Member-only story
Deterministic addresses using Create & Create2
In case where a contract is deployed from an EOA (externally owned address), the contract address is derived from the EOA address and the nonce.
For eg. if you deploy a contract from a new EOA address (say, 0x109F6aC361Aa9d1fEba9a42C01960272C4C67FaD), it has a starting nonce of 0. Then the address of the contract will come out to be 0x83A5A76FfdCE0Eb86808074F507a59ADEE15097b. You can try it yourself here, https://evmtools.xyz/contract-address-gen
But things are a bit different when it comes to deploying a contract from another contract
There are primarily two ways of deriving contract addresses when a new contract is being created from a contract.
CREATE
The first thing to note is that the starting nonce for the new contract is 1 instead of 0 as in the case of externally owned addresses. So when we deploy a new contract from another contract using a new keyword, the address of the new contract will be derived by using the contract address doing the deployment and its nonce.
// SPDX-License-Identifier: GPL-3.0…




