Openzeppelin-contracts: Code Styling: ERC20.sol amount vs value

Created on 2 Oct 2018  路  3Comments  路  Source: OpenZeppelin/openzeppelin-contracts

馃帀 Description
馃枊 This is a styling report.
馃摑 Details

Use value vs amount for consistency. All other functions are using value

  function _mint(address account, uint256 amount) internal {

  function _burn(address account, uint256 amount) internal {

  function _burnFrom(address account, uint256 amount) internal {

https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20.sol

Suggestion:

Use value to be consistent across the board. Should check other contracts to be sure it's standardized across all contracts.

contracts

Most helpful comment

@Aniket-Engg feel free to open a PR with ths change! :)

All 3 comments

Yikes, you're right we should be consistent on this. Thanks!

(Thinking out loud here.) At some point I used to prefer amount for tokens and value for ether (as in msg.value), but now that I think about it, "token amount" has always been very ambiguous because people expect it to not include the decimal digits, yet the smart contract needs all of the decimal digits. Maybe value is less ambiguous, precisely because it carries over the intuition from msg.value being expressed in wei.

I think value will be good for consistency. If it is final, I can work on it. Please let me know @mswezey23 @frangio

@Aniket-Engg feel free to open a PR with ths change! :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mswezey23 picture mswezey23  路  4Comments

fulldecent picture fulldecent  路  3Comments

ryana picture ryana  路  4Comments

LogvinovLeon picture LogvinovLeon  路  4Comments

rstormsf picture rstormsf  路  4Comments