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))
end;
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?
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 (heretransferType
). Double-check it both in the Ligo contract and its Michelson output, as well as in the contract call parameters.