What is the strategy for "complete" calls?

DFINITY’s main implentation of ICRC-1 has two additional endpoints, one called get_transactions and one called get_blocks, that allows you to verify that a certain transaction really happened.

Keep in mind that those endpoints are not standard. ICRC-1 doesn’t have a way to check the transactions log. That will be an extension called ICRC-3 but it is yet to be discussed by the working group.

If you want to use ICRC-1 only then the approach is to use subaccounts and icrc1_balance_of to check payments. A payer would transfer tokens to a subaccount of the receiver that is calculated from the payer principal and the invoice id (e.g. the sha256 of the bytes concatenation).

1 Like

What’s about the following strategy?

On a shared call f save changes in a (stable) variable, such as of BTree type. Every say 100 calls “commit”: set a flag disabling f calls and commit all 100 calls to a CanDB DB.

Is it a good strategy?

It has the advantage that this way the queue (or other data structure) of queued operations won’t overflow canister memory, because our stable variable will all the time have no more than 100 members.