fix all tests for 2.1.2

This commit is contained in:
Francisco Giordano
2019-01-22 17:35:47 -03:00
parent dd433c41bb
commit cff2509c63
7 changed files with 42 additions and 59 deletions

View File

@ -13,7 +13,7 @@ import "../token/ERC20/ERC20Pausable.sol";
contract StandardToken is Initializable, ERC20Detailed, ERC20Mintable, ERC20Pausable {
function initialize(
string memory name, string memory symbol, uint8 decimals, uint256 initialSupply, address initialHolder,
address[] memory minters, address[] memory pausers
address[] memory minters, address[] memory pausers, address sender
) public initializer {
ERC20Detailed.initialize(name, symbol, decimals);
@ -23,11 +23,11 @@ contract StandardToken is Initializable, ERC20Detailed, ERC20Mintable, ERC20Paus
}
// Initialize the minter and pauser roles, and renounce them
ERC20Mintable.initialize(msg.sender);
renounceMinter();
ERC20Mintable.initialize(sender);
_removeMinter(sender);
ERC20Pausable.initialize(msg.sender);
renouncePauser();
ERC20Pausable.initialize(sender);
_removePauser(sender);
// Add the requested minters and pausers (this can be done after renouncing since
// these are the internal calls)

View File

@ -13,7 +13,7 @@ import "./ERC20Pausable.sol";
contract StandaloneERC20 is Initializable, ERC20Detailed, ERC20Mintable, ERC20Pausable {
function initialize(
string memory name, string memory symbol, uint8 decimals, uint256 initialSupply, address initialHolder,
address[] memory minters, address[] memory pausers
address[] memory minters, address[] memory pausers, address sender
) public initializer {
ERC20Detailed.initialize(name, symbol, decimals);
@ -21,11 +21,11 @@ contract StandaloneERC20 is Initializable, ERC20Detailed, ERC20Mintable, ERC20Pa
_mint(initialHolder, initialSupply);
// Initialize the minter and pauser roles, and renounce them
ERC20Mintable.initialize(msg.sender);
renounceMinter();
ERC20Mintable.initialize(sender);
_removeMinter(sender);
ERC20Pausable.initialize(msg.sender);
renouncePauser();
ERC20Pausable.initialize(sender);
_removePauser(sender);
// Add the requested minters and pausers (this can be done after renouncing since
// these are the internal calls)
@ -39,16 +39,16 @@ contract StandaloneERC20 is Initializable, ERC20Detailed, ERC20Mintable, ERC20Pa
}
function initialize(
string memory name, string memory symbol, uint8 decimals, address[] memory minters, address[] memory pausers
string memory name, string memory symbol, uint8 decimals, address[] memory minters, address[] memory pausers, address sender
) public initializer {
ERC20Detailed.initialize(name, symbol, decimals);
// Initialize the minter and pauser roles, and renounce them
ERC20Mintable.initialize(msg.sender);
renounceMinter();
ERC20Mintable.initialize(sender);
_removeMinter(sender);
ERC20Pausable.initialize(msg.sender);
renouncePauser();
ERC20Pausable.initialize(sender);
_removePauser(sender);
// Add the requested minters and pausers (this can be done after renouncing since
// these are the internal calls)

View File

@ -15,17 +15,17 @@ import "./ERC721Pausable.sol";
contract StandaloneERC721
is Initializable, ERC721, ERC721Enumerable, ERC721Metadata, ERC721MetadataMintable, ERC721Pausable
{
function initialize(string memory name, string memory symbol, address[] memory minters, address[] memory pausers) public initializer {
function initialize(string memory name, string memory symbol, address[] memory minters, address[] memory pausers, address sender) public initializer {
ERC721.initialize();
ERC721Enumerable.initialize();
ERC721Metadata.initialize(name, symbol);
// Initialize the minter and pauser roles, and renounce them
ERC721MetadataMintable.initialize(msg.sender);
renounceMinter();
ERC721MetadataMintable.initialize(sender);
_removeMinter(sender);
ERC721Pausable.initialize(msg.sender);
renouncePauser();
ERC721Pausable.initialize(sender);
_removePauser(sender);
// Add the requested minters and pausers (this can be done after renouncing since
// these are the internal calls)