I have some troubles to call a contract.
This is the scenario:
Contract B (Entrypoint method "transfer"):
(pair %transfer (bytes %args1)
(pair (string %args2)
(pair (string %args3)
(pair (address %args4)
(pair (address %args5)
(nat %args6))))))
Contract A (which will call Contract B entrypoint method "transfer"):
type transfer is Transfer of (bytes * (string * (string * (address * (address * nat)))))
const contract : contract(transfer) =
case (Tezos.get_entrypoint_opt("%transfer", contractAddress): option(contract(transfer))) of
| Some (c) -> c
| None -> (failwith("not a correct contract") : contract(transfer))
end;
I am quite sure, something inside this statement is wrong for some reason
"type transfer is Transfer of (bytes * (string * (string * (address * (address * nat)))))"
But everytime failwith("not a correct contract") will be triggered 🙁
PS: I tried to call another method on contract B with only three parameters:
type approve is Approve of (bytes * (string * string))
Everything works fine with three parameters. But if I need to call a method with some more parameters, it fails.
Can somebody help ?
Thanks in advance!