v038

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package v038 is used for legacy migration scripts. Actual migration scripts for v038 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 (
	ModuleName = "staking"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Description

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

func NewDescription

func NewDescription(moniker, identity, website, securityContact, details string) Description

NewDescription creates a new Description object

type GenesisState

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

func NewGenesisState

func NewGenesisState(
	params v034staking.Params, lastTotalPower sdk.Int, lastValPowers []v034staking.LastValidatorPower,
	validators Validators, delegations v034staking.Delegations,
	ubds []v034staking.UnbondingDelegation, reds []v034staking.Redelegation, exported bool,
) GenesisState

NewGenesisState creates a new GenesisState object

type Params

type Params struct {
	UnbondingTime     time.Duration `json:"unbonding_time" yaml:"unbonding_time"`         // time duration of unbonding
	MaxValidators     uint16        `json:"max_validators" yaml:"max_validators"`         // maximum number of validators (max uint16 = 65535)
	MaxEntries        uint16        `json:"max_entries" yaml:"max_entries"`               // max entries for either unbonding delegation or redelegation (per pair/trio)
	HistoricalEntries uint16        `json:"historical_entries" yaml:"historical_entries"` // number of historical entries to persist
	BondDenom         string        `json:"bond_denom" yaml:"bond_denom"`                 // bondable coin denomination
}

type Validator

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

func (Validator) MarshalJSON

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

MarshalJSON marshals the validator to JSON using Bech32

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