Simple Summary
Change the @constant decorator to @view for methods
Motivation
To be consistent with the ABI stateMutability field, we should use the term view instead of constant when decorating a method
Specification
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
Backwards Compatibility
Breaks backwards compatibility because of a name change.
Dependencies
No dependencies
References
Copyright
Copyright and related rights waived via CC0
Simple Summary
Change the
@constantdecorator to@viewfor methodsMotivation
To be consistent with the ABI
stateMutabilityfield, we should use the termviewinstead ofconstantwhen 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