Forking Mainnet With Upgrades Package
See original GitHub issueHello all,
I am attempting to test a set of upgradeable contracts using the mainnet forking abilities on Hardhat. Unfortunately, whenever I attempt to run my tests I receive this error message:
Error: Invalid deployment with address 0x09635F643e140090A9A8Dcd712eD6285858ceBef and txHash 0xd9e10e22b3ac93529b4563a615cb341a2f11832eef7df79d22c8e090b1e60a9a
With this stack trace:
at Object.resumeOrDeploy (node_modules/@openzeppelin/upgrades-core/src/deployment.ts:35:13)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at /Users/jacobsanjuan/Desktop/Tokemak/fractal-smart-contracts/node_modules/@openzeppelin/upgrades-core/src/impl-store.ts:33:23
at Manifest.lockedRun (node_modules/@openzeppelin/upgrades-core/src/manifest.ts:90:14)
at fetchOrDeployGeneric (node_modules/@openzeppelin/upgrades-core/src/impl-store.ts:25:24)
at Proxy.deployProxy (node_modules/@openzeppelin/hardhat-upgrades/src/deploy-proxy.ts:45:18)
at Context.<anonymous> (test-unit/Manager.test.js:27:15)
At this line of code in my test file:
manager = await upgrades.deployProxy(managerFactory, [CYCLE_DURATION], { unsafeAllow: ['delegatecall'] });
I have done a lot of research on this issue and am aware that this issue is very similar to the one resolved in issue #282, but I am still having problems. I am using the latest version of OpenZeppelin Hardhat Upgrades (^1.6.0) and have tried both Infura and Alchemy on both the mainnet and testnets, and am still having issues. Please let me know what further information is needed.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to Fork Ethereum Mainnet - Alchemy Docs
A step-by-step guide on how to <<glossary:fork>> the Mainnet of Ethereum to ... This command will execute the Hardhat package and create a...
Read more >Forking Ethereum Mainnet: Mint Your Own DAI - Medium
Using your new node First, change MetaMask's network to our forked client by clicking on Custom RPC in the network dropdown and inputting...
Read more >Simulate Live Networks with Forked Sandboxes - Truffle Suite
Forking allows a sandbox to act as a live network from a given block number. We take for granted in web2 that we...
Read more >Upgrade from contracts-ethereum-package to contracts ...
The test was running on local network with mainnet fork. Tried both ganache and hardhat node with unlocked admin account but both raised...
Read more >Forking other networks | Ethereum development ... - Hardhat
You can start an instance of Hardhat Network that forks mainnet. This means that it will simulate having the same state as mainnet,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Solved, thank you for doing that, you guys rock!
@jake-sanjuan This should be fixed on the latest release of
@openzeppelin/upgrades-core
.In the end we fixed it by using
web3_clientVersion
to check if the node is Hardhat Network or Ganache, regardless of its chain id. But this should fix it for you.