mirror of
https://github.com/Instadapp/dsa-connectors-2.0.git
synced 2024-07-29 21:57:39 +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;
|
||
|
};
|