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

Document and figure out how to prevent double minting when using currentNEOTransfers API to mint tokens #2501

Open
spencercorwin opened this issue Jul 1, 2021 · 0 comments
Labels
area/compiler Categorize issue or PR as compiler (@neo-one/smart-contract-compiler) related area/documentation Categorize issue or PR as documentation related kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.

Comments

@spencercorwin
Copy link
Collaborator

We currently advice in docs and examples and mixins to use the currentNEOTransfers API to see when NEO has been sent to a contract. But there's a fatal flaw where someone could just keep calling the mintTokens method on the contract over and over to drain the ICO. Just need to add MapStorage to keep track in contract storage of which NEO transfers have already been counted by the method.

Make sure to document this in the relevant docs and examples.

@spencercorwin spencercorwin added area/compiler Categorize issue or PR as compiler (@neo-one/smart-contract-compiler) related area/documentation Categorize issue or PR as documentation related kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. labels Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/compiler Categorize issue or PR as compiler (@neo-one/smart-contract-compiler) related area/documentation Categorize issue or PR as documentation related kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now.
Projects
None yet
Development

No branches or pull requests

1 participant