Overview
The Distribution precompile provides access to the Cosmos SDKx/distribution module. Smart contracts can claim rewards, query reward balances, and interact with the community pool.
Precompile Address: 0x0000000000000000000000000000000000000801
Gas Costs
| Method Type | Gas Cost |
|---|---|
| Transactions | 2000 + (30 x bytes of input) |
| Queries | 1000 + (3 x bytes of input) |
Transaction Methods
| Method | Description |
|---|---|
setWithdrawAddress | Set the address that receives staking rewards |
withdrawDelegatorRewards | Withdraw rewards from a specific validator |
withdrawValidatorCommission | Withdraw validator commission earnings |
fundCommunityPool | Send tokens to the community pool |
claimRewards | Claim rewards for a delegator with a max retrieval count |
depositValidatorRewardsPool | Deposit rewards into a validator rewards pool |
Query Methods
| Method | Description |
|---|---|
validatorDistributionInfo | Get a validator’s distribution state |
validatorOutstandingRewards | Get unclaimed validator rewards |
validatorCommission | Get accumulated validator commission |
delegationTotalRewards | Get total rewards across all delegations |
delegatorValidators | List validators a delegator has staked with |