Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Applied the suggestion by nico
  • Loading branch information
Leo Arias committed Aug 28, 2018
commit e2c1e6003f983a93a486f668bb99aaf86a77c27e
18 changes: 14 additions & 4 deletions CODE_STYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we provide a couple examples? I'd add a note mentioning that some standards (e.g. ERC20) use present tense, and in those cases the spec prevails.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good ideas @nventuro! Please check if you like it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great!


```
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.