Commit e3575922 by Francisco Giordano

fix linter errors

parent f3635e15
...@@ -12,7 +12,7 @@ contract CapperRole is Initializable { ...@@ -12,7 +12,7 @@ contract CapperRole is Initializable {
Roles.Role private _cappers; Roles.Role private _cappers;
function _initialize(address sender) internal initializer { function initialize(address sender) public initializer {
if (!isCapper(sender)) { if (!isCapper(sender)) {
_addCapper(sender); _addCapper(sender);
} }
......
...@@ -12,7 +12,7 @@ contract MinterRole is Initializable { ...@@ -12,7 +12,7 @@ contract MinterRole is Initializable {
Roles.Role private _minters; Roles.Role private _minters;
function _initialize(address sender) internal initializer { function initialize(address sender) public initializer {
if (!isMinter(sender)) { if (!isMinter(sender)) {
_addMinter(sender); _addMinter(sender);
} }
......
...@@ -12,7 +12,7 @@ contract PauserRole is Initializable { ...@@ -12,7 +12,7 @@ contract PauserRole is Initializable {
Roles.Role private _pausers; Roles.Role private _pausers;
function _initialize(address sender) internal initializer { function initialize(address sender) public initializer {
if (!isPauser(sender)) { if (!isPauser(sender)) {
_addPauser(sender); _addPauser(sender);
} }
......
...@@ -12,7 +12,7 @@ contract SignerRole is Initializable { ...@@ -12,7 +12,7 @@ contract SignerRole is Initializable {
Roles.Role private _signers; Roles.Role private _signers;
function _initialize(address sender) internal initializer { function initialize(address sender) public initializer {
if (!isSigner(sender)) { if (!isSigner(sender)) {
_addSigner(sender); _addSigner(sender);
} }
......
...@@ -16,7 +16,7 @@ contract WhitelistAdminRole is Initializable { ...@@ -16,7 +16,7 @@ contract WhitelistAdminRole is Initializable {
Roles.Role private _whitelistAdmins; Roles.Role private _whitelistAdmins;
function _initialize(address sender) internal initializer { function initialize(address sender) public initializer {
if (!isWhitelistAdmin(sender)) { if (!isWhitelistAdmin(sender)) {
_addWhitelistAdmin(sender); _addWhitelistAdmin(sender);
} }
......
...@@ -24,8 +24,8 @@ contract WhitelistedRole is Initializable, WhitelistAdminRole { ...@@ -24,8 +24,8 @@ contract WhitelistedRole is Initializable, WhitelistAdminRole {
_; _;
} }
function _initialize(address sender) internal initializer { function initialize(address sender) public initializer {
WhitelistAdminRole._initialize(sender); WhitelistAdminRole.initialize(sender);
} }
function isWhitelisted(address account) public view returns (bool) { function isWhitelisted(address account) public view returns (bool) {
...@@ -56,4 +56,3 @@ contract WhitelistedRole is Initializable, WhitelistAdminRole { ...@@ -56,4 +56,3 @@ contract WhitelistedRole is Initializable, WhitelistAdminRole {
uint256[50] private ______gap; uint256[50] private ______gap;
} }
}
...@@ -18,7 +18,7 @@ contract IndividuallyCappedCrowdsale is Initializable, Crowdsale, CapperRole { ...@@ -18,7 +18,7 @@ contract IndividuallyCappedCrowdsale is Initializable, Crowdsale, CapperRole {
function initialize(address sender) public initializer { function initialize(address sender) public initializer {
assert(Crowdsale._hasBeenInitialized()); assert(Crowdsale._hasBeenInitialized());
CapperRole._initialize(sender); CapperRole.initialize(sender);
} }
/** /**
......
...@@ -9,7 +9,7 @@ import "../../access/roles/WhitelistedRole.sol"; ...@@ -9,7 +9,7 @@ import "../../access/roles/WhitelistedRole.sol";
*/ */
contract WhitelistCrowdsale is Initializable, WhitelistedRole, Crowdsale { contract WhitelistCrowdsale is Initializable, WhitelistedRole, Crowdsale {
function initialize(address sender) public initializer { function initialize(address sender) public initializer {
WhitelistedRole._initialize(sender); WhitelistedRole.initialize(sender);
assert(Crowdsale._hasBeenInitialized()); assert(Crowdsale._hasBeenInitialized());
} }
......
...@@ -44,8 +44,8 @@ contract SignatureBouncer is Initializable, SignerRole { ...@@ -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 // Signature size is 65 bytes (tightly packed v + r + s), but gets padded to 96 bytes
uint256 private constant _SIGNATURE_SIZE = 96; uint256 private constant _SIGNATURE_SIZE = 96;
function _initialize(address sender) internal initializer { function initialize(address sender) public initializer {
SignerRole._initialize(sender); SignerRole.initialize(sender);
} }
/** /**
......
...@@ -14,7 +14,7 @@ contract Pausable is Initializable, PauserRole { ...@@ -14,7 +14,7 @@ contract Pausable is Initializable, PauserRole {
bool private _paused; bool private _paused;
function initialize(address sender) public initializer { function initialize(address sender) public initializer {
PauserRole._initialize(sender); PauserRole.initialize(sender);
_paused = false; _paused = false;
} }
......
...@@ -4,7 +4,7 @@ import "../access/roles/CapperRole.sol"; ...@@ -4,7 +4,7 @@ import "../access/roles/CapperRole.sol";
contract CapperRoleMock is CapperRole { contract CapperRoleMock is CapperRole {
constructor() public { constructor() public {
CapperRole._initialize(msg.sender); CapperRole.initialize(msg.sender);
} }
function removeCapper(address account) public { function removeCapper(address account) public {
......
...@@ -4,7 +4,7 @@ import "../access/roles/MinterRole.sol"; ...@@ -4,7 +4,7 @@ import "../access/roles/MinterRole.sol";
contract MinterRoleMock is MinterRole { contract MinterRoleMock is MinterRole {
constructor() public { constructor() public {
MinterRole._initialize(msg.sender); MinterRole.initialize(msg.sender);
} }
function removeMinter(address account) public { function removeMinter(address account) public {
......
...@@ -4,7 +4,7 @@ import "../access/roles/PauserRole.sol"; ...@@ -4,7 +4,7 @@ import "../access/roles/PauserRole.sol";
contract PauserRoleMock is PauserRole { contract PauserRoleMock is PauserRole {
constructor () public { constructor () public {
PauserRole._initialize(msg.sender); PauserRole.initialize(msg.sender);
} }
function removePauser(address account) public { function removePauser(address account) public {
......
...@@ -5,7 +5,7 @@ import "../payment/PullPayment.sol"; ...@@ -5,7 +5,7 @@ import "../payment/PullPayment.sol";
// mock class using PullPayment // mock class using PullPayment
contract PullPaymentMock is PullPayment { contract PullPaymentMock is PullPayment {
constructor () public payable { constructor () public payable {
PullPayment._initialize(); PullPayment.initialize();
} }
// test helper function to call asyncTransfer // test helper function to call asyncTransfer
......
...@@ -5,7 +5,7 @@ import "./SignerRoleMock.sol"; ...@@ -5,7 +5,7 @@ import "./SignerRoleMock.sol";
contract SignatureBouncerMock is SignatureBouncer, SignerRoleMock { contract SignatureBouncerMock is SignatureBouncer, SignerRoleMock {
constructor() public { constructor() public {
SignatureBouncer._initialize(msg.sender); SignatureBouncer.initialize(msg.sender);
} }
function checkValidSignature(address account, bytes memory signature) function checkValidSignature(address account, bytes memory signature)
......
...@@ -4,7 +4,7 @@ import "../access/roles/SignerRole.sol"; ...@@ -4,7 +4,7 @@ import "../access/roles/SignerRole.sol";
contract SignerRoleMock is SignerRole { contract SignerRoleMock is SignerRole {
constructor() public { constructor() public {
SignerRole._initialize(msg.sender); SignerRole.initialize(msg.sender);
} }
function removeSigner(address account) public { function removeSigner(address account) public {
......
...@@ -4,7 +4,7 @@ import "../access/roles/WhitelistAdminRole.sol"; ...@@ -4,7 +4,7 @@ import "../access/roles/WhitelistAdminRole.sol";
contract WhitelistAdminRoleMock is WhitelistAdminRole { contract WhitelistAdminRoleMock is WhitelistAdminRole {
constructor () public { constructor () public {
WhitelistAdminRole._initialize(msg.sender); WhitelistAdminRole.initialize(msg.sender);
} }
function removeWhitelistAdmin(address account) public { function removeWhitelistAdmin(address account) public {
......
...@@ -4,7 +4,7 @@ import "../access/roles/WhitelistedRole.sol"; ...@@ -4,7 +4,7 @@ import "../access/roles/WhitelistedRole.sol";
contract WhitelistedRoleMock is WhitelistedRole { contract WhitelistedRoleMock is WhitelistedRole {
constructor() public { constructor() public {
WhitelistedRole._initialize(msg.sender); WhitelistedRole.initialize(msg.sender);
} }
function onlyWhitelistedMock() public view onlyWhitelisted { function onlyWhitelistedMock() public view onlyWhitelisted {
......
...@@ -12,7 +12,7 @@ import "./escrow/Escrow.sol"; ...@@ -12,7 +12,7 @@ import "./escrow/Escrow.sol";
contract PullPayment is Initializable { contract PullPayment is Initializable {
Escrow private _escrow; Escrow private _escrow;
function _initialize() internal initializer { function initialize() public initializer {
// conditional added to make initializer idempotent in case of diamond inheritance // conditional added to make initializer idempotent in case of diamond inheritance
if (address(_escrow) == address(0)) { if (address(_escrow) == address(0)) {
_escrow = new Escrow(); _escrow = new Escrow();
......
pragma solidity ^0.5.0; pragma solidity ^0.5.0;
import 'zos-lib/contracts/Initializable.sol'; import "zos-lib/contracts/Initializable.sol";
import "./ConditionalEscrow.sol"; import "./ConditionalEscrow.sol";
......
...@@ -10,7 +10,7 @@ import "../../access/roles/MinterRole.sol"; ...@@ -10,7 +10,7 @@ import "../../access/roles/MinterRole.sol";
*/ */
contract ERC20Mintable is Initializable, ERC20, MinterRole { contract ERC20Mintable is Initializable, ERC20, MinterRole {
function initialize(address sender) public initializer { function initialize(address sender) public initializer {
MinterRole._initialize(sender); MinterRole.initialize(sender);
} }
/** /**
......
...@@ -13,7 +13,7 @@ contract ERC721MetadataMintable is Initializable, ERC721, ERC721Metadata, Minter ...@@ -13,7 +13,7 @@ contract ERC721MetadataMintable is Initializable, ERC721, ERC721Metadata, Minter
function initialize(address sender) public initializer { function initialize(address sender) public initializer {
require(ERC721._hasBeenInitialized()); require(ERC721._hasBeenInitialized());
require(ERC721Metadata._hasBeenInitialized()); require(ERC721Metadata._hasBeenInitialized());
MinterRole._initialize(sender); MinterRole.initialize(sender);
} }
/** /**
......
...@@ -11,7 +11,7 @@ import "../../access/roles/MinterRole.sol"; ...@@ -11,7 +11,7 @@ import "../../access/roles/MinterRole.sol";
contract ERC721Mintable is Initializable, ERC721, MinterRole { contract ERC721Mintable is Initializable, ERC721, MinterRole {
function initialize(address sender) public initializer { function initialize(address sender) public initializer {
require(ERC721._hasBeenInitialized()); require(ERC721._hasBeenInitialized());
MinterRole._initialize(sender); MinterRole.initialize(sender);
} }
/** /**
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
}, },
"acorn-globals": { "acorn-globals": {
"version": "1.0.9", "version": "1.0.9",
"resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz", "resolved": "http://registry.npmjs.org/acorn-globals/-/acorn-globals-1.0.9.tgz",
"integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=", "integrity": "sha1-VbtemGkVB7dFedBRNBMhfDgMVM8=",
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -165,7 +165,7 @@ ...@@ -165,7 +165,7 @@
"dependencies": { "dependencies": {
"acorn": { "acorn": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", "resolved": "http://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz",
"integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=", "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=",
"dev": true, "dev": true,
"optional": true "optional": true
...@@ -457,7 +457,7 @@ ...@@ -457,7 +457,7 @@
}, },
"axios": { "axios": {
"version": "0.18.0", "version": "0.18.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-0.18.0.tgz", "resolved": "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz",
"integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=", "integrity": "sha1-MtU+SFHv3AoRmTts0AB4nXDAUQI=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -2758,7 +2758,7 @@ ...@@ -2758,7 +2758,7 @@
}, },
"rimraf": { "rimraf": {
"version": "2.4.5", "version": "2.4.5",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", "resolved": "http://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz",
"integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -3655,7 +3655,7 @@ ...@@ -3655,7 +3655,7 @@
}, },
"minimist": { "minimist": {
"version": "1.2.0", "version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true "dev": true
} }
...@@ -7187,7 +7187,7 @@ ...@@ -7187,7 +7187,7 @@
}, },
"readable-stream": { "readable-stream": {
"version": "1.1.14", "version": "1.1.14",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -7980,7 +7980,7 @@ ...@@ -7980,7 +7980,7 @@
}, },
"jsdom": { "jsdom": {
"version": "7.2.2", "version": "7.2.2",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz", "resolved": "http://registry.npmjs.org/jsdom/-/jsdom-7.2.2.tgz",
"integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=", "integrity": "sha1-QLQCdwwr2iNGkJa+6Rq2deOx/G4=",
"dev": true, "dev": true,
"optional": true, "optional": true,
...@@ -8004,7 +8004,7 @@ ...@@ -8004,7 +8004,7 @@
"dependencies": { "dependencies": {
"acorn": { "acorn": {
"version": "2.7.0", "version": "2.7.0",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz", "resolved": "http://registry.npmjs.org/acorn/-/acorn-2.7.0.tgz",
"integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=", "integrity": "sha1-q259nYhqrKiwhbwzEreaGYQz8Oc=",
"dev": true, "dev": true,
"optional": true "optional": true
...@@ -8725,7 +8725,7 @@ ...@@ -8725,7 +8725,7 @@
}, },
"marked": { "marked": {
"version": "0.3.19", "version": "0.3.19",
"resolved": "https://registry.npmjs.org/marked/-/marked-0.3.19.tgz", "resolved": "http://registry.npmjs.org/marked/-/marked-0.3.19.tgz",
"integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==",
"dev": true "dev": true
}, },
...@@ -14590,7 +14590,7 @@ ...@@ -14590,7 +14590,7 @@
}, },
"scrypt-js": { "scrypt-js": {
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz", "resolved": "http://registry.npmjs.org/scrypt-js/-/scrypt-js-2.0.3.tgz",
"integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=", "integrity": "sha1-uwBAvgMEPamgEqLOqfyfhSz8h9Q=",
"dev": true "dev": true
}, },
...@@ -14985,7 +14985,7 @@ ...@@ -14985,7 +14985,7 @@
}, },
"ws": { "ws": {
"version": "5.1.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/ws/-/ws-5.1.1.tgz", "resolved": "http://registry.npmjs.org/ws/-/ws-5.1.1.tgz",
"integrity": "sha512-bOusvpCb09TOBLbpMKszd45WKC2KPtxiyiHanv+H2DE3Az+1db5a/L7sVJZVDPUC1Br8f0SKRr1KjLpD1U/IAw==", "integrity": "sha512-bOusvpCb09TOBLbpMKszd45WKC2KPtxiyiHanv+H2DE3Az+1db5a/L7sVJZVDPUC1Br8f0SKRr1KjLpD1U/IAw==",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -15570,7 +15570,7 @@ ...@@ -15570,7 +15570,7 @@
}, },
"web3": { "web3": {
"version": "0.16.0", "version": "0.16.0",
"resolved": "https://registry.npmjs.org/web3/-/web3-0.16.0.tgz", "resolved": "http://registry.npmjs.org/web3/-/web3-0.16.0.tgz",
"integrity": "sha1-pFVBdc1GKUMDWx8dOUMvdBxrYBk=", "integrity": "sha1-pFVBdc1GKUMDWx8dOUMvdBxrYBk=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -17101,7 +17101,7 @@ ...@@ -17101,7 +17101,7 @@
}, },
"web3": { "web3": {
"version": "0.20.6", "version": "0.20.6",
"resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz", "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz",
"integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -17131,7 +17131,7 @@ ...@@ -17131,7 +17131,7 @@
}, },
"web3": { "web3": {
"version": "0.20.6", "version": "0.20.6",
"resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz", "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz",
"integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -19356,7 +19356,7 @@ ...@@ -19356,7 +19356,7 @@
}, },
"load-json-file": { "load-json-file": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
"integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=",
"dev": true, "dev": true,
"requires": { "requires": {
...@@ -19387,7 +19387,7 @@ ...@@ -19387,7 +19387,7 @@
"dependencies": { "dependencies": {
"commander": { "commander": {
"version": "2.15.1", "version": "2.15.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "resolved": "http://registry.npmjs.org/commander/-/commander-2.15.1.tgz",
"integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==",
"dev": true "dev": true
}, },
...@@ -19605,7 +19605,7 @@ ...@@ -19605,7 +19605,7 @@
}, },
"web3": { "web3": {
"version": "0.20.6", "version": "0.20.6",
"resolved": "https://registry.npmjs.org/web3/-/web3-0.20.6.tgz", "resolved": "http://registry.npmjs.org/web3/-/web3-0.20.6.tgz",
"integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=", "integrity": "sha1-PpcwauAk+yThCj11yIQwJWIhUSA=",
"dev": true, "dev": true,
"requires": { "requires": {
......
const encodeCall = require('zos-lib/lib/helpers/encodeCall').default;
const { shouldBehaveLikeERC20Mintable } = require('../token/ERC20/behaviors/ERC20Mintable.behavior'); const { shouldBehaveLikeERC20Mintable } = require('../token/ERC20/behaviors/ERC20Mintable.behavior');
const { BN } = require('openzeppelin-test-helpers'); const { BN } = require('openzeppelin-test-helpers');
...@@ -25,8 +24,8 @@ contract('StandardToken', function ([ ...@@ -25,8 +24,8 @@ contract('StandardToken', function ([
async function initialize (token, name, symbol, decimals, initialSupply, initialHolder, minters, pausers, from) { async function initialize (token, name, symbol, decimals, initialSupply, initialHolder, minters, pausers, from) {
const signature = 'initialize(string,string,uint8,uint256,address,address[],address[],address)'; const signature = 'initialize(string,string,uint8,uint256,address,address[],address[],address)';
const arguments = [name, symbol, decimals, initialSupply, initialHolder, minters, pausers, from]; const args = [name, symbol, decimals, initialSupply, initialHolder, minters, pausers, from];
await token.methods[signature](...arguments, { from }); await token.methods[signature](...args, { from });
} }
context('with all arguments', function () { context('with all arguments', function () {
......
const encodeCall = require('zos-lib/lib/helpers/encodeCall').default;
const { shouldBehaveLikeERC20Mintable } = require('./behaviors/ERC20Mintable.behavior'); const { shouldBehaveLikeERC20Mintable } = require('./behaviors/ERC20Mintable.behavior');
const { shouldFail, BN } = require('openzeppelin-test-helpers'); const { shouldFail, BN } = require('openzeppelin-test-helpers');
...@@ -25,14 +24,14 @@ contract('StandaloneERC20', function ([ ...@@ -25,14 +24,14 @@ contract('StandaloneERC20', function ([
async function initializeFull (token, name, symbol, decimals, initialSupply, initialHolder, minters, pausers, from) { async function initializeFull (token, name, symbol, decimals, initialSupply, initialHolder, minters, pausers, from) {
const signature = 'initialize(string,string,uint8,uint256,address,address[],address[],address)'; const signature = 'initialize(string,string,uint8,uint256,address,address[],address[],address)';
const arguments = [name, symbol, decimals, initialSupply, initialHolder, minters, pausers, from]; const args = [name, symbol, decimals, initialSupply, initialHolder, minters, pausers, from];
await token.methods[signature](...arguments, { from }); await token.methods[signature](...args, { from });
} }
async function initializePartial (token, name, symbol, decimals, minters, pausers, from) { async function initializePartial (token, name, symbol, decimals, minters, pausers, from) {
const signature = 'initialize(string,string,uint8,address[],address[],address)'; const signature = 'initialize(string,string,uint8,address[],address[],address)';
const arguments = [name, symbol, decimals, minters, pausers, from]; const args = [name, symbol, decimals, minters, pausers, from];
await token.methods[signature](...arguments, { from }); await token.methods[signature](...args, { from });
} }
describe('with all arguments', function () { describe('with all arguments', function () {
......
const encodeCall = require('zos-lib/lib/helpers/encodeCall').default;
require('openzeppelin-test-helpers'); require('openzeppelin-test-helpers');
const StandaloneERC721 = artifacts.require('StandaloneERC721'); const StandaloneERC721 = artifacts.require('StandaloneERC721');
...@@ -17,8 +15,8 @@ contract('StandaloneERC721', function ([_, deployer, minterA, minterB, pauserA, ...@@ -17,8 +15,8 @@ contract('StandaloneERC721', function ([_, deployer, minterA, minterB, pauserA,
async function initialize (token, name, symbol, minters, pausers, from) { async function initialize (token, name, symbol, minters, pausers, from) {
const signature = 'initialize(string,string,address[],address[],address)'; const signature = 'initialize(string,string,address[],address[],address)';
const arguments = [name, symbol, minters, pausers, from]; const args = [name, symbol, minters, pausers, from];
await token.methods[signature](...arguments, { from }); await token.methods[signature](...args, { from });
} }
it('can be created with no minters', async function () { it('can be created with no minters', async function () {
......
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