Overview
The Staking precompile provides a Solidity interface to the Cosmos SDKx/staking module. Smart contracts can create validators, manage delegations, and query staking state.
Precompile Address: 0x0000000000000000000000000000000000000800
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Validator operations, delegation management, and staking functionality via precompile.
x/staking module. Smart contracts can create validators, manage delegations, and query staking state.
Precompile Address: 0x0000000000000000000000000000000000000800
| Method Type | Gas Cost |
|---|---|
| Transactions | 2000 + (30 x bytes of input) |
| Queries | 1000 + (3 x bytes of input) |
| Method | Description |
|---|---|
createValidator | Create a new validator with description, commission, and self-delegation |
editValidator | Update validator description and commission |
delegate | Delegate tokens to a validator |
undelegate | Undelegate tokens (begins unbonding period) |
redelegate | Move delegation from one validator to another |
cancelUnbondingDelegation | Cancel an in-progress unbonding |
| Method | Description |
|---|---|
delegation | Get delegation details for a delegator-validator pair |
unbondingDelegation | Get unbonding delegation details |
validator | Get validator information |
validators | List all validators with pagination |
redelegations | Get redelegation entries |
// Pseudocode: import IStaking and Coin from the canonical interface.
IStaking constant staking = IStaking(0x0000000000000000000000000000000000000800);
// Delegate 1000 tokens to a validator
staking.delegate(msg.sender, "c8valoper1...", 1000000000);
// Query delegation
(uint256 shares, Coin memory balance) = staking.delegation(msg.sender, "c8valoper1...");
ctm with exponent 18; check each precompile’s expected amount format before interacting with it.