How 'callback' parameter must be used?

Hi, I don’t understand how callback must be used in the balance_of entrypoint. Can someone give me any example? Thanks

The Getter contract here gives an example: the getter entrypoint calls balance_of and then the _setter entrypoint receives the callback.

1 Like

Thanks for answer.
I have already seen that but i don’t totally understand what actually the callback is or does.
Can you help me with a easier example?

The callback is a transfer of 0 tez done by the FA2 contract to the entrypoint given to balance_of.

The associated argument is a list of requests (owner and token_id) and response (balance).
The list contains the exact same requests (in the same order and without de-duplication) as given in the balance_of parameter and it associates an answer: the number of tokens owned by the owner for the given token id.

Ok now i understand! Thanks