Kryptonite
  • Kryptonite
    • About
    • Protocol Overview
    • Platform Overview
  • USER GUIDE
    • Staking SEI
    • Burning stSEI*
    • Getting into an LP
    • NFT Game Event Rules
  • MECHANISMS
    • Staking
    • Farming
    • Convert
    • Governance
    • Bridge
    • veSEILOR vs SEILOR
  • TOKENOMICS
    • SEILOR Tokenomics
  • Developer
    • Staking
      • Hub
      • Reward
      • Rewards Dispatcher
      • Validators Registry
      • Tokens: stSei and bSei
    • SEILOR Token
      • Boost
      • Dispatcher
      • Distribute
      • Fund
      • Seilor
      • Staking
      • Ve Seilor
    • Oracle
    • Swap Extension
  • Contract Addresses
    • Staking Contracts
    • SEILOR Token Contracts
    • Pool2 Farming
  • Security
    • Audit
  • FAQs
    • Token Contracts
    • Exchanges
    • Socials + Links
Powered by GitBook
On this page
  • Config
  • InitMsg
  • ExecuteMsg
  • AddValidator
  • RemoveValidator
  • UpdateConfig
  • Redelegations
  • SetOwner
  • AcceptOwnership
  • QueryMsg
  • GetValidatorsForDelegation
  • ValidatorResponse
  • Config
  • NewOwner
  • NewOwnerResponse
  1. Developer
  2. Staking

Validators Registry

PreviousRewards DispatcherNextTokens: stSei and bSei

Last updated 1 year ago

The Validator Registry contract stores an approved validators whitelist.

The main query of the contract - 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

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

Key
Type
Description

address

String

Operator address

ExecuteMsg

AddValidator

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

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    AddValidator { validator: Validator },
}

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct Validator {
    pub address: String,
}
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.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    RemoveValidator { address: String},
}
Key
Type
Description

address

String

Operator address

UpdateConfig

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

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateConfig {
        hub_contract: Option<String>,
    },
}
Key
Type
Description

hub_contract*

String

* = optional

Redelegations

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

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    Redelegations { address: String }, 
}
Key
Type
Description

address

String

Operator address

SetOwner

Transfer ownership permissions to a new owner address.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
 SetOwner {
        new_owner_addr: String,
    },
}
Key
Type
Description

new_owner_addr

String

The address of new owner

AcceptOwnership

The new owner accepts ownership permissions.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    AcceptOwnership {},
}

QueryMsg

GetValidatorsForDelegation

Returns validators sorted by total_delegated amount.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    GetValidatorsForDelegation {},
}

ValidatorResponse

returns list validatorResponse

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct ValidatorResponse {
    #[serde(default)]
    pub total_delegated: Uint128,
    pub address: String,
}
Key
Type
Description

total_delegated

Uint128

total Sei delegated to validator

address

String

Operator address

Config

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Config {},
}

NewOwner

Query the address of the new owner.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
  NewOwner {},
}

NewOwnerResponse

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

new_owner

String

The address of new owner

Contract address of

Contract address of

New contract address of

Returns a struct.

GetValidatorsForDelegation
Config
Hub
Hub
Hub