Extend hre with a kredits instance

This commit is contained in:
bumi 2021-06-08 16:17:34 +02:00
parent a626409221
commit 63e8ce1e3f
1 changed files with 6 additions and 0 deletions

View File

@ -2,9 +2,15 @@ require("@nomiclabs/hardhat-waffle");
require('hardhat-deploy');
require("hardhat-deploy-ethers");
require('@openzeppelin/hardhat-upgrades');
const Kredits = require('./lib/kredits');
const promptly = require('promptly');
extendEnvironment(async (hre) => {
hre.kredits = new Kredits(hre.ethers.provider, hre.ethers.provider.getSigner())
await hre.kredits.init();
});
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async () => {