Developers

System contracts

The contracts that run the chain, their addresses, and what each one is responsible for.

System contracts

The chain runs on a set of system contracts. Their addresses are published in the chain feed, so read them from there rather than pasting them into your code.

The contracts

These are the addresses on the L2 Protocol chain. They are also in the chain feed, per chain.

Contract Address Responsible for
validatorSet 0x0000000000000000000000000000000000001000 The active validator set, block rewards, the emission schedule and the burn ratio
slashIndicator 0x0000000000000000000000000000000000001001 Counting missed blocks and reporting downtime and double signing
systemReward 0x0000000000000000000000000000000000001002 The reward pool and the operators allowed to draw from it
govHub 0x0000000000000000000000000000000000001007 The single entry point through which parameter changes are applied
stakeHub 0x0000000000000000000000000000000000002002 Delegation, undelegation, the unbond period and the slashing amounts
stakeCredit 0x0000000000000000000000000000000000002003 The pool share a delegator holds in one validator
governor 0x0000000000000000000000000000000000002004 Proposals, voting, quorum and the whitelist of executable targets
govToken 0x0000000000000000000000000000000000002005 govL2P, the voting power minted against staked L2P. Non-transferable
timelock 0x0000000000000000000000000000000000002006 The delay between a passed proposal and its execution
blsPrecompile 0x0000000000000000000000000000000000000066 Verifying BLS signatures, used when a validator proves it owns its vote key

Two standard helpers are in the genesis state as well: Multicall3 at 0xcA11bde05977b3631167028862bE2a173976CA11 for batching calls, and an ENS registry whose root owner is preset.

Read them from the feed rather than pasting them into your code, so that a second chain does not need a second copy of your integration:

curl -s https://chains.l2protocol.com/chains.json | jq '.[0].contracts'

The parameters these contracts expose to governance, and what each one does, are listed in What governance can change.

Reading a parameter

Everything the sites show can be read directly. For example, the current burn ratio:

curl -s https://rpc.l2protocol.com   -H 'Content-Type: application/json'   -d '{"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"to":"<validatorSet>","data":"<burnRatio selector>"},"latest"]}'

Why govHub exists

Parameter changes do not call the target contract directly. They call govHub.updateParam(key, value, target), and the hub applies the change to the target. That gives the chain one audited path for every parameter change, instead of one setter per contract with its own access control to get wrong.

It also means a proposal only ever needs one target to be whitelisted on the governor: the hub itself.