Suppose I have a contract like
pragma solidity ^0.8.17;
contract MyContract {
constructor(string arg1, uint arg2) {
...
}
...
}
When I compile the solidity contract (actually I'm using hardhat), we get an artifact file like artifacts/contracts/MyContract.sol/MyContract.json, which includes bytecode and deployedBytecode fields. What are the differences?
I've googled and found some docs but its not yet clear, especially because bytecode and deployedBytecode are generated without constructor parameters.
- the concatenation of
bytecodeand consctuctor parameters are send in the deployed transaction? - the byte code of the deployed stored on Ethereum is
deployedBytecodeand constructor parameters?