I haven't tested this, but as far as I understand it seems like wallet clients should only construct a transaction that triggers the smart contract during verification when mintTokens is called. Otherwise, it will run verification for mintTokens even though another method is actually the one being called.
Instead, I propose that we change the verification trigger to also check the method invoked and only run the can_exchange verification if that method is mintTokens. This way, clients can always trigger verification which has a few benefits:
- Wallet clients can uniformly invoke the contract in a way that always triggers verification, regardless of the method called
- Smart contract authors can assume that their smart contract will be invoked during verification for all methods so they can implement automatic rejection of transactions for more than just
mintTokens - i.e. this makes it more generalized and not specific to just NEP-5 ICO crowdsales.
I haven't tested this, but as far as I understand it seems like wallet clients should only construct a transaction that triggers the smart contract during verification when
mintTokensis called. Otherwise, it will run verification formintTokenseven though another method is actually the one being called.Instead, I propose that we change the verification trigger to also check the method invoked and only run the
can_exchangeverification if that method ismintTokens. This way, clients can always trigger verification which has a few benefits:mintTokens- i.e. this makes it more generalized and not specific to just NEP-5 ICO crowdsales.