Skip to content
🚧 Under Development! May be incomplete.Some pages/links may be incomplete or subject to change.

Distributor

0x2C1F148Ee973a4cdA4aBEce2241DF3D3337b7319 | ABI JSON

The Distributor contract is responsible for distributing the block rewards from the reward controller and the reward allocation weights, to the reward allocation receivers.

Each validator has its own reward allocation, if it does not exist, a default reward allocation is used. And if governance has not set the default reward allocation, the rewards are not minted and distributed.

Functions

distributeFor

Distribute the rewards to the reward allocation receivers.

Permissionless function to distribute rewards by providing the necessary Merkle proofs. Reverts if the proofs are invalid.

solidity
function distributeFor(
    uint64 nextTimestamp,
    uint64 proposerIndex,
    bytes calldata pubkey,
    bytes32[] calldata proposerIndexProof,
    bytes32[] calldata pubkeyProof
)
    external;

Parameters

NameTypeDescription
nextTimestampuint64The timestamp of the next beacon block to distribute for. The EIP-4788 Beacon Roots contract is queried by this key, returning the parent beacon block root from the next timestamp.
proposerIndexuint64The proposer index of the beacon block. This should be the validator index corresponding to the pubkey in the validator registry in the beacon state.
pubkeybytesThe validator pubkey of the proposer.
proposerIndexProofbytes32[]The Merkle proof of the proposer index in the beacon block.
pubkeyProofbytes32[]The Merkle proof of the validator pubkey of the proposer in the beacon block.

Events

Distributed

solidity
event Distributed(bytes indexed valPubkey, uint64 indexed nextTimestamp, address indexed receiver, uint256 amount);