How to deploy a smart contract on multiple networks and keeping the contract address same in all the networks?

445 Views Asked by At

How to deploy a smart contract on multiple networks and keeping the contract address same in all the networks? Please help me with this situation, if is there any way to do such .

1

There are 1 best solutions below

0
Mohamed Sohail On

Contract addresses are deterministic. They are formed from the senders address and the network nonce. So on different networks you would want the nonce to be the same (assuming you will use the same sender address across different networks) when deploying the contract.

However there is no real benefit of having the same contract address aside from maybe less verbose docs or maybe recovering lost funds sent on a wrong network.