Commit e808a646 by Francisco Giordano

rename internal initializers

parent a221c17f
......@@ -12,7 +12,7 @@ contract CapperRole is Initializable {
Roles.Role private _cappers;
function initialize(address sender) public initializer {
function _initialize(address sender) internal initializer {
if (!isCapper(sender)) {
_addCapper(sender);
}
......
......@@ -12,7 +12,7 @@ contract MinterRole is Initializable {
Roles.Role private _minters;
function initialize(address sender) public initializer {
function _initialize(address sender) internal initializer {
if (!isMinter(sender)) {
_addMinter(sender);
}
......
......@@ -12,7 +12,7 @@ contract PauserRole is Initializable {
Roles.Role private _pausers;
function initialize(address sender) public initializer {
function _initialize(address sender) internal initializer {
if (!isPauser(sender)) {
_addPauser(sender);
}
......
......@@ -12,7 +12,7 @@ contract SignerRole is Initializable {
Roles.Role private _signers;
function initialize(address sender) public initializer {
function _initialize(address sender) internal initializer {
if (!isSigner(sender)) {
_addSigner(sender);
}
......
......@@ -18,7 +18,7 @@ contract IndividuallyCappedCrowdsale is Initializable, Crowdsale, CapperRole {
function initialize(address sender) public initializer {
assert(Crowdsale._hasBeenInitialized());
CapperRole.initialize(sender);
CapperRole._initialize(sender);
}
/**
......
......@@ -44,8 +44,8 @@ contract SignatureBouncer is Initializable, SignerRole {
// Signature size is 65 bytes (tightly packed v + r + s), but gets padded to 96 bytes
uint256 private constant _SIGNATURE_SIZE = 96;
function initialize(address sender) internal initializer {
SignerRole.initialize(sender);
function _initialize(address sender) internal initializer {
SignerRole._initialize(sender);
}
/**
......
......@@ -4,7 +4,7 @@ import "../access/roles/CapperRole.sol";
contract CapperRoleMock is CapperRole {
constructor() public {
CapperRole.initialize(msg.sender);
CapperRole._initialize(msg.sender);
}
function removeCapper(address account) public {
......
......@@ -4,7 +4,7 @@ import "../access/roles/MinterRole.sol";
contract MinterRoleMock is MinterRole {
constructor() public {
MinterRole.initialize(msg.sender);
MinterRole._initialize(msg.sender);
}
function removeMinter(address account) public {
......
......@@ -4,7 +4,7 @@ import "../access/roles/PauserRole.sol";
contract PauserRoleMock is PauserRole {
constructor () public {
PauserRole.initialize(msg.sender);
PauserRole._initialize(msg.sender);
}
function removePauser(address account) public {
......
......@@ -4,7 +4,7 @@ import "../access/roles/SignerRole.sol";
contract SignerRoleMock is SignerRole {
constructor() public {
SignerRole.initialize(msg.sender);
SignerRole._initialize(msg.sender);
}
function removeSigner(address account) public {
......
......@@ -12,7 +12,7 @@ import "./escrow/Escrow.sol";
contract PullPayment is Initializable {
Escrow private _escrow;
function initialize() internal initializer {
function _initialize() internal initializer {
// conditional added to make initializer idempotent in case of diamond inheritance
if (address(_escrow) == address(0)) {
_escrow = new Escrow();
......
......@@ -10,7 +10,7 @@ import "../../access/roles/MinterRole.sol";
*/
contract ERC20Mintable is Initializable, ERC20, MinterRole {
function initialize(address sender) public initializer {
MinterRole.initialize(sender);
MinterRole._initialize(sender);
}
/**
......
......@@ -13,7 +13,7 @@ contract ERC721MetadataMintable is Initializable, ERC721, ERC721Metadata, Minter
function initialize(address sender) public initializer {
require(ERC721._hasBeenInitialized());
require(ERC721Metadata._hasBeenInitialized());
MinterRole.initialize(sender);
MinterRole._initialize(sender);
}
/**
......
......@@ -11,7 +11,7 @@ import "../../access/roles/MinterRole.sol";
contract ERC721Mintable is Initializable, ERC721, MinterRole {
function initialize(address sender) public initializer {
require(ERC721._hasBeenInitialized());
MinterRole.initialize(sender);
MinterRole._initialize(sender);
}
/**
......
......@@ -4955,6 +4955,7 @@
"integrity": "sha1-pFVBdc1GKUMDWx8dOUMvdBxrYBk=",
"dev": true,
"requires": {
"bignumber.js": "git+https://github.com/debris/bignumber.js.git#c7a38de919ed75e6fb6ba38051986e294b328df9",
"crypto-js": "^3.1.4",
"utf8": "^2.1.1",
"xmlhttprequest": "*"
......@@ -4962,7 +4963,8 @@
"dependencies": {
"bignumber.js": {
"version": "git+https://github.com/debris/bignumber.js.git#c7a38de919ed75e6fb6ba38051986e294b328df9",
"from": "git+https://github.com/debris/bignumber.js.git#c7a38de919ed75e6fb6ba38051986e294b328df9"
"from": "git+https://github.com/debris/bignumber.js.git#master",
"dev": true
}
}
}
......@@ -15446,6 +15448,7 @@
"integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=",
"dev": true,
"requires": {
"bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
"crypto-js": "^3.1.4",
"utf8": "^2.1.1",
"xhr2": "*",
......@@ -15454,7 +15457,8 @@
"dependencies": {
"bignumber.js": {
"version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
"from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"
"from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git",
"dev": true
},
"crypto-js": {
"version": "3.1.8",
......@@ -15485,6 +15489,7 @@
"integrity": "sha512-VU6/DSUX93d1fCzBz7WP/SGCQizO1rKZi4Px9j/3yRyfssHyFcZamMw2/sj4E8TlfMXONvZLoforR8B4bRoyTQ==",
"dev": true,
"requires": {
"bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
"crypto-js": "^3.1.4",
"utf8": "^2.1.1",
"xhr2-cookies": "^1.1.0",
......@@ -15493,7 +15498,8 @@
"dependencies": {
"bignumber.js": {
"version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
"from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"
"from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git",
"dev": true
}
}
}
......@@ -16089,9 +16095,9 @@
"dev": true
},
"truffle-flattener": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/truffle-flattener/-/truffle-flattener-1.2.9.tgz",
"integrity": "sha512-BsxNpXzWAYUKdWCaVvSh5+F806LWBpNyRRATdExh3Qm4IkAH9KaKtKBZjQYjBDZ4RuFfdn1hmBH7Yg29WVUR4g==",
"version": "1.2.10",
"resolved": "https://registry.npmjs.org/truffle-flattener/-/truffle-flattener-1.2.10.tgz",
"integrity": "sha512-YZTez8gghcI/87tALjR4tLEX5wztZ6ycazIOJlMerGrcep1I5vOCqwgSYI4HZOyRbBUGLMOnuGckX+oIVhaTaw==",
"dev": true,
"requires": {
"chalk": "^2.4.1",
......@@ -16114,9 +16120,9 @@
}
},
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
......@@ -16483,10 +16489,18 @@
"integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=",
"dev": true,
"requires": {
"bignumber.js": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
"crypto-js": "^3.1.4",
"utf8": "^2.1.1",
"xhr2": "*",
"xmlhttprequest": "*"
},
"dependencies": {
"bignumber.js": {
"version": "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934",
"from": "git+https://github.com/frozeman/bignumber.js-nolookahead.git",
"dev": true
}
}
}
}
......@@ -16716,6 +16730,15 @@
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
"dev": true
},
"typedarray-to-buffer": {
"version": "3.1.5",
"resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz",
"integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==",
"dev": true,
"requires": {
"is-typedarray": "^1.0.0"
}
},
"uglify-js": {
"version": "2.8.29",
"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz",
......@@ -17801,7 +17824,8 @@
"dev": true,
"requires": {
"underscore": "1.8.3",
"web3-core-helpers": "1.0.0-beta.37"
"web3-core-helpers": "1.0.0-beta.37",
"websocket": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
},
"dependencies": {
"underscore": {
......@@ -17809,16 +17833,6 @@
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz",
"integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=",
"dev": true
},
"websocket": {
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"from": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"requires": {
"debug": "^2.2.0",
"nan": "^2.3.3",
"typedarray-to-buffer": "^3.1.2",
"yaeti": "^0.0.6"
}
}
}
},
......@@ -18389,6 +18403,17 @@
}
}
},
"websocket": {
"version": "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2",
"from": "git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible",
"dev": true,
"requires": {
"debug": "^2.2.0",
"nan": "^2.3.3",
"typedarray-to-buffer": "^3.1.2",
"yaeti": "^0.0.6"
}
},
"wget-improved": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/wget-improved/-/wget-improved-1.5.0.tgz",
......@@ -18621,6 +18646,12 @@
"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz",
"integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE="
},
"yaeti": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz",
"integrity": "sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc=",
"dev": true
},
"yallist": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz",
......@@ -19609,21 +19640,23 @@
}
},
"zos-lib": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/zos-lib/-/zos-lib-2.0.0.tgz",
"integrity": "sha512-uFRFeKUTUHBwnYH81NIMw4/69YX5tSMbhxeIJ+xRYdfKIk8IcvLqE6BHYma2auMiM4inOK8WPLBovIF9QzQDEg==",
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/zos-lib/-/zos-lib-2.1.0.tgz",
"integrity": "sha512-HLjo31UKwjj1hbdyXuG7JM/UKVx/cmUh5BG9usguIrpueVDUWS60x/+k8JtVPv6214TLQTfZ/UJRReuDmMrnGQ==",
"dev": true,
"requires": {
"axios": "^0.18.0",
"bignumber.js": "^7.2.0",
"chalk": "^2.4.1",
"ethereumjs-abi": "^0.6.5",
"glob": "^7.1.3",
"openzeppelin-solidity": "~1.10.0",
"semver": "^5.5.1",
"truffle-config": "^1.0.6",
"truffle-contract": "^3.0.6",
"truffle-config": "1.0.6",
"truffle-contract": "3.0.6",
"truffle-flattener": "^1.2.8",
"truffle-provisioner": "^0.1.1",
"truffle-provider": "0.0.6",
"truffle-provisioner": "0.1.1",
"web3": "^0.18.4"
},
"dependencies": {
......@@ -19643,9 +19676,9 @@
"dev": true
},
"chalk": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz",
"integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==",
"version": "2.4.2",
"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
"dev": true,
"requires": {
"ansi-styles": "^3.2.1",
......
......@@ -61,10 +61,10 @@
"solidity-coverage": "^0.5.4",
"truffle": "^4.1.13",
"web3-utils": "^1.0.0-beta.34",
"zos": "^2.0.0"
"zos": "^2.0.0",
"zos-lib": "^2.1.0"
},
"peerDependencies": {
"zos-lib": "^2.0.0"
},
"dependencies": {}
"zos-lib": "^2.1.0"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment