In the Fuel VM it is not possible to send a SRC20 token to a contract, and then have the contract send the SRC20 token back to you in a single transaction.
The following transfer is not possible in the Fuel VM:
A => B => A
Where user A sends an SRC20 token to contract B and then contract B returns the SRC20 token back to user A, all within the same transaction.
I was wondering where is this specified in the Fuel documentation? Where can I find a good link that references this constraint of the Fuel VM?
This conflicts with what other Fuel engineers have mentioned in various telegram chats.
Alexander John Lee:
Hello all, just want to tripple check. In the Fuel VM it is not possible to send a SRC20 token to a contract, and then have the contract send the SRC20 token back to you in a single transaction. Is this true? If so, is there a link to this VM nuance in the docs?
Egor:
Yes, you’re correct. In the Fuel VM, it is not possible to send an SRC20 token to a contract and have the contract send the SRC20 token back to you in a single transaction.
I also have heard this from other Fuel engineers, would reference these messages, however, these are from private chats I no longer have access to.
It seems like there was some confusion regarding this functionality, but it looks like it’s actually possible to send an SRC20 token to a contract and have it returned in the same transaction, as demonstrated with the correct usage of VariableOutputPolicy. Glad to hear it worked after sorting out the configuration. It might be helpful for the documentation to clarify this point, as it seems there was a misunderstanding about the Fuel VM’s capabilities!