Skip to main content

Overview

The Distribution precompile provides access to the Cosmos SDK x/distribution module, enabling smart contracts to manage staking rewards, interact with the community pool, and handle validator commission operations. Precompile Address: 0x0000000000000000000000000000000000000801 Related Module: x/distribution

Gas Costs

Gas costs are approximated and may vary based on call complexity and chain settings.

Message Type Constants

The precompile defines the following constants for the various Cosmos SDK message types:

Transaction Methods

claimRewards

Claims staking rewards from multiple validators.
The maxRetrieve parameter limits the number of validators from which to claim rewards in a single transaction. This prevents excessive gas consumption when a delegator has rewards from many validators.

withdrawDelegatorRewards

Withdraws staking rewards from a single, specific validator.

setWithdrawAddress

Sets or changes the withdrawal address for receiving staking rewards.

withdrawValidatorCommission

Withdraws a validator’s accumulated commission rewards.

fundCommunityPool

Sends tokens directly to the community pool.

depositValidatorRewardsPool

Deposits tokens into a specific validator’s rewards pool.

Query Methods

delegationTotalRewards

Retrieves comprehensive reward information for all of a delegator’s positions.

delegationRewards

Queries pending rewards for a specific delegation.

delegatorValidators

Retrieves a list of all validators from which a delegator has rewards.

delegatorWithdrawAddress

Queries the address that can withdraw rewards for a given delegator.

communityPool

Queries the current balance of the community pool.

validatorCommission

Queries the accumulated commission for a specific validator.

validatorDistributionInfo

Queries a validator’s commission and self-delegation rewards.

validatorOutstandingRewards

Queries the outstanding rewards of a validator.

validatorSlashes

Queries slashing events for a validator within a specific height range.

Full Solidity Interface & ABI

Distribution Solidity Interface
Distribution ABI