Skip to content

Commit

Permalink
feat: can impersonate accounts on a local node. eg Hardhat, Ganache o…
Browse files Browse the repository at this point in the history
…r Anvil
  • Loading branch information
naddison36 committed Aug 18, 2022
1 parent 098e6c8 commit 03543ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks/utils/signerFactory.ts
Expand Up @@ -41,7 +41,7 @@ export const getSigner = async (hre: HardhatRuntime = {}, speed: Speed = "fast",
}

// If connecting to a forked chain
if (["tasks-fork.config.ts", "tasks-fork-polygon.config.ts"].includes(hre?.hardhatArguments.config)) {
if (hre.network.name === "local" || ["tasks-fork.config.ts", "tasks-fork-polygon.config.ts"].includes(hre?.hardhatArguments.config)) {
const chain = getChain(hre)
// If IMPERSONATE environment variable has been set
if (process.env.IMPERSONATE) {
Expand Down

0 comments on commit 03543ba

Please sign in to comment.