Overview

The Staking precompile provides a Solidity interface to the Cosmos SDK x/staking module. Smart contracts can create validators, manage delegations, and query staking state. Precompile Address: 0x0000000000000000000000000000000000000800

Gas Costs

Method TypeGas Cost
Transactions2000 + (30 x bytes of input)
Queries1000 + (3 x bytes of input)

Transaction Methods

MethodDescription
createValidatorCreate a new validator with description, commission, and self-delegation
editValidatorUpdate validator description and commission
delegateDelegate tokens to a validator
undelegateUndelegate tokens (begins unbonding period)
redelegateMove delegation from one validator to another
cancelUnbondingDelegationCancel an in-progress unbonding

Query Methods

MethodDescription
delegationGet delegation details for a delegator-validator pair
unbondingDelegationGet unbonding delegation details
validatorGet validator information
validatorsList all validators with pagination
redelegationsGet redelegation entries

Example

// 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...");
Cosmos module precompiles use the chain’s native decimal precision. c8ntinuum’s base denom is ctm with exponent 18; check each precompile’s expected amount format before interacting with it.
For exact signatures, structs, return values, and events, see Precompile ABI Reference.