For the complete documentation index, see llms.txt. This page is also available as Markdown.

Validators Registry

The Validator Registry contract stores an approved validators whitelist.

The main query of the contract - GetValidatorsForDelegation returns a list of approved validators sorted by total_delegated amount.

The Hub uses this query to equally distribute delegations between validators.

Config

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Config {
    pub owner: CanonicalAddr,
    pub hub_contract: CanonicalAddr,
}
Key
Type
Description

owner

CanonicalAddr

Owner of the contract

hub_contract

CanonicalAddr

Contract address of Hub

InitMsg

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
    pub registry: Vec<Validator>,
    pub hub_contract: String,
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Validator {
    pub address: String,
}
Key
Type
Description

registry

Vec<Validator>

List of whitelisted validators

hub_contract

String

Contract address of Hub

Key
Type
Description

address

String

Operator address

ExecuteMsg

AddValidator

Adds a validator to the registry. Can only be executed by the owner.

Key
Type
Description

validator

Validator

validator struct

Key
Type
Description

address

String

Operator address

RemoveValidator

Removes a validator from the registry. Can only be executed by the owner.

Key
Type
Description

address

String

Operator address

UpdateConfig

Updates a registry's configuration. Can only be issued by the owner.

Key
Type
Description

hub_contract*

String

New contract address of Hub

* = optional

Redelegations

Re-delegate the delegation from the validator which removed to other whitelisted validator nodes.

Key
Type
Description

address

String

Operator address

SetOwner

Transfer ownership permissions to a new owner address.

Key
Type
Description

new_owner_addr

String

The address of new owner

AcceptOwnership

The new owner accepts ownership permissions.

QueryMsg

GetValidatorsForDelegation

Returns validators sorted by total_delegated amount.

ValidatorResponse

returns list validatorResponse

Key
Type
Description

total_delegated

Uint128

total Sei delegated to validator

address

String

Operator address

Config

Returns a Config struct.

NewOwner

Query the address of the new owner.

NewOwnerResponse

Key
Type
Description

new_owner

String

The address of new owner

Last updated