Skip to content

Commit a83f680

Browse files
committed
Merge branch 'release-v2.3.0'
2 parents a71c3bc + 132e442 commit a83f680

File tree

7 files changed

+40
-44
lines changed

7 files changed

+40
-44
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## 2.3.0 (unreleased)
3+
## 2.3.0 (2019-05-27)
44

55
### New features:
66
* `ERC1820`: added support for interacting with the [ERC1820](https://eips.ethereum.org/EIPS/eip-1820) registry contract (`IERC1820Registry`), as well as base contracts that can be registered as implementers there. ([#1677](https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1677))

contracts/token/ERC777/ERC777.sol

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ contract ERC777 is IERC777, IERC20 {
122122
}
123123

124124
/**
125-
* @dev Returns the amount of tokens owned by an account (`owner`).
125+
* @dev Returns the amount of tokens owned by an account (`tokenHolder`).
126126
*/
127127
function balanceOf(address tokenHolder) public view returns (uint256) {
128128
return _balances[tokenHolder];
@@ -252,8 +252,8 @@ contract ERC777 is IERC777, IERC20 {
252252
* not have allowance, and accounts with allowance may not be operators
253253
* themselves.
254254
*/
255-
function allowance(address owner, address spender) public view returns (uint256) {
256-
return _allowances[owner][spender];
255+
function allowance(address holder, address spender) public view returns (uint256) {
256+
return _allowances[holder][spender];
257257
}
258258

259259
/**
@@ -262,7 +262,8 @@ contract ERC777 is IERC777, IERC20 {
262262
* Note that accounts cannot have allowance issued by their operators.
263263
*/
264264
function approve(address spender, uint256 value) external returns (bool) {
265-
_approve(msg.sender, spender, value);
265+
address holder = msg.sender;
266+
_approve(holder, spender, value);
266267
return true;
267268
}
268269

@@ -275,18 +276,18 @@ contract ERC777 is IERC777, IERC20 {
275276
*
276277
* Emits `Sent` and `Transfer` events.
277278
*/
278-
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) {
279+
function transferFrom(address holder, address recipient, uint256 amount) external returns (bool) {
279280
require(recipient != address(0), "ERC777: transfer to the zero address");
280-
require(sender != address(0), "ERC777: transfer from the zero address");
281+
require(holder != address(0), "ERC777: transfer from the zero address");
281282

282-
address operator = msg.sender;
283+
address spender = msg.sender;
283284

284-
_callTokensToSend(operator, sender, recipient, amount, "", "");
285+
_callTokensToSend(spender, holder, recipient, amount, "", "");
285286

286-
_move(operator, sender, recipient, amount, "", "");
287-
_approve(sender, operator, _allowances[sender][operator].sub(amount));
287+
_move(spender, holder, recipient, amount, "", "");
288+
_approve(holder, spender, _allowances[holder][spender].sub(amount));
288289

289-
_callTokensReceived(operator, sender, recipient, amount, "", "", false);
290+
_callTokensReceived(spender, holder, recipient, amount, "", "", false);
290291

291292
return true;
292293
}
@@ -406,14 +407,14 @@ contract ERC777 is IERC777, IERC20 {
406407
emit Transfer(from, to, amount);
407408
}
408409

409-
function _approve(address owner, address spender, uint256 value) private {
410+
function _approve(address holder, address spender, uint256 value) private {
410411
// TODO: restore this require statement if this function becomes internal, or is called at a new callsite. It is
411412
// currently unnecessary.
412-
//require(owner != address(0), "ERC777: approve from the zero address");
413+
//require(holder != address(0), "ERC777: approve from the zero address");
413414
require(spender != address(0), "ERC777: approve to the zero address");
414415

415-
_allowances[owner][spender] = value;
416-
emit Approval(owner, spender, value);
416+
_allowances[holder][spender] = value;
417+
emit Approval(holder, spender, value);
417418
}
418419

419420
/**

contracts/token/ERC777/IERC777.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ interface IERC777 {
5959
function send(address recipient, uint256 amount, bytes calldata data) external;
6060

6161
/**
62-
* @dev Destoys `amount` tokens from the caller's account, reducing the
62+
* @dev Destroys `amount` tokens from the caller's account, reducing the
6363
* total supply.
6464
*
6565
* If a send hook is registered for the caller, the corresponding function
@@ -114,7 +114,7 @@ interface IERC777 {
114114
* them.
115115
*
116116
* This list is immutable, but individual holders may revoke these via
117-
*`revokeOperator`, in which case `isOperatorFor` will return false.
117+
* `revokeOperator`, in which case `isOperatorFor` will return false.
118118
*/
119119
function defaultOperators() external view returns (address[] memory);
120120

ethpm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"package_name": "zeppelin",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"description": "Secure Smart Contract library for Solidity",
55
"authors": [
66
"OpenZeppelin Community <[email protected]>"

package-lock.json

Lines changed: 17 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openzeppelin-solidity",
3-
"version": "2.2.0",
3+
"version": "2.3.0",
44
"description": "Secure Smart Contract library for Solidity",
55
"files": [
66
"build",
@@ -59,7 +59,7 @@
5959
"ganache-cli-coverage": "https://github.com/frangio/ganache-cli/releases/download/v6.4.1-coverage/ganache-cli-coverage-6.4.1.tgz",
6060
"micromatch": "^4.0.2",
6161
"nodemon": "^1.19.0",
62-
"openzeppelin-docsite": "github:OpenZeppelin/openzeppelin-docsite#22388b7a891a6fcdd333efef9e4f7f584ae5b826",
62+
"openzeppelin-docsite": "github:OpenZeppelin/openzeppelin-docsite#ee1df82d52ad3df4337b20392627975091f8d5b3",
6363
"openzeppelin-test-helpers": "^0.4",
6464
"solhint": "^1.5.0",
6565
"solidity-coverage": "github:rotcivegaf/solidity-coverage#5875f5b7bc74d447f3312c9c0e9fc7814b482477",

scripts/release/release.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ elif [[ "$*" == "rc" ]]; then
8888
assert_current_branch "$(current_release_branch)"
8989

9090
# Bumps rc number, commits and tags
91-
npm version prelease
91+
npm version prerelease
9292

9393
push_and_publish next
9494

0 commit comments

Comments
 (0)