Migrate to Hardhat (#2397)

This commit is contained in:
Francisco Giordano
2020-10-28 17:03:05 -03:00
parent 1ada3b633e
commit 65d3b232f8
73 changed files with 5241 additions and 19087 deletions

View File

@ -1,13 +1,11 @@
const { accounts, contract } = require('@openzeppelin/test-environment');
const { balance, constants, ether, expectEvent, send, expectRevert } = require('@openzeppelin/test-helpers');
const { ZERO_ADDRESS } = constants;
const { expect } = require('chai');
const PaymentSplitter = contract.fromArtifact('PaymentSplitter');
const PaymentSplitter = artifacts.require('PaymentSplitter');
describe('PaymentSplitter', function () {
contract('PaymentSplitter', function (accounts) {
const [ owner, payee1, payee2, payee3, nonpayee1, payer1 ] = accounts;
const amount = ether('1');

View File

@ -1,12 +1,10 @@
const { accounts, contract } = require('@openzeppelin/test-environment');
const { balance, ether } = require('@openzeppelin/test-helpers');
const { expect } = require('chai');
const PullPaymentMock = contract.fromArtifact('PullPaymentMock');
const PullPaymentMock = artifacts.require('PullPaymentMock');
describe('PullPayment', function () {
contract('PullPayment', function (accounts) {
const [ payer, payee1, payee2 ] = accounts;
const amount = ether('17');

View File

@ -1,11 +1,9 @@
const { accounts, contract } = require('@openzeppelin/test-environment');
const { ether, expectRevert } = require('@openzeppelin/test-helpers');
const { shouldBehaveLikeEscrow } = require('./Escrow.behavior');
const ConditionalEscrowMock = contract.fromArtifact('ConditionalEscrowMock');
const ConditionalEscrowMock = artifacts.require('ConditionalEscrowMock');
describe('ConditionalEscrow', function () {
contract('ConditionalEscrow', function (accounts) {
const [ owner, payee, ...otherAccounts ] = accounts;
beforeEach(async function () {

View File

@ -1,11 +1,9 @@
const { accounts, contract } = require('@openzeppelin/test-environment');
require('@openzeppelin/test-helpers');
const { shouldBehaveLikeEscrow } = require('./Escrow.behavior');
const Escrow = contract.fromArtifact('Escrow');
const Escrow = artifacts.require('Escrow');
describe('Escrow', function () {
contract('Escrow', function (accounts) {
const [ owner, ...otherAccounts ] = accounts;
beforeEach(async function () {

View File

@ -1,13 +1,11 @@
const { accounts, contract } = require('@openzeppelin/test-environment');
const { balance, constants, ether, expectEvent, expectRevert } = require('@openzeppelin/test-helpers');
const { ZERO_ADDRESS } = constants;
const { expect } = require('chai');
const RefundEscrow = contract.fromArtifact('RefundEscrow');
const RefundEscrow = artifacts.require('RefundEscrow');
describe('RefundEscrow', function () {
contract('RefundEscrow', function (accounts) {
const [ owner, beneficiary, refundee1, refundee2 ] = accounts;
const amount = ether('54');