-
Notifications
You must be signed in to change notification settings - Fork 12.3k
Closed
Labels
breaking changeChanges that break backwards compatibility of the public API.Changes that break backwards compatibility of the public API.contractsSmart contract code.Smart contract code.
Milestone
Description
Solidity adds public getters to public state variables. This is kind of magical and dark, and could lead to mistakes.
We should be more explicit on everything we do, to make the code clearer and easier to review. So let's get rid of the automatic getters making all the public state variables private. If the variable has to be accessed from outside of the contract, we should add a getter function that should be either internal or public, depending on how the contracat is designed.
This gives us an extra benefit because the state variables will be implementation details and this allows us to make some changes without modifying the public API of the contract.
frangio and adria0
Metadata
Metadata
Assignees
Labels
breaking changeChanges that break backwards compatibility of the public API.Changes that break backwards compatibility of the public API.contractsSmart contract code.Smart contract code.