1

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 if there are any. However, in looking at many contract deployment transactions, there's a lot of data before the contract bytecode as well. What does this represent?

Taking a random example, the contract at address 0x41f28833be34e6ede3c58d1f597bef429861c4e2 has this bytecode:

https://etherscan.io/bytecode-decompiler?a=0x41f28833be34e6ede3c58d1f597bef429861c4e2

here's the contract creation transaction:

https://etherscan.io/tx/0x0bd8df07cf5cd52b86c6d419b68fc4c413d5c150594da05c0b5f511205ae603b

Looking at the "Input Data" (i.e. raw transaction data) etherscan shows here, there's a lot of data before the actual bytecode of the contract, roughly as long as the actual contract bytecode itself:

0x606060405234156200001057600080fd5b600b60028190555073789c778b340f17eb046a5a8633e362468aceeff660008080815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160008080815260200190815260200160002060000160146101000a81548160ff021916908315150217905550678ac7230489e80000600080808152602001908152602001600020600101819055506002600080808152602001908152602001600020600201819055506001600073789c778b340f17eb046a5a8633e362468aceeff673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060010182816200013c919062000e53565b916000526020600020900160008090919091505550739a643a42748243f80243a65666146a2e1bd5c6aa6000806001815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060006001815260200190815260200160002060000160146101000a81548160ff02191690831515021790555066071afd498d000060008060018152602001908152602001600020600101819055506003600080600181526020019081526020016000206002018190555060016000739a643a42748243f80243a65666146a2e1bd5c6aa73ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480600101828162000278919062000e53565b91600052602060002090016000600190919091505550735d5d6543d73066e69424ce2756cc34cbfe4c368c6000806002815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060006002815260200190815260200160002060000160146101000a81548160ff0219169083151502179055506611c37937e0800060008060028152602001908152602001600020600101819055506001600080600281526020019081526020016000206002018190555060016000735d5d6543d73066e69424ce2756cc34cbfe4c368c73ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806001018281620003b5919062000e53565b9160005260206000209001600060029091909150555073e34501580dc9591211afc7c13f16ddf591c87cde6000806003815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016000806003815260200190815260200160002060000160146101000a81548160ff021916908315150217905550670de0b6b3a76400006000806003815260200190815260200160002060010181905550600160008060038152602001908152602001600020600201819055506001600073e34501580dc9591211afc7c13f16ddf591c87cde73ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806001018281620004f3919062000e53565b916000526020600020900160006003909190915055507393cdb0a93fc36f6a53ed21ecf6305ab80d06beca6000806004815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016000806004815260200190815260200160002060000160146101000a81548160ff021916908315150217905550670de0b6b3a7640000600080600481526020019081526020016000206001018190555060016000806004815260200190815260200160002060020181905550600160007393cdb0a93fc36f6a53ed21ecf6305ab80d06beca73ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480600101828162000631919062000e53565b91600052602060002090016000600490919091505550739467d05ee1c90010a657e244f6261941685965836000806005815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016000806005815260200190815260200160002060000160146101000a81548160ff021916908315150217905550680246ddf9797668000060008060058152602001908152602001600020600101819055506001600080600581526020019081526020016000206002018190555060016000739467d05ee1c90010a657e244f62619416859658373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480600101828162000770919062000e53565b9160005260206000209001600060059091909150555073b6e2e5e06397dc522db58faa064f74c95322b58e6000806006815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016000806006815260200190815260200160002060000160146101000a81548160ff02191690831515021790555066d529ae9e8600006000806006815260200190815260200160002060010181905550600160008060068152602001908152602001600020600201819055506001600073b6e2e5e06397dc522db58faa064f74c95322b58e73ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806001018281620008ad919062000e53565b9160005260206000209001600060069091909150555073bcddcf35880443b6a1f32f07009097e95c3277166000806007815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016000806007815260200190815260200160002060000160146101000a81548160ff02191690831515021790555067016345785d8a00006000806007815260200190815260200160002060010181905550600160008060078152602001908152602001600020600201819055506001600073bcddcf35880443b6a1f32f07009097e95c32771673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806001018281620009eb919062000e53565b9160005260206000209001600060079091909150555073f7007f39a41d87c669bd9beadc3d5cc2ef5a32be6000806008815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008060006008815260200190815260200160002060000160146101000a81548160ff02191690831515021790555066e6ed27d66680006000806008815260200190815260200160002060010181905550600160008060088152602001908152602001600020600201819055506001600073f7007f39a41d87c669bd9beadc3d5cc2ef5a32be73ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480600101828162000b28919062000e53565b9160005260206000209001600060089091909150555073f7007f39a41d87c669bd9beadc3d5cc2ef5a32be6000806009815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016000806009815260200190815260200160002060000160146101000a81548160ff021916908315150217905550678ac7230489e800006000806009815260200190815260200160002060010181905550600160008060098152602001908152602001600020600201819055506001600073f7007f39a41d87c669bd9beadc3d5cc2ef5a32be73ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480600101828162000c66919062000e53565b9160005260206000209001600060099091909150555073d17e2bfe196470a9fefb567e8f5992214eb42f24600080600a815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600080600a815260200190815260200160002060000160146101000a81548160ff0219169083151502179055506702c68af0bb140000600080600a8152602001908152602001600020600101819055506001600080600a8152602001908152602001600020600201819055506001600073d17e2bfe196470a9fefb567e8f5992214eb42f2473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480600101828162000da4919062000e53565b91600052602060002090016000600a909190915055506001600080600b815260200190815260200160002060000160146101000a81548160ff0219169083151502179055506701b16e5a86990000600080600b81526020019081526020016000206001018190555033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555062000eaa565b81548183558181151162000e7d5781836000526020600020918201910162000e7c919062000e82565b5b505050565b62000ea791905b8082111562000ea357600081600090555060010162000e89565b5090565b90565b610bb98062000eba6000396000f300

What does this represent?

1
  • It is the constructor bytecode. It initializes the contract and returns the bytcode to store it in the Ethereum World State.
    – Ismael
    Commented Jun 26, 2021 at 5:23

0