Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
85e02b23
Commit
85e02b23
authored
May 13, 2020
by
Francisco Giordano
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rename to UpgradeSafe
parent
d13d0ea9
Hide whitespace changes
Inline
Side-by-side
Showing
128 changed files
with
191 additions
and
191 deletions
+191
-191
Context.sol
contracts/GSN/Context.sol
+1
-1
GSNRecipient.sol
contracts/GSN/GSNRecipient.sol
+1
-1
GSNRecipientERC20Fee.sol
contracts/GSN/GSNRecipientERC20Fee.sol
+2
-2
GSNRecipientSignature.sol
contracts/GSN/GSNRecipientSignature.sol
+1
-1
AccessControl.sol
contracts/access/AccessControl.sol
+1
-1
Ownable.sol
contracts/access/Ownable.sol
+1
-1
TokenVesting.sol
contracts/drafts/TokenVesting.sol
+1
-1
ERC165.sol
contracts/introspection/ERC165.sol
+1
-1
ERC1820Implementer.sol
contracts/introspection/ERC1820Implementer.sol
+1
-1
AccessControlMock.sol
contracts/mocks/AccessControlMock.sol
+1
-1
AddressImpl.sol
contracts/mocks/AddressImpl.sol
+1
-1
ArraysImpl.sol
contracts/mocks/ArraysImpl.sol
+1
-1
ConditionalEscrowMock.sol
contracts/mocks/ConditionalEscrowMock.sol
+1
-1
ContextMock.sol
contracts/mocks/ContextMock.sol
+4
-4
CountersImpl.sol
contracts/mocks/CountersImpl.sol
+1
-1
Create2Impl.sol
contracts/mocks/Create2Impl.sol
+2
-2
ECDSAMock.sol
contracts/mocks/ECDSAMock.sol
+1
-1
ERC165InterfacesSupported.sol
contracts/mocks/ERC165/ERC165InterfacesSupported.sol
+2
-2
ERC165NotSupported.sol
contracts/mocks/ERC165/ERC165NotSupported.sol
+1
-1
ERC165CheckerMock.sol
contracts/mocks/ERC165CheckerMock.sol
+1
-1
ERC165Mock.sol
contracts/mocks/ERC165Mock.sol
+1
-1
ERC1820ImplementerMock.sol
contracts/mocks/ERC1820ImplementerMock.sol
+1
-1
ERC20BurnableMock.sol
contracts/mocks/ERC20BurnableMock.sol
+1
-1
ERC20CappedMock.sol
contracts/mocks/ERC20CappedMock.sol
+1
-1
ERC20DecimalsMock.sol
contracts/mocks/ERC20DecimalsMock.sol
+1
-1
ERC20Mock.sol
contracts/mocks/ERC20Mock.sol
+1
-1
ERC20PausableMock.sol
contracts/mocks/ERC20PausableMock.sol
+1
-1
ERC20PresetMinterPauserMock.sol
contracts/mocks/ERC20PresetMinterPauserMock.sol
+1
-1
ERC20SnapshotMock.sol
contracts/mocks/ERC20SnapshotMock.sol
+1
-1
ERC721BurnableMock.sol
contracts/mocks/ERC721BurnableMock.sol
+1
-1
ERC721GSNRecipientMock.sol
contracts/mocks/ERC721GSNRecipientMock.sol
+5
-5
ERC721Mock.sol
contracts/mocks/ERC721Mock.sol
+1
-1
ERC721PausableMock.sol
contracts/mocks/ERC721PausableMock.sol
+1
-1
ERC721PresetMinterPauserAutoIdMock.sol
contracts/mocks/ERC721PresetMinterPauserAutoIdMock.sol
+1
-1
ERC721ReceiverMock.sol
contracts/mocks/ERC721ReceiverMock.sol
+1
-1
ERC777Mock.sol
contracts/mocks/ERC777Mock.sol
+1
-1
ERC777SenderRecipientMock.sol
contracts/mocks/ERC777SenderRecipientMock.sol
+1
-1
EnumerableMapMock.sol
contracts/mocks/EnumerableMapMock.sol
+1
-1
EnumerableSetMock.sol
contracts/mocks/EnumerableSetMock.sol
+1
-1
EscrowMock.sol
contracts/mocks/EscrowMock.sol
+1
-1
EtherReceiverMock.sol
contracts/mocks/EtherReceiverMock.sol
+1
-1
GSNRecipientERC20FeeMock.sol
contracts/mocks/GSNRecipientERC20FeeMock.sol
+1
-1
GSNRecipientMock.sol
contracts/mocks/GSNRecipientMock.sol
+5
-5
GSNRecipientSignatureMock.sol
contracts/mocks/GSNRecipientSignatureMock.sol
+1
-1
MathMock.sol
contracts/mocks/MathMock.sol
+1
-1
MerkleProofWrapper.sol
contracts/mocks/MerkleProofWrapper.sol
+1
-1
OwnableMock.sol
contracts/mocks/OwnableMock.sol
+1
-1
PausableMock.sol
contracts/mocks/PausableMock.sol
+1
-1
PaymentSplitterMock.sol
contracts/mocks/PaymentSplitterMock.sol
+1
-1
PullPaymentMock.sol
contracts/mocks/PullPaymentMock.sol
+1
-1
ReentrancyAttack.sol
contracts/mocks/ReentrancyAttack.sol
+1
-1
ReentrancyMock.sol
contracts/mocks/ReentrancyMock.sol
+2
-2
RefundEscrowMock.sol
contracts/mocks/RefundEscrowMock.sol
+1
-1
SafeCastMock.sol
contracts/mocks/SafeCastMock.sol
+1
-1
SafeERC20Helper.sol
contracts/mocks/SafeERC20Helper.sol
+5
-5
SafeMathMock.sol
contracts/mocks/SafeMathMock.sol
+1
-1
SignedSafeMathMock.sol
contracts/mocks/SignedSafeMathMock.sol
+1
-1
StringsMock.sol
contracts/mocks/StringsMock.sol
+1
-1
TokenTimelockMock.sol
contracts/mocks/TokenTimelockMock.sol
+1
-1
PaymentSplitter.sol
contracts/payment/PaymentSplitter.sol
+1
-1
PullPayment.sol
contracts/payment/PullPayment.sol
+3
-3
ConditionalEscrow.sol
contracts/payment/escrow/ConditionalEscrow.sol
+1
-1
Escrow.sol
contracts/payment/escrow/Escrow.sol
+1
-1
RefundEscrow.sol
contracts/payment/escrow/RefundEscrow.sol
+1
-1
ERC20PresetMinterPauser.sol
contracts/presets/ERC20PresetMinterPauser.sol
+2
-2
ERC721PresetMinterPauserAutoId.sol
contracts/presets/ERC721PresetMinterPauserAutoId.sol
+2
-2
ERC20.sol
contracts/token/ERC20/ERC20.sol
+1
-1
ERC20Burnable.sol
contracts/token/ERC20/ERC20Burnable.sol
+1
-1
ERC20Capped.sol
contracts/token/ERC20/ERC20Capped.sol
+1
-1
ERC20Pausable.sol
contracts/token/ERC20/ERC20Pausable.sol
+1
-1
ERC20Snapshot.sol
contracts/token/ERC20/ERC20Snapshot.sol
+1
-1
TokenTimelock.sol
contracts/token/ERC20/TokenTimelock.sol
+1
-1
ERC721.sol
contracts/token/ERC721/ERC721.sol
+1
-1
ERC721Burnable.sol
contracts/token/ERC721/ERC721Burnable.sol
+1
-1
ERC721Holder.sol
contracts/token/ERC721/ERC721Holder.sol
+1
-1
ERC721Pausable.sol
contracts/token/ERC721/ERC721Pausable.sol
+1
-1
ERC777.sol
contracts/token/ERC777/ERC777.sol
+1
-1
Pausable.sol
contracts/utils/Pausable.sol
+1
-1
ReentrancyGuard.sol
contracts/utils/ReentrancyGuard.sol
+1
-1
00-fix-references.patch
patches/00-fix-references.patch
+23
-23
01-initialize-escrow.patch
patches/01-initialize-escrow.patch
+2
-2
upgrade-safe.sh
scripts/upgrade-safe.sh
+1
-1
Context.behavior.js
test/GSN/Context.behavior.js
+1
-1
Context.test.js
test/GSN/Context.test.js
+2
-2
ERC721GSNRecipientMock.test.js
test/GSN/ERC721GSNRecipientMock.test.js
+1
-1
GSNRecipient.test.js
test/GSN/GSNRecipient.test.js
+2
-2
GSNRecipientERC20Fee.test.js
test/GSN/GSNRecipientERC20Fee.test.js
+2
-2
GSNRecipientSignature.test.js
test/GSN/GSNRecipientSignature.test.js
+1
-1
AccessControl.test.js
test/access/AccessControl.test.js
+1
-1
Ownable.test.js
test/access/Ownable.test.js
+1
-1
ECDSA.test.js
test/cryptography/ECDSA.test.js
+1
-1
MerkleProof.test.js
test/cryptography/MerkleProof.test.js
+1
-1
ERC165.test.js
test/introspection/ERC165.test.js
+1
-1
ERC165Checker.test.js
test/introspection/ERC165Checker.test.js
+3
-3
ERC1820Implementer.test.js
test/introspection/ERC1820Implementer.test.js
+1
-1
Math.test.js
test/math/Math.test.js
+1
-1
SafeMath.test.js
test/math/SafeMath.test.js
+1
-1
SignedSafeMath.test.js
test/math/SignedSafeMath.test.js
+1
-1
PaymentSplitter.test.js
test/payment/PaymentSplitter.test.js
+1
-1
PullPayment.test.js
test/payment/PullPayment.test.js
+1
-1
ConditionalEscrow.test.js
test/payment/escrow/ConditionalEscrow.test.js
+1
-1
Escrow.test.js
test/payment/escrow/Escrow.test.js
+1
-1
RefundEscrow.test.js
test/payment/escrow/RefundEscrow.test.js
+1
-1
ERC20PresetMinterPauser.test.js
test/presets/ERC20PresetMinterPauser.test.js
+1
-1
ERC721PresetMinterPauserAutoId.js
test/presets/ERC721PresetMinterPauserAutoId.js
+1
-1
ERC20.test.js
test/token/ERC20/ERC20.test.js
+2
-2
ERC20Burnable.test.js
test/token/ERC20/ERC20Burnable.test.js
+1
-1
ERC20Capped.test.js
test/token/ERC20/ERC20Capped.test.js
+1
-1
ERC20Pausable.test.js
test/token/ERC20/ERC20Pausable.test.js
+1
-1
ERC20Snapshot.test.js
test/token/ERC20/ERC20Snapshot.test.js
+1
-1
SafeERC20.test.js
test/token/ERC20/SafeERC20.test.js
+4
-4
TokenTimelock.test.js
test/token/ERC20/TokenTimelock.test.js
+2
-2
ERC721.test.js
test/token/ERC721/ERC721.test.js
+2
-2
ERC721Burnable.test.js
test/token/ERC721/ERC721Burnable.test.js
+1
-1
ERC721Holder.test.js
test/token/ERC721/ERC721Holder.test.js
+2
-2
ERC721Pausable.test.js
test/token/ERC721/ERC721Pausable.test.js
+1
-1
ERC777.behavior.js
test/token/ERC777/ERC777.behavior.js
+1
-1
ERC777.test.js
test/token/ERC777/ERC777.test.js
+2
-2
Address.test.js
test/utils/Address.test.js
+2
-2
Arrays.test.js
test/utils/Arrays.test.js
+1
-1
Counters.test.js
test/utils/Counters.test.js
+1
-1
Create2.test.js
test/utils/Create2.test.js
+3
-3
EnumerableMap.test.js
test/utils/EnumerableMap.test.js
+1
-1
EnumerableSet.test.js
test/utils/EnumerableSet.test.js
+1
-1
Pausable.test.js
test/utils/Pausable.test.js
+1
-1
ReentrancyGuard.test.js
test/utils/ReentrancyGuard.test.js
+2
-2
SafeCast.test.js
test/utils/SafeCast.test.js
+1
-1
Strings.test.js
test/utils/Strings.test.js
+1
-1
No files found.
contracts/GSN/Context.sol
View file @
85e02b23
...
@@ -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 ContextUpgrade
abl
e is Initializable {
contract ContextUpgrade
Saf
e 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.
...
...
contracts/GSN/GSNRecipient.sol
View file @
85e02b23
...
@@ -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 GSNRecipientUpgrade
able is Initializable, IRelayRecipient, ContextUpgradeabl
e {
abstract contract GSNRecipientUpgrade
Safe is Initializable, IRelayRecipient, ContextUpgradeSaf
e {
function __GSNRecipient_init() internal initializer {
function __GSNRecipient_init() internal initializer {
__Context_init_unchained();
__Context_init_unchained();
__GSNRecipient_init_unchained();
__GSNRecipient_init_unchained();
...
...
contracts/GSN/GSNRecipientERC20Fee.sol
View file @
85e02b23
...
@@ -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 GSNRecipientERC20FeeUpgrade
able is Initializable, GSNRecipientUpgradeabl
e {
contract GSNRecipientERC20FeeUpgrade
Safe is Initializable, GSNRecipientUpgradeSaf
e {
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, ERC20Upgrade
able, OwnableUpgradeabl
e {
contract __unstable__ERC20Owned is Initializable, ERC20Upgrade
Safe, OwnableUpgradeSaf
e {
uint256 private constant _UINT256_MAX = 2**256 - 1;
uint256 private constant _UINT256_MAX = 2**256 - 1;
...
...
contracts/GSN/GSNRecipientSignature.sol
View file @
85e02b23
...
@@ -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 GSNRecipientSignatureUpgrade
able is Initializable, GSNRecipientUpgradeabl
e {
contract GSNRecipientSignatureUpgrade
Safe is Initializable, GSNRecipientUpgradeSaf
e {
using ECDSA for bytes32;
using ECDSA for bytes32;
address private _trustedSigner;
address private _trustedSigner;
...
...
contracts/access/AccessControl.sol
View file @
85e02b23
...
@@ -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 AccessControlUpgrade
able is Initializable, ContextUpgradeabl
e {
abstract contract AccessControlUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
function __AccessControl_init() internal initializer {
function __AccessControl_init() internal initializer {
__Context_init_unchained();
__Context_init_unchained();
__AccessControl_init_unchained();
__AccessControl_init_unchained();
...
...
contracts/access/Ownable.sol
View file @
85e02b23
...
@@ -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 OwnableUpgrade
able is Initializable, ContextUpgradeabl
e {
contract OwnableUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
address private _owner;
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
...
...
contracts/drafts/TokenVesting.sol
View file @
85e02b23
...
@@ -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 TokenVestingUpgrade
able is Initializable, OwnableUpgradeabl
e {
contract TokenVestingUpgrade
Safe is Initializable, OwnableUpgradeSaf
e {
// 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
...
...
contracts/introspection/ERC165.sol
View file @
85e02b23
...
@@ -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 ERC165Upgrade
abl
e is Initializable, IERC165 {
contract ERC165Upgrade
Saf
e is Initializable, IERC165 {
/*
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
*/
...
...
contracts/introspection/ERC1820Implementer.sol
View file @
85e02b23
...
@@ -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 ERC1820ImplementerUpgrade
abl
e is Initializable, IERC1820Implementer {
contract ERC1820ImplementerUpgrade
Saf
e is Initializable, IERC1820Implementer {
function __ERC1820Implementer_init() internal initializer {
function __ERC1820Implementer_init() internal initializer {
__ERC1820Implementer_init_unchained();
__ERC1820Implementer_init_unchained();
}
}
...
...
contracts/mocks/AccessControlMock.sol
View file @
85e02b23
...
@@ -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 AccessControlMockUpgrade
able is Initializable, AccessControlUpgradeabl
e {
contract AccessControlMockUpgrade
Safe is Initializable, AccessControlUpgradeSaf
e {
constructor() public {
constructor() public {
__AccessControlMock_init();
__AccessControlMock_init();
...
...
contracts/mocks/AddressImpl.sol
View file @
85e02b23
...
@@ -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 AddressMockUpgrade
abl
e is Initializable {
contract AddressMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__AddressMock_init();
__AddressMock_init();
}
}
...
...
contracts/mocks/ArraysImpl.sol
View file @
85e02b23
...
@@ -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 ArraysMockUpgrade
abl
e is Initializable {
contract ArraysMockUpgrade
Saf
e is Initializable {
using Arrays for uint256[];
using Arrays for uint256[];
uint256[] private _array;
uint256[] private _array;
...
...
contracts/mocks/ConditionalEscrowMock.sol
View file @
85e02b23
...
@@ -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 ConditionalEscrowMockUpgrade
able is Initializable, ConditionalEscrowUpgradeabl
e {
contract ConditionalEscrowMockUpgrade
Safe is Initializable, ConditionalEscrowUpgradeSaf
e {
constructor() public {
constructor() public {
__ConditionalEscrowMock_init();
__ConditionalEscrowMock_init();
}
}
...
...
contracts/mocks/ContextMock.sol
View file @
85e02b23
...
@@ -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 ContextMockUpgrade
able is Initializable, ContextUpgradeabl
e {
contract ContextMockUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
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 ContextMockCallerUpgrade
abl
e is Initializable {
contract ContextMockCallerUpgrade
Saf
e 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(ContextMockUpgrade
abl
e context) public {
function callSender(ContextMockUpgrade
Saf
e context) public {
context.msgSender();
context.msgSender();
}
}
function callData(ContextMockUpgrade
abl
e context, uint256 integerValue, string memory stringValue) public {
function callData(ContextMockUpgrade
Saf
e context, uint256 integerValue, string memory stringValue) public {
context.msgData(integerValue, stringValue);
context.msgData(integerValue, stringValue);
}
}
...
...
contracts/mocks/CountersImpl.sol
View file @
85e02b23
...
@@ -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 CountersMockUpgrade
abl
e is Initializable {
contract CountersMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__CountersMock_init();
__CountersMock_init();
}
}
...
...
contracts/mocks/Create2Impl.sol
View file @
85e02b23
...
@@ -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 Create2MockUpgrade
abl
e is Initializable {
contract Create2MockUpgrade
Saf
e 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(ERC1820ImplementerUpgrade
abl
e).creationCode);
Create2.deploy(value, salt, type(ERC1820ImplementerUpgrade
Saf
e).creationCode);
}
}
function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) {
function computeAddress(bytes32 salt, bytes32 codeHash) public view returns (address) {
...
...
contracts/mocks/ECDSAMock.sol
View file @
85e02b23
...
@@ -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 ECDSAMockUpgrade
abl
e is Initializable {
contract ECDSAMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__ECDSAMock_init();
__ECDSAMock_init();
}
}
...
...
contracts/mocks/ERC165/ERC165InterfacesSupported.sol
View file @
85e02b23
...
@@ -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 SupportsInterfaceWithLookupMockUpgrade
abl
e is Initializable, IERC165 {
contract SupportsInterfaceWithLookupMockUpgrade
Saf
e 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 ERC165InterfacesSupportedUpgrade
able is Initializable, SupportsInterfaceWithLookupMockUpgradeabl
e {
contract ERC165InterfacesSupportedUpgrade
Safe is Initializable, SupportsInterfaceWithLookupMockUpgradeSaf
e {
constructor(bytes4[] memory interfaceIds) public {
constructor(bytes4[] memory interfaceIds) public {
__ERC165InterfacesSupported_init(interfaceIds);
__ERC165InterfacesSupported_init(interfaceIds);
...
...
contracts/mocks/ERC165/ERC165NotSupported.sol
View file @
85e02b23
pragma solidity ^0.6.0;
pragma solidity ^0.6.0;
import "../../Initializable.sol";
import "../../Initializable.sol";
contract ERC165NotSupportedUpgrade
abl
e is Initializable {
contract ERC165NotSupportedUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__ERC165NotSupported_init();
__ERC165NotSupported_init();
}
}
...
...
contracts/mocks/ERC165CheckerMock.sol
View file @
85e02b23
...
@@ -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 ERC165CheckerMockUpgrade
abl
e is Initializable {
contract ERC165CheckerMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__ERC165CheckerMock_init();
__ERC165CheckerMock_init();
}
}
...
...
contracts/mocks/ERC165Mock.sol
View file @
85e02b23
...
@@ -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 ERC165MockUpgrade
able is Initializable, ERC165Upgradeabl
e {
contract ERC165MockUpgrade
Safe is Initializable, ERC165UpgradeSaf
e {
constructor() public {
constructor() public {
__ERC165Mock_init();
__ERC165Mock_init();
}
}
...
...
contracts/mocks/ERC1820ImplementerMock.sol
View file @
85e02b23
...
@@ -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 ERC1820ImplementerMockUpgrade
able is Initializable, ERC1820ImplementerUpgradeabl
e {
contract ERC1820ImplementerMockUpgrade
Safe is Initializable, ERC1820ImplementerUpgradeSaf
e {
constructor() public {
constructor() public {
__ERC1820ImplementerMock_init();
__ERC1820ImplementerMock_init();
}
}
...
...
contracts/mocks/ERC20BurnableMock.sol
View file @
85e02b23
...
@@ -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 ERC20BurnableMockUpgrade
able is Initializable, ERC20BurnableUpgradeabl
e {
contract ERC20BurnableMockUpgrade
Safe is Initializable, ERC20BurnableUpgradeSaf
e {
constructor(
constructor(
string memory name,
string memory name,
...
...
contracts/mocks/ERC20CappedMock.sol
View file @
85e02b23
...
@@ -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 ERC20CappedMockUpgrade
able is Initializable, ERC20CappedUpgradeabl
e {
contract ERC20CappedMockUpgrade
Safe is Initializable, ERC20CappedUpgradeSaf
e {
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);
...
...
contracts/mocks/ERC20DecimalsMock.sol
View file @
85e02b23
...
@@ -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 ERC20DecimalsMockUpgrade
able is Initializable, ERC20Upgradeabl
e {
contract ERC20DecimalsMockUpgrade
Safe is Initializable, ERC20UpgradeSaf
e {
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);
...
...
contracts/mocks/ERC20Mock.sol
View file @
85e02b23
...
@@ -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 ERC20MockUpgrade
able is Initializable, ERC20Upgradeabl
e {
contract ERC20MockUpgrade
Safe is Initializable, ERC20UpgradeSaf
e {
constructor(
constructor(
string memory name,
string memory name,
...
...
contracts/mocks/ERC20PausableMock.sol
View file @
85e02b23
...
@@ -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 ERC20PausableMockUpgrade
able is Initializable, ERC20PausableUpgradeabl
e {
contract ERC20PausableMockUpgrade
Safe is Initializable, ERC20PausableUpgradeSaf
e {
constructor(
constructor(
string memory name,
string memory name,
...
...
contracts/mocks/ERC20PresetMinterPauserMock.sol
View file @
85e02b23
...
@@ -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 ERC20PresetMinterPauserMockUpgrade
able is Initializable, ERC20PresetMinterPauserUpgradeabl
e {
contract ERC20PresetMinterPauserMockUpgrade
Safe is Initializable, ERC20PresetMinterPauserUpgradeSaf
e {
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);
...
...
contracts/mocks/ERC20SnapshotMock.sol
View file @
85e02b23
...
@@ -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 ERC20SnapshotMockUpgrade
able is Initializable, ERC20SnapshotUpgradeabl
e {
contract ERC20SnapshotMockUpgrade
Safe is Initializable, ERC20SnapshotUpgradeSaf
e {
constructor(
constructor(
string memory name,
string memory name,
...
...
contracts/mocks/ERC721BurnableMock.sol
View file @
85e02b23
...
@@ -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 ERC721BurnableMockUpgrade
able is Initializable, ERC721BurnableUpgradeabl
e {
contract ERC721BurnableMockUpgrade
Safe is Initializable, ERC721BurnableUpgradeSaf
e {
constructor(string memory name, string memory symbol) public {
constructor(string memory name, string memory symbol) public {
__ERC721BurnableMock_init(name, symbol);
__ERC721BurnableMock_init(name, symbol);
...
...
contracts/mocks/ERC721GSNRecipientMock.sol
View file @
85e02b23
...
@@ -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 ERC721GSNRecipientMockUpgrade
able is Initializable, ERC721Upgradeable, GSNRecipientUpgradeable, GSNRecipientSignatureUpgradeabl
e {
contract ERC721GSNRecipientMockUpgrade
Safe is Initializable, ERC721UpgradeSafe, GSNRecipientUpgradeSafe, GSNRecipientSignatureUpgradeSaf
e {
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(ContextUpgrade
able, GSNRecipientUpgradeabl
e) returns (address payable) {
function _msgSender() internal view override(ContextUpgrade
Safe, GSNRecipientUpgradeSaf
e) returns (address payable) {
return GSNRecipientUpgrade
abl
e._msgSender();
return GSNRecipientUpgrade
Saf
e._msgSender();
}
}
function _msgData() internal view override(ContextUpgrade
able, GSNRecipientUpgradeabl
e) returns (bytes memory) {
function _msgData() internal view override(ContextUpgrade
Safe, GSNRecipientUpgradeSaf
e) returns (bytes memory) {
return GSNRecipientUpgrade
abl
e._msgData();
return GSNRecipientUpgrade
Saf
e._msgData();
}
}
uint256[50] private __gap;
uint256[50] private __gap;
...
...
contracts/mocks/ERC721Mock.sol
View file @
85e02b23
...
@@ -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 ERC721MockUpgrade
able is Initializable, ERC721Upgradeabl
e {
contract ERC721MockUpgrade
Safe is Initializable, ERC721UpgradeSaf
e {
constructor(string memory name, string memory symbol) public {
constructor(string memory name, string memory symbol) public {
__ERC721Mock_init(name, symbol);
__ERC721Mock_init(name, symbol);
...
...
contracts/mocks/ERC721PausableMock.sol
View file @
85e02b23
...
@@ -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 ERC721PausableMockUpgrade
able is Initializable, ERC721PausableUpgradeabl
e {
contract ERC721PausableMockUpgrade
Safe is Initializable, ERC721PausableUpgradeSaf
e {
constructor(string memory name, string memory symbol) public {
constructor(string memory name, string memory symbol) public {
__ERC721PausableMock_init(name, symbol);
__ERC721PausableMock_init(name, symbol);
...
...
contracts/mocks/ERC721PresetMinterPauserAutoIdMock.sol
View file @
85e02b23
...
@@ -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 ERC721PresetMinterPauserAutoIdMockUpgrade
able is Initializable, ERC721PresetMinterPauserAutoIdUpgradeabl
e {
contract ERC721PresetMinterPauserAutoIdMockUpgrade
Safe is Initializable, ERC721PresetMinterPauserAutoIdUpgradeSaf
e {
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);
...
...
contracts/mocks/ERC721ReceiverMock.sol
View file @
85e02b23
...
@@ -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 ERC721ReceiverMockUpgrade
abl
e is Initializable, IERC721Receiver {
contract ERC721ReceiverMockUpgrade
Saf
e is Initializable, IERC721Receiver {
bytes4 private _retval;
bytes4 private _retval;
bool private _reverts;
bool private _reverts;
...
...
contracts/mocks/ERC777Mock.sol
View file @
85e02b23
...
@@ -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 ERC777MockUpgrade
able is Initializable, ContextUpgradeable, ERC777Upgradeabl
e {
contract ERC777MockUpgrade
Safe is Initializable, ContextUpgradeSafe, ERC777UpgradeSaf
e {
constructor(
constructor(
address initialHolder,
address initialHolder,
...
...
contracts/mocks/ERC777SenderRecipientMock.sol
View file @
85e02b23
...
@@ -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 ERC777SenderRecipientMockUpgrade
able is Initializable, ContextUpgradeable, IERC777Sender, IERC777Recipient, ERC1820ImplementerUpgradeabl
e {
contract ERC777SenderRecipientMockUpgrade
Safe is Initializable, ContextUpgradeSafe, IERC777Sender, IERC777Recipient, ERC1820ImplementerUpgradeSaf
e {
constructor() public {
constructor() public {
__ERC777SenderRecipientMock_init();
__ERC777SenderRecipientMock_init();
}
}
...
...
contracts/mocks/EnumerableMapMock.sol
View file @
85e02b23
...
@@ -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 EnumerableMapMockUpgrade
abl
e is Initializable {
contract EnumerableMapMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__EnumerableMapMock_init();
__EnumerableMapMock_init();
}
}
...
...
contracts/mocks/EnumerableSetMock.sol
View file @
85e02b23
...
@@ -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 EnumerableSetMockUpgrade
abl
e is Initializable {
contract EnumerableSetMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__EnumerableSetMock_init();
__EnumerableSetMock_init();
}
}
...
...
contracts/mocks/EscrowMock.sol
View file @
85e02b23
...
@@ -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 EscrowMockUpgrade
able is Initializable, EscrowUpgradeabl
e {
contract EscrowMockUpgrade
Safe is Initializable, EscrowUpgradeSaf
e {
constructor() public {
constructor() public {
__EscrowMock_init();
__EscrowMock_init();
}
}
...
...
contracts/mocks/EtherReceiverMock.sol
View file @
85e02b23
pragma solidity ^0.6.0;
pragma solidity ^0.6.0;
import "../Initializable.sol";
import "../Initializable.sol";
contract EtherReceiverMockUpgrade
abl
e is Initializable {
contract EtherReceiverMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__EtherReceiverMock_init();
__EtherReceiverMock_init();
}
}
...
...
contracts/mocks/GSNRecipientERC20FeeMock.sol
View file @
85e02b23
...
@@ -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 GSNRecipientERC20FeeMockUpgrade
able is Initializable, GSNRecipientUpgradeable, GSNRecipientERC20FeeUpgradeabl
e {
contract GSNRecipientERC20FeeMockUpgrade
Safe is Initializable, GSNRecipientUpgradeSafe, GSNRecipientERC20FeeUpgradeSaf
e {
constructor(string memory name, string memory symbol) public {
constructor(string memory name, string memory symbol) public {
__GSNRecipientERC20FeeMock_init(name, symbol);
__GSNRecipientERC20FeeMock_init(name, symbol);
...
...
contracts/mocks/GSNRecipientMock.sol
View file @
85e02b23
...
@@ -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 GSNRecipientMockUpgrade
able is Initializable, ContextMockUpgradeable, GSNRecipientUpgradeabl
e {
contract GSNRecipientMockUpgrade
Safe is Initializable, ContextMockUpgradeSafe, GSNRecipientUpgradeSaf
e {
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(ContextUpgrade
able, GSNRecipientUpgradeabl
e) view virtual returns (address payable) {
function _msgSender() internal override(ContextUpgrade
Safe, GSNRecipientUpgradeSaf
e) view virtual returns (address payable) {
return GSNRecipientUpgrade
abl
e._msgSender();
return GSNRecipientUpgrade
Saf
e._msgSender();
}
}
function _msgData() internal override(ContextUpgrade
able, GSNRecipientUpgradeabl
e) view virtual returns (bytes memory) {
function _msgData() internal override(ContextUpgrade
Safe, GSNRecipientUpgradeSaf
e) view virtual returns (bytes memory) {
return GSNRecipientUpgrade
abl
e._msgData();
return GSNRecipientUpgrade
Saf
e._msgData();
}
}
uint256[50] private __gap;
uint256[50] private __gap;
...
...
contracts/mocks/GSNRecipientSignatureMock.sol
View file @
85e02b23
...
@@ -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 GSNRecipientSignatureMockUpgrade
able is Initializable, GSNRecipientUpgradeable, GSNRecipientSignatureUpgradeabl
e {
contract GSNRecipientSignatureMockUpgrade
Safe is Initializable, GSNRecipientUpgradeSafe, GSNRecipientSignatureUpgradeSaf
e {
constructor(address trustedSigner) public {
constructor(address trustedSigner) public {
__GSNRecipientSignatureMock_init(trustedSigner);
__GSNRecipientSignatureMock_init(trustedSigner);
...
...
contracts/mocks/MathMock.sol
View file @
85e02b23
...
@@ -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 MathMockUpgrade
abl
e is Initializable {
contract MathMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__MathMock_init();
__MathMock_init();
}
}
...
...
contracts/mocks/MerkleProofWrapper.sol
View file @
85e02b23
...
@@ -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 MerkleProofWrapperUpgrade
abl
e is Initializable {
contract MerkleProofWrapperUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__MerkleProofWrapper_init();
__MerkleProofWrapper_init();
}
}
...
...
contracts/mocks/OwnableMock.sol
View file @
85e02b23
...
@@ -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 OwnableMockUpgrade
able is Initializable, OwnableUpgradeabl
e {
contract OwnableMockUpgrade
Safe is Initializable, OwnableUpgradeSaf
e {
constructor() public {
constructor() public {
__OwnableMock_init();
__OwnableMock_init();
}
}
...
...
contracts/mocks/PausableMock.sol
View file @
85e02b23
...
@@ -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 PausableMockUpgrade
able is Initializable, PausableUpgradeabl
e {
contract PausableMockUpgrade
Safe is Initializable, PausableUpgradeSaf
e {
bool public drasticMeasureTaken;
bool public drasticMeasureTaken;
uint256 public count;
uint256 public count;
...
...
contracts/mocks/PaymentSplitterMock.sol
View file @
85e02b23
...
@@ -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 PaymentSplitterMockUpgrade
able is Initializable, PaymentSplitterUpgradeabl
e {
contract PaymentSplitterMockUpgrade
Safe is Initializable, PaymentSplitterUpgradeSaf
e {
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);
...
...
contracts/mocks/PullPaymentMock.sol
View file @
85e02b23
...
@@ -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 PullPaymentMockUpgrade
able is Initializable, PullPaymentUpgradeabl
e {
contract PullPaymentMockUpgrade
Safe is Initializable, PullPaymentUpgradeSaf
e {
constructor() public payable {
constructor() public payable {
__PullPaymentMock_init();
__PullPaymentMock_init();
...
...
contracts/mocks/ReentrancyAttack.sol
View file @
85e02b23
...
@@ -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 ReentrancyAttackUpgrade
able is Initializable, ContextUpgradeabl
e {
contract ReentrancyAttackUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
constructor() public {
constructor() public {
__ReentrancyAttack_init();
__ReentrancyAttack_init();
}
}
...
...
contracts/mocks/ReentrancyMock.sol
View file @
85e02b23
...
@@ -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 ReentrancyMockUpgrade
able is Initializable, ReentrancyGuardUpgradeabl
e {
contract ReentrancyMockUpgrade
Safe is Initializable, ReentrancyGuardUpgradeSaf
e {
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(ReentrancyAttackUpgrade
abl
e attacker) public nonReentrant {
function countAndCall(ReentrancyAttackUpgrade
Saf
e attacker) public nonReentrant {
_count();
_count();
bytes4 func = bytes4(keccak256("callback()"));
bytes4 func = bytes4(keccak256("callback()"));
attacker.callSender(func);
attacker.callSender(func);
...
...
contracts/mocks/RefundEscrowMock.sol
View file @
85e02b23
...
@@ -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 RefundEscrowMockUpgrade
able is Initializable, RefundEscrowUpgradeabl
e {
contract RefundEscrowMockUpgrade
Safe is Initializable, RefundEscrowUpgradeSaf
e {
constructor(address payable beneficiary) public payable {
constructor(address payable beneficiary) public payable {
__RefundEscrowMock_init(beneficiary);
__RefundEscrowMock_init(beneficiary);
...
...
contracts/mocks/SafeCastMock.sol
View file @
85e02b23
...
@@ -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 SafeCastMockUpgrade
abl
e is Initializable {
contract SafeCastMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__SafeCastMock_init();
__SafeCastMock_init();
}
}
...
...
contracts/mocks/SafeERC20Helper.sol
View file @
85e02b23
...
@@ -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 ERC20ReturnFalseMockUpgrade
able is Initializable, ContextUpgradeabl
e {
contract ERC20ReturnFalseMockUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
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 ERC20ReturnTrueMockUpgrade
able is Initializable, ContextUpgradeabl
e {
contract ERC20ReturnTrueMockUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
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 ERC20NoReturnMockUpgrade
able is Initializable, ContextUpgradeabl
e {
contract ERC20NoReturnMockUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
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 SafeERC20MockUpgrade
able is Initializable, ContextUpgradeabl
e {
contract SafeERC20MockUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
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 {
ERC20ReturnTrueMockUpgrade
abl
e(address(_token)).setAllowance(allowance_);
ERC20ReturnTrueMockUpgrade
Saf
e(address(_token)).setAllowance(allowance_);
}
}
function allowance() public view returns (uint256) {
function allowance() public view returns (uint256) {
...
...
contracts/mocks/SafeMathMock.sol
View file @
85e02b23
...
@@ -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 SafeMathMockUpgrade
abl
e is Initializable {
contract SafeMathMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__SafeMathMock_init();
__SafeMathMock_init();
}
}
...
...
contracts/mocks/SignedSafeMathMock.sol
View file @
85e02b23
...
@@ -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 SignedSafeMathMockUpgrade
abl
e is Initializable {
contract SignedSafeMathMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__SignedSafeMathMock_init();
__SignedSafeMathMock_init();
}
}
...
...
contracts/mocks/StringsMock.sol
View file @
85e02b23
...
@@ -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 StringsMockUpgrade
abl
e is Initializable {
contract StringsMockUpgrade
Saf
e is Initializable {
constructor() public {
constructor() public {
__StringsMock_init();
__StringsMock_init();
}
}
...
...
contracts/mocks/TokenTimelockMock.sol
View file @
85e02b23
...
@@ -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 TokenTimelockMockUpgrade
able is Initializable, TokenTimelockUpgradeabl
e {
contract TokenTimelockMockUpgrade
Safe is Initializable, TokenTimelockUpgradeSaf
e {
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);
...
...
contracts/payment/PaymentSplitter.sol
View file @
85e02b23
...
@@ -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 PaymentSplitterUpgrade
able is Initializable, ContextUpgradeabl
e {
contract PaymentSplitterUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
using SafeMath for uint256;
using SafeMath for uint256;
event PayeeAdded(address account, uint256 shares);
event PayeeAdded(address account, uint256 shares);
...
...
contracts/payment/PullPayment.sol
View file @
85e02b23
...
@@ -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 PullPaymentUpgrade
abl
e is Initializable {
contract PullPaymentUpgrade
Saf
e is Initializable {
EscrowUpgrade
abl
e private _escrow;
EscrowUpgrade
Saf
e 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 EscrowUpgrade
abl
e();
_escrow = new EscrowUpgrade
Saf
e();
_escrow.initialize();
_escrow.initialize();
}
}
...
...
contracts/payment/escrow/ConditionalEscrow.sol
View file @
85e02b23
...
@@ -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 ConditionalEscrowUpgrade
able is Initializable, EscrowUpgradeabl
e {
abstract contract ConditionalEscrowUpgrade
Safe is Initializable, EscrowUpgradeSaf
e {
function __ConditionalEscrow_init() internal initializer {
function __ConditionalEscrow_init() internal initializer {
__Context_init_unchained();
__Context_init_unchained();
__Ownable_init_unchained();
__Ownable_init_unchained();
...
...
contracts/payment/escrow/Escrow.sol
View file @
85e02b23
...
@@ -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 EscrowUpgrade
able is Initializable, OwnableUpgradeabl
e {
contract EscrowUpgrade
Safe is Initializable, OwnableUpgradeSaf
e {
function initialize() public {
function initialize() public {
__Escrow_init();
__Escrow_init();
}
}
...
...
contracts/payment/escrow/RefundEscrow.sol
View file @
85e02b23
...
@@ -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 RefundEscrowUpgrade
able is Initializable, ConditionalEscrowUpgradeabl
e {
contract RefundEscrowUpgrade
Safe is Initializable, ConditionalEscrowUpgradeSaf
e {
enum State { Active, Refunding, Closed }
enum State { Active, Refunding, Closed }
event RefundsClosed();
event RefundsClosed();
...
...
contracts/presets/ERC20PresetMinterPauser.sol
View file @
85e02b23
...
@@ -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 ERC20PresetMinterPauserUpgrade
able is Initializable, ContextUpgradeable, AccessControlUpgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeabl
e {
contract ERC20PresetMinterPauserUpgrade
Safe is Initializable, ContextUpgradeSafe, AccessControlUpgradeSafe, ERC20BurnableUpgradeSafe, ERC20PausableUpgradeSaf
e {
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(ERC20Upgrade
able, ERC20PausableUpgradeabl
e) {
function _beforeTokenTransfer(address from, address to, uint256 amount) internal override(ERC20Upgrade
Safe, ERC20PausableUpgradeSaf
e) {
super._beforeTokenTransfer(from, to, amount);
super._beforeTokenTransfer(from, to, amount);
}
}
...
...
contracts/presets/ERC721PresetMinterPauserAutoId.sol
View file @
85e02b23
...
@@ -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 ERC721PresetMinterPauserAutoIdUpgrade
able is Initializable, ContextUpgradeable, AccessControlUpgradeable, ERC721BurnableUpgradeable, ERC721PausableUpgradeabl
e {
contract ERC721PresetMinterPauserAutoIdUpgrade
Safe is Initializable, ContextUpgradeSafe, AccessControlUpgradeSafe, ERC721BurnableUpgradeSafe, ERC721PausableUpgradeSaf
e {
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(ERC721Upgrade
able, ERC721PausableUpgradeabl
e) {
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721Upgrade
Safe, ERC721PausableUpgradeSaf
e) {
super._beforeTokenTransfer(from, to, tokenId);
super._beforeTokenTransfer(from, to, tokenId);
}
}
...
...
contracts/token/ERC20/ERC20.sol
View file @
85e02b23
...
@@ -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 ERC20Upgrade
able is Initializable, ContextUpgradeabl
e, IERC20 {
contract ERC20Upgrade
Safe is Initializable, ContextUpgradeSaf
e, IERC20 {
using SafeMath for uint256;
using SafeMath for uint256;
using Address for address;
using Address for address;
...
...
contracts/token/ERC20/ERC20Burnable.sol
View file @
85e02b23
...
@@ -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 ERC20BurnableUpgrade
able is Initializable, ContextUpgradeable, ERC20Upgradeabl
e {
abstract contract ERC20BurnableUpgrade
Safe is Initializable, ContextUpgradeSafe, ERC20UpgradeSaf
e {
function __ERC20Burnable_init() internal initializer {
function __ERC20Burnable_init() internal initializer {
__Context_init_unchained();
__Context_init_unchained();
__ERC20Burnable_init_unchained();
__ERC20Burnable_init_unchained();
...
...
contracts/token/ERC20/ERC20Capped.sol
View file @
85e02b23
...
@@ -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 ERC20CappedUpgrade
able is Initializable, ERC20Upgradeabl
e {
abstract contract ERC20CappedUpgrade
Safe is Initializable, ERC20UpgradeSaf
e {
uint256 private _cap;
uint256 private _cap;
/**
/**
...
...
contracts/token/ERC20/ERC20Pausable.sol
View file @
85e02b23
...
@@ -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 ERC20PausableUpgrade
able is Initializable, ERC20Upgradeable, PausableUpgradeabl
e {
abstract contract ERC20PausableUpgrade
Safe is Initializable, ERC20UpgradeSafe, PausableUpgradeSaf
e {
function __ERC20Pausable_init() internal initializer {
function __ERC20Pausable_init() internal initializer {
__Context_init_unchained();
__Context_init_unchained();
__Pausable_init_unchained();
__Pausable_init_unchained();
...
...
contracts/token/ERC20/ERC20Snapshot.sol
View file @
85e02b23
...
@@ -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 ERC20SnapshotUpgrade
able is Initializable, ERC20Upgradeabl
e {
abstract contract ERC20SnapshotUpgrade
Safe is Initializable, ERC20UpgradeSaf
e {
function __ERC20Snapshot_init() internal initializer {
function __ERC20Snapshot_init() internal initializer {
__Context_init_unchained();
__Context_init_unchained();
__ERC20Snapshot_init_unchained();
__ERC20Snapshot_init_unchained();
...
...
contracts/token/ERC20/TokenTimelock.sol
View file @
85e02b23
...
@@ -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 TokenTimelockUpgrade
abl
e is Initializable {
contract TokenTimelockUpgrade
Saf
e is Initializable {
using SafeERC20 for IERC20;
using SafeERC20 for IERC20;
// ERC20 basic token contract being held
// ERC20 basic token contract being held
...
...
contracts/token/ERC721/ERC721.sol
View file @
85e02b23
...
@@ -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 ERC721Upgrade
able is Initializable, ContextUpgradeable, ERC165Upgradeabl
e, IERC721, IERC721Metadata, IERC721Enumerable {
contract ERC721Upgrade
Safe is Initializable, ContextUpgradeSafe, ERC165UpgradeSaf
e, 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;
...
...
contracts/token/ERC721/ERC721Burnable.sol
View file @
85e02b23
...
@@ -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 ERC721BurnableUpgrade
able is Initializable, ContextUpgradeable, ERC721Upgradeabl
e {
abstract contract ERC721BurnableUpgrade
Safe is Initializable, ContextUpgradeSafe, ERC721UpgradeSaf
e {
function __ERC721Burnable_init() internal initializer {
function __ERC721Burnable_init() internal initializer {
__Context_init_unchained();
__Context_init_unchained();
__ERC165_init_unchained();
__ERC165_init_unchained();
...
...
contracts/token/ERC721/ERC721Holder.sol
View file @
85e02b23
...
@@ -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 ERC721HolderUpgrade
abl
e is Initializable, IERC721Receiver {
contract ERC721HolderUpgrade
Saf
e is Initializable, IERC721Receiver {
function __ERC721Holder_init() internal initializer {
function __ERC721Holder_init() internal initializer {
__ERC721Holder_init_unchained();
__ERC721Holder_init_unchained();
}
}
...
...
contracts/token/ERC721/ERC721Pausable.sol
View file @
85e02b23
...
@@ -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 ERC721PausableUpgrade
able is Initializable, ERC721Upgradeable, PausableUpgradeabl
e {
abstract contract ERC721PausableUpgrade
Safe is Initializable, ERC721UpgradeSafe, PausableUpgradeSaf
e {
function __ERC721Pausable_init() internal initializer {
function __ERC721Pausable_init() internal initializer {
__Context_init_unchained();
__Context_init_unchained();
__ERC165_init_unchained();
__ERC165_init_unchained();
...
...
contracts/token/ERC777/ERC777.sol
View file @
85e02b23
...
@@ -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 ERC777Upgrade
able is Initializable, ContextUpgradeabl
e, IERC777, IERC20 {
contract ERC777Upgrade
Safe is Initializable, ContextUpgradeSaf
e, IERC777, IERC20 {
using SafeMath for uint256;
using SafeMath for uint256;
using Address for address;
using Address for address;
...
...
contracts/utils/Pausable.sol
View file @
85e02b23
...
@@ -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 PausableUpgrade
able is Initializable, ContextUpgradeabl
e {
contract PausableUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
/**
/**
* @dev Emitted when the pause is triggered by `account`.
* @dev Emitted when the pause is triggered by `account`.
*/
*/
...
...
contracts/utils/ReentrancyGuard.sol
View file @
85e02b23
...
@@ -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 ReentrancyGuardUpgrade
abl
e is Initializable {
contract ReentrancyGuardUpgrade
Saf
e is Initializable {
bool private _notEntered;
bool private _notEntered;
...
...
patches/00-fix-references.patch
View file @
85e02b23
...
@@ -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 ContextMockCallerUpgrade
abl
e is Initializable {
@@ -45,11 +45,11 @@ contract ContextMockCallerUpgrade
Saf
e is Initializable {
}
}
- function callSender(ContextMock context) public {
- function callSender(ContextMock context) public {
+ function callSender(ContextMockUpgrade
abl
e context) public {
+ function callSender(ContextMockUpgrade
Saf
e 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(ContextMockUpgrade
abl
e context, uint256 integerValue, string memory stringValue) public {
+ function callData(ContextMockUpgrade
Saf
e 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 Create2MockUpgrade
abl
e is Initializable {
@@ -24,7 +24,7 @@ contract Create2MockUpgrade
Saf
e 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(ERC1820ImplementerUpgrade
abl
e).creationCode);
+ Create2.deploy(value, salt, type(ERC1820ImplementerUpgrade
Saf
e).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 ERC721GSNRecipientMockUpgrade
able is Initializable, ERC721Upgradeabl
e,
@@ -35,10 +35,10 @@ contract ERC721GSNRecipientMockUpgrade
Safe is Initializable, ERC721UpgradeSaf
e,
}
}
function _msgSender() internal view override(ContextUpgrade
able, GSNRecipientUpgradeabl
e) returns (address payable) {
function _msgSender() internal view override(ContextUpgrade
Safe, GSNRecipientUpgradeSaf
e) returns (address payable) {
- return GSNRecipient._msgSender();
- return GSNRecipient._msgSender();
+ return GSNRecipientUpgrade
abl
e._msgSender();
+ return GSNRecipientUpgrade
Saf
e._msgSender();
}
}
function _msgData() internal view override(ContextUpgrade
able, GSNRecipientUpgradeabl
e) returns (bytes memory) {
function _msgData() internal view override(ContextUpgrade
Safe, GSNRecipientUpgradeSaf
e) returns (bytes memory) {
- return GSNRecipient._msgData();
- return GSNRecipient._msgData();
+ return GSNRecipientUpgrade
abl
e._msgData();
+ return GSNRecipientUpgrade
Saf
e._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 GSNRecipientMockUpgrade
able is Initializable, ContextMockUpgradeabl
e, G
@@ -44,10 +44,10 @@ contract GSNRecipientMockUpgrade
Safe is Initializable, ContextMockUpgradeSaf
e, G
}
}
function _msgSender() internal override(ContextUpgrade
able, GSNRecipientUpgradeabl
e) view virtual returns (address payable) {
function _msgSender() internal override(ContextUpgrade
Safe, GSNRecipientUpgradeSaf
e) view virtual returns (address payable) {
- return GSNRecipient._msgSender();
- return GSNRecipient._msgSender();
+ return GSNRecipientUpgrade
abl
e._msgSender();
+ return GSNRecipientUpgrade
Saf
e._msgSender();
}
}
function _msgData() internal override(ContextUpgrade
able, GSNRecipientUpgradeabl
e) view virtual returns (bytes memory) {
function _msgData() internal override(ContextUpgrade
Safe, GSNRecipientUpgradeSaf
e) view virtual returns (bytes memory) {
- return GSNRecipient._msgData();
- return GSNRecipient._msgData();
+ return GSNRecipientUpgrade
abl
e._msgData();
+ return GSNRecipientUpgrade
Saf
e._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 ReentrancyMockUpgrade
able is Initializable, ReentrancyGuardUpgradeabl
e
@@ -45,7 +45,7 @@ contract ReentrancyMockUpgrade
Safe is Initializable, ReentrancyGuardUpgradeSaf
e
}
}
}
}
- function countAndCall(ReentrancyAttack attacker) public nonReentrant {
- function countAndCall(ReentrancyAttack attacker) public nonReentrant {
+ function countAndCall(ReentrancyAttackUpgrade
abl
e attacker) public nonReentrant {
+ function countAndCall(ReentrancyAttackUpgrade
Saf
e 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 SafeERC20MockUpgrade
able is Initializable, ContextUpgradeabl
e {
@@ -178,7 +178,7 @@ contract SafeERC20MockUpgrade
Safe is Initializable, ContextUpgradeSaf
e {
}
}
function setAllowance(uint256 allowance_) public {
function setAllowance(uint256 allowance_) public {
- ERC20ReturnTrueMock(address(_token)).setAllowance(allowance_);
- ERC20ReturnTrueMock(address(_token)).setAllowance(allowance_);
+ ERC20ReturnTrueMockUpgrade
abl
e(address(_token)).setAllowance(allowance_);
+ ERC20ReturnTrueMockUpgrade
Saf
e(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 PullPaymentUpgrade
abl
e is Initializable {
contract PullPaymentUpgrade
Saf
e is Initializable {
- Escrow private _escrow;
- Escrow private _escrow;
+ EscrowUpgrade
abl
e private _escrow;
+ EscrowUpgrade
Saf
e private _escrow;
function __PullPayment_init() internal initializer {
function __PullPayment_init() internal initializer {
@@ -32,7 +32,7 @@ contract PullPaymentUpgrade
abl
e is Initializable {
@@ -32,7 +32,7 @@ contract PullPaymentUpgrade
Saf
e is Initializable {
function __PullPayment_init_unchained() internal initializer {
function __PullPayment_init_unchained() internal initializer {
- _escrow = new Escrow();
- _escrow = new Escrow();
+ _escrow = new EscrowUpgrade
abl
e();
+ _escrow = new EscrowUpgrade
Saf
e();
}
}
patches/01-initialize-escrow.patch
View file @
85e02b23
...
@@ -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 PullPaymentUpgrade
abl
e is Initializable {
@@ -33,7 +33,7 @@ contract PullPaymentUpgrade
Saf
e is Initializable {
_escrow = new EscrowUpgrade
abl
e();
_escrow = new EscrowUpgrade
Saf
e();
-
-
+ _escrow.initialize();
+ _escrow.initialize();
}
}
...
...
scripts/upgrade-safe.sh
View file @
85e02b23
...
@@ -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}Upgrade
abl
e')"
test
rs
"contract
\.
fromArtifact
\(
'([^I].*?)'
\)
"
"contract.fromArtifact('
\$
{1}Upgrade
Saf
e')"
test
cat
patches/
*
| patch
-p1
cat
patches/
*
| patch
-p1
...
...
test/GSN/Context.behavior.js
View file @
85e02b23
...
@@ -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
(
'ContextMockUpgrade
abl
e'
);
const
ContextMock
=
contract
.
fromArtifact
(
'ContextMockUpgrade
Saf
e'
);
function
shouldBehaveLikeRegularContext
(
sender
)
{
function
shouldBehaveLikeRegularContext
(
sender
)
{
describe
(
'msgSender'
,
function
()
{
describe
(
'msgSender'
,
function
()
{
...
...
test/GSN/Context.test.js
View file @
85e02b23
...
@@ -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
(
'ContextMockUpgrade
abl
e'
);
const
ContextMock
=
contract
.
fromArtifact
(
'ContextMockUpgrade
Saf
e'
);
const
ContextMockCaller
=
contract
.
fromArtifact
(
'ContextMockCallerUpgrade
abl
e'
);
const
ContextMockCaller
=
contract
.
fromArtifact
(
'ContextMockCallerUpgrade
Saf
e'
);
const
{
shouldBehaveLikeRegularContext
}
=
require
(
'./Context.behavior'
);
const
{
shouldBehaveLikeRegularContext
}
=
require
(
'./Context.behavior'
);
...
...
test/GSN/ERC721GSNRecipientMock.test.js
View file @
85e02b23
...
@@ -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
(
'ERC721GSNRecipientMockUpgrade
abl
e'
);
const
ERC721GSNRecipientMock
=
contract
.
fromArtifact
(
'ERC721GSNRecipientMockUpgrade
Saf
e'
);
describe
(
'ERC721GSNRecipient (integration)'
,
function
()
{
describe
(
'ERC721GSNRecipient (integration)'
,
function
()
{
const
[
signer
,
sender
]
=
accounts
;
const
[
signer
,
sender
]
=
accounts
;
...
...
test/GSN/GSNRecipient.test.js
View file @
85e02b23
...
@@ -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
(
'GSNRecipientMockUpgrade
abl
e'
);
const
GSNRecipientMock
=
contract
.
fromArtifact
(
'GSNRecipientMockUpgrade
Saf
e'
);
const
ContextMockCaller
=
contract
.
fromArtifact
(
'ContextMockCallerUpgrade
abl
e'
);
const
ContextMockCaller
=
contract
.
fromArtifact
(
'ContextMockCallerUpgrade
Saf
e'
);
const
{
shouldBehaveLikeRegularContext
}
=
require
(
'./Context.behavior'
);
const
{
shouldBehaveLikeRegularContext
}
=
require
(
'./Context.behavior'
);
...
...
test/GSN/GSNRecipientERC20Fee.test.js
View file @
85e02b23
...
@@ -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
(
'GSNRecipientERC20FeeMockUpgrade
abl
e'
);
const
GSNRecipientERC20FeeMock
=
contract
.
fromArtifact
(
'GSNRecipientERC20FeeMockUpgrade
Saf
e'
);
const
ERC20
=
contract
.
fromArtifact
(
'ERC20Upgrade
abl
e'
);
const
ERC20
=
contract
.
fromArtifact
(
'ERC20Upgrade
Saf
e'
);
const
IRelayHub
=
contract
.
fromArtifact
(
'IRelayHub'
);
const
IRelayHub
=
contract
.
fromArtifact
(
'IRelayHub'
);
describe
(
'GSNRecipientERC20Fee'
,
function
()
{
describe
(
'GSNRecipientERC20Fee'
,
function
()
{
...
...
test/GSN/GSNRecipientSignature.test.js
View file @
85e02b23
...
@@ -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
(
'GSNRecipientSignatureMockUpgrade
abl
e'
);
const
GSNRecipientSignatureMock
=
contract
.
fromArtifact
(
'GSNRecipientSignatureMockUpgrade
Saf
e'
);
describe
(
'GSNRecipientSignature'
,
function
()
{
describe
(
'GSNRecipientSignature'
,
function
()
{
const
[
signer
,
other
]
=
accounts
;
const
[
signer
,
other
]
=
accounts
;
...
...
test/access/AccessControl.test.js
View file @
85e02b23
...
@@ -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
(
'AccessControlMockUpgrade
abl
e'
);
const
AccessControlMock
=
contract
.
fromArtifact
(
'AccessControlMockUpgrade
Saf
e'
);
describe
(
'AccessControl'
,
function
()
{
describe
(
'AccessControl'
,
function
()
{
const
[
admin
,
authorized
,
otherAuthorized
,
other
,
otherAdmin
]
=
accounts
;
const
[
admin
,
authorized
,
otherAuthorized
,
other
,
otherAdmin
]
=
accounts
;
...
...
test/access/Ownable.test.js
View file @
85e02b23
...
@@ -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
(
'OwnableMockUpgrade
abl
e'
);
const
Ownable
=
contract
.
fromArtifact
(
'OwnableMockUpgrade
Saf
e'
);
describe
(
'Ownable'
,
function
()
{
describe
(
'Ownable'
,
function
()
{
const
[
owner
,
other
]
=
accounts
;
const
[
owner
,
other
]
=
accounts
;
...
...
test/cryptography/ECDSA.test.js
View file @
85e02b23
...
@@ -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
(
'ECDSAMockUpgrade
abl
e'
);
const
ECDSAMock
=
contract
.
fromArtifact
(
'ECDSAMockUpgrade
Saf
e'
);
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'
);
...
...
test/cryptography/MerkleProof.test.js
View file @
85e02b23
...
@@ -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
(
'MerkleProofWrapperUpgrade
abl
e'
);
const
MerkleProofWrapper
=
contract
.
fromArtifact
(
'MerkleProofWrapperUpgrade
Saf
e'
);
describe
(
'MerkleProof'
,
function
()
{
describe
(
'MerkleProof'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/introspection/ERC165.test.js
View file @
85e02b23
...
@@ -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
(
'ERC165MockUpgrade
abl
e'
);
const
ERC165Mock
=
contract
.
fromArtifact
(
'ERC165MockUpgrade
Saf
e'
);
describe
(
'ERC165'
,
function
()
{
describe
(
'ERC165'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/introspection/ERC165Checker.test.js
View file @
85e02b23
...
@@ -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
(
'ERC165CheckerMockUpgrade
abl
e'
);
const
ERC165CheckerMock
=
contract
.
fromArtifact
(
'ERC165CheckerMockUpgrade
Saf
e'
);
const
ERC165NotSupported
=
contract
.
fromArtifact
(
'ERC165NotSupportedUpgrade
abl
e'
);
const
ERC165NotSupported
=
contract
.
fromArtifact
(
'ERC165NotSupportedUpgrade
Saf
e'
);
const
ERC165InterfacesSupported
=
contract
.
fromArtifact
(
'ERC165InterfacesSupportedUpgrade
abl
e'
);
const
ERC165InterfacesSupported
=
contract
.
fromArtifact
(
'ERC165InterfacesSupportedUpgrade
Saf
e'
);
const
DUMMY_ID
=
'0xdeadbeef'
;
const
DUMMY_ID
=
'0xdeadbeef'
;
const
DUMMY_ID_2
=
'0xcafebabe'
;
const
DUMMY_ID_2
=
'0xcafebabe'
;
...
...
test/introspection/ERC1820Implementer.test.js
View file @
85e02b23
...
@@ -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
(
'ERC1820ImplementerMockUpgrade
abl
e'
);
const
ERC1820ImplementerMock
=
contract
.
fromArtifact
(
'ERC1820ImplementerMockUpgrade
Saf
e'
);
describe
(
'ERC1820Implementer'
,
function
()
{
describe
(
'ERC1820Implementer'
,
function
()
{
const
[
registryFunder
,
implementee
,
other
]
=
accounts
;
const
[
registryFunder
,
implementee
,
other
]
=
accounts
;
...
...
test/math/Math.test.js
View file @
85e02b23
...
@@ -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
(
'MathMockUpgrade
abl
e'
);
const
MathMock
=
contract
.
fromArtifact
(
'MathMockUpgrade
Saf
e'
);
describe
(
'Math'
,
function
()
{
describe
(
'Math'
,
function
()
{
const
min
=
new
BN
(
'1234'
);
const
min
=
new
BN
(
'1234'
);
...
...
test/math/SafeMath.test.js
View file @
85e02b23
...
@@ -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
(
'SafeMathMockUpgrade
abl
e'
);
const
SafeMathMock
=
contract
.
fromArtifact
(
'SafeMathMockUpgrade
Saf
e'
);
describe
(
'SafeMath'
,
function
()
{
describe
(
'SafeMath'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/math/SignedSafeMath.test.js
View file @
85e02b23
...
@@ -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
(
'SignedSafeMathMockUpgrade
abl
e'
);
const
SignedSafeMathMock
=
contract
.
fromArtifact
(
'SignedSafeMathMockUpgrade
Saf
e'
);
describe
(
'SignedSafeMath'
,
function
()
{
describe
(
'SignedSafeMath'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/payment/PaymentSplitter.test.js
View file @
85e02b23
...
@@ -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
(
'PaymentSplitterMockUpgrade
abl
e'
);
const
PaymentSplitter
=
contract
.
fromArtifact
(
'PaymentSplitterMockUpgrade
Saf
e'
);
describe
(
'PaymentSplitter'
,
function
()
{
describe
(
'PaymentSplitter'
,
function
()
{
const
[
owner
,
payee1
,
payee2
,
payee3
,
nonpayee1
,
payer1
]
=
accounts
;
const
[
owner
,
payee1
,
payee2
,
payee3
,
nonpayee1
,
payer1
]
=
accounts
;
...
...
test/payment/PullPayment.test.js
View file @
85e02b23
...
@@ -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
(
'PullPaymentMockUpgrade
abl
e'
);
const
PullPaymentMock
=
contract
.
fromArtifact
(
'PullPaymentMockUpgrade
Saf
e'
);
describe
(
'PullPayment'
,
function
()
{
describe
(
'PullPayment'
,
function
()
{
const
[
payer
,
payee1
,
payee2
]
=
accounts
;
const
[
payer
,
payee1
,
payee2
]
=
accounts
;
...
...
test/payment/escrow/ConditionalEscrow.test.js
View file @
85e02b23
...
@@ -3,7 +3,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
...
@@ -3,7 +3,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
const
{
ether
,
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
ether
,
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
shouldBehaveLikeEscrow
}
=
require
(
'./Escrow.behavior'
);
const
{
shouldBehaveLikeEscrow
}
=
require
(
'./Escrow.behavior'
);
const
ConditionalEscrowMock
=
contract
.
fromArtifact
(
'ConditionalEscrowMockUpgrade
abl
e'
);
const
ConditionalEscrowMock
=
contract
.
fromArtifact
(
'ConditionalEscrowMockUpgrade
Saf
e'
);
describe
(
'ConditionalEscrow'
,
function
()
{
describe
(
'ConditionalEscrow'
,
function
()
{
const
[
owner
,
payee
,
...
otherAccounts
]
=
accounts
;
const
[
owner
,
payee
,
...
otherAccounts
]
=
accounts
;
...
...
test/payment/escrow/Escrow.test.js
View file @
85e02b23
...
@@ -3,7 +3,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
...
@@ -3,7 +3,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
require
(
'@openzeppelin/test-helpers'
);
require
(
'@openzeppelin/test-helpers'
);
const
{
shouldBehaveLikeEscrow
}
=
require
(
'./Escrow.behavior'
);
const
{
shouldBehaveLikeEscrow
}
=
require
(
'./Escrow.behavior'
);
const
Escrow
=
contract
.
fromArtifact
(
'EscrowMockUpgrade
abl
e'
);
const
Escrow
=
contract
.
fromArtifact
(
'EscrowMockUpgrade
Saf
e'
);
describe
(
'Escrow'
,
function
()
{
describe
(
'Escrow'
,
function
()
{
const
[
owner
,
...
otherAccounts
]
=
accounts
;
const
[
owner
,
...
otherAccounts
]
=
accounts
;
...
...
test/payment/escrow/RefundEscrow.test.js
View file @
85e02b23
...
@@ -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
RefundEscrow
=
contract
.
fromArtifact
(
'RefundEscrowMockUpgrade
abl
e'
);
const
RefundEscrow
=
contract
.
fromArtifact
(
'RefundEscrowMockUpgrade
Saf
e'
);
describe
(
'RefundEscrow'
,
function
()
{
describe
(
'RefundEscrow'
,
function
()
{
const
[
owner
,
beneficiary
,
refundee1
,
refundee2
]
=
accounts
;
const
[
owner
,
beneficiary
,
refundee1
,
refundee2
]
=
accounts
;
...
...
test/presets/ERC20PresetMinterPauser.test.js
View file @
85e02b23
...
@@ -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
ERC20PresetMinterPauser
=
contract
.
fromArtifact
(
'ERC20PresetMinterPauserMockUpgrade
abl
e'
);
const
ERC20PresetMinterPauser
=
contract
.
fromArtifact
(
'ERC20PresetMinterPauserMockUpgrade
Saf
e'
);
describe
(
'ERC20PresetMinterPauser'
,
function
()
{
describe
(
'ERC20PresetMinterPauser'
,
function
()
{
const
[
deployer
,
other
]
=
accounts
;
const
[
deployer
,
other
]
=
accounts
;
...
...
test/presets/ERC721PresetMinterPauserAutoId.js
View file @
85e02b23
...
@@ -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
ERC721PresetMinterPauserAutoId
=
contract
.
fromArtifact
(
'ERC721PresetMinterPauserAutoIdMockUpgrade
abl
e'
);
const
ERC721PresetMinterPauserAutoId
=
contract
.
fromArtifact
(
'ERC721PresetMinterPauserAutoIdMockUpgrade
Saf
e'
);
describe
(
'ERC721PresetMinterPauserAutoId'
,
function
()
{
describe
(
'ERC721PresetMinterPauserAutoId'
,
function
()
{
const
[
deployer
,
other
]
=
accounts
;
const
[
deployer
,
other
]
=
accounts
;
...
...
test/token/ERC20/ERC20.test.js
View file @
85e02b23
...
@@ -10,8 +10,8 @@ const {
...
@@ -10,8 +10,8 @@ const {
shouldBehaveLikeERC20Approve
,
shouldBehaveLikeERC20Approve
,
}
=
require
(
'./ERC20.behavior'
);
}
=
require
(
'./ERC20.behavior'
);
const
ERC20Mock
=
contract
.
fromArtifact
(
'ERC20MockUpgrade
abl
e'
);
const
ERC20Mock
=
contract
.
fromArtifact
(
'ERC20MockUpgrade
Saf
e'
);
const
ERC20DecimalsMock
=
contract
.
fromArtifact
(
'ERC20DecimalsMockUpgrade
abl
e'
);
const
ERC20DecimalsMock
=
contract
.
fromArtifact
(
'ERC20DecimalsMockUpgrade
Saf
e'
);
describe
(
'ERC20'
,
function
()
{
describe
(
'ERC20'
,
function
()
{
const
[
initialHolder
,
recipient
,
anotherAccount
]
=
accounts
;
const
[
initialHolder
,
recipient
,
anotherAccount
]
=
accounts
;
...
...
test/token/ERC20/ERC20Burnable.test.js
View file @
85e02b23
...
@@ -3,7 +3,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
...
@@ -3,7 +3,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
const
{
BN
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
BN
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
shouldBehaveLikeERC20Burnable
}
=
require
(
'./behaviors/ERC20Burnable.behavior'
);
const
{
shouldBehaveLikeERC20Burnable
}
=
require
(
'./behaviors/ERC20Burnable.behavior'
);
const
ERC20BurnableMock
=
contract
.
fromArtifact
(
'ERC20BurnableMockUpgrade
abl
e'
);
const
ERC20BurnableMock
=
contract
.
fromArtifact
(
'ERC20BurnableMockUpgrade
Saf
e'
);
describe
(
'ERC20Burnable'
,
function
()
{
describe
(
'ERC20Burnable'
,
function
()
{
const
[
owner
,
...
otherAccounts
]
=
accounts
;
const
[
owner
,
...
otherAccounts
]
=
accounts
;
...
...
test/token/ERC20/ERC20Capped.test.js
View file @
85e02b23
...
@@ -3,7 +3,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
...
@@ -3,7 +3,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
const
{
BN
,
ether
,
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
BN
,
ether
,
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
shouldBehaveLikeERC20Capped
}
=
require
(
'./behaviors/ERC20Capped.behavior'
);
const
{
shouldBehaveLikeERC20Capped
}
=
require
(
'./behaviors/ERC20Capped.behavior'
);
const
ERC20Capped
=
contract
.
fromArtifact
(
'ERC20CappedMockUpgrade
abl
e'
);
const
ERC20Capped
=
contract
.
fromArtifact
(
'ERC20CappedMockUpgrade
Saf
e'
);
describe
(
'ERC20Capped'
,
function
()
{
describe
(
'ERC20Capped'
,
function
()
{
const
[
minter
,
...
otherAccounts
]
=
accounts
;
const
[
minter
,
...
otherAccounts
]
=
accounts
;
...
...
test/token/ERC20/ERC20Pausable.test.js
View file @
85e02b23
...
@@ -4,7 +4,7 @@ const { BN, expectRevert } = require('@openzeppelin/test-helpers');
...
@@ -4,7 +4,7 @@ const { BN, expectRevert } = require('@openzeppelin/test-helpers');
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
ERC20PausableMock
=
contract
.
fromArtifact
(
'ERC20PausableMockUpgrade
abl
e'
);
const
ERC20PausableMock
=
contract
.
fromArtifact
(
'ERC20PausableMockUpgrade
Saf
e'
);
describe
(
'ERC20Pausable'
,
function
()
{
describe
(
'ERC20Pausable'
,
function
()
{
const
[
holder
,
recipient
,
anotherAccount
]
=
accounts
;
const
[
holder
,
recipient
,
anotherAccount
]
=
accounts
;
...
...
test/token/ERC20/ERC20Snapshot.test.js
View file @
85e02b23
const
{
accounts
,
contract
}
=
require
(
'@openzeppelin/test-environment'
);
const
{
accounts
,
contract
}
=
require
(
'@openzeppelin/test-environment'
);
const
{
BN
,
expectEvent
,
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
BN
,
expectEvent
,
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
ERC20SnapshotMock
=
contract
.
fromArtifact
(
'ERC20SnapshotMockUpgrade
abl
e'
);
const
ERC20SnapshotMock
=
contract
.
fromArtifact
(
'ERC20SnapshotMockUpgrade
Saf
e'
);
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
...
...
test/token/ERC20/SafeERC20.test.js
View file @
85e02b23
...
@@ -2,10 +2,10 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
...
@@ -2,10 +2,10 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
const
{
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
ERC20ReturnFalseMock
=
contract
.
fromArtifact
(
'ERC20ReturnFalseMockUpgrade
abl
e'
);
const
ERC20ReturnFalseMock
=
contract
.
fromArtifact
(
'ERC20ReturnFalseMockUpgrade
Saf
e'
);
const
ERC20ReturnTrueMock
=
contract
.
fromArtifact
(
'ERC20ReturnTrueMockUpgrade
abl
e'
);
const
ERC20ReturnTrueMock
=
contract
.
fromArtifact
(
'ERC20ReturnTrueMockUpgrade
Saf
e'
);
const
ERC20NoReturnMock
=
contract
.
fromArtifact
(
'ERC20NoReturnMockUpgrade
abl
e'
);
const
ERC20NoReturnMock
=
contract
.
fromArtifact
(
'ERC20NoReturnMockUpgrade
Saf
e'
);
const
SafeERC20Mock
=
contract
.
fromArtifact
(
'SafeERC20MockUpgrade
abl
e'
);
const
SafeERC20Mock
=
contract
.
fromArtifact
(
'SafeERC20MockUpgrade
Saf
e'
);
describe
(
'SafeERC20'
,
function
()
{
describe
(
'SafeERC20'
,
function
()
{
const
[
hasNoCode
]
=
accounts
;
const
[
hasNoCode
]
=
accounts
;
...
...
test/token/ERC20/TokenTimelock.test.js
View file @
85e02b23
...
@@ -4,8 +4,8 @@ const { BN, expectRevert, time } = require('@openzeppelin/test-helpers');
...
@@ -4,8 +4,8 @@ const { BN, expectRevert, time } = require('@openzeppelin/test-helpers');
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
ERC20Mock
=
contract
.
fromArtifact
(
'ERC20MockUpgrade
abl
e'
);
const
ERC20Mock
=
contract
.
fromArtifact
(
'ERC20MockUpgrade
Saf
e'
);
const
TokenTimelock
=
contract
.
fromArtifact
(
'TokenTimelockMockUpgrade
abl
e'
);
const
TokenTimelock
=
contract
.
fromArtifact
(
'TokenTimelockMockUpgrade
Saf
e'
);
describe
(
'TokenTimelock'
,
function
()
{
describe
(
'TokenTimelock'
,
function
()
{
const
[
beneficiary
]
=
accounts
;
const
[
beneficiary
]
=
accounts
;
...
...
test/token/ERC721/ERC721.test.js
View file @
85e02b23
...
@@ -7,8 +7,8 @@ const { expect } = require('chai');
...
@@ -7,8 +7,8 @@ const { expect } = require('chai');
const
{
shouldSupportInterfaces
}
=
require
(
'../../introspection/SupportsInterface.behavior'
);
const
{
shouldSupportInterfaces
}
=
require
(
'../../introspection/SupportsInterface.behavior'
);
const
ERC721Mock
=
contract
.
fromArtifact
(
'ERC721MockUpgrade
abl
e'
);
const
ERC721Mock
=
contract
.
fromArtifact
(
'ERC721MockUpgrade
Saf
e'
);
const
ERC721ReceiverMock
=
contract
.
fromArtifact
(
'ERC721ReceiverMockUpgrade
abl
e'
);
const
ERC721ReceiverMock
=
contract
.
fromArtifact
(
'ERC721ReceiverMockUpgrade
Saf
e'
);
describe
(
'ERC721'
,
function
()
{
describe
(
'ERC721'
,
function
()
{
const
[
owner
,
newOwner
,
approved
,
anotherApproved
,
operator
,
other
]
=
accounts
;
const
[
owner
,
newOwner
,
approved
,
anotherApproved
,
operator
,
other
]
=
accounts
;
...
...
test/token/ERC721/ERC721Burnable.test.js
View file @
85e02b23
...
@@ -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
ERC721BurnableMock
=
contract
.
fromArtifact
(
'ERC721BurnableMockUpgrade
abl
e'
);
const
ERC721BurnableMock
=
contract
.
fromArtifact
(
'ERC721BurnableMockUpgrade
Saf
e'
);
describe
(
'ERC721Burnable'
,
function
()
{
describe
(
'ERC721Burnable'
,
function
()
{
const
[
owner
,
approved
]
=
accounts
;
const
[
owner
,
approved
]
=
accounts
;
...
...
test/token/ERC721/ERC721Holder.test.js
View file @
85e02b23
...
@@ -4,8 +4,8 @@ const { BN } = require('@openzeppelin/test-helpers');
...
@@ -4,8 +4,8 @@ const { BN } = require('@openzeppelin/test-helpers');
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
ERC721Holder
=
contract
.
fromArtifact
(
'ERC721HolderUpgrade
abl
e'
);
const
ERC721Holder
=
contract
.
fromArtifact
(
'ERC721HolderUpgrade
Saf
e'
);
const
ERC721Mock
=
contract
.
fromArtifact
(
'ERC721MockUpgrade
abl
e'
);
const
ERC721Mock
=
contract
.
fromArtifact
(
'ERC721MockUpgrade
Saf
e'
);
describe
(
'ERC721Holder'
,
function
()
{
describe
(
'ERC721Holder'
,
function
()
{
const
[
owner
]
=
accounts
;
const
[
owner
]
=
accounts
;
...
...
test/token/ERC721/ERC721Pausable.test.js
View file @
85e02b23
...
@@ -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
ERC721PausableMock
=
contract
.
fromArtifact
(
'ERC721PausableMockUpgrade
abl
e'
);
const
ERC721PausableMock
=
contract
.
fromArtifact
(
'ERC721PausableMockUpgrade
Saf
e'
);
describe
(
'ERC721Pausable'
,
function
()
{
describe
(
'ERC721Pausable'
,
function
()
{
const
[
owner
,
receiver
,
operator
]
=
accounts
;
const
[
owner
,
receiver
,
operator
]
=
accounts
;
...
...
test/token/ERC777/ERC777.behavior.js
View file @
85e02b23
...
@@ -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
ERC777SenderRecipientMock
=
contract
.
fromArtifact
(
'ERC777SenderRecipientMockUpgrade
abl
e'
);
const
ERC777SenderRecipientMock
=
contract
.
fromArtifact
(
'ERC777SenderRecipientMockUpgrade
Saf
e'
);
function
shouldBehaveLikeERC777DirectSendBurn
(
holder
,
recipient
,
data
)
{
function
shouldBehaveLikeERC777DirectSendBurn
(
holder
,
recipient
,
data
)
{
shouldBehaveLikeERC777DirectSend
(
holder
,
recipient
,
data
);
shouldBehaveLikeERC777DirectSend
(
holder
,
recipient
,
data
);
...
...
test/token/ERC777/ERC777.test.js
View file @
85e02b23
...
@@ -17,8 +17,8 @@ const {
...
@@ -17,8 +17,8 @@ const {
shouldBehaveLikeERC20
,
shouldBehaveLikeERC20
,
}
=
require
(
'../ERC20/ERC20.behavior'
);
}
=
require
(
'../ERC20/ERC20.behavior'
);
const
ERC777
=
contract
.
fromArtifact
(
'ERC777MockUpgrade
abl
e'
);
const
ERC777
=
contract
.
fromArtifact
(
'ERC777MockUpgrade
Saf
e'
);
const
ERC777SenderRecipientMock
=
contract
.
fromArtifact
(
'ERC777SenderRecipientMockUpgrade
abl
e'
);
const
ERC777SenderRecipientMock
=
contract
.
fromArtifact
(
'ERC777SenderRecipientMockUpgrade
Saf
e'
);
describe
(
'ERC777'
,
function
()
{
describe
(
'ERC777'
,
function
()
{
const
[
registryFunder
,
holder
,
defaultOperatorA
,
defaultOperatorB
,
newOperator
,
anyone
]
=
accounts
;
const
[
registryFunder
,
holder
,
defaultOperatorA
,
defaultOperatorB
,
newOperator
,
anyone
]
=
accounts
;
...
...
test/utils/Address.test.js
View file @
85e02b23
...
@@ -3,8 +3,8 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
...
@@ -3,8 +3,8 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
const
{
balance
,
ether
,
expectRevert
,
send
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
balance
,
ether
,
expectRevert
,
send
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
AddressMock
=
contract
.
fromArtifact
(
'AddressMockUpgrade
abl
e'
);
const
AddressMock
=
contract
.
fromArtifact
(
'AddressMockUpgrade
Saf
e'
);
const
EtherReceiver
=
contract
.
fromArtifact
(
'EtherReceiverMockUpgrade
abl
e'
);
const
EtherReceiver
=
contract
.
fromArtifact
(
'EtherReceiverMockUpgrade
Saf
e'
);
describe
(
'Address'
,
function
()
{
describe
(
'Address'
,
function
()
{
const
[
recipient
,
other
]
=
accounts
;
const
[
recipient
,
other
]
=
accounts
;
...
...
test/utils/Arrays.test.js
View file @
85e02b23
...
@@ -3,7 +3,7 @@ require('@openzeppelin/test-helpers');
...
@@ -3,7 +3,7 @@ require('@openzeppelin/test-helpers');
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
ArraysMock
=
contract
.
fromArtifact
(
'ArraysMockUpgrade
abl
e'
);
const
ArraysMock
=
contract
.
fromArtifact
(
'ArraysMockUpgrade
Saf
e'
);
describe
(
'Arrays'
,
function
()
{
describe
(
'Arrays'
,
function
()
{
context
(
'Even number of elements'
,
function
()
{
context
(
'Even number of elements'
,
function
()
{
...
...
test/utils/Counters.test.js
View file @
85e02b23
...
@@ -3,7 +3,7 @@ const { expectRevert } = require('@openzeppelin/test-helpers');
...
@@ -3,7 +3,7 @@ const { expectRevert } = require('@openzeppelin/test-helpers');
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
CountersMock
=
contract
.
fromArtifact
(
'CountersMockUpgrade
abl
e'
);
const
CountersMock
=
contract
.
fromArtifact
(
'CountersMockUpgrade
Saf
e'
);
describe
(
'Counters'
,
function
()
{
describe
(
'Counters'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/utils/Create2.test.js
View file @
85e02b23
...
@@ -3,9 +3,9 @@ const { balance, BN, ether, expectRevert, send } = require('@openzeppelin/test-h
...
@@ -3,9 +3,9 @@ const { balance, BN, ether, expectRevert, send } = require('@openzeppelin/test-h
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
Create2Mock
=
contract
.
fromArtifact
(
'Create2MockUpgrade
abl
e'
);
const
Create2Mock
=
contract
.
fromArtifact
(
'Create2MockUpgrade
Saf
e'
);
const
ERC20Mock
=
contract
.
fromArtifact
(
'ERC20MockUpgrade
abl
e'
);
const
ERC20Mock
=
contract
.
fromArtifact
(
'ERC20MockUpgrade
Saf
e'
);
const
ERC1820Implementer
=
contract
.
fromArtifact
(
'ERC1820ImplementerUpgrade
abl
e'
);
const
ERC1820Implementer
=
contract
.
fromArtifact
(
'ERC1820ImplementerUpgrade
Saf
e'
);
describe
(
'Create2'
,
function
()
{
describe
(
'Create2'
,
function
()
{
const
[
deployerAccount
]
=
accounts
;
const
[
deployerAccount
]
=
accounts
;
...
...
test/utils/EnumerableMap.test.js
View file @
85e02b23
...
@@ -4,7 +4,7 @@ const { expect } = require('chai');
...
@@ -4,7 +4,7 @@ const { expect } = require('chai');
const
zip
=
require
(
'lodash.zip'
);
const
zip
=
require
(
'lodash.zip'
);
const
EnumerableMapMock
=
contract
.
fromArtifact
(
'EnumerableMapMockUpgrade
abl
e'
);
const
EnumerableMapMock
=
contract
.
fromArtifact
(
'EnumerableMapMockUpgrade
Saf
e'
);
describe
(
'EnumerableMap'
,
function
()
{
describe
(
'EnumerableMap'
,
function
()
{
const
[
accountA
,
accountB
,
accountC
]
=
accounts
;
const
[
accountA
,
accountB
,
accountC
]
=
accounts
;
...
...
test/utils/EnumerableSet.test.js
View file @
85e02b23
...
@@ -2,7 +2,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
...
@@ -2,7 +2,7 @@ const { accounts, contract } = require('@openzeppelin/test-environment');
const
{
expectEvent
,
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
expectEvent
,
expectRevert
}
=
require
(
'@openzeppelin/test-helpers'
);
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
EnumerableSetMock
=
contract
.
fromArtifact
(
'EnumerableSetMockUpgrade
abl
e'
);
const
EnumerableSetMock
=
contract
.
fromArtifact
(
'EnumerableSetMockUpgrade
Saf
e'
);
describe
(
'EnumerableSet'
,
function
()
{
describe
(
'EnumerableSet'
,
function
()
{
const
[
accountA
,
accountB
,
accountC
]
=
accounts
;
const
[
accountA
,
accountB
,
accountC
]
=
accounts
;
...
...
test/utils/Pausable.test.js
View file @
85e02b23
...
@@ -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
PausableMock
=
contract
.
fromArtifact
(
'PausableMockUpgrade
abl
e'
);
const
PausableMock
=
contract
.
fromArtifact
(
'PausableMockUpgrade
Saf
e'
);
describe
(
'Pausable'
,
function
()
{
describe
(
'Pausable'
,
function
()
{
const
[
pauser
]
=
accounts
;
const
[
pauser
]
=
accounts
;
...
...
test/utils/ReentrancyGuard.test.js
View file @
85e02b23
...
@@ -3,8 +3,8 @@ const { expectRevert } = require('@openzeppelin/test-helpers');
...
@@ -3,8 +3,8 @@ const { expectRevert } = require('@openzeppelin/test-helpers');
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
ReentrancyMock
=
contract
.
fromArtifact
(
'ReentrancyMockUpgrade
abl
e'
);
const
ReentrancyMock
=
contract
.
fromArtifact
(
'ReentrancyMockUpgrade
Saf
e'
);
const
ReentrancyAttack
=
contract
.
fromArtifact
(
'ReentrancyAttackUpgrade
abl
e'
);
const
ReentrancyAttack
=
contract
.
fromArtifact
(
'ReentrancyAttackUpgrade
Saf
e'
);
describe
(
'ReentrancyGuard'
,
function
()
{
describe
(
'ReentrancyGuard'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/utils/SafeCast.test.js
View file @
85e02b23
...
@@ -3,7 +3,7 @@ const { BN, expectRevert } = require('@openzeppelin/test-helpers');
...
@@ -3,7 +3,7 @@ const { BN, expectRevert } = require('@openzeppelin/test-helpers');
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
SafeCastMock
=
contract
.
fromArtifact
(
'SafeCastMockUpgrade
abl
e'
);
const
SafeCastMock
=
contract
.
fromArtifact
(
'SafeCastMockUpgrade
Saf
e'
);
describe
(
'SafeCast'
,
async
()
=>
{
describe
(
'SafeCast'
,
async
()
=>
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
test/utils/Strings.test.js
View file @
85e02b23
...
@@ -3,7 +3,7 @@ const { constants } = require('@openzeppelin/test-helpers');
...
@@ -3,7 +3,7 @@ const { constants } = require('@openzeppelin/test-helpers');
const
{
expect
}
=
require
(
'chai'
);
const
{
expect
}
=
require
(
'chai'
);
const
StringsMock
=
contract
.
fromArtifact
(
'StringsMockUpgrade
abl
e'
);
const
StringsMock
=
contract
.
fromArtifact
(
'StringsMockUpgrade
Saf
e'
);
describe
(
'Strings'
,
function
()
{
describe
(
'Strings'
,
function
()
{
beforeEach
(
async
function
()
{
beforeEach
(
async
function
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment