2021-12-05 05:23:21 +00:00
|
|
|
const { ethers, network } = "hardhat";
|
|
|
|
import { addresses } from "./constant/addresses";
|
|
|
|
import { abis } from "../constant/abis";
|
2021-10-03 14:02:56 +00:00
|
|
|
|
|
|
|
module.exports = async function() {
|
|
|
|
const [_, __, ___, wallet3] = await ethers.getSigners();
|
|
|
|
const instaIndex = new ethers.Contract(
|
|
|
|
addresses.core.instaIndex,
|
|
|
|
abis.core.instaIndex,
|
|
|
|
wallet3
|
|
|
|
);
|
|
|
|
|
|
|
|
const masterAddress = await instaIndex.master(); // TODO: make it constant?
|
2021-12-05 05:23:21 +00:00
|
|
|
await network.provider.request({
|
2021-10-03 14:02:56 +00:00
|
|
|
method: "hardhat_impersonateAccount",
|
|
|
|
params: [masterAddress],
|
|
|
|
});
|
|
|
|
await wallet3.sendTransaction({
|
|
|
|
to: masterAddress,
|
|
|
|
value: ethers.utils.parseEther("10"),
|
|
|
|
});
|
|
|
|
|
|
|
|
return await ethers.getSigner(masterAddress);
|
|
|
|
};
|