Commit 85e02b23 by Francisco Giordano

rename to UpgradeSafe

parent d13d0ea9
...@@ -11,7 +11,7 @@ import "../Initializable.sol"; ...@@ -11,7 +11,7 @@ import "../Initializable.sol";
* *
* This contract is only required for intermediate, library-like contracts. * This contract is only required for intermediate, library-like contracts.
*/ */
contract ContextUpgradeable is Initializable { contract ContextUpgradeSafe is Initializable {
// Empty internal constructor, to prevent people from mistakenly deploying // Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance. // an instance of this contract, which should be used via inheritance.
......
...@@ -16,7 +16,7 @@ import "../Initializable.sol"; ...@@ -16,7 +16,7 @@ import "../Initializable.sol";
* information on how to use the pre-built {GSNRecipientSignature} and * information on how to use the pre-built {GSNRecipientSignature} and
* {GSNRecipientERC20Fee}, or how to write your own. * {GSNRecipientERC20Fee}, or how to write your own.
*/ */
abstract contract GSNRecipientUpgradeable is Initializable, IRelayRecipient, ContextUpgradeable { abstract contract GSNRecipientUpgradeSafe is Initializable, IRelayRecipient, ContextUpgradeSafe {
function __GSNRecipient_init() internal initializer { function __GSNRecipient_init() internal initializer {
__Context_init_unchained(); __Context_init_unchained();
__GSNRecipient_init_unchained(); __GSNRecipient_init_unchained();
......
...@@ -16,7 +16,7 @@ import "../Initializable.sol"; ...@@ -16,7 +16,7 @@ import "../Initializable.sol";
* whose only minter is the recipient, so the strategy must be implemented in a derived contract, making use of the * whose only minter is the recipient, so the strategy must be implemented in a derived contract, making use of the
* internal {_mint} function. * internal {_mint} function.
*/ */
contract GSNRecipientERC20FeeUpgradeable is Initializable, GSNRecipientUpgradeable { contract GSNRecipientERC20FeeUpgradeSafe is Initializable, GSNRecipientUpgradeSafe {
using SafeERC20 for __unstable__ERC20Owned; using SafeERC20 for __unstable__ERC20Owned;
using SafeMath for uint256; using SafeMath for uint256;
...@@ -125,7 +125,7 @@ contract GSNRecipientERC20FeeUpgradeable is Initializable, GSNRecipientUpgradeab ...@@ -125,7 +125,7 @@ contract GSNRecipientERC20FeeUpgradeable is Initializable, GSNRecipientUpgradeab
* outside of this context. * outside of this context.
*/ */
// solhint-disable-next-line contract-name-camelcase // solhint-disable-next-line contract-name-camelcase
contract __unstable__ERC20Owned is Initializable, ERC20Upgradeable, OwnableUpgradeable { contract __unstable__ERC20Owned is Initializable, ERC20UpgradeSafe, OwnableUpgradeSafe {
uint256 private constant _UINT256_MAX = 2**256 - 1; uint256 private constant _UINT256_MAX = 2**256 - 1;
......
...@@ -10,7 +10,7 @@ import "../Initializable.sol"; ...@@ -10,7 +10,7 @@ import "../Initializable.sol";
* performs validations off-chain. Note that nothing is charged to the user in this scheme. Thus, the server should make * performs validations off-chain. Note that nothing is charged to the user in this scheme. Thus, the server should make
* sure to account for this in their economic and threat model. * sure to account for this in their economic and threat model.
*/ */
contract GSNRecipientSignatureUpgradeable is Initializable, GSNRecipientUpgradeable { contract GSNRecipientSignatureUpgradeSafe is Initializable, GSNRecipientUpgradeSafe {
using ECDSA for bytes32; using ECDSA for bytes32;
address private _trustedSigner; address private _trustedSigner;
......
...@@ -36,7 +36,7 @@ import "../Initializable.sol"; ...@@ -36,7 +36,7 @@ import "../Initializable.sol";
* roles. More complex role relationships can be created by using * roles. More complex role relationships can be created by using
* {_setRoleAdmin}. * {_setRoleAdmin}.
*/ */
abstract contract AccessControlUpgradeable is Initializable, ContextUpgradeable { abstract contract AccessControlUpgradeSafe is Initializable, ContextUpgradeSafe {
function __AccessControl_init() internal initializer { function __AccessControl_init() internal initializer {
__Context_init_unchained(); __Context_init_unchained();
__AccessControl_init_unchained(); __AccessControl_init_unchained();
......
...@@ -14,7 +14,7 @@ import "../Initializable.sol"; ...@@ -14,7 +14,7 @@ import "../Initializable.sol";
* `onlyOwner`, which can be applied to your functions to restrict their use to * `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner. * the owner.
*/ */
contract OwnableUpgradeable is Initializable, ContextUpgradeable { contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe {
address private _owner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
......
...@@ -11,7 +11,7 @@ import "../Initializable.sol"; ...@@ -11,7 +11,7 @@ import "../Initializable.sol";
* typical vesting scheme, with a cliff and vesting period. Optionally revocable by the * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the
* owner. * owner.
*/ */
contract TokenVestingUpgradeable is Initializable, OwnableUpgradeable { contract TokenVestingUpgradeSafe is Initializable, OwnableUpgradeSafe {
// The vesting schedule is time-based (i.e. using block timestamps as opposed to e.g. block numbers), and is // The vesting schedule is time-based (i.e. using block timestamps as opposed to e.g. block numbers), and is
// therefore sensitive to timestamp manipulation (which is something miners can do, to a certain degree). Therefore, // therefore sensitive to timestamp manipulation (which is something miners can do, to a certain degree). Therefore,
// it is recommended to avoid using short time durations (less than a minute). Typical vesting schemes, with a // it is recommended to avoid using short time durations (less than a minute). Typical vesting schemes, with a
......
...@@ -9,7 +9,7 @@ import "../Initializable.sol"; ...@@ -9,7 +9,7 @@ import "../Initializable.sol";
* Contracts may inherit from this and call {_registerInterface} to declare * Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface. * their support of an interface.
*/ */
contract ERC165Upgradeable is Initializable, IERC165 { contract ERC165UpgradeSafe is Initializable, IERC165 {
/* /*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/ */
......
...@@ -11,7 +11,7 @@ import "../Initializable.sol"; ...@@ -11,7 +11,7 @@ import "../Initializable.sol";
* {IERC1820Registry-setInterfaceImplementer} should then be called for the * {IERC1820Registry-setInterfaceImplementer} should then be called for the
* registration to be complete. * registration to be complete.
*/ */
contract ERC1820ImplementerUpgradeable is Initializable, IERC1820Implementer { contract ERC1820ImplementerUpgradeSafe is Initializable, IERC1820Implementer {
function __ERC1820Implementer_init() internal initializer { function __ERC1820Implementer_init() internal initializer {
__ERC1820Implementer_init_unchained(); __ERC1820Implementer_init_unchained();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../access/AccessControl.sol"; import "../access/AccessControl.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract AccessControlMockUpgradeable is Initializable, AccessControlUpgradeable { contract AccessControlMockUpgradeSafe is Initializable, AccessControlUpgradeSafe {
constructor() public { constructor() public {
__AccessControlMock_init(); __AccessControlMock_init();
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/Address.sol"; import "../utils/Address.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract AddressMockUpgradeable is Initializable { contract AddressMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__AddressMock_init(); __AddressMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/Arrays.sol"; import "../utils/Arrays.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ArraysMockUpgradeable is Initializable { contract ArraysMockUpgradeSafe is Initializable {
using Arrays for uint256[]; using Arrays for uint256[];
uint256[] private _array; uint256[] private _array;
......
...@@ -4,7 +4,7 @@ import "../payment/escrow/ConditionalEscrow.sol"; ...@@ -4,7 +4,7 @@ import "../payment/escrow/ConditionalEscrow.sol";
import "../Initializable.sol"; import "../Initializable.sol";
// mock class using ConditionalEscrow // mock class using ConditionalEscrow
contract ConditionalEscrowMockUpgradeable is Initializable, ConditionalEscrowUpgradeable { contract ConditionalEscrowMockUpgradeSafe is Initializable, ConditionalEscrowUpgradeSafe {
constructor() public { constructor() public {
__ConditionalEscrowMock_init(); __ConditionalEscrowMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ContextMockUpgradeable is Initializable, ContextUpgradeable { contract ContextMockUpgradeSafe is Initializable, ContextUpgradeSafe {
constructor() public { constructor() public {
__ContextMock_init(); __ContextMock_init();
} }
...@@ -33,7 +33,7 @@ contract ContextMockUpgradeable is Initializable, ContextUpgradeable { ...@@ -33,7 +33,7 @@ contract ContextMockUpgradeable is Initializable, ContextUpgradeable {
uint256[50] private __gap; uint256[50] private __gap;
} }
contract ContextMockCallerUpgradeable is Initializable { contract ContextMockCallerUpgradeSafe is Initializable {
constructor() public { constructor() public {
__ContextMockCaller_init(); __ContextMockCaller_init();
} }
...@@ -47,11 +47,11 @@ contract ContextMockCallerUpgradeable is Initializable { ...@@ -47,11 +47,11 @@ contract ContextMockCallerUpgradeable is Initializable {
} }
function callSender(ContextMockUpgradeable context) public { function callSender(ContextMockUpgradeSafe context) public {
context.msgSender(); context.msgSender();
} }
function callData(ContextMockUpgradeable context, uint256 integerValue, string memory stringValue) public { function callData(ContextMockUpgradeSafe context, uint256 integerValue, string memory stringValue) public {
context.msgData(integerValue, stringValue); context.msgData(integerValue, stringValue);
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/Counters.sol"; import "../utils/Counters.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract CountersMockUpgradeable is Initializable { contract CountersMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__CountersMock_init(); __CountersMock_init();
} }
......
...@@ -4,7 +4,7 @@ import "../utils/Create2.sol"; ...@@ -4,7 +4,7 @@ import "../utils/Create2.sol";
import "../introspection/ERC1820Implementer.sol"; import "../introspection/ERC1820Implementer.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract Create2MockUpgradeable is Initializable { contract Create2MockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__Create2Mock_init(); __Create2Mock_init();
} }
...@@ -24,7 +24,7 @@ contract Create2MockUpgradeable is Initializable { ...@@ -24,7 +24,7 @@ contract Create2MockUpgradeable is Initializable {
function deployERC1820Implementer(uint256 value, bytes32 salt) public { function deployERC1820Implementer(uint256 value, bytes32 salt) public {
// solhint-disable-next-line indent // solhint-disable-next-line indent
Create2.deploy(value, salt, type(ERC1820ImplementerUpgradeable).creationCode); Create2.deploy(value, salt, type(ERC1820ImplementerUpgradeSafe).creationCode);
} }
function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) { function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) {
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../cryptography/ECDSA.sol"; import "../cryptography/ECDSA.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ECDSAMockUpgradeable is Initializable { contract ECDSAMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__ECDSAMock_init(); __ECDSAMock_init();
} }
......
...@@ -13,7 +13,7 @@ import "../../Initializable.sol"; ...@@ -13,7 +13,7 @@ import "../../Initializable.sol";
* therefore, because this contract is staticcall'd we need to not emit events (which is how solidity-coverage works) * therefore, because this contract is staticcall'd we need to not emit events (which is how solidity-coverage works)
* solidity-coverage ignores the /mocks folder, so we duplicate its implementation here to avoid instrumenting it * solidity-coverage ignores the /mocks folder, so we duplicate its implementation here to avoid instrumenting it
*/ */
contract SupportsInterfaceWithLookupMockUpgradeable is Initializable, IERC165 { contract SupportsInterfaceWithLookupMockUpgradeSafe is Initializable, IERC165 {
/* /*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/ */
...@@ -63,7 +63,7 @@ contract SupportsInterfaceWithLookupMockUpgradeable is Initializable, IERC165 { ...@@ -63,7 +63,7 @@ contract SupportsInterfaceWithLookupMockUpgradeable is Initializable, IERC165 {
uint256[49] private __gap; uint256[49] private __gap;
} }
contract ERC165InterfacesSupportedUpgradeable is Initializable, SupportsInterfaceWithLookupMockUpgradeable { contract ERC165InterfacesSupportedUpgradeSafe is Initializable, SupportsInterfaceWithLookupMockUpgradeSafe {
constructor(bytes4[] memory interfaceIds) public { constructor(bytes4[] memory interfaceIds) public {
__ERC165InterfacesSupported_init(interfaceIds); __ERC165InterfacesSupported_init(interfaceIds);
......
pragma solidity ^0.6.0; pragma solidity ^0.6.0;
import "../../Initializable.sol"; import "../../Initializable.sol";
contract ERC165NotSupportedUpgradeable is Initializable { contract ERC165NotSupportedUpgradeSafe is Initializable {
constructor() public { constructor() public {
__ERC165NotSupported_init(); __ERC165NotSupported_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../introspection/ERC165Checker.sol"; import "../introspection/ERC165Checker.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC165CheckerMockUpgradeable is Initializable { contract ERC165CheckerMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__ERC165CheckerMock_init(); __ERC165CheckerMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../introspection/ERC165.sol"; import "../introspection/ERC165.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC165MockUpgradeable is Initializable, ERC165Upgradeable { contract ERC165MockUpgradeSafe is Initializable, ERC165UpgradeSafe {
constructor() public { constructor() public {
__ERC165Mock_init(); __ERC165Mock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../introspection/ERC1820Implementer.sol"; import "../introspection/ERC1820Implementer.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC1820ImplementerMockUpgradeable is Initializable, ERC1820ImplementerUpgradeable { contract ERC1820ImplementerMockUpgradeSafe is Initializable, ERC1820ImplementerUpgradeSafe {
constructor() public { constructor() public {
__ERC1820ImplementerMock_init(); __ERC1820ImplementerMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../token/ERC20/ERC20Burnable.sol"; import "../token/ERC20/ERC20Burnable.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC20BurnableMockUpgradeable is Initializable, ERC20BurnableUpgradeable { contract ERC20BurnableMockUpgradeSafe is Initializable, ERC20BurnableUpgradeSafe {
constructor( constructor(
string memory name, string memory name,
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../token/ERC20/ERC20Capped.sol"; import "../token/ERC20/ERC20Capped.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC20CappedMockUpgradeable is Initializable, ERC20CappedUpgradeable { contract ERC20CappedMockUpgradeSafe is Initializable, ERC20CappedUpgradeSafe {
constructor(string memory name, string memory symbol, uint256 cap) public { constructor(string memory name, string memory symbol, uint256 cap) public {
__ERC20CappedMock_init(name, symbol, cap); __ERC20CappedMock_init(name, symbol, cap);
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC20DecimalsMockUpgradeable is Initializable, ERC20Upgradeable { contract ERC20DecimalsMockUpgradeSafe is Initializable, ERC20UpgradeSafe {
constructor(string memory name, string memory symbol, uint8 decimals) public { constructor(string memory name, string memory symbol, uint8 decimals) public {
__ERC20DecimalsMock_init(name, symbol, decimals); __ERC20DecimalsMock_init(name, symbol, decimals);
......
...@@ -4,7 +4,7 @@ import "../token/ERC20/ERC20.sol"; ...@@ -4,7 +4,7 @@ import "../token/ERC20/ERC20.sol";
import "../Initializable.sol"; import "../Initializable.sol";
// mock class using ERC20 // mock class using ERC20
contract ERC20MockUpgradeable is Initializable, ERC20Upgradeable { contract ERC20MockUpgradeSafe is Initializable, ERC20UpgradeSafe {
constructor( constructor(
string memory name, string memory name,
......
...@@ -4,7 +4,7 @@ import "../token/ERC20/ERC20Pausable.sol"; ...@@ -4,7 +4,7 @@ import "../token/ERC20/ERC20Pausable.sol";
import "../Initializable.sol"; import "../Initializable.sol";
// mock class using ERC20Pausable // mock class using ERC20Pausable
contract ERC20PausableMockUpgradeable is Initializable, ERC20PausableUpgradeable { contract ERC20PausableMockUpgradeSafe is Initializable, ERC20PausableUpgradeSafe {
constructor( constructor(
string memory name, string memory name,
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import '../presets/ERC20PresetMinterPauser.sol'; import '../presets/ERC20PresetMinterPauser.sol';
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC20PresetMinterPauserMockUpgradeable is Initializable, ERC20PresetMinterPauserUpgradeable { contract ERC20PresetMinterPauserMockUpgradeSafe is Initializable, ERC20PresetMinterPauserUpgradeSafe {
constructor(string memory name, string memory symbol) public payable { constructor(string memory name, string memory symbol) public payable {
__ERC20PresetMinterPauserMock_init(name, symbol); __ERC20PresetMinterPauserMock_init(name, symbol);
......
...@@ -4,7 +4,7 @@ import "../token/ERC20/ERC20Snapshot.sol"; ...@@ -4,7 +4,7 @@ import "../token/ERC20/ERC20Snapshot.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC20SnapshotMockUpgradeable is Initializable, ERC20SnapshotUpgradeable { contract ERC20SnapshotMockUpgradeSafe is Initializable, ERC20SnapshotUpgradeSafe {
constructor( constructor(
string memory name, string memory name,
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../token/ERC721/ERC721Burnable.sol"; import "../token/ERC721/ERC721Burnable.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC721BurnableMockUpgradeable is Initializable, ERC721BurnableUpgradeable { contract ERC721BurnableMockUpgradeSafe is Initializable, ERC721BurnableUpgradeSafe {
constructor(string memory name, string memory symbol) public { constructor(string memory name, string memory symbol) public {
__ERC721BurnableMock_init(name, symbol); __ERC721BurnableMock_init(name, symbol);
......
...@@ -9,7 +9,7 @@ import "../Initializable.sol"; ...@@ -9,7 +9,7 @@ import "../Initializable.sol";
* @title ERC721GSNRecipientMock * @title ERC721GSNRecipientMock
* A simple ERC721 mock that has GSN support enabled * A simple ERC721 mock that has GSN support enabled
*/ */
contract ERC721GSNRecipientMockUpgradeable is Initializable, ERC721Upgradeable, GSNRecipientUpgradeable, GSNRecipientSignatureUpgradeable { contract ERC721GSNRecipientMockUpgradeSafe is Initializable, ERC721UpgradeSafe, GSNRecipientUpgradeSafe, GSNRecipientSignatureUpgradeSafe {
constructor(string memory name, string memory symbol, address trustedSigner) public { constructor(string memory name, string memory symbol, address trustedSigner) public {
__ERC721GSNRecipientMock_init(name, symbol, trustedSigner); __ERC721GSNRecipientMock_init(name, symbol, trustedSigner);
...@@ -34,12 +34,12 @@ contract ERC721GSNRecipientMockUpgradeable is Initializable, ERC721Upgradeable, ...@@ -34,12 +34,12 @@ contract ERC721GSNRecipientMockUpgradeable is Initializable, ERC721Upgradeable,
_mint(_msgSender(), tokenId); _mint(_msgSender(), tokenId);
} }
function _msgSender() internal view override(ContextUpgradeable, GSNRecipientUpgradeable) returns (address payable) { function _msgSender() internal view override(ContextUpgradeSafe, GSNRecipientUpgradeSafe) returns (address payable) {
return GSNRecipientUpgradeable._msgSender(); return GSNRecipientUpgradeSafe._msgSender();
} }
function _msgData() internal view override(ContextUpgradeable, GSNRecipientUpgradeable) returns (bytes memory) { function _msgData() internal view override(ContextUpgradeSafe, GSNRecipientUpgradeSafe) returns (bytes memory) {
return GSNRecipientUpgradeable._msgData(); return GSNRecipientUpgradeSafe._msgData();
} }
uint256[50] private __gap; uint256[50] private __gap;
......
...@@ -7,7 +7,7 @@ import "../Initializable.sol"; ...@@ -7,7 +7,7 @@ import "../Initializable.sol";
* @title ERC721Mock * @title ERC721Mock
* This mock just provides a public safeMint, mint, and burn functions for testing purposes * This mock just provides a public safeMint, mint, and burn functions for testing purposes
*/ */
contract ERC721MockUpgradeable is Initializable, ERC721Upgradeable { contract ERC721MockUpgradeSafe is Initializable, ERC721UpgradeSafe {
constructor(string memory name, string memory symbol) public { constructor(string memory name, string memory symbol) public {
__ERC721Mock_init(name, symbol); __ERC721Mock_init(name, symbol);
......
...@@ -7,7 +7,7 @@ import "../Initializable.sol"; ...@@ -7,7 +7,7 @@ import "../Initializable.sol";
* @title ERC721PausableMock * @title ERC721PausableMock
* This mock just provides a public mint, burn and exists functions for testing purposes * This mock just provides a public mint, burn and exists functions for testing purposes
*/ */
contract ERC721PausableMockUpgradeable is Initializable, ERC721PausableUpgradeable { contract ERC721PausableMockUpgradeSafe is Initializable, ERC721PausableUpgradeSafe {
constructor(string memory name, string memory symbol) public { constructor(string memory name, string memory symbol) public {
__ERC721PausableMock_init(name, symbol); __ERC721PausableMock_init(name, symbol);
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import '../presets/ERC721PresetMinterPauserAutoId.sol'; import '../presets/ERC721PresetMinterPauserAutoId.sol';
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC721PresetMinterPauserAutoIdMockUpgradeable is Initializable, ERC721PresetMinterPauserAutoIdUpgradeable { contract ERC721PresetMinterPauserAutoIdMockUpgradeSafe is Initializable, ERC721PresetMinterPauserAutoIdUpgradeSafe {
constructor(string memory name, string memory symbol, string memory baseURI) public payable { constructor(string memory name, string memory symbol, string memory baseURI) public payable {
__ERC721PresetMinterPauserAutoIdMock_init(name, symbol, baseURI); __ERC721PresetMinterPauserAutoIdMock_init(name, symbol, baseURI);
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../token/ERC721/IERC721Receiver.sol"; import "../token/ERC721/IERC721Receiver.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC721ReceiverMockUpgradeable is Initializable, IERC721Receiver { contract ERC721ReceiverMockUpgradeSafe is Initializable, IERC721Receiver {
bytes4 private _retval; bytes4 private _retval;
bool private _reverts; bool private _reverts;
......
...@@ -4,7 +4,7 @@ import "../GSN/Context.sol"; ...@@ -4,7 +4,7 @@ import "../GSN/Context.sol";
import "../token/ERC777/ERC777.sol"; import "../token/ERC777/ERC777.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC777MockUpgradeable is Initializable, ContextUpgradeable, ERC777Upgradeable { contract ERC777MockUpgradeSafe is Initializable, ContextUpgradeSafe, ERC777UpgradeSafe {
constructor( constructor(
address initialHolder, address initialHolder,
......
...@@ -8,7 +8,7 @@ import "../introspection/IERC1820Registry.sol"; ...@@ -8,7 +8,7 @@ import "../introspection/IERC1820Registry.sol";
import "../introspection/ERC1820Implementer.sol"; import "../introspection/ERC1820Implementer.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC777SenderRecipientMockUpgradeable is Initializable, ContextUpgradeable, IERC777Sender, IERC777Recipient, ERC1820ImplementerUpgradeable { contract ERC777SenderRecipientMockUpgradeSafe is Initializable, ContextUpgradeSafe, IERC777Sender, IERC777Recipient, ERC1820ImplementerUpgradeSafe {
constructor() public { constructor() public {
__ERC777SenderRecipientMock_init(); __ERC777SenderRecipientMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/EnumerableMap.sol"; import "../utils/EnumerableMap.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract EnumerableMapMockUpgradeable is Initializable { contract EnumerableMapMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__EnumerableMapMock_init(); __EnumerableMapMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/EnumerableSet.sol"; import "../utils/EnumerableSet.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract EnumerableSetMockUpgradeable is Initializable { contract EnumerableSetMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__EnumerableSetMock_init(); __EnumerableSetMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import '../payment/escrow/Escrow.sol'; import '../payment/escrow/Escrow.sol';
import "../Initializable.sol"; import "../Initializable.sol";
contract EscrowMockUpgradeable is Initializable, EscrowUpgradeable { contract EscrowMockUpgradeSafe is Initializable, EscrowUpgradeSafe {
constructor() public { constructor() public {
__EscrowMock_init(); __EscrowMock_init();
} }
......
pragma solidity ^0.6.0; pragma solidity ^0.6.0;
import "../Initializable.sol"; import "../Initializable.sol";
contract EtherReceiverMockUpgradeable is Initializable { contract EtherReceiverMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__EtherReceiverMock_init(); __EtherReceiverMock_init();
} }
......
...@@ -4,7 +4,7 @@ import "../GSN/GSNRecipient.sol"; ...@@ -4,7 +4,7 @@ import "../GSN/GSNRecipient.sol";
import "../GSN/GSNRecipientERC20Fee.sol"; import "../GSN/GSNRecipientERC20Fee.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract GSNRecipientERC20FeeMockUpgradeable is Initializable, GSNRecipientUpgradeable, GSNRecipientERC20FeeUpgradeable { contract GSNRecipientERC20FeeMockUpgradeSafe is Initializable, GSNRecipientUpgradeSafe, GSNRecipientERC20FeeUpgradeSafe {
constructor(string memory name, string memory symbol) public { constructor(string memory name, string memory symbol) public {
__GSNRecipientERC20FeeMock_init(name, symbol); __GSNRecipientERC20FeeMock_init(name, symbol);
......
...@@ -5,7 +5,7 @@ import "../GSN/GSNRecipient.sol"; ...@@ -5,7 +5,7 @@ import "../GSN/GSNRecipient.sol";
import "../Initializable.sol"; import "../Initializable.sol";
// By inheriting from GSNRecipient, Context's internal functions are overridden automatically // By inheriting from GSNRecipient, Context's internal functions are overridden automatically
contract GSNRecipientMockUpgradeable is Initializable, ContextMockUpgradeable, GSNRecipientUpgradeable { contract GSNRecipientMockUpgradeSafe is Initializable, ContextMockUpgradeSafe, GSNRecipientUpgradeSafe {
constructor() public { constructor() public {
__GSNRecipientMock_init(); __GSNRecipientMock_init();
} }
...@@ -43,12 +43,12 @@ contract GSNRecipientMockUpgradeable is Initializable, ContextMockUpgradeable, G ...@@ -43,12 +43,12 @@ contract GSNRecipientMockUpgradeable is Initializable, ContextMockUpgradeable, G
return _upgradeRelayHub(newRelayHub); return _upgradeRelayHub(newRelayHub);
} }
function _msgSender() internal override(ContextUpgradeable, GSNRecipientUpgradeable) view virtual returns (address payable) { function _msgSender() internal override(ContextUpgradeSafe, GSNRecipientUpgradeSafe) view virtual returns (address payable) {
return GSNRecipientUpgradeable._msgSender(); return GSNRecipientUpgradeSafe._msgSender();
} }
function _msgData() internal override(ContextUpgradeable, GSNRecipientUpgradeable) view virtual returns (bytes memory) { function _msgData() internal override(ContextUpgradeSafe, GSNRecipientUpgradeSafe) view virtual returns (bytes memory) {
return GSNRecipientUpgradeable._msgData(); return GSNRecipientUpgradeSafe._msgData();
} }
uint256[50] private __gap; uint256[50] private __gap;
......
...@@ -4,7 +4,7 @@ import "../GSN/GSNRecipient.sol"; ...@@ -4,7 +4,7 @@ import "../GSN/GSNRecipient.sol";
import "../GSN/GSNRecipientSignature.sol"; import "../GSN/GSNRecipientSignature.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract GSNRecipientSignatureMockUpgradeable is Initializable, GSNRecipientUpgradeable, GSNRecipientSignatureUpgradeable { contract GSNRecipientSignatureMockUpgradeSafe is Initializable, GSNRecipientUpgradeSafe, GSNRecipientSignatureUpgradeSafe {
constructor(address trustedSigner) public { constructor(address trustedSigner) public {
__GSNRecipientSignatureMock_init(trustedSigner); __GSNRecipientSignatureMock_init(trustedSigner);
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../math/Math.sol"; import "../math/Math.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract MathMockUpgradeable is Initializable { contract MathMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__MathMock_init(); __MathMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import { MerkleProof } from "../cryptography/MerkleProof.sol"; import { MerkleProof } from "../cryptography/MerkleProof.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract MerkleProofWrapperUpgradeable is Initializable { contract MerkleProofWrapperUpgradeSafe is Initializable {
constructor() public { constructor() public {
__MerkleProofWrapper_init(); __MerkleProofWrapper_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../access/Ownable.sol"; import "../access/Ownable.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract OwnableMockUpgradeable is Initializable, OwnableUpgradeable { contract OwnableMockUpgradeSafe is Initializable, OwnableUpgradeSafe {
constructor() public { constructor() public {
__OwnableMock_init(); __OwnableMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/Pausable.sol"; import "../utils/Pausable.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract PausableMockUpgradeable is Initializable, PausableUpgradeable { contract PausableMockUpgradeSafe is Initializable, PausableUpgradeSafe {
bool public drasticMeasureTaken; bool public drasticMeasureTaken;
uint256 public count; uint256 public count;
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import '../payment/PaymentSplitter.sol'; import '../payment/PaymentSplitter.sol';
import "../Initializable.sol"; import "../Initializable.sol";
contract PaymentSplitterMockUpgradeable is Initializable, PaymentSplitterUpgradeable { contract PaymentSplitterMockUpgradeSafe is Initializable, PaymentSplitterUpgradeSafe {
constructor(address[] memory payees, uint256[] memory shares) public payable { constructor(address[] memory payees, uint256[] memory shares) public payable {
__PaymentSplitterMock_init(payees, shares); __PaymentSplitterMock_init(payees, shares);
......
...@@ -4,7 +4,7 @@ import "../payment/PullPayment.sol"; ...@@ -4,7 +4,7 @@ import "../payment/PullPayment.sol";
import "../Initializable.sol"; import "../Initializable.sol";
// mock class using PullPayment // mock class using PullPayment
contract PullPaymentMockUpgradeable is Initializable, PullPaymentUpgradeable { contract PullPaymentMockUpgradeSafe is Initializable, PullPaymentUpgradeSafe {
constructor() public payable { constructor() public payable {
__PullPaymentMock_init(); __PullPaymentMock_init();
......
...@@ -2,7 +2,7 @@ pragma solidity ^0.6.0; ...@@ -2,7 +2,7 @@ pragma solidity ^0.6.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ReentrancyAttackUpgradeable is Initializable, ContextUpgradeable { contract ReentrancyAttackUpgradeSafe is Initializable, ContextUpgradeSafe {
constructor() public { constructor() public {
__ReentrancyAttack_init(); __ReentrancyAttack_init();
} }
......
...@@ -4,7 +4,7 @@ import "../utils/ReentrancyGuard.sol"; ...@@ -4,7 +4,7 @@ import "../utils/ReentrancyGuard.sol";
import "./ReentrancyAttack.sol"; import "./ReentrancyAttack.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ReentrancyMockUpgradeable is Initializable, ReentrancyGuardUpgradeable { contract ReentrancyMockUpgradeSafe is Initializable, ReentrancyGuardUpgradeSafe {
uint256 public counter; uint256 public counter;
...@@ -45,7 +45,7 @@ contract ReentrancyMockUpgradeable is Initializable, ReentrancyGuardUpgradeable ...@@ -45,7 +45,7 @@ contract ReentrancyMockUpgradeable is Initializable, ReentrancyGuardUpgradeable
} }
} }
function countAndCall(ReentrancyAttackUpgradeable attacker) public nonReentrant { function countAndCall(ReentrancyAttackUpgradeSafe attacker) public nonReentrant {
_count(); _count();
bytes4 func = bytes4(keccak256("callback()")); bytes4 func = bytes4(keccak256("callback()"));
attacker.callSender(func); attacker.callSender(func);
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import '../payment/escrow/RefundEscrow.sol'; import '../payment/escrow/RefundEscrow.sol';
import "../Initializable.sol"; import "../Initializable.sol";
contract RefundEscrowMockUpgradeable is Initializable, RefundEscrowUpgradeable { contract RefundEscrowMockUpgradeSafe is Initializable, RefundEscrowUpgradeSafe {
constructor(address payable beneficiary) public payable { constructor(address payable beneficiary) public payable {
__RefundEscrowMock_init(beneficiary); __RefundEscrowMock_init(beneficiary);
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/SafeCast.sol"; import "../utils/SafeCast.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract SafeCastMockUpgradeable is Initializable { contract SafeCastMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__SafeCastMock_init(); __SafeCastMock_init();
} }
......
...@@ -5,7 +5,7 @@ import "../token/ERC20/IERC20.sol"; ...@@ -5,7 +5,7 @@ import "../token/ERC20/IERC20.sol";
import "../token/ERC20/SafeERC20.sol"; import "../token/ERC20/SafeERC20.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract ERC20ReturnFalseMockUpgradeable is Initializable, ContextUpgradeable { contract ERC20ReturnFalseMockUpgradeSafe is Initializable, ContextUpgradeSafe {
constructor() public { constructor() public {
__ERC20ReturnFalseMock_init(); __ERC20ReturnFalseMock_init();
} }
...@@ -49,7 +49,7 @@ contract ERC20ReturnFalseMockUpgradeable is Initializable, ContextUpgradeable { ...@@ -49,7 +49,7 @@ contract ERC20ReturnFalseMockUpgradeable is Initializable, ContextUpgradeable {
uint256[48] private __gap; uint256[48] private __gap;
} }
contract ERC20ReturnTrueMockUpgradeable is Initializable, ContextUpgradeable { contract ERC20ReturnTrueMockUpgradeSafe is Initializable, ContextUpgradeSafe {
constructor() public { constructor() public {
__ERC20ReturnTrueMock_init(); __ERC20ReturnTrueMock_init();
} }
...@@ -96,7 +96,7 @@ contract ERC20ReturnTrueMockUpgradeable is Initializable, ContextUpgradeable { ...@@ -96,7 +96,7 @@ contract ERC20ReturnTrueMockUpgradeable is Initializable, ContextUpgradeable {
uint256[48] private __gap; uint256[48] private __gap;
} }
contract ERC20NoReturnMockUpgradeable is Initializable, ContextUpgradeable { contract ERC20NoReturnMockUpgradeSafe is Initializable, ContextUpgradeSafe {
constructor() public { constructor() public {
__ERC20NoReturnMock_init(); __ERC20NoReturnMock_init();
} }
...@@ -140,7 +140,7 @@ contract ERC20NoReturnMockUpgradeable is Initializable, ContextUpgradeable { ...@@ -140,7 +140,7 @@ contract ERC20NoReturnMockUpgradeable is Initializable, ContextUpgradeable {
uint256[48] private __gap; uint256[48] private __gap;
} }
contract SafeERC20MockUpgradeable is Initializable, ContextUpgradeable { contract SafeERC20MockUpgradeSafe is Initializable, ContextUpgradeSafe {
using SafeERC20 for IERC20; using SafeERC20 for IERC20;
IERC20 private _token; IERC20 private _token;
...@@ -184,7 +184,7 @@ contract SafeERC20MockUpgradeable is Initializable, ContextUpgradeable { ...@@ -184,7 +184,7 @@ contract SafeERC20MockUpgradeable is Initializable, ContextUpgradeable {
} }
function setAllowance(uint256 allowance_) public { function setAllowance(uint256 allowance_) public {
ERC20ReturnTrueMockUpgradeable(address(_token)).setAllowance(allowance_); ERC20ReturnTrueMockUpgradeSafe(address(_token)).setAllowance(allowance_);
} }
function allowance() public view returns (uint256) { function allowance() public view returns (uint256) {
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract SafeMathMockUpgradeable is Initializable { contract SafeMathMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__SafeMathMock_init(); __SafeMathMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../math/SignedSafeMath.sol"; import "../math/SignedSafeMath.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract SignedSafeMathMockUpgradeable is Initializable { contract SignedSafeMathMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__SignedSafeMathMock_init(); __SignedSafeMathMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "../utils/Strings.sol"; import "../utils/Strings.sol";
import "../Initializable.sol"; import "../Initializable.sol";
contract StringsMockUpgradeable is Initializable { contract StringsMockUpgradeSafe is Initializable {
constructor() public { constructor() public {
__StringsMock_init(); __StringsMock_init();
} }
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import '../token/ERC20/TokenTimelock.sol'; import '../token/ERC20/TokenTimelock.sol';
import "../Initializable.sol"; import "../Initializable.sol";
contract TokenTimelockMockUpgradeable is Initializable, TokenTimelockUpgradeable { contract TokenTimelockMockUpgradeSafe is Initializable, TokenTimelockUpgradeSafe {
constructor(IERC20 token, address beneficiary, uint256 releaseTime) public { constructor(IERC20 token, address beneficiary, uint256 releaseTime) public {
__TokenTimelockMock_init(token, beneficiary, releaseTime); __TokenTimelockMock_init(token, beneficiary, releaseTime);
......
...@@ -17,7 +17,7 @@ import "../Initializable.sol"; ...@@ -17,7 +17,7 @@ import "../Initializable.sol";
* accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
* function. * function.
*/ */
contract PaymentSplitterUpgradeable is Initializable, ContextUpgradeable { contract PaymentSplitterUpgradeSafe is Initializable, ContextUpgradeSafe {
using SafeMath for uint256; using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares); event PayeeAdded(address account, uint256 shares);
......
...@@ -21,8 +21,8 @@ import "../Initializable.sol"; ...@@ -21,8 +21,8 @@ import "../Initializable.sol";
* instead of Solidity's `transfer` function. Payees can query their due * instead of Solidity's `transfer` function. Payees can query their due
* payments with {payments}, and retrieve them with {withdrawPayments}. * payments with {payments}, and retrieve them with {withdrawPayments}.
*/ */
contract PullPaymentUpgradeable is Initializable { contract PullPaymentUpgradeSafe is Initializable {
EscrowUpgradeable private _escrow; EscrowUpgradeSafe private _escrow;
function __PullPayment_init() internal initializer { function __PullPayment_init() internal initializer {
...@@ -32,7 +32,7 @@ contract PullPaymentUpgradeable is Initializable { ...@@ -32,7 +32,7 @@ contract PullPaymentUpgradeable is Initializable {
function __PullPayment_init_unchained() internal initializer { function __PullPayment_init_unchained() internal initializer {
_escrow = new EscrowUpgradeable(); _escrow = new EscrowUpgradeSafe();
_escrow.initialize(); _escrow.initialize();
} }
......
...@@ -8,7 +8,7 @@ import "../../Initializable.sol"; ...@@ -8,7 +8,7 @@ import "../../Initializable.sol";
* @dev Base abstract escrow to only allow withdrawal if a condition is met. * @dev Base abstract escrow to only allow withdrawal if a condition is met.
* @dev Intended usage: See {Escrow}. Same usage guidelines apply here. * @dev Intended usage: See {Escrow}. Same usage guidelines apply here.
*/ */
abstract contract ConditionalEscrowUpgradeable is Initializable, EscrowUpgradeable { abstract contract ConditionalEscrowUpgradeSafe is Initializable, EscrowUpgradeSafe {
function __ConditionalEscrow_init() internal initializer { function __ConditionalEscrow_init() internal initializer {
__Context_init_unchained(); __Context_init_unchained();
__Ownable_init_unchained(); __Ownable_init_unchained();
......
...@@ -18,7 +18,7 @@ import "../../Initializable.sol"; ...@@ -18,7 +18,7 @@ import "../../Initializable.sol";
* payment method should be its owner, and provide public methods redirecting * payment method should be its owner, and provide public methods redirecting
* to the escrow's deposit and withdraw. * to the escrow's deposit and withdraw.
*/ */
contract EscrowUpgradeable is Initializable, OwnableUpgradeable { contract EscrowUpgradeSafe is Initializable, OwnableUpgradeSafe {
function initialize() public { function initialize() public {
__Escrow_init(); __Escrow_init();
} }
......
...@@ -13,7 +13,7 @@ import "../../Initializable.sol"; ...@@ -13,7 +13,7 @@ import "../../Initializable.sol";
* withdrawal by the beneficiary, or refunds to the depositors. All interactions * withdrawal by the beneficiary, or refunds to the depositors. All interactions
* with `RefundEscrow` will be made through the owner contract. * with `RefundEscrow` will be made through the owner contract.
*/ */
contract RefundEscrowUpgradeable is Initializable, ConditionalEscrowUpgradeable { contract RefundEscrowUpgradeSafe is Initializable, ConditionalEscrowUpgradeSafe {
enum State { Active, Refunding, Closed } enum State { Active, Refunding, Closed }
event RefundsClosed(); event RefundsClosed();
......
...@@ -21,7 +21,7 @@ import "../Initializable.sol"; ...@@ -21,7 +21,7 @@ import "../Initializable.sol";
* roles, as well as the default admin role, which will let it grant both minter * roles, as well as the default admin role, which will let it grant both minter
* and pauser roles to aother accounts * and pauser roles to aother accounts
*/ */
contract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable, AccessControlUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable { contract ERC20PresetMinterPauserUpgradeSafe is Initializable, ContextUpgradeSafe, AccessControlUpgradeSafe, ERC20BurnableUpgradeSafe, ERC20PausableUpgradeSafe {
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE");
...@@ -99,7 +99,7 @@ contract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable ...@@ -99,7 +99,7 @@ contract ERC20PresetMinterPauserUpgradeable is Initializable, ContextUpgradeable
_unpause(); _unpause();
} }
function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20Upgradeable, ERC20PausableUpgradeable) { function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20UpgradeSafe, ERC20PausableUpgradeSafe) {
super._beforeTokenTransfer(from, to, amount); super._beforeTokenTransfer(from, to, amount);
} }
......
...@@ -23,7 +23,7 @@ import "../Initializable.sol"; ...@@ -23,7 +23,7 @@ import "../Initializable.sol";
* roles, as well as the default admin role, which will let it grant both minter * roles, as well as the default admin role, which will let it grant both minter
* and pauser roles to aother accounts * and pauser roles to aother accounts
*/ */
contract ERC721PresetMinterPauserAutoIdUpgradeable is Initializable, ContextUpgradeable, AccessControlUpgradeable, ERC721BurnableUpgradeable, ERC721PausableUpgradeable { contract ERC721PresetMinterPauserAutoIdUpgradeSafe is Initializable, ContextUpgradeSafe, AccessControlUpgradeSafe, ERC721BurnableUpgradeSafe, ERC721PausableUpgradeSafe {
using Counters for Counters.Counter; using Counters for Counters.Counter;
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
...@@ -115,7 +115,7 @@ contract ERC721PresetMinterPauserAutoIdUpgradeable is Initializable, ContextUpgr ...@@ -115,7 +115,7 @@ contract ERC721PresetMinterPauserAutoIdUpgradeable is Initializable, ContextUpgr
_unpause(); _unpause();
} }
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721Upgradeable, ERC721PausableUpgradeable) { function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721UpgradeSafe, ERC721PausableUpgradeSafe) {
super._beforeTokenTransfer(from, to, tokenId); super._beforeTokenTransfer(from, to, tokenId);
} }
......
...@@ -30,7 +30,7 @@ import "../../Initializable.sol"; ...@@ -30,7 +30,7 @@ import "../../Initializable.sol";
* functions have been added to mitigate the well-known issues around setting * functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}. * allowances. See {IERC20-approve}.
*/ */
contract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20 { contract ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256; using SafeMath for uint256;
using Address for address; using Address for address;
......
...@@ -9,7 +9,7 @@ import "../../Initializable.sol"; ...@@ -9,7 +9,7 @@ import "../../Initializable.sol";
* tokens and those that they have an allowance for, in a way that can be * tokens and those that they have an allowance for, in a way that can be
* recognized off-chain (via event analysis). * recognized off-chain (via event analysis).
*/ */
abstract contract ERC20BurnableUpgradeable is Initializable, ContextUpgradeable, ERC20Upgradeable { abstract contract ERC20BurnableUpgradeSafe is Initializable, ContextUpgradeSafe, ERC20UpgradeSafe {
function __ERC20Burnable_init() internal initializer { function __ERC20Burnable_init() internal initializer {
__Context_init_unchained(); __Context_init_unchained();
__ERC20Burnable_init_unchained(); __ERC20Burnable_init_unchained();
......
...@@ -6,7 +6,7 @@ import "../../Initializable.sol"; ...@@ -6,7 +6,7 @@ import "../../Initializable.sol";
/** /**
* @dev Extension of {ERC20} that adds a cap to the supply of tokens. * @dev Extension of {ERC20} that adds a cap to the supply of tokens.
*/ */
abstract contract ERC20CappedUpgradeable is Initializable, ERC20Upgradeable { abstract contract ERC20CappedUpgradeSafe is Initializable, ERC20UpgradeSafe {
uint256 private _cap; uint256 private _cap;
/** /**
......
...@@ -11,7 +11,7 @@ import "../../Initializable.sol"; ...@@ -11,7 +11,7 @@ import "../../Initializable.sol";
* period, or having an emergency switch for freezing all token transfers in the * period, or having an emergency switch for freezing all token transfers in the
* event of a large bug. * event of a large bug.
*/ */
abstract contract ERC20PausableUpgradeable is Initializable, ERC20Upgradeable, PausableUpgradeable { abstract contract ERC20PausableUpgradeSafe is Initializable, ERC20UpgradeSafe, PausableUpgradeSafe {
function __ERC20Pausable_init() internal initializer { function __ERC20Pausable_init() internal initializer {
__Context_init_unchained(); __Context_init_unchained();
__Pausable_init_unchained(); __Pausable_init_unchained();
......
...@@ -30,7 +30,7 @@ import "../../Initializable.sol"; ...@@ -30,7 +30,7 @@ import "../../Initializable.sol";
* only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent * only significant for the first transfer that immediately follows a snapshot for a particular account. Subsequent
* transfers will have normal cost until the next snapshot, and so on. * transfers will have normal cost until the next snapshot, and so on.
*/ */
abstract contract ERC20SnapshotUpgradeable is Initializable, ERC20Upgradeable { abstract contract ERC20SnapshotUpgradeSafe is Initializable, ERC20UpgradeSafe {
function __ERC20Snapshot_init() internal initializer { function __ERC20Snapshot_init() internal initializer {
__Context_init_unchained(); __Context_init_unchained();
__ERC20Snapshot_init_unchained(); __ERC20Snapshot_init_unchained();
......
...@@ -12,7 +12,7 @@ import "../../Initializable.sol"; ...@@ -12,7 +12,7 @@ import "../../Initializable.sol";
* *
* For a more complete vesting schedule, see {TokenVesting}. * For a more complete vesting schedule, see {TokenVesting}.
*/ */
contract TokenTimelockUpgradeable is Initializable { contract TokenTimelockUpgradeSafe is Initializable {
using SafeERC20 for IERC20; using SafeERC20 for IERC20;
// ERC20 basic token contract being held // ERC20 basic token contract being held
......
...@@ -17,7 +17,7 @@ import "../../Initializable.sol"; ...@@ -17,7 +17,7 @@ import "../../Initializable.sol";
* @title ERC721 Non-Fungible Token Standard basic implementation * @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721 * @dev see https://eips.ethereum.org/EIPS/eip-721
*/ */
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721, IERC721Metadata, IERC721Enumerable { contract ERC721UpgradeSafe is Initializable, ContextUpgradeSafe, ERC165UpgradeSafe, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256; using SafeMath for uint256;
using Address for address; using Address for address;
using EnumerableSet for EnumerableSet.UintSet; using EnumerableSet for EnumerableSet.UintSet;
......
...@@ -8,7 +8,7 @@ import "../../Initializable.sol"; ...@@ -8,7 +8,7 @@ import "../../Initializable.sol";
* @title ERC721 Burnable Token * @title ERC721 Burnable Token
* @dev ERC721 Token that can be irreversibly burned (destroyed). * @dev ERC721 Token that can be irreversibly burned (destroyed).
*/ */
abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable { abstract contract ERC721BurnableUpgradeSafe is Initializable, ContextUpgradeSafe, ERC721UpgradeSafe {
function __ERC721Burnable_init() internal initializer { function __ERC721Burnable_init() internal initializer {
__Context_init_unchained(); __Context_init_unchained();
__ERC165_init_unchained(); __ERC165_init_unchained();
......
...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0; ...@@ -3,7 +3,7 @@ pragma solidity ^0.6.0;
import "./IERC721Receiver.sol"; import "./IERC721Receiver.sol";
import "../../Initializable.sol"; import "../../Initializable.sol";
contract ERC721HolderUpgradeable is Initializable, IERC721Receiver { contract ERC721HolderUpgradeSafe is Initializable, IERC721Receiver {
function __ERC721Holder_init() internal initializer { function __ERC721Holder_init() internal initializer {
__ERC721Holder_init_unchained(); __ERC721Holder_init_unchained();
} }
......
...@@ -11,7 +11,7 @@ import "../../Initializable.sol"; ...@@ -11,7 +11,7 @@ import "../../Initializable.sol";
* period, or having an emergency switch for freezing all token transfers in the * period, or having an emergency switch for freezing all token transfers in the
* event of a large bug. * event of a large bug.
*/ */
abstract contract ERC721PausableUpgradeable is Initializable, ERC721Upgradeable, PausableUpgradeable { abstract contract ERC721PausableUpgradeSafe is Initializable, ERC721UpgradeSafe, PausableUpgradeSafe {
function __ERC721Pausable_init() internal initializer { function __ERC721Pausable_init() internal initializer {
__Context_init_unchained(); __Context_init_unchained();
__ERC165_init_unchained(); __ERC165_init_unchained();
......
...@@ -25,7 +25,7 @@ import "../../Initializable.sol"; ...@@ -25,7 +25,7 @@ import "../../Initializable.sol";
* are no special restrictions in the amount of tokens that created, moved, or * are no special restrictions in the amount of tokens that created, moved, or
* destroyed. This makes integration with ERC20 applications seamless. * destroyed. This makes integration with ERC20 applications seamless.
*/ */
contract ERC777Upgradeable is Initializable, ContextUpgradeable, IERC777, IERC20 { contract ERC777UpgradeSafe is Initializable, ContextUpgradeSafe, IERC777, IERC20 {
using SafeMath for uint256; using SafeMath for uint256;
using Address for address; using Address for address;
......
...@@ -12,7 +12,7 @@ import "../Initializable.sol"; ...@@ -12,7 +12,7 @@ import "../Initializable.sol";
* the functions of your contract. Note that they will not be pausable by * the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place. * simply including this module, only once the modifiers are put in place.
*/ */
contract PausableUpgradeable is Initializable, ContextUpgradeable { contract PausableUpgradeSafe is Initializable, ContextUpgradeSafe {
/** /**
* @dev Emitted when the pause is triggered by `account`. * @dev Emitted when the pause is triggered by `account`.
*/ */
......
...@@ -17,7 +17,7 @@ import "../Initializable.sol"; ...@@ -17,7 +17,7 @@ import "../Initializable.sol";
* to protect against it, check out our blog post * to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/ */
contract ReentrancyGuardUpgradeable is Initializable { contract ReentrancyGuardUpgradeSafe is Initializable {
bool private _notEntered; bool private _notEntered;
......
...@@ -2,17 +2,17 @@ diff --git a/contracts/mocks/ContextMock.sol b/contracts/mocks/ContextMock.sol ...@@ -2,17 +2,17 @@ diff --git a/contracts/mocks/ContextMock.sol b/contracts/mocks/ContextMock.sol
index ae989969..5975438f 100644 index ae989969..5975438f 100644
--- a/contracts/mocks/ContextMock.sol --- a/contracts/mocks/ContextMock.sol
+++ b/contracts/mocks/ContextMock.sol +++ b/contracts/mocks/ContextMock.sol
@@ -45,11 +45,11 @@ contract ContextMockCallerUpgradeable is Initializable { @@ -45,11 +45,11 @@ contract ContextMockCallerUpgradeSafe is Initializable {
} }
- function callSender(ContextMock context) public { - function callSender(ContextMock context) public {
+ function callSender(ContextMockUpgradeable context) public { + function callSender(ContextMockUpgradeSafe context) public {
context.msgSender(); context.msgSender();
} }
- function callData(ContextMock context, uint256 integerValue, string memory stringValue) public { - function callData(ContextMock context, uint256 integerValue, string memory stringValue) public {
+ function callData(ContextMockUpgradeable context, uint256 integerValue, string memory stringValue) public { + function callData(ContextMockUpgradeSafe context, uint256 integerValue, string memory stringValue) public {
context.msgData(integerValue, stringValue); context.msgData(integerValue, stringValue);
} }
} }
...@@ -20,12 +20,12 @@ diff --git a/contracts/mocks/Create2Impl.sol b/contracts/mocks/Create2Impl.sol ...@@ -20,12 +20,12 @@ diff --git a/contracts/mocks/Create2Impl.sol b/contracts/mocks/Create2Impl.sol
index 5661a5ea..216f0266 100644 index 5661a5ea..216f0266 100644
--- a/contracts/mocks/Create2Impl.sol --- a/contracts/mocks/Create2Impl.sol
+++ b/contracts/mocks/Create2Impl.sol +++ b/contracts/mocks/Create2Impl.sol
@@ -24,7 +24,7 @@ contract Create2MockUpgradeable is Initializable { @@ -24,7 +24,7 @@ contract Create2MockUpgradeSafe is Initializable {
function deployERC1820Implementer(uint256 value, bytes32 salt) public { function deployERC1820Implementer(uint256 value, bytes32 salt) public {
// solhint-disable-next-line indent // solhint-disable-next-line indent
- Create2.deploy(value, salt, type(ERC1820Implementer).creationCode); - Create2.deploy(value, salt, type(ERC1820Implementer).creationCode);
+ Create2.deploy(value, salt, type(ERC1820ImplementerUpgradeable).creationCode); + Create2.deploy(value, salt, type(ERC1820ImplementerUpgradeSafe).creationCode);
} }
function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) { function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) {
...@@ -33,46 +33,46 @@ diff --git a/contracts/mocks/ERC721GSNRecipientMock.sol b/contracts/mocks/ERC721 ...@@ -33,46 +33,46 @@ diff --git a/contracts/mocks/ERC721GSNRecipientMock.sol b/contracts/mocks/ERC721
index 322ba7ca..1b75ceb8 100644 index 322ba7ca..1b75ceb8 100644
--- a/contracts/mocks/ERC721GSNRecipientMock.sol --- a/contracts/mocks/ERC721GSNRecipientMock.sol
+++ b/contracts/mocks/ERC721GSNRecipientMock.sol +++ b/contracts/mocks/ERC721GSNRecipientMock.sol
@@ -35,10 +35,10 @@ contract ERC721GSNRecipientMockUpgradeable is Initializable, ERC721Upgradeable, @@ -35,10 +35,10 @@ contract ERC721GSNRecipientMockUpgradeSafe is Initializable, ERC721UpgradeSafe,
} }
function _msgSender() internal view override(ContextUpgradeable, GSNRecipientUpgradeable) returns (address payable) { function _msgSender() internal view override(ContextUpgradeSafe, GSNRecipientUpgradeSafe) returns (address payable) {
- return GSNRecipient._msgSender(); - return GSNRecipient._msgSender();
+ return GSNRecipientUpgradeable._msgSender(); + return GSNRecipientUpgradeSafe._msgSender();
} }
function _msgData() internal view override(ContextUpgradeable, GSNRecipientUpgradeable) returns (bytes memory) { function _msgData() internal view override(ContextUpgradeSafe, GSNRecipientUpgradeSafe) returns (bytes memory) {
- return GSNRecipient._msgData(); - return GSNRecipient._msgData();
+ return GSNRecipientUpgradeable._msgData(); + return GSNRecipientUpgradeSafe._msgData();
} }
} }
diff --git a/contracts/mocks/GSNRecipientMock.sol b/contracts/mocks/GSNRecipientMock.sol diff --git a/contracts/mocks/GSNRecipientMock.sol b/contracts/mocks/GSNRecipientMock.sol
index 4f29dec0..95ea1db1 100644 index 4f29dec0..95ea1db1 100644
--- a/contracts/mocks/GSNRecipientMock.sol --- a/contracts/mocks/GSNRecipientMock.sol
+++ b/contracts/mocks/GSNRecipientMock.sol +++ b/contracts/mocks/GSNRecipientMock.sol
@@ -44,10 +44,10 @@ contract GSNRecipientMockUpgradeable is Initializable, ContextMockUpgradeable, G @@ -44,10 +44,10 @@ contract GSNRecipientMockUpgradeSafe is Initializable, ContextMockUpgradeSafe, G
} }
function _msgSender() internal override(ContextUpgradeable, GSNRecipientUpgradeable) view virtual returns (address payable) { function _msgSender() internal override(ContextUpgradeSafe, GSNRecipientUpgradeSafe) view virtual returns (address payable) {
- return GSNRecipient._msgSender(); - return GSNRecipient._msgSender();
+ return GSNRecipientUpgradeable._msgSender(); + return GSNRecipientUpgradeSafe._msgSender();
} }
function _msgData() internal override(ContextUpgradeable, GSNRecipientUpgradeable) view virtual returns (bytes memory) { function _msgData() internal override(ContextUpgradeSafe, GSNRecipientUpgradeSafe) view virtual returns (bytes memory) {
- return GSNRecipient._msgData(); - return GSNRecipient._msgData();
+ return GSNRecipientUpgradeable._msgData(); + return GSNRecipientUpgradeSafe._msgData();
} }
} }
diff --git a/contracts/mocks/ReentrancyMock.sol b/contracts/mocks/ReentrancyMock.sol diff --git a/contracts/mocks/ReentrancyMock.sol b/contracts/mocks/ReentrancyMock.sol
index 4884937f..4fe0b398 100644 index 4884937f..4fe0b398 100644
--- a/contracts/mocks/ReentrancyMock.sol --- a/contracts/mocks/ReentrancyMock.sol
+++ b/contracts/mocks/ReentrancyMock.sol +++ b/contracts/mocks/ReentrancyMock.sol
@@ -45,7 +45,7 @@ contract ReentrancyMockUpgradeable is Initializable, ReentrancyGuardUpgradeable @@ -45,7 +45,7 @@ contract ReentrancyMockUpgradeSafe is Initializable, ReentrancyGuardUpgradeSafe
} }
} }
- function countAndCall(ReentrancyAttack attacker) public nonReentrant { - function countAndCall(ReentrancyAttack attacker) public nonReentrant {
+ function countAndCall(ReentrancyAttackUpgradeable attacker) public nonReentrant { + function countAndCall(ReentrancyAttackUpgradeSafe attacker) public nonReentrant {
_count(); _count();
bytes4 func = bytes4(keccak256("callback()")); bytes4 func = bytes4(keccak256("callback()"));
attacker.callSender(func); attacker.callSender(func);
...@@ -80,12 +80,12 @@ diff --git a/contracts/mocks/SafeERC20Helper.sol b/contracts/mocks/SafeERC20Help ...@@ -80,12 +80,12 @@ diff --git a/contracts/mocks/SafeERC20Helper.sol b/contracts/mocks/SafeERC20Help
index 53828632..9fcf9cc6 100644 index 53828632..9fcf9cc6 100644
--- a/contracts/mocks/SafeERC20Helper.sol --- a/contracts/mocks/SafeERC20Helper.sol
+++ b/contracts/mocks/SafeERC20Helper.sol +++ b/contracts/mocks/SafeERC20Helper.sol
@@ -178,7 +178,7 @@ contract SafeERC20MockUpgradeable is Initializable, ContextUpgradeable { @@ -178,7 +178,7 @@ contract SafeERC20MockUpgradeSafe is Initializable, ContextUpgradeSafe {
} }
function setAllowance(uint256 allowance_) public { function setAllowance(uint256 allowance_) public {
- ERC20ReturnTrueMock(address(_token)).setAllowance(allowance_); - ERC20ReturnTrueMock(address(_token)).setAllowance(allowance_);
+ ERC20ReturnTrueMockUpgradeable(address(_token)).setAllowance(allowance_); + ERC20ReturnTrueMockUpgradeSafe(address(_token)).setAllowance(allowance_);
} }
function allowance() public view returns (uint256) { function allowance() public view returns (uint256) {
...@@ -96,18 +96,18 @@ index 9decf658..3763f2dc 100644 ...@@ -96,18 +96,18 @@ index 9decf658..3763f2dc 100644
@@ -22,7 +22,7 @@ import "../Initializable.sol"; @@ -22,7 +22,7 @@ import "../Initializable.sol";
* payments with {payments}, and retrieve them with {withdrawPayments}. * payments with {payments}, and retrieve them with {withdrawPayments}.
*/ */
contract PullPaymentUpgradeable is Initializable { contract PullPaymentUpgradeSafe is Initializable {
- Escrow private _escrow; - Escrow private _escrow;
+ EscrowUpgradeable private _escrow; + EscrowUpgradeSafe private _escrow;
function __PullPayment_init() internal initializer { function __PullPayment_init() internal initializer {
@@ -32,7 +32,7 @@ contract PullPaymentUpgradeable is Initializable { @@ -32,7 +32,7 @@ contract PullPaymentUpgradeSafe is Initializable {
function __PullPayment_init_unchained() internal initializer { function __PullPayment_init_unchained() internal initializer {
- _escrow = new Escrow(); - _escrow = new Escrow();
+ _escrow = new EscrowUpgradeable(); + _escrow = new EscrowUpgradeSafe();
} }
...@@ -2,10 +2,10 @@ diff --git a/contracts/payment/PullPayment.sol b/contracts/payment/PullPayment.s ...@@ -2,10 +2,10 @@ diff --git a/contracts/payment/PullPayment.sol b/contracts/payment/PullPayment.s
index 69d2fc5c..f71282d3 100644 index 69d2fc5c..f71282d3 100644
--- a/contracts/payment/PullPayment.sol --- a/contracts/payment/PullPayment.sol
+++ b/contracts/payment/PullPayment.sol +++ b/contracts/payment/PullPayment.sol
@@ -33,7 +33,7 @@ contract PullPaymentUpgradeable is Initializable { @@ -33,7 +33,7 @@ contract PullPaymentUpgradeSafe is Initializable {
_escrow = new EscrowUpgradeable(); _escrow = new EscrowUpgradeSafe();
- -
+ _escrow.initialize(); + _escrow.initialize();
} }
......
...@@ -17,7 +17,7 @@ git checkout $(git ls-files -d) ...@@ -17,7 +17,7 @@ git checkout $(git ls-files -d)
# git add contracts # git add contracts
rs "contract\.fromArtifact\('([^I].*?)'\)" "contract.fromArtifact('\${1}Upgradeable')" test rs "contract\.fromArtifact\('([^I].*?)'\)" "contract.fromArtifact('\${1}UpgradeSafe')" test
cat patches/* | patch -p1 cat patches/* | patch -p1
......
...@@ -2,7 +2,7 @@ const { contract } = require('@openzeppelin/test-environment'); ...@@ -2,7 +2,7 @@ const { contract } = require('@openzeppelin/test-environment');
const { BN, expectEvent } = require('@openzeppelin/test-helpers'); const { BN, expectEvent } = require('@openzeppelin/test-helpers');
const ContextMock = contract.fromArtifact('ContextMockUpgradeable'); const ContextMock = contract.fromArtifact('ContextMockUpgradeSafe');
function shouldBehaveLikeRegularContext (sender) { function shouldBehaveLikeRegularContext (sender) {
describe('msgSender', function () { describe('msgSender', function () {
......
...@@ -2,8 +2,8 @@ const { accounts, contract } = require('@openzeppelin/test-environment'); ...@@ -2,8 +2,8 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
require('@openzeppelin/test-helpers'); require('@openzeppelin/test-helpers');
const ContextMock = contract.fromArtifact('ContextMockUpgradeable'); const ContextMock = contract.fromArtifact('ContextMockUpgradeSafe');
const ContextMockCaller = contract.fromArtifact('ContextMockCallerUpgradeable'); const ContextMockCaller = contract.fromArtifact('ContextMockCallerUpgradeSafe');
const { shouldBehaveLikeRegularContext } = require('./Context.behavior'); const { shouldBehaveLikeRegularContext } = require('./Context.behavior');
......
...@@ -6,7 +6,7 @@ const gsn = require('@openzeppelin/gsn-helpers'); ...@@ -6,7 +6,7 @@ const gsn = require('@openzeppelin/gsn-helpers');
const { fixSignature } = require('../helpers/sign'); const { fixSignature } = require('../helpers/sign');
const { utils: { toBN } } = require('web3'); const { utils: { toBN } } = require('web3');
const ERC721GSNRecipientMock = contract.fromArtifact('ERC721GSNRecipientMockUpgradeable'); const ERC721GSNRecipientMock = contract.fromArtifact('ERC721GSNRecipientMockUpgradeSafe');
describe('ERC721GSNRecipient (integration)', function () { describe('ERC721GSNRecipient (integration)', function () {
const [ signer, sender ] = accounts; const [ signer, sender ] = accounts;
......
...@@ -7,8 +7,8 @@ const gsn = require('@openzeppelin/gsn-helpers'); ...@@ -7,8 +7,8 @@ const gsn = require('@openzeppelin/gsn-helpers');
const { expect } = require('chai'); const { expect } = require('chai');
const GSNRecipientMock = contract.fromArtifact('GSNRecipientMockUpgradeable'); const GSNRecipientMock = contract.fromArtifact('GSNRecipientMockUpgradeSafe');
const ContextMockCaller = contract.fromArtifact('ContextMockCallerUpgradeable'); const ContextMockCaller = contract.fromArtifact('ContextMockCallerUpgradeSafe');
const { shouldBehaveLikeRegularContext } = require('./Context.behavior'); const { shouldBehaveLikeRegularContext } = require('./Context.behavior');
......
...@@ -5,8 +5,8 @@ const gsn = require('@openzeppelin/gsn-helpers'); ...@@ -5,8 +5,8 @@ const gsn = require('@openzeppelin/gsn-helpers');
const { expect } = require('chai'); const { expect } = require('chai');
const GSNRecipientERC20FeeMock = contract.fromArtifact('GSNRecipientERC20FeeMockUpgradeable'); const GSNRecipientERC20FeeMock = contract.fromArtifact('GSNRecipientERC20FeeMockUpgradeSafe');
const ERC20 = contract.fromArtifact('ERC20Upgradeable'); const ERC20 = contract.fromArtifact('ERC20UpgradeSafe');
const IRelayHub = contract.fromArtifact('IRelayHub'); const IRelayHub = contract.fromArtifact('IRelayHub');
describe('GSNRecipientERC20Fee', function () { describe('GSNRecipientERC20Fee', function () {
......
...@@ -6,7 +6,7 @@ const { fixSignature } = require('../helpers/sign'); ...@@ -6,7 +6,7 @@ const { fixSignature } = require('../helpers/sign');
const { utils: { toBN } } = require('web3'); const { utils: { toBN } } = require('web3');
const { ZERO_ADDRESS } = constants; const { ZERO_ADDRESS } = constants;
const GSNRecipientSignatureMock = contract.fromArtifact('GSNRecipientSignatureMockUpgradeable'); const GSNRecipientSignatureMock = contract.fromArtifact('GSNRecipientSignatureMockUpgradeSafe');
describe('GSNRecipientSignature', function () { describe('GSNRecipientSignature', function () {
const [ signer, other ] = accounts; const [ signer, other ] = accounts;
......
...@@ -4,7 +4,7 @@ const { expectEvent, expectRevert } = require('@openzeppelin/test-helpers'); ...@@ -4,7 +4,7 @@ const { expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
const { expect } = require('chai'); const { expect } = require('chai');
const AccessControlMock = contract.fromArtifact('AccessControlMockUpgradeable'); const AccessControlMock = contract.fromArtifact('AccessControlMockUpgradeSafe');
describe('AccessControl', function () { describe('AccessControl', function () {
const [ admin, authorized, otherAuthorized, other, otherAdmin ] = accounts; const [ admin, authorized, otherAuthorized, other, otherAdmin ] = accounts;
......
...@@ -4,7 +4,7 @@ const { ZERO_ADDRESS } = constants; ...@@ -4,7 +4,7 @@ const { ZERO_ADDRESS } = constants;
const { expect } = require('chai'); const { expect } = require('chai');
const Ownable = contract.fromArtifact('OwnableMockUpgradeable'); const Ownable = contract.fromArtifact('OwnableMockUpgradeSafe');
describe('Ownable', function () { describe('Ownable', function () {
const [ owner, other ] = accounts; const [ owner, other ] = accounts;
......
...@@ -5,7 +5,7 @@ const { toEthSignedMessageHash, fixSignature } = require('../helpers/sign'); ...@@ -5,7 +5,7 @@ const { toEthSignedMessageHash, fixSignature } = require('../helpers/sign');
const { expect } = require('chai'); const { expect } = require('chai');
const ECDSAMock = contract.fromArtifact('ECDSAMockUpgradeable'); const ECDSAMock = contract.fromArtifact('ECDSAMockUpgradeSafe');
const TEST_MESSAGE = web3.utils.sha3('OpenZeppelin'); const TEST_MESSAGE = web3.utils.sha3('OpenZeppelin');
const WRONG_MESSAGE = web3.utils.sha3('Nope'); const WRONG_MESSAGE = web3.utils.sha3('Nope');
......
...@@ -7,7 +7,7 @@ const { keccak256, bufferToHex } = require('ethereumjs-util'); ...@@ -7,7 +7,7 @@ const { keccak256, bufferToHex } = require('ethereumjs-util');
const { expect } = require('chai'); const { expect } = require('chai');
const MerkleProofWrapper = contract.fromArtifact('MerkleProofWrapperUpgradeable'); const MerkleProofWrapper = contract.fromArtifact('MerkleProofWrapperUpgradeSafe');
describe('MerkleProof', function () { describe('MerkleProof', function () {
beforeEach(async function () { beforeEach(async function () {
......
...@@ -3,7 +3,7 @@ const { expectRevert } = require('@openzeppelin/test-helpers'); ...@@ -3,7 +3,7 @@ const { expectRevert } = require('@openzeppelin/test-helpers');
const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
const ERC165Mock = contract.fromArtifact('ERC165MockUpgradeable'); const ERC165Mock = contract.fromArtifact('ERC165MockUpgradeSafe');
describe('ERC165', function () { describe('ERC165', function () {
beforeEach(async function () { beforeEach(async function () {
......
...@@ -3,9 +3,9 @@ require('@openzeppelin/test-helpers'); ...@@ -3,9 +3,9 @@ require('@openzeppelin/test-helpers');
const { expect } = require('chai'); const { expect } = require('chai');
const ERC165CheckerMock = contract.fromArtifact('ERC165CheckerMockUpgradeable'); const ERC165CheckerMock = contract.fromArtifact('ERC165CheckerMockUpgradeSafe');
const ERC165NotSupported = contract.fromArtifact('ERC165NotSupportedUpgradeable'); const ERC165NotSupported = contract.fromArtifact('ERC165NotSupportedUpgradeSafe');
const ERC165InterfacesSupported = contract.fromArtifact('ERC165InterfacesSupportedUpgradeable'); const ERC165InterfacesSupported = contract.fromArtifact('ERC165InterfacesSupportedUpgradeSafe');
const DUMMY_ID = '0xdeadbeef'; const DUMMY_ID = '0xdeadbeef';
const DUMMY_ID_2 = '0xcafebabe'; const DUMMY_ID_2 = '0xcafebabe';
......
...@@ -5,7 +5,7 @@ const { bufferToHex, keccak256 } = require('ethereumjs-util'); ...@@ -5,7 +5,7 @@ const { bufferToHex, keccak256 } = require('ethereumjs-util');
const { expect } = require('chai'); const { expect } = require('chai');
const ERC1820ImplementerMock = contract.fromArtifact('ERC1820ImplementerMockUpgradeable'); const ERC1820ImplementerMock = contract.fromArtifact('ERC1820ImplementerMockUpgradeSafe');
describe('ERC1820Implementer', function () { describe('ERC1820Implementer', function () {
const [ registryFunder, implementee, other ] = accounts; const [ registryFunder, implementee, other ] = accounts;
......
...@@ -3,7 +3,7 @@ const { BN } = require('@openzeppelin/test-helpers'); ...@@ -3,7 +3,7 @@ const { BN } = require('@openzeppelin/test-helpers');
const { expect } = require('chai'); const { expect } = require('chai');
const MathMock = contract.fromArtifact('MathMockUpgradeable'); const MathMock = contract.fromArtifact('MathMockUpgradeSafe');
describe('Math', function () { describe('Math', function () {
const min = new BN('1234'); const min = new BN('1234');
......
...@@ -4,7 +4,7 @@ const { MAX_UINT256 } = constants; ...@@ -4,7 +4,7 @@ const { MAX_UINT256 } = constants;
const { expect } = require('chai'); const { expect } = require('chai');
const SafeMathMock = contract.fromArtifact('SafeMathMockUpgradeable'); const SafeMathMock = contract.fromArtifact('SafeMathMockUpgradeSafe');
describe('SafeMath', function () { describe('SafeMath', function () {
beforeEach(async function () { beforeEach(async function () {
......
...@@ -5,7 +5,7 @@ const { MAX_INT256, MIN_INT256 } = constants; ...@@ -5,7 +5,7 @@ const { MAX_INT256, MIN_INT256 } = constants;
const { expect } = require('chai'); const { expect } = require('chai');
const SignedSafeMathMock = contract.fromArtifact('SignedSafeMathMockUpgradeable'); const SignedSafeMathMock = contract.fromArtifact('SignedSafeMathMockUpgradeSafe');
describe('SignedSafeMath', function () { describe('SignedSafeMath', function () {
beforeEach(async function () { beforeEach(async function () {
......
...@@ -5,7 +5,7 @@ const { ZERO_ADDRESS } = constants; ...@@ -5,7 +5,7 @@ const { ZERO_ADDRESS } = constants;
const { expect } = require('chai'); const { expect } = require('chai');
const PaymentSplitter = contract.fromArtifact('PaymentSplitterMockUpgradeable'); const PaymentSplitter = contract.fromArtifact('PaymentSplitterMockUpgradeSafe');
describe('PaymentSplitter', function () { describe('PaymentSplitter', function () {
const [ owner, payee1, payee2, payee3, nonpayee1, payer1 ] = accounts; const [ owner, payee1, payee2, payee3, nonpayee1, payer1 ] = accounts;
......
...@@ -4,7 +4,7 @@ const { balance, ether } = require('@openzeppelin/test-helpers'); ...@@ -4,7 +4,7 @@ const { balance, ether } = require('@openzeppelin/test-helpers');
const { expect } = require('chai'); const { expect } = require('chai');
const PullPaymentMock = contract.fromArtifact('PullPaymentMockUpgradeable'); const PullPaymentMock = contract.fromArtifact('PullPaymentMockUpgradeSafe');
describe('PullPayment', function () { describe('PullPayment', function () {
const [ payer, payee1, payee2 ] = accounts; const [ payer, payee1, payee2 ] = accounts;
......
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