Decode Solidity constructor arguments directly from contract creation bytecode.
Useful for:
- Smart contract auditing
- Reverse engineering deployed contracts
- CTFs
- On-chain security research
- Recovering constructor secrets
From GitHub:
pip install "git+https://github.com/touchmeangel/evm_decode_constructor.git"Docker:
docker pull touchmeangel/evm_decode_constructorCLI:
evm_decode_constructor "<creation_input>" "<constructor_types>"Docker:
docker run --rm touchmeangel/evm_decode_constructor \
"<creation_input>" \
"<constructor_types>"Single parameter:
evm_decode_constructor "0x6080604052..." "bytes32"Multiple parameters:
evm_decode_constructor "0x6080604052..." "address,uint256,bool"======================================================================
DECODED CONSTRUCTOR ARGUMENTS
======================================================================
Parameter 1 (bytes32):
b'A very strong secret password :)'
======================================================================
On Etherscan:
- Open the contract.
- Select the Contract tab.
- Open Contract Creation Code.
- Copy the complete creation input.
The copied creation input is the value passed to the decoder.
Examples include:
- address
- bool
- string
- bytes
- bytes32
- uint256
- int256
- address[]
- uint256[]
- tuples
- nested ABI-compatible types
- The constructor types must exactly match the deployed constructor.
- Input must be the complete contract creation bytecode.
- Uses standard Solidity ABI decoding.
Apache-2.0
