#clawback with Stellar asset wrapped with SAC

4 messages · Page 1 of 1 (latest)

cobalt violet
#

I'm having trouble with the clawback function of the SAC. I've tried this

soroban contract invoke --id CAWKSIJM64CVZ6OLBSRSVSFGEOONPILQL6HGSCHHOSKEBNSYEU3Q4IJE --network Futurenet --source-account signer1 -- clawback --from GBXNUXRDE4ONBVIFHWI24LB36ZGHX2K3T5C4IJSYVI4EU56ICOTOQLWT --amount 25

where signer1 is the admin/issuer. The error is:
error: transaction simulation failed: HostError: Error(Value, InvalidInput)
DebugInfo not available

I know that means the SAC trapped, but those parameters match the expected input, address and i128. It also fails (same error) in this runkit trying to do the same thing with soroban-client using the same parameters. It traps in the .prepareTransaction call.
https://runkit.com/lmorgan824/soroban-sac-clawback-example-09062023

Any thoughts?

oblique dagger
#

(away from my computer at the moment, so I can't really look anything up)

Did you configure the issuing account with all the required flags and such to enable clawbacks? And before the GBX...LWT account created the trustline?

Since a SAC token is a wrapped stellar asset, it would need all the regular stellar stuff to make the clawbacks work

cobalt violet
#

Ah, that’s it. Thanks, I’ll reconfigure and try again!

cobalt violet
#

Just to follow up, @oblique dagger nailed it. After configuring the issuing account for revocable, clawback BEFORE establishing trustlines, clawback works as intended via the wrapped SAC asset. By tomorrow, I'll be posting a bunch of small runkits that control a SAC token with the JS soroban-client. I'll also post these in our Soroban Smart Option Contract repo. FWIW, I know it's really early on for Soroban, but in the future, if these types of errors had just a little more verbosity propagated up from the host as to why something traps, it would probably help devs in the future.