wighawag / hardhat-deploy

hardhat deployment plugin
MIT License
1.2k stars 296 forks source link

Pre-deploy Deterministic Deployment Factory to Avalanche #229

Closed jsidorenko closed 2 years ago

jsidorenko commented 2 years ago

Hi there, I've experienced a problem deploying on Avalanche network using the Deterministic Deployment Proxy. As described here (#4-deterministicdeployment-ability-to-specify-a-deployment-factory in order to deploy your contracts on Avalanche or Celo you need to use another proxy. But if you already have your contracts deployed on other networks with the default proxy, then you'll get different contract addresses when using a new proxy. In my case, that causes a big issue, since I'm trying to keep the same contract address across all the chains.

Maybe @wighawag, you could deploy a proxy contract manually to Avalanche X-chain + their Fuji testnet if you own a private key for 0x3fab184622dc19b6109349b94811493bf2a45362? Or maybe just pre-sign and include the deployment transaction with the right chainId (as per EIP-155)?

wighawag commented 2 years ago

if the contract are already deployed and the network in question are not compatible with the default deployment factory, then you cannot do anything nobody have the private key for 0x3fab184622dc19b6109349b94811493bf2a45362

jsidorenko commented 2 years ago

Got it, thanks @wighawag !