Support for Multiple Contracts and Hardhat Networks #35
Replies: 2 comments 2 replies
-
Hi @0xD006F00D, thanks for sharing your input and work! So let me quickly elaborate on my design decision of If you think it's worth the time, you could even write your own Hardhat plugin that extends this plugin for your use case! |
Beta Was this translation helpful? Give feedback.
-
Just to go over your gist, you have setup deploying different constructor arguments & contract code bases/contracts but getting the same single contract address? Also were you targeting just Arbitrum or multi-chain in this gist? Just wondering for the specific addition.
|
Beta Was this translation helpful? Give feedback.
-
Hi again,
I think supporting multiple contracts is quite important. I rewrote the extension a bit, not sure if the format makes sense so I didn't create a pull request for it. Here as a Gist. I added support for:
But I used the same array formatting you had which wouldn't allow individual gas/salt/signer settings for each contract. Maybe having an Array of XDeployConfigs would make more sense, but that would have required a few more changes to the verify subtasks and tests.
Also it would be nice if hardhat networks could be directly referenced or XDeployer can be executed with the --network parameter to specify networks. Hardhat-Deploy also makes use of a tagging system for networks. Maybe XDeployer could just reuse that functionality to select which networks to deploy to.
As I have some custom logic for my contract constructor arguments as the contracts depend on each others I ended up just creating a minimal deploy script and referencing your deployer directly. Maybe somebody can make use of it: Gist
Beta Was this translation helpful? Give feedback.
All reactions