I am trying to replace get_contract
with Tezos.get_entrypoint_opt
I need to transfer FA1.2 tokens in Dex: https://github.com/madfish-solutions/quipuswap-core/blob/master/contracts/Dex.ligo#L21-L28
operations := transaction(
Transfer(Tezos.sender, this, tokenAmount),
0mutez,
case (Tezos.get_entrypoint_opt("%transfer", s.tokenAddress) : option(contract(x))) of Some(contr) -> contr
| None -> (failwith("01"):contract(x))
end
) # operations;
But the entrypoint isn't found during execution. Deployed contract: https://better-call.dev/carthagenet/KT1PB7PCFS3F71FT8fbRmYsYX3ex8W7X5Vcw I have used this approach before and it worked fine:
operations := transaction(Transfer(Tezos.sender, this, tokenAmount), 0mutez, (get_contract(s.tokenAddress): contract(tokenAction))) # operations;
Deployed contract: https://better-call.dev/carthagenet/KT1KSpx5NY7FkY9PFBGRbYbui36rEF6agVWr Could someone advise something?