v034

package
v0.44.50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package v034 is used for legacy migration scripts. Actual migration scripts for v034 have been removed, but the v039->v042 migration script still references types from this file, so we're keeping it for now. DONTCOVER

Index

Constants

View Source
const (
	Unbonded  BondStatus = 0x00
	Unbonding BondStatus = 0x01
	Bonded    BondStatus = 0x02

	BondStatusUnbonded  = "Unbonded"
	BondStatusUnbonding = "Unbonding"
	BondStatusBonded    = "Bonded"
)

staking constants

View Source
const (
	ModuleName = "staking"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BondStatus

type BondStatus byte

BondStatus is the status of a validator

type Commission

type Commission struct {
	Rate          sdk.Dec   `json:"rate"`
	MaxRate       sdk.Dec   `json:"max_rate"`
	MaxChangeRate sdk.Dec   `json:"max_change_rate"`
	UpdateTime    time.Time `json:"update_time"`
}

type Delegation

type Delegation struct {
	DelegatorAddress sdk.AccAddress `json:"delegator_address"`
	ValidatorAddress sdk.ValAddress `json:"validator_address"`
	Shares           sdk.Dec        `json:"shares"`
}

type Delegations

type Delegations []Delegation

type Description

type Description struct {
	Moniker  string `json:"moniker"`
	Identity string `json:"identity"`
	Website  string `json:"website"`
	Details  string `json:"details"`
}

type GenesisState

type GenesisState struct {
	Pool                 Pool                  `json:"pool"`
	Params               Params                `json:"params"`
	LastTotalPower       sdk.Int               `json:"last_total_power"`
	LastValidatorPowers  []LastValidatorPower  `json:"last_validator_powers"`
	Validators           Validators            `json:"validators"`
	Delegations          Delegations           `json:"delegations"`
	UnbondingDelegations []UnbondingDelegation `json:"unbonding_delegations"`
	Redelegations        []Redelegation        `json:"redelegations"`
	Exported             bool                  `json:"exported"`
}

type LastValidatorPower

type LastValidatorPower struct {
	Address sdk.ValAddress
	Power   int64
}

type Params

type Params struct {
	UnbondingTime time.Duration `json:"unbonding_time"`
	MaxValidators uint16        `json:"max_validators"`
	MaxEntries    uint16        `json:"max_entries"`
	BondDenom     string        `json:"bond_denom"`
}

type Pool

type Pool struct {
	NotBondedTokens sdk.Int `json:"not_bonded_tokens"`
	BondedTokens    sdk.Int `json:"bonded_tokens"`
}

type Redelegation

type Redelegation struct {
	DelegatorAddress    sdk.AccAddress      `json:"delegator_address"`
	ValidatorSrcAddress sdk.ValAddress      `json:"validator_src_address"`
	ValidatorDstAddress sdk.ValAddress      `json:"validator_dst_address"`
	Entries             []RedelegationEntry `json:"entries"`
}

type RedelegationEntry

type RedelegationEntry struct {
	CreationHeight int64     `json:"creation_height"`
	CompletionTime time.Time `json:"completion_time"`
	InitialBalance sdk.Int   `json:"initial_balance"`
	SharesDst      sdk.Dec   `json:"shares_dst"`
}

type UnbondingDelegation

type UnbondingDelegation struct {
	DelegatorAddress sdk.AccAddress             `json:"delegator_address"`
	ValidatorAddress sdk.ValAddress             `json:"validator_address"`
	Entries          []UnbondingDelegationEntry `json:"entries"`
}

type UnbondingDelegationEntry

type UnbondingDelegationEntry struct {
	CreationHeight int64     `json:"creation_height"`
	CompletionTime time.Time `json:"completion_time"`
	InitialBalance sdk.Int   `json:"initial_balance"`
	Balance        sdk.Int   `json:"balance"`
}

type Validator

type Validator struct {
	OperatorAddress         sdk.ValAddress     `json:"operator_address"`
	ConsPubKey              cryptotypes.PubKey `json:"consensus_pubkey"`
	Jailed                  bool               `json:"jailed"`
	Status                  BondStatus         `json:"status"`
	Tokens                  sdk.Int            `json:"tokens"`
	DelegatorShares         sdk.Dec            `json:"delegator_shares"`
	Description             Description        `json:"description"`
	UnbondingHeight         int64              `json:"unbonding_height"`
	UnbondingCompletionTime time.Time          `json:"unbonding_time"`
	Commission              Commission         `json:"commission"`
	MinSelfDelegation       sdk.Int            `json:"min_self_delegation"`
}

func (Validator) MarshalJSON

func (v Validator) MarshalJSON() ([]byte, error)

func (*Validator) UnmarshalJSON

func (v *Validator) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals the validator from JSON using Bech32

type Validators

type Validators []Validator

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL