Vyper theorytheory 0/50 · 0%
Tooling · hard

48. Reading Vyper bytecode and the ABI

What the compiler actually hands you.

Compiling a `.vy` file produces (at minimum) the ABI — a JSON description of every external function, event and their types — and the bytecode split into creation code (run once, returns runtime code) and runtime code (what actually lives at the deployed address).

vyper -f abi,bytecode my_contract.vy

Front-end libraries (ethers.js, viem, web3.py) consume the ABI to encode function calls and decode return data and event logs; you rarely need to read raw bytecode by hand except when debugging deep issues.

Check your understanding

  1. 1. What does the ABI describe?

  2. 2. What's the difference between creation code and runtime code?

  3. 3. What consumes the ABI to build calls from JavaScript?