Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mint/Transfer return optimisation #110

Closed
abright opened this issue Sep 23, 2022 · 1 comment
Closed

Mint/Transfer return optimisation #110

abright opened this issue Sep 23, 2022 · 1 comment

Comments

@abright
Copy link
Contributor

abright commented Sep 23, 2022

Follows on from #103 (comment)

The new model requires querying balance and allowance data separately after every mint or transfer is completed, in order to deal with possible actions taken inside the receiver hook. If state didn't change inside the receiver hook call, we could safely use the values we get from within the mint/transfer implementations.

It should be easy to pass through those values in the intermediate data so they are ready for use, the tricky part here is knowing when the state is 'dirty' and we need to query fresh values. We could save the root CID in there as part of making the hook call and compare it afterwards (in mint_return) to decide but maybe there's a better way to do it?

@abright
Copy link
Contributor Author

abright commented Feb 14, 2023

Closing this and continuing on in #139

@abright abright closed this as completed Feb 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant