mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
15 lines
355 B
TypeScript
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;
|
|
};
|