Migrate to Hardhat (#2397)
This commit is contained in:
committed by
GitHub
parent
0c27ecc536
commit
f06738828b
@ -1,5 +1,3 @@
|
||||
const { accounts, contract } = require('@openzeppelin/test-environment');
|
||||
|
||||
const { BN, constants, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
|
||||
const { expect } = require('chai');
|
||||
const { ZERO_ADDRESS } = constants;
|
||||
@ -10,10 +8,10 @@ const {
|
||||
shouldBehaveLikeERC20Approve,
|
||||
} = require('./ERC20.behavior');
|
||||
|
||||
const ERC20Mock = contract.fromArtifact('ERC20Mock');
|
||||
const ERC20DecimalsMock = contract.fromArtifact('ERC20DecimalsMock');
|
||||
const ERC20Mock = artifacts.require('ERC20Mock');
|
||||
const ERC20DecimalsMock = artifacts.require('ERC20DecimalsMock');
|
||||
|
||||
describe('ERC20', function () {
|
||||
contract('ERC20', function (accounts) {
|
||||
const [ initialHolder, recipient, anotherAccount ] = accounts;
|
||||
|
||||
const name = 'My Token';
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
const { accounts, contract } = require('@openzeppelin/test-environment');
|
||||
|
||||
const { BN } = require('@openzeppelin/test-helpers');
|
||||
|
||||
const { shouldBehaveLikeERC20Burnable } = require('./behaviors/ERC20Burnable.behavior');
|
||||
const ERC20BurnableMock = contract.fromArtifact('ERC20BurnableMock');
|
||||
const ERC20BurnableMock = artifacts.require('ERC20BurnableMock');
|
||||
|
||||
describe('ERC20Burnable', function () {
|
||||
contract('ERC20Burnable', function (accounts) {
|
||||
const [ owner, ...otherAccounts ] = accounts;
|
||||
|
||||
const initialBalance = new BN(1000);
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
const { accounts, contract } = require('@openzeppelin/test-environment');
|
||||
|
||||
const { BN, ether, expectRevert } = require('@openzeppelin/test-helpers');
|
||||
const { shouldBehaveLikeERC20Capped } = require('./behaviors/ERC20Capped.behavior');
|
||||
|
||||
const ERC20Capped = contract.fromArtifact('ERC20CappedMock');
|
||||
const ERC20Capped = artifacts.require('ERC20CappedMock');
|
||||
|
||||
describe('ERC20Capped', function () {
|
||||
contract('ERC20Capped', function (accounts) {
|
||||
const [ minter, ...otherAccounts ] = accounts;
|
||||
|
||||
const cap = ether('1000');
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
const { accounts, contract } = require('@openzeppelin/test-environment');
|
||||
|
||||
const { BN, expectRevert } = require('@openzeppelin/test-helpers');
|
||||
|
||||
const { expect } = require('chai');
|
||||
|
||||
const ERC20PausableMock = contract.fromArtifact('ERC20PausableMock');
|
||||
const ERC20PausableMock = artifacts.require('ERC20PausableMock');
|
||||
|
||||
describe('ERC20Pausable', function () {
|
||||
contract('ERC20Pausable', function (accounts) {
|
||||
const [ holder, recipient, anotherAccount ] = accounts;
|
||||
|
||||
const initialSupply = new BN(100);
|
||||
|
||||
@ -1,11 +1,9 @@
|
||||
const { accounts, contract } = require('@openzeppelin/test-environment');
|
||||
|
||||
const { BN, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
|
||||
const ERC20SnapshotMock = contract.fromArtifact('ERC20SnapshotMock');
|
||||
const ERC20SnapshotMock = artifacts.require('ERC20SnapshotMock');
|
||||
|
||||
const { expect } = require('chai');
|
||||
|
||||
describe('ERC20Snapshot', function () {
|
||||
contract('ERC20Snapshot', function (accounts) {
|
||||
const [ initialHolder, recipient, other ] = accounts;
|
||||
|
||||
const initialSupply = new BN(100);
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
const { accounts, contract } = require('@openzeppelin/test-environment');
|
||||
|
||||
const { expectRevert } = require('@openzeppelin/test-helpers');
|
||||
|
||||
const ERC20ReturnFalseMock = contract.fromArtifact('ERC20ReturnFalseMock');
|
||||
const ERC20ReturnTrueMock = contract.fromArtifact('ERC20ReturnTrueMock');
|
||||
const ERC20NoReturnMock = contract.fromArtifact('ERC20NoReturnMock');
|
||||
const SafeERC20Wrapper = contract.fromArtifact('SafeERC20Wrapper');
|
||||
const ERC20ReturnFalseMock = artifacts.require('ERC20ReturnFalseMock');
|
||||
const ERC20ReturnTrueMock = artifacts.require('ERC20ReturnTrueMock');
|
||||
const ERC20NoReturnMock = artifacts.require('ERC20NoReturnMock');
|
||||
const SafeERC20Wrapper = artifacts.require('SafeERC20Wrapper');
|
||||
|
||||
describe('SafeERC20', function () {
|
||||
contract('SafeERC20', function (accounts) {
|
||||
const [ hasNoCode ] = accounts;
|
||||
|
||||
describe('with address that has no contract code', function () {
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
const { accounts, contract } = require('@openzeppelin/test-environment');
|
||||
|
||||
const { BN, expectRevert, time } = require('@openzeppelin/test-helpers');
|
||||
|
||||
const { expect } = require('chai');
|
||||
|
||||
const ERC20Mock = contract.fromArtifact('ERC20Mock');
|
||||
const TokenTimelock = contract.fromArtifact('TokenTimelock');
|
||||
const ERC20Mock = artifacts.require('ERC20Mock');
|
||||
const TokenTimelock = artifacts.require('TokenTimelock');
|
||||
|
||||
describe('TokenTimelock', function () {
|
||||
contract('TokenTimelock', function (accounts) {
|
||||
const [ beneficiary ] = accounts;
|
||||
|
||||
const name = 'My Token';
|
||||
|
||||
Reference in New Issue
Block a user