Linked Questions

1 vote
0 answers

Transaction data for contract creation: What's the data before the contract bytecode? [duplicate]

When a contract is deployed, the bytecode of the contract shows in the raw transaction data for the transaction that created the contract, along with constructor arguments after the contract bytecode ...
John1's user avatar
  • 103
17 votes
1 answer

What's the difference between solc's bin bytecode versus bin runtime?

Solc says that bin-runtime is the runtime part of the contracts. What exactly is the runtime bytecode part and how does it differ from bin bytecode output?
dbryson's user avatar
  • 6,393
9 votes
3 answers

What is INIT_CODE_HASH and how is it calculated / used in DeFi smart contracts

I am forking the Sushiswap Exchange code for educational purposes, and I have come across a variable in the code called INIT_CODE_HASH. I am struggling to understand exactly how this variable works, ...
Oscar Chambers's user avatar
16 votes
1 answer

Bytecode on block chain different from the one used when deploying

When I deploy a contract from node.js using the web3 JavaScript API (connected to a locally running geth), and then check the deployed bytecode using eth.getCode(address) (either from the JS console ...
mazi's user avatar
  • 443
4 votes
1 answer

web3.eth.getCode doesn't return the data shown on etherscan

For example, let's take contract address 0xdac17f958d2ee523a2206206994597c13d831ec7. Does anybody have an idea why the following two are totally different: The string returned from await web3.eth....
goodvibration's user avatar
5 votes
1 answer

How to get the actual runtime bytecode from creation bytecode and constructor arguments without deploying

Possible outputs of the Solidity compiler include creation bytecode and deployed (runtime) bytecode. However, this compiled deployed bytecode might not be the same as the one that will actually be ...
FabijanC's user avatar
  • 111
5 votes
1 answer

Is it possible to get the "creation bytecode" of an already deployed contract in Solidity?

I am looking to get some already deployed code working for myself. With ethers.js I can get the bytecode in the following way ethers.getCode("CONTRACT ADDRESS") However, this is a ...
zen's user avatar
  • 51
5 votes
1 answer

what's the "Contract Creation Code" in Etherscan Verfied Contract?

what's the difference between "Contract Creation Code" in Etherscan Verfied Contract and the bytecode compiled by Solc?
Tony_Zhou's user avatar
2 votes
2 answers

Transaction init and 24kb contract size limit

The yellow paper says: init: An unlimited size byte array specifying the EVM-code for the account initialisation procedure, formally Ti. Isn't contract bytecode? If it is, there is a 24kb size limit ...
Fatih Furkan's user avatar
0 votes
2 answers

How are there contracts on mainnet that exceed contract size limit?

As far as I know, there is a contract size limit on mainnet of 24577 bytes. But I can see contracts with larger deployed bytecode, e.g.,
pickaxe's user avatar
1 vote
1 answer

Compute CREATE2 pool address in python for a AMM dex contract based on Uniswap v2

I am trying to create a function in python that can generate the pool address from the address of the tokens. The relevant portion of the solidity contracts is below: contract SyncSwapClassicPool is ...
Cristian's user avatar
  • 113
1 vote
2 answers

Can't find deployment bytecode for contract created from factory - How to retrieve it?

I have a factory contract that deploys child contracts, to complete a challenge on Ethernauts. I would like to retrieve the deployment bytecode for one of the child contracts, but I'm having trouble ...
Danny B's user avatar
  • 323