Skip to main content

Overview

The Staking precompile provides a comprehensive interface to the Cosmos SDK’s x/staking module, enabling smart contracts to engage in staking activities. This includes creating and managing validators, delegating and undelegating tokens, and querying a wide range of staking-related information, such as validator details, delegation records, and staking pool status. Precompile Address: 0x0000000000000000000000000000000000000800 Related Module: x/staking

Gas Costs

Gas costs are approximated and may vary based on the complexity of the staking operation and chain settings.

Transaction Methods

createValidator

Creates a new validator.

editValidator

Edits an existing validator’s parameters.

delegate

Delegates tokens to a validator.

undelegate

Undelegates tokens from a validator.

redelegate

Redelegates tokens from one validator to another.

cancelUnbondingDelegation

Cancels an unbonding delegation.

Query Methods

validator

Queries information about a specific validator.

validators

Queries validators with optional status filtering and pagination.

delegation

Queries the delegation amount between a delegator and a validator.

unbondingDelegation

Queries unbonding delegation information.

redelegation

Queries a specific redelegation.

redelegations

Queries redelegations with optional filters.
Note: The pool() and params() functions are not currently available in this staking precompile implementation. The available query methods are limited to delegation-specific functions shown above.

Full Solidity Interface & ABI

Staking Solidity Interface
Staking ABI