Optimize constructor of ERC777 (#2551)
This commit is contained in:
committed by
GitHub
parent
ba1d773176
commit
62af16b9f2
@ -16,6 +16,7 @@
|
||||
* Overall reorganisation of the contract folder to improve clarity and discoverability. ([#2503](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2503))
|
||||
* `ERC20Capped`: optimize gas usage of by enforcing te check directly in `_mint`. ([#2524](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2524))
|
||||
* Rename `UpgradeableProxy` to `ERC1967Proxy`. ([#2547](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2547))
|
||||
* `ERC777`: Optimize the gas costs of the constructor. ([#2551](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2551))
|
||||
|
||||
### How to upgrade from 3.x
|
||||
|
||||
|
||||
@ -65,8 +65,8 @@ contract ERC777 is Context, IERC777, IERC20 {
|
||||
_symbol = symbol_;
|
||||
|
||||
_defaultOperatorsArray = defaultOperators_;
|
||||
for (uint256 i = 0; i < _defaultOperatorsArray.length; i++) {
|
||||
_defaultOperators[_defaultOperatorsArray[i]] = true;
|
||||
for (uint256 i = 0; i < defaultOperators_.length; i++) {
|
||||
_defaultOperators[defaultOperators_[i]] = true;
|
||||
}
|
||||
|
||||
// register interfaces
|
||||
|
||||
Reference in New Issue
Block a user