Is creation code and byte code (fetched via etherscan) the same thing?
Welcome to the community
Creation code is the code to create the contract, the runtime code (shown on Etherscan) is the contract code.
Deconstructing a Solidity Contract — Part II: Creation vs. Runtime
The creation code gets executed in a transaction, which returns a copy of the runtime code, which is the actual code of the contract. As we will see, the constructor is part of the creation code, and not part of the runtime code.
Etherscan shows the runtime bytecode.
The example from Deep dive into the Minimal Proxy contract shows an example of a minimal proxy:
Thanks a lot, @abcoathup
I think, that’s the reason for getting different address while calculating the CREAT2 contract address.
It is a matter of assembling the creation code to calculate the CREATE2 address.
The creation code for a minimal proxy is as follows (just need to replace
bebe... with the actual logic address):