dsa-connectors-2.0/scripts/tests/impersonate.ts

15 lines
355 B
TypeScript
Raw Normal View History

2023-12-15 22:50:02 +00:00
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;
};