contract can be re-created at the same address after having been destroyed. Yet, it is possible for that newly created contract to have a different deployed bytecode even though the creation bytecode has been the same (which is a requirement because otherwise the address would change). This is due to the fact that the constructor can query external state that might have changed between the two creations and incorporate that into the deployed bytecode before it is stored.
However CREATE2 has an important property that makes it preferable in certain situations: it doesn’t rely on the current state of the deploying address. This means you can be sure the contract address calculated today would be the same as the address calculated 1 year from now. This is important because you can interact with the address, and send it ETH, before the smart contract has been deployed to it.
These two pieces of text explain the same idea. Could you please tell me whether I am right or not? CREATE2 allows us to keep the same deployed address, even if the external data used by our contract is changed.
Isn't contract address dependent on deployer nonce? unless using CREATE2
Обсуждают сегодня