neo-one icon indicating copy to clipboard operation
neo-one copied to clipboard

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

Open spencercorwin opened this issue 3 years ago • 0 comments

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 avatar Jul 01 '21 00:07 spencercorwin