mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
26 lines
712 B
JavaScript
26 lines
712 B
JavaScript
const hre = require("hardhat");
|
|
const { ethers } = hre;
|
|
const addresses = require("./constant/addresses");
|
|
const abis = require("./constant/abis");
|
|
|
|
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?
|
|
await hre.network.provider.request({
|
|
method: "hardhat_impersonateAccount",
|
|
params: [masterAddress],
|
|
});
|
|
await wallet3.sendTransaction({
|
|
to: masterAddress,
|
|
value: ethers.utils.parseEther("10"),
|
|
});
|
|
|
|
return await ethers.getSigner(masterAddress);
|
|
};
|