0

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., https://etherscan.io/address/0x23581767a106ae21c074b2276d25e5c3e136a68b#code

The deployed byte code is 44832 bytes. How is that possible?

pickaxe
  • 3
  • 1

2 Answers2

2
  1. You are counting hex digits, not bytes. So it’s 44832 ÷ 2 = 22416 bytes, which is within the limit.
  2. It’s even lower than 22416, because 22416 is the contract creation code, which includes the constructor code + constructor arguments. Have a look at this other question. What needs to be within the limit is the deployed bytecode.
dwardu
  • 1,388
  • 7
  • 10
0

Everthing @dawrdu said, and this:

The contract size limit didn't exist before hard fork 4, described in EIP-607 which included EIP-170, the contract size limitation. So, contracts deployed prior to that were limited by the block gasLimit and not the explicit cap.

https://github.com/ethereum/EIPs/blob/master/EIPS/eip-607.md

Hope it helps.

Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145