We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Change the @constant decorator to @view for methods
@constant
@view
To be consistent with the ABI stateMutability field, we should use the term view instead of constant when decorating a method
stateMutability
view
constant
Contracts and Vyper interfaces should be specified using the following syntax to denote a method that does not modify state:
@view @public def getSender() -> address: return msg.sender
Breaks backwards compatibility because of a name change.
No dependencies
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered:
Violent agreement!
Sorry, something went wrong.
fubuloubu
Successfully merging a pull request may close this issue.
Simple Summary
Change the
@constant
decorator to@view
for methodsMotivation
To be consistent with the ABI
stateMutability
field, we should use the termview
instead ofconstant
when decorating a methodSpecification
Contracts and Vyper interfaces should be specified using the following syntax to denote a method that does not modify state:
Backwards Compatibility
Breaks backwards compatibility because of a name change.
Dependencies
No dependencies
References
Copyright
Copyright and related rights waived via CC0
The text was updated successfully, but these errors were encountered: