It seems that my smart contract cannot find the transfer operation of my FA2 other smart contract. Here is where the error is being thrown.

  case (Tezos.get_entrypoint_opt("%transfer", tokenAddress) : option(contract(transferType))) of
  Some(contr) -> contr
  | None -> (failwith("CantGetContractToken") : contract(transferType))

tokenAddress is set to the correct field. On better-call-dev the entrypoint is named transfer and it complies with the FA2 standard. The contract doing this request has operator privileges. Is there something I have overlooked?

  • Most of the time when Tezos.get_entrypoint_opt doesn't seem to work when the contract is deployed is because the Michelson type of the transfer entrypoint parameter is different from the Ligo type (here transferType). Double-check it both in the Ligo contract and its Michelson output, as well as in the contract call parameters. Aug 27, 2021 at 13:39


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.