-
Notifications
You must be signed in to change notification settings - Fork 31
Calling Balance_of
(or get_balance
) from CameLIGO test
#99
Comments
The callback type required is not a function but an other contract entry point But I am not sure how Ligo test framework works with multi-contract tests. If it does not help you may ask Ligo team |
Thank you very much for your speedy response. I will look into this. |
Hello,
I have added you as a collaborator to this private repository in case you need to see more information. |
let cb_opt: balance_of_response list inspector_contract option =
Tezos.get_entrypoint_opt "%response" inspector_contract it. looks like wrong callback type. Shouldn't it be let cb_opt: balance_of_response list contract option =
Tezos.get_entrypoint_opt "%response" inspector_contract ? |
Hmm, with that change I get, |
let cb_opt: balance_of_response list contract option =
Tezos.get_entrypoint_opt "%response" inspector_addr |
With that change, I get |
The new Marigold tutorial has a callback example at |
I think you cannot mix |
Ah... I will try that, thank you |
Hello,
I want to call the
Balance_of
entrypoint for a standard FA2 contract in a CameLIGO unit test (or it's "implementation"get_balance
).I am trying to formulate the correct
balance_of_request.callback
parameter, but the continuation-passing style is giving me trouble - I cannot conjure up the correct incantation.Below is the test in development. Notice that I typed all the parameters, and broke everything down completely, to isolate completely the error.
The problem I have is only with the
callback
parameter ("Cannot unify ..."). I have tried a number of things, but I cannot get the right incantation.My last effort has been trying to pass a
fun
to the callback, because I thought it might require a fun going frombalance_of_response list
tocontract
. It is a unique signature amongst all the other ones with which I have successfully worked.What is the correct incantation such that I can get the above to pass? You can see what I'm trying to do, I hope?
I will also take this opportunity to thank you very much for the significant value I have derived from this repository.
Cheers!
Edward Garson
Developer Evangelist @ ECAD Labs
The text was updated successfully, but these errors were encountered: