when calling transfer method, how to call hook method on received smart contract. I'm using fa2 in smartpy

  • What is your scenario, are you calling from another contract or from an app?
    – FFF
    Aug 28 '20 at 9:51
  • when contract received the token, I want to recording in contract. 'when' 'who' 'how much' . so I need hook function like ERC777TokensRecipient And The tokensReceived Hook on ethereum
    – MS.J
    Aug 31 '20 at 0:32
  • Receiver hooks in FA2 are optional. If the particular implementation of the FA2 supports receiver hooks, you receiver contract may implement tokens_received entry point. See FA2 token owner hook and some example implementation. However due to inter-contract calls gas costs, most of the existing FA2 implementations choose not to support sender/receiver hooks Sep 1 '20 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.