2021-05-14 19:16:54 +00:00
|
|
|
const hre = require("hardhat");
|
2021-06-04 10:47:16 +00:00
|
|
|
const { ethers } = hre;
|
2021-05-14 19:16:54 +00:00
|
|
|
const addresses = require("./constant/addresses");
|
|
|
|
const abis = require("./constant/abis");
|
|
|
|
|
2021-06-04 10:47:16 +00:00
|
|
|
module.exports = async function() {
|
|
|
|
const [_, __, ___, wallet3] = await ethers.getSigners();
|
|
|
|
const instaIndex = new ethers.Contract(
|
|
|
|
addresses.core.instaIndex,
|
|
|
|
abis.core.instaIndex,
|
|
|
|
wallet3
|
|
|
|
);
|
2021-05-14 19:16:54 +00:00
|
|
|
|
2021-06-04 10:47:16 +00:00
|
|
|
const masterAddress = await instaIndex.master(); // TODO: make it constant?
|
|
|
|
await hre.network.provider.request({
|
|
|
|
method: "hardhat_impersonateAccount",
|
|
|
|
params: [masterAddress],
|
|
|
|
});
|
|
|
|
await wallet3.sendTransaction({
|
|
|
|
to: masterAddress,
|
|
|
|
value: ethers.utils.parseEther("10"),
|
|
|
|
});
|
2021-05-14 19:16:54 +00:00
|
|
|
|
2021-06-04 10:47:16 +00:00
|
|
|
return await ethers.getSigner(masterAddress);
|
2021-05-14 19:16:54 +00:00
|
|
|
};
|