I have a token contract (let's say it TC) and creating a contract Wallet. Now, is it possible for a user to call Wallet's entrypoint deposit which will do an inter-contract call to TC's transfer entrypoint to transfer some of the user's token to the Wallet? Since TC will check that the sender is the owner of those tokens, it'll require keeping the sender the same when doing the inter-contract call.

2 Answers 2


SENDER always points to the caller's address.

SOURCE points to the implicit account that initiated the current transaction.

enter image description here

SmartPY example: https://smartpy.io/ide?cid=QmevNhUmzeDBzi5uYyxcWdMphrqurJz8TGiVQpeJRgKu58&k=1adea9375ecba75eaab6

  • Since I can't change the token contract, any suggestion to implement the Wallet contract? Or the user has to explicitly call the transfer entypoint everytime to transfer tokens to the Wallet (even then how will my Wallet know that this user transferred those tokens)?
    – tichnas
    Commented Jun 11, 2021 at 10:23

You might want to have a look at a feature called "tickets". An application of tickets is to use them as authentication tokens that can be transmitted across contract call chains.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.