Two kinds of code

Initcode runs at creation and returns the code stored at the address. The two lengths may differ significantly. The EIP sets a 49,152-byte limit for initcode and charges 2 gas per started 32-byte word. Ethereum EIP 3860 ↗

A factory example

For 65 bytes, three words add 6 gas. This charge covers the initcode length. Constructor execution and storage of the resulting code add separate costs. Encoded constructor arguments can increase the creation payload.

Checking a deployment

Measure both the submitted initcode and the code returned by the constructor. Test direct creation and factory paths using CREATE or CREATE2 when applicable. Retain compiler and build metadata to explain size changes after dependency updates.