Skip to content

Allow Verification trigger to be called for all methods #8

@dicarlo2

Description

@dicarlo2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions