Rename events to past-tense (#1181)
This commit is contained in:
@ -18,8 +18,21 @@ Any exception or additions specific to our project are documented below.
|
||||
|
||||
* Parameters must be prefixed with an underscore.
|
||||
|
||||
```
|
||||
function test(uint256 _testParameter1, uint256 _testParameter2) {
|
||||
```
|
||||
function test(uint256 _testParameter1, uint256 _testParameter2) {
|
||||
...
|
||||
}
|
||||
```
|
||||
}
|
||||
```
|
||||
|
||||
* Events should be emitted immediately after the state change that they
|
||||
represent, and consequently they should be named in past tense.
|
||||
|
||||
```
|
||||
function _burn(address _who, uint256 _value) internal {
|
||||
super._burn(_who, _value);
|
||||
emit TokensBurned(_who, _value);
|
||||
}
|
||||
```
|
||||
|
||||
Some standards (e.g. ERC20) use present tense, and in those cases the
|
||||
standard specification prevails.
|
||||
|
||||
Reference in New Issue
Block a user