Transition from buidler to hardhat

This commit is contained in:
Hadrien Croubois
2021-01-27 11:33:54 +01:00
parent 0db76e98f9
commit a0323d446c
8 changed files with 1535 additions and 2172 deletions

10
hardhat/env-contract.js Normal file
View File

@ -0,0 +1,10 @@
extendEnvironment(env => {
const { contract } = env;
env.contract = function (name, body) {
// remove the default account from the accounts list used in tests, in order
// to protect tests against accidentally passing due to the contract
// deployer being used subsequently as function caller
contract(name, accounts => body(accounts.slice(1)));
};
});