Skip to content

Instantly share code, notes, and snippets.

@donoso-eth
Last active June 22, 2022 04:45
Show Gist options
  • Save donoso-eth/88b3e43f5957cf1e6cdbcd326067fee0 to your computer and use it in GitHub Desktop.
Save donoso-eth/88b3e43f5957cf1e6cdbcd326067fee0 to your computer and use it in GitHub Desktop.
// Impersonate, get account/contract ownership
await hre.network.provider.request({
method: "hardhat_impersonateAccount",
params: [ADDRESS],
});
// Gelato address on network mumbai
const GELATO_NETWORK = "0x25aD59adbe00C2d80c86d01e2E05e1294DA84823"
// we impersonate the account
await hre.network.provider.request({
method: "hardhat_impersonateAccount",
params: [GELATO_NETWORK],
});
// we take ownership of gelato network's contract with ethers.js
const executor = await ethers.provider.getSigner(GELATO_NETWORK);
// now we are ready to call the Ops contract and call execute();
const GELATO_OPS = "0xB3f5503f93d5Ef84b06993a1975B9D21B962892F"
const ops = IOps__factory.connect(GELATO_OPS, executor);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment