A quick question regarding sending tokens from a smart contract:
in the doc, I am reading this:
https://docs.elrond.com/developers/developer-reference/elrond-wasm-api-functions/#direct
This will fail if the destination is a non-payable smart contract, but the current executing transaction will not fail, and as such, any changes done to the storage will persist. The tokens will not be lost though, as they will be automatically returned.
Is there a way to check if the caller is a non-payable smart contract?
If yes, is there any way to send tokens to the caller contract at the end the said contract calling my contract?
There is no way of checking the a contract's metadata.