dsa-connectors/scripts/tests/impersonate.ts
2021-12-06 00:40:22 +05:30

15 lines
355 B
TypeScript

import { ethers, network } from "hardhat";
export const impersonateAccounts = async (accounts: any) => {
const signers = [];
for (const account of accounts) {
await network.provider.request({
method: "hardhat_impersonateAccount",
params: [account],
});
signers.push(await ethers.getSigner(account));
}
return signers;
};