Merge pull request #917 from hjorthjort/patch-1

Change `constant` modifier to `view` in functions
This commit is contained in:
Nick Savers 2018-03-20 11:44:16 +01:00 committed by GitHub
commit 69e9dfedfd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,7 @@ but interfaces and other contracts MUST NOT expect these values to be present.
``` js ``` js
function name() constant returns (string name) function name() view returns (string name)
``` ```
@ -54,7 +54,7 @@ OPTIONAL - This method can be used to improve usability,
but interfaces and other contracts MUST NOT expect these values to be present. but interfaces and other contracts MUST NOT expect these values to be present.
``` js ``` js
function symbol() constant returns (string symbol) function symbol() view returns (string symbol)
``` ```
@ -67,7 +67,7 @@ OPTIONAL - This method can be used to improve usability,
but interfaces and other contracts MUST NOT expect these values to be present. but interfaces and other contracts MUST NOT expect these values to be present.
``` js ``` js
function decimals() constant returns (uint8 decimals) function decimals() view returns (uint8 decimals)
``` ```
@ -76,7 +76,7 @@ function decimals() constant returns (uint8 decimals)
Returns the total token supply. Returns the total token supply.
``` js ``` js
function totalSupply() constant returns (uint256 totalSupply) function totalSupply() view returns (uint256 totalSupply)
``` ```
@ -86,7 +86,7 @@ function totalSupply() constant returns (uint256 totalSupply)
Returns the account balance of another account with address `_owner`. Returns the account balance of another account with address `_owner`.
``` js ``` js
function balanceOf(address _owner) constant returns (uint256 balance) function balanceOf(address _owner) view returns (uint256 balance)
``` ```
@ -138,7 +138,7 @@ function approve(address _spender, uint256 _value) returns (bool success)
Returns the amount which `_spender` is still allowed to withdraw from `_owner`. Returns the amount which `_spender` is still allowed to withdraw from `_owner`.
``` js ``` js
function allowance(address _owner, address _spender) constant returns (uint256 remaining) function allowance(address _owner, address _spender) view returns (uint256 remaining)
``` ```