Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
bd51db5b
Commit
bd51db5b
authored
Aug 26, 2019
by
Mitar
Committed by
Francisco Giordano
Oct 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Syncing naming of value and amount. (#1895)
(cherry picked from commit
5d183d0e
)
parent
25b82b0d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
ERC20.sol
contracts/token/ERC20/ERC20.sol
+10
-10
No files found.
contracts/token/ERC20/ERC20.sol
View file @
bd51db5b
...
@@ -78,8 +78,8 @@ contract ERC20 is Context, IERC20 {
...
@@ -78,8 +78,8 @@ contract ERC20 is Context, IERC20 {
*
*
* - `spender` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
*/
function approve(address spender, uint256
value
) public returns (bool) {
function approve(address spender, uint256
amount
) public returns (bool) {
_approve(_msgSender(), spender,
value
);
_approve(_msgSender(), spender,
amount
);
return true;
return true;
}
}
...
@@ -91,7 +91,7 @@ contract ERC20 is Context, IERC20 {
...
@@ -91,7 +91,7 @@ contract ERC20 is Context, IERC20 {
*
*
* Requirements:
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `
value
`.
* - `sender` must have a balance of at least `
amount
`.
* - the caller must have allowance for `sender`'s tokens of at least
* - the caller must have allowance for `sender`'s tokens of at least
* `amount`.
* `amount`.
*/
*/
...
@@ -188,12 +188,12 @@ contract ERC20 is Context, IERC20 {
...
@@ -188,12 +188,12 @@ contract ERC20 is Context, IERC20 {
* - `account` cannot be the zero address.
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
* - `account` must have at least `amount` tokens.
*/
*/
function _burn(address account, uint256
value
) internal {
function _burn(address account, uint256
amount
) internal {
require(account != address(0), "ERC20: burn from the zero address");
require(account != address(0), "ERC20: burn from the zero address");
_balances[account] = _balances[account].sub(
value
, "ERC20: burn amount exceeds balance");
_balances[account] = _balances[account].sub(
amount
, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(
value
);
_totalSupply = _totalSupply.sub(
amount
);
emit Transfer(account, address(0),
value
);
emit Transfer(account, address(0),
amount
);
}
}
/**
/**
...
@@ -209,12 +209,12 @@ contract ERC20 is Context, IERC20 {
...
@@ -209,12 +209,12 @@ contract ERC20 is Context, IERC20 {
* - `owner` cannot be the zero address.
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
*/
function _approve(address owner, address spender, uint256
value
) internal {
function _approve(address owner, address spender, uint256
amount
) internal {
require(owner != address(0), "ERC20: approve from the zero address");
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] =
value
;
_allowances[owner][spender] =
amount
;
emit Approval(owner, spender,
value
);
emit Approval(owner, spender,
amount
);
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment