types

package
v0.0.0-...-8551cdf Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

nolint

Index

Constants

View Source
const (
	EventTypeSetWithdrawAddress = "set_withdraw_address"
	EventTypeRewards            = "rewards"
	EventTypeCommission         = "commission"
	EventTypeWithdrawRewards    = "withdraw_rewards"
	EventTypeWithdrawCommission = "withdraw_commission"
	EventTypeProposerReward     = "proposer_reward"

	AttributeKeyWithdrawAddress = "withdraw_address"
	AttributeKeyValidator       = "validator"

	AttributeValueCategory = ModuleName
)

distribution module event types

View Source
const (
	// ModuleName is the module name constant used in many places
	ModuleName = "kudistribution"

	// StoreKey is the store key string for distribution
	StoreKey = ModuleName

	// RouterKey is the message route for distribution
	RouterKey = ModuleName

	// QuerierRoute is the querier route for distribution
	QuerierRoute = ModuleName
)
View Source
const (
	QueryParams                      = "params"
	QueryValidatorOutstandingRewards = "validator_outstanding_rewards"
	QueryValidatorCommission         = "validator_commission"
	QueryValidatorSlashes            = "validator_slashes"
	QueryDelegationRewards           = "delegation_rewards"
	QueryDelegatorTotalRewards       = "delegator_total_rewards"
	QueryDelegatorValidators         = "delegator_validators"
	QueryWithdrawAddr                = "withdraw_addr"
	QueryCommunityPool               = "community_pool"
)

querier keys

View Source
const (
	AccIDStoreKeyLen = types.AccIDStoreKeyLen
)
View Source
const (
	// default paramspace for params keeper
	DefaultParamspace = ModuleName
)
View Source
const (
	// ProposalTypeCommunityPoolSpend defines the type for a CommunityPoolSpendProposal
	ProposalTypeCommunityPoolSpend = "kuCommunityPoolSpend"
)

Variables

View Source
var (
	NewAccountIDFromStoreKey = types.NewAccountIDFromStoreKey
	MustName                 = types.MustName
)
View Source
var (
	StakingNewHandler            = staking.NewHandler
	StakingNewCommissionRates    = staking.NewCommissionRates
	StakingNewMsgCreateValidator = staking.NewMsgCreateValidator
	StakingEndBlocker            = staking.EndBlocker
	StakingNewMsgDelegate        = staking.NewMsgDelegate
)
View Source
var (
	SupplyRegisterCodec         = supply.RegisterCodec
	SupplyNewModuleAddress      = supply.NewModuleAddress
	SupplyNewEmptyModuleAccount = supply.NewEmptyModuleAccount
)
View Source
var (
	SimulationNoOpMsg              = Sim.NoOpMsg
	SimulationRandomAcc            = Sim.RandomAcc
	SimulationRandPositiveInt      = Sim.RandPositiveInt
	SimulationRandStringOfLength   = Sim.RandStringOfLength
	SimulationNewWeightedOperation = Sim.NewWeightedOperation
	SimulationRandomFees           = Sim.RandomFees
	SimulationNewOperationMsg      = Sim.NewOperationMsg
	SimulationFindAccount          = Sim.FindAccount
	SimulationRandSubsetCoins      = Sim.RandSubsetCoins
)
View Source
var (
	GovTypesRegisterProposalType      = GovTypes.RegisterProposalType
	GovTypesRegisterProposalTypeCodec = GovTypes.RegisterProposalTypeCodec
	GovTypesValidateAbstract          = GovTypes.ValidateAbstract
	GovTypesNewKuMsgSubmitProposal    = GovTypes.NewKuMsgSubmitProposal
)
View Source
var (
	ErrEmptyDelegatorAddr      = sdkerrors.Register(ModuleName, 2, "delegator address is empty")
	ErrEmptyWithdrawAddr       = sdkerrors.Register(ModuleName, 3, "withdraw address is empty")
	ErrEmptyValidatorAddr      = sdkerrors.Register(ModuleName, 4, "validator address is empty")
	ErrEmptyDelegationDistInfo = sdkerrors.Register(ModuleName, 5, "no delegation distribution info")
	ErrNoValidatorDistInfo     = sdkerrors.Register(ModuleName, 6, "no validator distribution info")
	ErrNoValidatorCommission   = sdkerrors.Register(ModuleName, 7, "no validator commission to withdraw")
	ErrSetWithdrawAddrDisabled = sdkerrors.Register(ModuleName, 8, "set withdraw address disabled")
	ErrBadDistribution         = sdkerrors.Register(ModuleName, 9, "community pool does not have sufficient coins to distribute")
	ErrInvalidProposalAmount   = sdkerrors.Register(ModuleName, 10, "invalid community pool spend proposal amount")
	ErrEmptyProposalRecipient  = sdkerrors.Register(ModuleName, 11, "invalid community pool spend proposal recipient")
	ErrNoValidatorExists       = sdkerrors.Register(ModuleName, 12, "validator does not exist")
	ErrNoDelegationExists      = sdkerrors.Register(ModuleName, 13, "delegation does not exist")
)

x/distribution module sentinel errors

View Source
var (
	ModuleAccountName = MustName(ModuleName)
	ModuleAccountID   = types.NewAccountIDFromName(ModuleAccountName)
)
View Source
var (
	FeePoolKey                        = []byte{0x00} // key for global distribution state
	ProposerKey                       = []byte{0x01} // key for the proposer operator address
	ValidatorOutstandingRewardsPrefix = []byte{0x02} // key for outstanding rewards

	DelegatorWithdrawAddrPrefix          = []byte{0x03} // key for delegator withdraw address
	DelegatorStartingInfoPrefix          = []byte{0x04} // key for delegator starting info
	ValidatorHistoricalRewardsPrefix     = []byte{0x05} // key for historical validators rewards / stake
	ValidatorCurrentRewardsPrefix        = []byte{0x06} // key for current validator rewards
	ValidatorAccumulatedCommissionPrefix = []byte{0x07} // key for accumulated validator commission
	ValidatorSlashEventPrefix            = []byte{0x08} // key for validator slash fraction
)

Keys for distribution store Items are stored with the following key: values

- 0x00<proposalID_Bytes>: FeePol

- 0x01: sdk.ConsAddress

- 0x02<valAddr_Bytes>: ValidatorOutstandingRewards

- 0x03<accAddr_Bytes>: sdk.AccAddress

- 0x04<valAddr_Bytes><accAddr_Bytes>: DelegatorStartingInfo

- 0x05<valAddr_Bytes><period_Bytes>: ValidatorHistoricalRewards

- 0x06<valAddr_Bytes>: ValidatorCurrentRewards

- 0x07<valAddr_Bytes>: ValidatorCurrentRewards

- 0x08<valAddr_Bytes><height>: ValidatorSlashEvent

View Source
var (
	ParamStoreKeyCommunityTax        = []byte("communitytax")
	ParamStoreKeyBaseProposerReward  = []byte("baseproposerreward")
	ParamStoreKeyBonusProposerReward = []byte("bonusproposerreward")
	ParamStoreKeyWithdrawAddrEnabled = []byte("withdrawaddrenabled")
)

Parameter keys

View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// ModuleCdc references the global x/distribution module codec. Note, the codec
	// should ONLY be used in certain instances of tests and for JSON encoding as Amino
	// is still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/distribution and
	// defined at the application level.
	ModuleCdc = codec.NewHybridCodec(amino)
)
View Source
var TypeMsgFundCommunityPool = MustName("fundcommpool")

Functions

func Cdc

func Cdc() *codec.Codec

Cdc get codec for types

func GetDelegatorStartingInfoAddresses

func GetDelegatorStartingInfoAddresses(key []byte) (valAddr AccountID, delAddr AccountID)

gets the addresses from a delegator starting info key

func GetDelegatorStartingInfoKey

func GetDelegatorStartingInfoKey(v AccountID, d AccountID) []byte

gets the key for a delegator's starting info

func GetDelegatorWithdrawAddrKey

func GetDelegatorWithdrawAddrKey(del AccountID) []byte

gets the key for a delegator's withdraw addr

func GetValidatorAccumulatedCommissionKey

func GetValidatorAccumulatedCommissionKey(v AccountID) []byte

gets the key for a validator's current commission

func GetValidatorCurrentRewardsKey

func GetValidatorCurrentRewardsKey(v AccountID) []byte

gets the key for a validator's current rewards

func GetValidatorHistoricalRewardsKey

func GetValidatorHistoricalRewardsKey(v AccountID, k uint64) []byte

gets the key for a validator's historical rewards

func GetValidatorHistoricalRewardsPrefix

func GetValidatorHistoricalRewardsPrefix(v AccountID) []byte

gets the prefix key for a validator's historical rewards

func GetValidatorOutstandingRewardsKey

func GetValidatorOutstandingRewardsKey(val AccountID) []byte

gets the outstanding rewards key for a validator

func GetValidatorSlashEventKey

func GetValidatorSlashEventKey(v AccountID, height, period uint64) []byte

gets the key for a validator's slash fraction

func GetValidatorSlashEventKeyPrefix

func GetValidatorSlashEventKeyPrefix(v AccountID, height uint64) []byte

gets the prefix key for a validator's slash fraction (ValidatorSlashEventPrefix + height)

func GetValidatorSlashEventPrefix

func GetValidatorSlashEventPrefix(v AccountID) []byte

gets the prefix key for a validator's slash fractions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable returns the parameter key table.

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the necessary x/distribution interfaces and concrete types on the provided Amino codec. These types are used for Amino JSON serialization.

func ValidateGenesis

func ValidateGenesis(gs GenesisState) error

ValidateGenesis validates the genesis state of distribution genesis input

Types

type AccAddress

type AccAddress = types.AccAddress

type AccountID

type AccountID = types.AccountID

func GetDelegatorWithdrawInfoAddress

func GetDelegatorWithdrawInfoAddress(key []byte) AccountID

gets an address from a delegator's withdraw info key

func GetDelegatorWithdrawInfoAddressUseAccountId

func GetDelegatorWithdrawInfoAddressUseAccountId(key []byte) AccountID

gets an address from a delegator's withdraw info key, by cancer

func GetValidatorAccumulatedCommissionAddress

func GetValidatorAccumulatedCommissionAddress(key []byte) AccountID

gets the address from a validator's accumulated commission key

func GetValidatorCurrentRewardsAddress

func GetValidatorCurrentRewardsAddress(key []byte) AccountID

gets the address from a validator's current rewards key

func GetValidatorHistoricalRewardsAddressPeriod

func GetValidatorHistoricalRewardsAddressPeriod(key []byte) (valAddr AccountID, period uint64)

gets the address & period from a validator's historical rewards key

func GetValidatorOutstandingRewardsAddress

func GetValidatorOutstandingRewardsAddress(key []byte) AccountID

gets an address from a validator's outstanding rewards key

func GetValidatorSlashEventAddressHeight

func GetValidatorSlashEventAddressHeight(key []byte) (valAddr AccountID, height uint64)

gets the height from a validator's slash event key

type AccountKeeperAccountID

type AccountKeeperAccountID interface {
	types.AccountAuther
	GetAccount(ctx sdk.Context, Id AccountID) accExported.Account
}

AccountKeeper defines the expected account keeper used for simulations (noalias) by cancer

type BankKeeperAccountID

type BankKeeperAccountID interface {
	types.AssetTransfer
	GetAllBalances(ctx sdk.Context, Id AccountID) sdk.Coins
	GetCoinPowers(ctx sdk.Context, Id AccountID) sdk.Coins
	SpendableCoins(ctx sdk.Context, Id AccountID) sdk.Coins
	CoinsToPower(ctx sdk.Context, from, to AccountID, amt sdk.Coins) error
}

BankKeeper defines the expected interface needed to retrieve account balances.

type Coin

type Coin = types.Coin

type Coins

type Coins = types.Coins

type CommunityPoolSpendProposal

type CommunityPoolSpendProposal struct {
	Title       string                                   `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
	Description string                                   `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Recipient   types1.AccountID                         `protobuf:"bytes,3,opt,name=recipient,proto3" json:"recipient"`
	Amount      github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount"`
}

CommunityPoolSpendProposal spends from the community pool

func NewCommunityPoolSpendProposal

func NewCommunityPoolSpendProposal(title, description string, recipient chainType.AccountID, amount sdk.Coins) CommunityPoolSpendProposal

NewCommunityPoolSpendProposal creates a new community pool spend proposal.

func (*CommunityPoolSpendProposal) Descriptor

func (*CommunityPoolSpendProposal) Descriptor() ([]byte, []int)

func (*CommunityPoolSpendProposal) Equal

func (this *CommunityPoolSpendProposal) Equal(that interface{}) bool

func (CommunityPoolSpendProposal) GetDescription

func (csp CommunityPoolSpendProposal) GetDescription() string

GetDescription returns the description of a community pool spend proposal.

func (CommunityPoolSpendProposal) GetTitle

func (csp CommunityPoolSpendProposal) GetTitle() string

GetTitle returns the title of a community pool spend proposal.

func (*CommunityPoolSpendProposal) Marshal

func (m *CommunityPoolSpendProposal) Marshal() (dAtA []byte, err error)

func (*CommunityPoolSpendProposal) MarshalTo

func (m *CommunityPoolSpendProposal) MarshalTo(dAtA []byte) (int, error)

func (*CommunityPoolSpendProposal) MarshalToSizedBuffer

func (m *CommunityPoolSpendProposal) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (CommunityPoolSpendProposal) ProposalRoute

func (csp CommunityPoolSpendProposal) ProposalRoute() string

GetDescription returns the routing key of a community pool spend proposal.

func (CommunityPoolSpendProposal) ProposalType

func (csp CommunityPoolSpendProposal) ProposalType() string

ProposalType returns the type of a community pool spend proposal.

func (*CommunityPoolSpendProposal) ProtoMessage

func (*CommunityPoolSpendProposal) ProtoMessage()

func (*CommunityPoolSpendProposal) Reset

func (m *CommunityPoolSpendProposal) Reset()

func (*CommunityPoolSpendProposal) Size

func (m *CommunityPoolSpendProposal) Size() (n int)

func (CommunityPoolSpendProposal) String

func (csp CommunityPoolSpendProposal) String() string

String implements the Stringer interface.

func (*CommunityPoolSpendProposal) Unmarshal

func (m *CommunityPoolSpendProposal) Unmarshal(dAtA []byte) error

func (CommunityPoolSpendProposal) ValidateBasic

func (csp CommunityPoolSpendProposal) ValidateBasic() error

ValidateBasic runs basic stateless validity checks

func (*CommunityPoolSpendProposal) XXX_DiscardUnknown

func (m *CommunityPoolSpendProposal) XXX_DiscardUnknown()

func (*CommunityPoolSpendProposal) XXX_Marshal

func (m *CommunityPoolSpendProposal) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CommunityPoolSpendProposal) XXX_Merge

func (m *CommunityPoolSpendProposal) XXX_Merge(src proto.Message)

func (*CommunityPoolSpendProposal) XXX_Size

func (m *CommunityPoolSpendProposal) XXX_Size() int

func (*CommunityPoolSpendProposal) XXX_Unmarshal

func (m *CommunityPoolSpendProposal) XXX_Unmarshal(b []byte) error

type DelegationDelegatorReward

type DelegationDelegatorReward struct {
	ValidatorAddress chainType.AccountID `json:"validator_account" yaml:"validator_account"`
	Reward           sdk.DecCoins        `json:"reward" yaml:"reward"`
}

DelegationDelegatorReward defines the properties of a delegator's delegation reward.

func NewDelegationDelegatorReward

func NewDelegationDelegatorReward(valAddr chainType.AccountID, reward sdk.DecCoins) DelegationDelegatorReward

NewDelegationDelegatorReward constructs a DelegationDelegatorReward.

type DelegationI

type DelegationI = exported.DelegationI

type DelegatorStartingInfo

type DelegatorStartingInfo struct {
	PreviousPeriod uint64                                 `` /* 127-byte string literal not displayed */
	Stake          github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=stake,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"stake" yaml:"stake"`
	Height         uint64                                 `protobuf:"varint,3,opt,name=height,proto3" json:"creation_height" yaml:"creation_height"`
}

starting info for a delegator reward period tracks the previous validator period, the delegation's amount of staking token, and the creation height (to check later on if any slashes have occurred) NOTE that even though validators are slashed to whole staking tokens, the delegators within the validator may be left with less than a full token, thus sdk.Dec is used

func NewDelegatorStartingInfo

func NewDelegatorStartingInfo(previousPeriod uint64, stake sdk.Dec, height uint64) DelegatorStartingInfo

create a new DelegatorStartingInfo

func (*DelegatorStartingInfo) Descriptor

func (*DelegatorStartingInfo) Descriptor() ([]byte, []int)

func (*DelegatorStartingInfo) Equal

func (this *DelegatorStartingInfo) Equal(that interface{}) bool

func (*DelegatorStartingInfo) GetHeight

func (m *DelegatorStartingInfo) GetHeight() uint64

func (*DelegatorStartingInfo) GetPreviousPeriod

func (m *DelegatorStartingInfo) GetPreviousPeriod() uint64

func (*DelegatorStartingInfo) Marshal

func (m *DelegatorStartingInfo) Marshal() (dAtA []byte, err error)

func (*DelegatorStartingInfo) MarshalTo

func (m *DelegatorStartingInfo) MarshalTo(dAtA []byte) (int, error)

func (*DelegatorStartingInfo) MarshalToSizedBuffer

func (m *DelegatorStartingInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*DelegatorStartingInfo) ProtoMessage

func (*DelegatorStartingInfo) ProtoMessage()

func (*DelegatorStartingInfo) Reset

func (m *DelegatorStartingInfo) Reset()

func (*DelegatorStartingInfo) Size

func (m *DelegatorStartingInfo) Size() (n int)

func (*DelegatorStartingInfo) String

func (m *DelegatorStartingInfo) String() string

func (*DelegatorStartingInfo) Unmarshal

func (m *DelegatorStartingInfo) Unmarshal(dAtA []byte) error

func (*DelegatorStartingInfo) XXX_DiscardUnknown

func (m *DelegatorStartingInfo) XXX_DiscardUnknown()

func (*DelegatorStartingInfo) XXX_Marshal

func (m *DelegatorStartingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DelegatorStartingInfo) XXX_Merge

func (m *DelegatorStartingInfo) XXX_Merge(src proto.Message)

func (*DelegatorStartingInfo) XXX_Size

func (m *DelegatorStartingInfo) XXX_Size() int

func (*DelegatorStartingInfo) XXX_Unmarshal

func (m *DelegatorStartingInfo) XXX_Unmarshal(b []byte) error

type DelegatorStartingInfoRecord

type DelegatorStartingInfoRecord struct {
	DelegatorAddress chainType.AccountID   `json:"delegator_address" yaml:"delegator_address"`
	ValidatorAddress chainType.AccountID   `json:"validator_address" yaml:"validator_address"`
	StartingInfo     DelegatorStartingInfo `json:"starting_info" yaml:"starting_info"`
}

used for import / export via genesis json

type DelegatorWithdrawInfo

type DelegatorWithdrawInfo struct {
	DelegatorAddress chainType.AccountID `json:"delegator_address" yaml:"delegator_address"`
	WithdrawAddress  chainType.AccountID `json:"withdraw_address" yaml:"withdraw_address"`
}

the address for where distributions rewards are withdrawn to by default this struct is only used at genesis to feed in default withdraw addresses

type DistributionKeeper

type DistributionKeeper interface {
	CanDistribution(ctx sdk.Context) (bool, time.Time)

	SetStartNotDistributionTimePoint(ctx sdk.Context, t time.Time)
}

type FeePool

type FeePool struct {
	CommunityPool github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 169-byte string literal not displayed */
}

global fee pool for distribution

func InitialFeePool

func InitialFeePool() FeePool

zero fee pool

func (*FeePool) Descriptor

func (*FeePool) Descriptor() ([]byte, []int)

func (*FeePool) Equal

func (this *FeePool) Equal(that interface{}) bool

func (*FeePool) GetCommunityPool

func (m *FeePool) GetCommunityPool() github_com_cosmos_cosmos_sdk_types.DecCoins

func (*FeePool) Marshal

func (m *FeePool) Marshal() (dAtA []byte, err error)

func (*FeePool) MarshalTo

func (m *FeePool) MarshalTo(dAtA []byte) (int, error)

func (*FeePool) MarshalToSizedBuffer

func (m *FeePool) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*FeePool) ProtoMessage

func (*FeePool) ProtoMessage()

func (*FeePool) Reset

func (m *FeePool) Reset()

func (*FeePool) Size

func (m *FeePool) Size() (n int)

func (*FeePool) String

func (m *FeePool) String() string

func (*FeePool) Unmarshal

func (m *FeePool) Unmarshal(dAtA []byte) error

func (FeePool) ValidateGenesis

func (f FeePool) ValidateGenesis() error

ValidateGenesis validates the fee pool for a genesis state

func (*FeePool) XXX_DiscardUnknown

func (m *FeePool) XXX_DiscardUnknown()

func (*FeePool) XXX_Marshal

func (m *FeePool) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*FeePool) XXX_Merge

func (m *FeePool) XXX_Merge(src proto.Message)

func (*FeePool) XXX_Size

func (m *FeePool) XXX_Size() int

func (*FeePool) XXX_Unmarshal

func (m *FeePool) XXX_Unmarshal(b []byte) error

type GenesisState

type GenesisState struct {
	Params                          Params                                 `json:"params" yaml:"params"`
	FeePool                         FeePool                                `json:"fee_pool" yaml:"fee_pool"`
	DelegatorWithdrawInfos          []DelegatorWithdrawInfo                `json:"delegator_withdraw_infos" yaml:"delegator_withdraw_infos"`
	PreviousProposer                sdk.ConsAddress                        `json:"previous_proposer" yaml:"previous_proposer"`
	OutstandingRewards              []ValidatorOutstandingRewardsRecord    `json:"outstanding_rewards" yaml:"outstanding_rewards"`
	ValidatorAccumulatedCommissions []ValidatorAccumulatedCommissionRecord `json:"validator_accumulated_commissions" yaml:"validator_accumulated_commissions"`
	ValidatorHistoricalRewards      []ValidatorHistoricalRewardsRecord     `json:"validator_historical_rewards" yaml:"validator_historical_rewards"`
	ValidatorCurrentRewards         []ValidatorCurrentRewardsRecord        `json:"validator_current_rewards" yaml:"validator_current_rewards"`
	DelegatorStartingInfos          []DelegatorStartingInfoRecord          `json:"delegator_starting_infos" yaml:"delegator_starting_infos"`
	ValidatorSlashEvents            []ValidatorSlashEventRecord            `json:"validator_slash_events" yaml:"validator_slash_events"`
}

GenesisState - all distribution state that must be provided at genesis

func DefaultGenesisState

func DefaultGenesisState() GenesisState

get raw genesis raw message for testing

type GovTypesContent

type GovTypesContent = GovTypes.Content

type GovTypesHandler

type GovTypesHandler = GovTypes.Handler

type KuMsg

type KuMsg = types.KuMsg

type MsgFundCommunityPool

type MsgFundCommunityPool struct {
	KuMsg
}

func NewMsgFundCommunityPool

func NewMsgFundCommunityPool(auth AccAddress, amount Coins, depositor AccountID) MsgFundCommunityPool

NewMsgFundCommunityPool returns a new MsgFundCommunityPool with a sender and a funding amount.

func (MsgFundCommunityPool) GetData

type MsgFundCommunityPoolData

type MsgFundCommunityPoolData struct {
	Amount    Coins     `json:"amount" yaml:"amount"`
	Depositor AccountID `json:"depositor" yaml:"depositor"`
}

func (MsgFundCommunityPoolData) Marshal

func (m MsgFundCommunityPoolData) Marshal() ([]byte, error)

func (MsgFundCommunityPoolData) Type

func (*MsgFundCommunityPoolData) Unmarshal

func (m *MsgFundCommunityPoolData) Unmarshal(b []byte) error

type MsgSetWithdrawAccountId

type MsgSetWithdrawAccountId struct {
	KuMsg
}

func NewMsgSetWithdrawAccountId

func NewMsgSetWithdrawAccountId(auth AccAddress, delAddr, withdrawAddr AccountID) MsgSetWithdrawAccountId

func (MsgSetWithdrawAccountId) GetData

type MsgSetWithdrawAccountIdData

type MsgSetWithdrawAccountIdData struct {
	DelegatorAccountid chainType.AccountID `` /* 132-byte string literal not displayed */
	WithdrawAccountid  chainType.AccountID `` /* 128-byte string literal not displayed */
}

func (MsgSetWithdrawAccountIdData) Marshal

func (m MsgSetWithdrawAccountIdData) Marshal() ([]byte, error)

func (MsgSetWithdrawAccountIdData) Type

func (*MsgSetWithdrawAccountIdData) Unmarshal

func (m *MsgSetWithdrawAccountIdData) Unmarshal(b []byte) error

type MsgWithdrawDelegatorReward

type MsgWithdrawDelegatorReward struct {
	KuMsg
}

func NewMsgWithdrawDelegatorReward

func NewMsgWithdrawDelegatorReward(auth AccAddress, delAddr, valAddr AccountID) MsgWithdrawDelegatorReward

func (MsgWithdrawDelegatorReward) GetData

type MsgWithdrawDelegatorRewardData

type MsgWithdrawDelegatorRewardData struct {
	DelegatorAccountId chainType.AccountID `protobuf:"bytes,1,opt,name=delegator_address,json=delegatorAddress,proto3" json:"delegator_address" yaml:"delegator_address"`
	ValidatorAccountId chainType.AccountID `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address" yaml:"validator_address"`
}

func (MsgWithdrawDelegatorRewardData) Marshal

func (m MsgWithdrawDelegatorRewardData) Marshal() ([]byte, error)

func (MsgWithdrawDelegatorRewardData) Type

func (*MsgWithdrawDelegatorRewardData) Unmarshal

func (m *MsgWithdrawDelegatorRewardData) Unmarshal(b []byte) error

type MsgWithdrawValidatorCommission

type MsgWithdrawValidatorCommission struct {
	KuMsg
}

func NewMsgWithdrawValidatorCommission

func NewMsgWithdrawValidatorCommission(auth AccAddress, valAddr AccountID) MsgWithdrawValidatorCommission

func (MsgWithdrawValidatorCommission) GetData

type MsgWithdrawValidatorCommissionData

type MsgWithdrawValidatorCommissionData struct {
	ValidatorAccountId chainType.AccountID `protobuf:"bytes,1,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address" yaml:"validator_address"`
}

func (MsgWithdrawValidatorCommissionData) Marshal

func (MsgWithdrawValidatorCommissionData) Type

func (*MsgWithdrawValidatorCommissionData) Unmarshal

func (m *MsgWithdrawValidatorCommissionData) Unmarshal(b []byte) error

type Name

type Name = types.Name

type Params

type Params struct {
	CommunityTax        github_com_cosmos_cosmos_sdk_types.Dec `` /* 158-byte string literal not displayed */
	BaseProposerReward  github_com_cosmos_cosmos_sdk_types.Dec `` /* 185-byte string literal not displayed */
	BonusProposerReward github_com_cosmos_cosmos_sdk_types.Dec `` /* 189-byte string literal not displayed */
	WithdrawAddrEnabled bool                                   `` /* 150-byte string literal not displayed */
}

Params defines the set of distribution parameters.

func DefaultParams

func DefaultParams() Params

DefaultParams returns default distribution parameters

func (*Params) Descriptor

func (*Params) Descriptor() ([]byte, []int)

func (*Params) Equal

func (this *Params) Equal(that interface{}) bool

func (*Params) GetWithdrawAddrEnabled

func (m *Params) GetWithdrawAddrEnabled() bool

func (*Params) Marshal

func (m *Params) Marshal() (dAtA []byte, err error)

func (*Params) MarshalTo

func (m *Params) MarshalTo(dAtA []byte) (int, error)

func (*Params) MarshalToSizedBuffer

func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Params) ParamSetPairs

func (p *Params) ParamSetPairs() params.ParamSetPairs

ParamSetPairs returns the parameter set pairs.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

func (m *Params) Size() (n int)

func (Params) String

func (p Params) String() string

func (*Params) Unmarshal

func (m *Params) Unmarshal(dAtA []byte) error

func (Params) ValidateBasic

func (p Params) ValidateBasic() error

ValidateBasic performs basic validation on distribution parameters.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Params) XXX_Merge

func (m *Params) XXX_Merge(src proto.Message)

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

func (m *Params) XXX_Unmarshal(b []byte) error

type QueryDelegationRewardsParams

type QueryDelegationRewardsParams struct {
	DelegatorAddress chainType.AccountID `json:"delegator_address" yaml:"delegator_address"`
	ValidatorAddress chainType.AccountID `json:"validator_address" yaml:"validator_address"`
}

params for query 'custom/distr/delegation_rewards'

func NewQueryDelegationRewardsParams

func NewQueryDelegationRewardsParams(delegatorAddr chainType.AccountID, validatorAddr chainType.AccountID) QueryDelegationRewardsParams

creates a new instance of QueryDelegationRewardsParams

type QueryDelegatorParams

type QueryDelegatorParams struct {
	DelegatorAddress chainType.AccountID `json:"delegator_address" yaml:"delegator_address"`
}

params for query 'custom/distr/delegator_total_rewards' and 'custom/distr/delegator_validators'

func NewQueryDelegatorParams

func NewQueryDelegatorParams(delegatorAddr chainType.AccountID) QueryDelegatorParams

creates a new instance of QueryDelegationRewardsParams

type QueryDelegatorTotalRewardsResponse

type QueryDelegatorTotalRewardsResponse struct {
	Rewards []DelegationDelegatorReward `json:"rewards" yaml:"rewards"`
	Total   sdk.DecCoins                `json:"total" yaml:"total"`
}

QueryDelegatorTotalRewardsResponse defines the properties of QueryDelegatorTotalRewards query's response.

func NewQueryDelegatorTotalRewardsResponse

func NewQueryDelegatorTotalRewardsResponse(rewards []DelegationDelegatorReward,
	total sdk.DecCoins) QueryDelegatorTotalRewardsResponse

NewQueryDelegatorTotalRewardsResponse constructs a QueryDelegatorTotalRewardsResponse

func (QueryDelegatorTotalRewardsResponse) String

type QueryDelegatorWithdrawAddrParams

type QueryDelegatorWithdrawAddrParams struct {
	DelegatorAddress chainType.AccountID `json:"delegator_address" yaml:"delegator_address"`
}

params for query 'custom/distr/withdraw_addr'

func NewQueryDelegatorWithdrawAddrParams

func NewQueryDelegatorWithdrawAddrParams(delegatorAddr chainType.AccountID) QueryDelegatorWithdrawAddrParams

NewQueryDelegatorWithdrawAddrParams creates a new instance of QueryDelegatorWithdrawAddrParams.

type QueryValidatorCommissionParams

type QueryValidatorCommissionParams struct {
	ValidatorAddress chainType.AccountID `json:"validator_address" yaml:"validator_address"`
}

params for query 'custom/distr/validator_commission'

func NewQueryValidatorCommissionParams

func NewQueryValidatorCommissionParams(validatorAddr chainType.AccountID) QueryValidatorCommissionParams

creates a new instance of QueryValidatorCommissionParams

type QueryValidatorOutstandingRewardsParams

type QueryValidatorOutstandingRewardsParams struct {
	ValidatorAddress chainType.AccountID `json:"validator_address" yaml:"validator_address"`
}

params for query 'custom/distr/validator_outstanding_rewards'

func NewQueryValidatorOutstandingRewardsParams

func NewQueryValidatorOutstandingRewardsParams(validatorAddr chainType.AccountID) QueryValidatorOutstandingRewardsParams

creates a new instance of QueryValidatorOutstandingRewardsParams

type QueryValidatorSlashesParams

type QueryValidatorSlashesParams struct {
	ValidatorAddress chainType.AccountID `json:"validator_address" yaml:"validator_address"`
	StartingHeight   uint64              `json:"starting_height" yaml:"starting_height"`
	EndingHeight     uint64              `json:"ending_height" yaml:"ending_height"`
}

params for query 'custom/distr/validator_slashes'

func NewQueryValidatorSlashesParams

func NewQueryValidatorSlashesParams(validatorAddr chainType.AccountID, startingHeight uint64, endingHeight uint64) QueryValidatorSlashesParams

creates a new instance of QueryValidatorSlashesParams

type SimulationAccount

type SimulationAccount = Sim.Account

type SimulationAppParams

type SimulationAppParams = Sim.AppParams

type SimulationContentSimulatorFn

type SimulationContentSimulatorFn = Sim.ContentSimulatorFn

type SimulationFutureOperation

type SimulationFutureOperation = Sim.FutureOperation

type SimulationOperation

type SimulationOperation = Sim.Operation

type SimulationOperationMsg

type SimulationOperationMsg = Sim.OperationMsg

type SimulationWeightedOperations

type SimulationWeightedOperations = Sim.WeightedOperations

type StakingDelegation

type StakingDelegation = staking.Delegation

type StakingDescription

type StakingDescription = staking.Description

type StakingExportedDelegationI

type StakingExportedDelegationI = StakingExported.DelegationI

type StakingExportedValidatorI

type StakingExportedValidatorI = StakingExported.ValidatorI

type StakingHooksAccountID

type StakingHooksAccountID interface {
	AfterValidatorCreated(ctx sdk.Context, valId AccountID)                         // Must be called when a validator is created
	AfterValidatorRemoved(ctx sdk.Context, consId sdk.ConsAddress, valId AccountID) // Must be called when a validator is deleted

	BeforeDelegationCreated(ctx sdk.Context, delId AccountID, valId AccountID)        // Must be called when a delegation is created
	BeforeDelegationSharesModified(ctx sdk.Context, delId AccountID, valId AccountID) // Must be called when a delegation's shares are modified
	AfterDelegationModified(ctx sdk.Context, delId AccountID, valId AccountID)
	BeforeValidatorSlashed(ctx sdk.Context, valId AccountID, fraction sdk.Dec)
}

StakingHooks event hooks for staking validator object (noalias) by cancer

type StakingKPKeeper

type StakingKPKeeper = StakingKP.Keeper

type StakingKeeperAccountID

type StakingKeeperAccountID interface {
	// iterate through validators by operator address, execute func for each validator
	IterateValidators(sdk.Context,
		func(index int64, validator StakingExportedValidatorI) (stop bool))

	// iterate through bonded validators by operator address, execute func for each validator
	IterateBondedValidatorsByPower(sdk.Context,
		func(index int64, validator StakingExportedValidatorI) (stop bool))

	// iterate through the consensus validator set of the last block by operator address, execute func for each validator
	IterateLastValidators(sdk.Context,
		func(index int64, validator StakingExportedValidatorI) (stop bool))

	Validator(sdk.Context, AccountID) StakingExportedValidatorI                 // get a particular validator by operator address
	ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) StakingExportedValidatorI // get a particular validator by consensus address

	// slash the validator and delegators of the validator, specifying offence height, offence power, and slash fraction
	Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec)
	Jail(sdk.Context, sdk.ConsAddress)   // jail a validator
	Unjail(sdk.Context, sdk.ConsAddress) // unjail a validator

	// Delegation allows for getting a particular delegation for a given validator
	// and delegator outside the scope of the staking module.
	Delegation(sdk.Context, AccountID, AccountID) StakingExportedDelegationI

	// MaxValidators returns the maximum amount of bonded validators
	MaxValidators(sdk.Context) uint32

	IterateDelegations(ctx sdk.Context, delegatorId AccountID,
		fn func(index int64, delegation StakingExportedDelegationI) (stop bool))

	GetLastTotalPower(ctx sdk.Context) sdk.Int
	GetLastValidatorPower(ctx sdk.Context, valId AccountID) int64

	GetAllSDKDelegations(ctx sdk.Context) []StakingDelegation
}

StakingKeeper expected staking keeper (noalias) by cancer

type StakingTypesStakingHooks

type StakingTypesStakingHooks = StakingTypes.StakingHooks

type SupplyKeeperAccountID

type SupplyKeeperAccountID interface {
	GetModuleAccount(ctx sdk.Context, name string) supplyexported.ModuleAccountI

	// TODO remove with genesis 2-phases refactor https://github.com/cosmos/cosmos-sdk/issues/2862
	SetModuleAccount(sdk.Context, supplyexported.ModuleAccountI)

	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule string, recipientModule string, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientId AccountID, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderId AccountID, recipientModule string, amt sdk.Coins) error
}

SupplyKeeper defines the expected supply Keeper (noalias) by cancer

type ValidatorAccumulatedCommission

type ValidatorAccumulatedCommission struct {
	Commission github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=commission,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"commission"`
}

accumulated commission for a validator kept as a running counter, can be withdrawn at any time

func InitialValidatorAccumulatedCommission

func InitialValidatorAccumulatedCommission() ValidatorAccumulatedCommission

return the initial accumulated commission (zero)

func (*ValidatorAccumulatedCommission) Descriptor

func (*ValidatorAccumulatedCommission) Descriptor() ([]byte, []int)

func (*ValidatorAccumulatedCommission) Equal

func (this *ValidatorAccumulatedCommission) Equal(that interface{}) bool

func (*ValidatorAccumulatedCommission) GetCommission

func (*ValidatorAccumulatedCommission) Marshal

func (m *ValidatorAccumulatedCommission) Marshal() (dAtA []byte, err error)

func (*ValidatorAccumulatedCommission) MarshalTo

func (m *ValidatorAccumulatedCommission) MarshalTo(dAtA []byte) (int, error)

func (*ValidatorAccumulatedCommission) MarshalToSizedBuffer

func (m *ValidatorAccumulatedCommission) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ValidatorAccumulatedCommission) ProtoMessage

func (*ValidatorAccumulatedCommission) ProtoMessage()

func (*ValidatorAccumulatedCommission) Reset

func (m *ValidatorAccumulatedCommission) Reset()

func (*ValidatorAccumulatedCommission) Size

func (m *ValidatorAccumulatedCommission) Size() (n int)

func (*ValidatorAccumulatedCommission) String

func (*ValidatorAccumulatedCommission) Unmarshal

func (m *ValidatorAccumulatedCommission) Unmarshal(dAtA []byte) error

func (*ValidatorAccumulatedCommission) XXX_DiscardUnknown

func (m *ValidatorAccumulatedCommission) XXX_DiscardUnknown()

func (*ValidatorAccumulatedCommission) XXX_Marshal

func (m *ValidatorAccumulatedCommission) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValidatorAccumulatedCommission) XXX_Merge

func (m *ValidatorAccumulatedCommission) XXX_Merge(src proto.Message)

func (*ValidatorAccumulatedCommission) XXX_Size

func (m *ValidatorAccumulatedCommission) XXX_Size() int

func (*ValidatorAccumulatedCommission) XXX_Unmarshal

func (m *ValidatorAccumulatedCommission) XXX_Unmarshal(b []byte) error

type ValidatorAccumulatedCommissionRecord

type ValidatorAccumulatedCommissionRecord struct {
	ValidatorAddress chainType.AccountID            `json:"validator_address" yaml:"validator_address"`
	Accumulated      ValidatorAccumulatedCommission `json:"accumulated" yaml:"accumulated"`
}

used for import / export via genesis json

type ValidatorCurrentRewards

type ValidatorCurrentRewards struct {
	Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `protobuf:"bytes,1,rep,name=rewards,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.DecCoins" json:"rewards"`
	Period  uint64                                      `protobuf:"varint,2,opt,name=period,proto3" json:"period,omitempty"`
}

current rewards and current period for a validator kept as a running counter and incremented each block as long as the validator's tokens remain constant

func NewValidatorCurrentRewards

func NewValidatorCurrentRewards(rewards sdk.DecCoins, period uint64) ValidatorCurrentRewards

create a new ValidatorCurrentRewards

func (*ValidatorCurrentRewards) Descriptor

func (*ValidatorCurrentRewards) Descriptor() ([]byte, []int)

func (*ValidatorCurrentRewards) Equal

func (this *ValidatorCurrentRewards) Equal(that interface{}) bool

func (*ValidatorCurrentRewards) GetPeriod

func (m *ValidatorCurrentRewards) GetPeriod() uint64

func (*ValidatorCurrentRewards) GetRewards

func (*ValidatorCurrentRewards) Marshal

func (m *ValidatorCurrentRewards) Marshal() (dAtA []byte, err error)

func (*ValidatorCurrentRewards) MarshalTo

func (m *ValidatorCurrentRewards) MarshalTo(dAtA []byte) (int, error)

func (*ValidatorCurrentRewards) MarshalToSizedBuffer

func (m *ValidatorCurrentRewards) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ValidatorCurrentRewards) ProtoMessage

func (*ValidatorCurrentRewards) ProtoMessage()

func (*ValidatorCurrentRewards) Reset

func (m *ValidatorCurrentRewards) Reset()

func (*ValidatorCurrentRewards) Size

func (m *ValidatorCurrentRewards) Size() (n int)

func (*ValidatorCurrentRewards) String

func (m *ValidatorCurrentRewards) String() string

func (*ValidatorCurrentRewards) Unmarshal

func (m *ValidatorCurrentRewards) Unmarshal(dAtA []byte) error

func (*ValidatorCurrentRewards) XXX_DiscardUnknown

func (m *ValidatorCurrentRewards) XXX_DiscardUnknown()

func (*ValidatorCurrentRewards) XXX_Marshal

func (m *ValidatorCurrentRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValidatorCurrentRewards) XXX_Merge

func (m *ValidatorCurrentRewards) XXX_Merge(src proto.Message)

func (*ValidatorCurrentRewards) XXX_Size

func (m *ValidatorCurrentRewards) XXX_Size() int

func (*ValidatorCurrentRewards) XXX_Unmarshal

func (m *ValidatorCurrentRewards) XXX_Unmarshal(b []byte) error

type ValidatorCurrentRewardsRecord

type ValidatorCurrentRewardsRecord struct {
	ValidatorAddress chainType.AccountID     `json:"validator_address" yaml:"validator_address"`
	Rewards          ValidatorCurrentRewards `json:"rewards" yaml:"rewards"`
}

used for import / export via genesis json

type ValidatorHistoricalRewards

type ValidatorHistoricalRewards struct {
	CumulativeRewardRatio github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 204-byte string literal not displayed */
	ReferenceCount        uint32                                      `` /* 127-byte string literal not displayed */
}

historical rewards for a validator height is implicit within the store key cumulative reward ratio is the sum from the zeroeth period until this period of rewards / tokens, per the spec The reference count indicates the number of objects which might need to reference this historical entry at any point. ReferenceCount =

  number of outstanding delegations which ended the associated period (and might need to read
  that record)
+ number of slashes which ended the associated period (and might need to read that record)
+ one per validator for the zeroeth period, set on initialization

func NewValidatorHistoricalRewards

func NewValidatorHistoricalRewards(cumulativeRewardRatio sdk.DecCoins, referenceCount uint32) ValidatorHistoricalRewards

create a new ValidatorHistoricalRewards

func (*ValidatorHistoricalRewards) Descriptor

func (*ValidatorHistoricalRewards) Descriptor() ([]byte, []int)

func (*ValidatorHistoricalRewards) Equal

func (this *ValidatorHistoricalRewards) Equal(that interface{}) bool

func (*ValidatorHistoricalRewards) GetCumulativeRewardRatio

func (*ValidatorHistoricalRewards) GetReferenceCount

func (m *ValidatorHistoricalRewards) GetReferenceCount() uint32

func (*ValidatorHistoricalRewards) Marshal

func (m *ValidatorHistoricalRewards) Marshal() (dAtA []byte, err error)

func (*ValidatorHistoricalRewards) MarshalTo

func (m *ValidatorHistoricalRewards) MarshalTo(dAtA []byte) (int, error)

func (*ValidatorHistoricalRewards) MarshalToSizedBuffer

func (m *ValidatorHistoricalRewards) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ValidatorHistoricalRewards) ProtoMessage

func (*ValidatorHistoricalRewards) ProtoMessage()

func (*ValidatorHistoricalRewards) Reset

func (m *ValidatorHistoricalRewards) Reset()

func (*ValidatorHistoricalRewards) Size

func (m *ValidatorHistoricalRewards) Size() (n int)

func (*ValidatorHistoricalRewards) String

func (m *ValidatorHistoricalRewards) String() string

func (*ValidatorHistoricalRewards) Unmarshal

func (m *ValidatorHistoricalRewards) Unmarshal(dAtA []byte) error

func (*ValidatorHistoricalRewards) XXX_DiscardUnknown

func (m *ValidatorHistoricalRewards) XXX_DiscardUnknown()

func (*ValidatorHistoricalRewards) XXX_Marshal

func (m *ValidatorHistoricalRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValidatorHistoricalRewards) XXX_Merge

func (m *ValidatorHistoricalRewards) XXX_Merge(src proto.Message)

func (*ValidatorHistoricalRewards) XXX_Size

func (m *ValidatorHistoricalRewards) XXX_Size() int

func (*ValidatorHistoricalRewards) XXX_Unmarshal

func (m *ValidatorHistoricalRewards) XXX_Unmarshal(b []byte) error

type ValidatorHistoricalRewardsRecord

type ValidatorHistoricalRewardsRecord struct {
	ValidatorAddress chainType.AccountID        `json:"validator_address" yaml:"validator_address"`
	Period           uint64                     `json:"period" yaml:"period"`
	Rewards          ValidatorHistoricalRewards `json:"rewards" yaml:"rewards"`
}

used for import / export via genesis json

type ValidatorI

type ValidatorI = exported.ValidatorI

type ValidatorOutstandingRewards

type ValidatorOutstandingRewards struct {
	Rewards github_com_cosmos_cosmos_sdk_types.DecCoins `` /* 129-byte string literal not displayed */
}

outstanding (un-withdrawn) rewards for a validator inexpensive to track, allows simple sanity checks

func (*ValidatorOutstandingRewards) Descriptor

func (*ValidatorOutstandingRewards) Descriptor() ([]byte, []int)

func (*ValidatorOutstandingRewards) Equal

func (this *ValidatorOutstandingRewards) Equal(that interface{}) bool

func (*ValidatorOutstandingRewards) GetRewards

func (*ValidatorOutstandingRewards) Marshal

func (m *ValidatorOutstandingRewards) Marshal() (dAtA []byte, err error)

func (*ValidatorOutstandingRewards) MarshalTo

func (m *ValidatorOutstandingRewards) MarshalTo(dAtA []byte) (int, error)

func (*ValidatorOutstandingRewards) MarshalToSizedBuffer

func (m *ValidatorOutstandingRewards) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ValidatorOutstandingRewards) ProtoMessage

func (*ValidatorOutstandingRewards) ProtoMessage()

func (*ValidatorOutstandingRewards) Reset

func (m *ValidatorOutstandingRewards) Reset()

func (*ValidatorOutstandingRewards) Size

func (m *ValidatorOutstandingRewards) Size() (n int)

func (*ValidatorOutstandingRewards) String

func (m *ValidatorOutstandingRewards) String() string

func (*ValidatorOutstandingRewards) Unmarshal

func (m *ValidatorOutstandingRewards) Unmarshal(dAtA []byte) error

func (*ValidatorOutstandingRewards) XXX_DiscardUnknown

func (m *ValidatorOutstandingRewards) XXX_DiscardUnknown()

func (*ValidatorOutstandingRewards) XXX_Marshal

func (m *ValidatorOutstandingRewards) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValidatorOutstandingRewards) XXX_Merge

func (m *ValidatorOutstandingRewards) XXX_Merge(src proto.Message)

func (*ValidatorOutstandingRewards) XXX_Size

func (m *ValidatorOutstandingRewards) XXX_Size() int

func (*ValidatorOutstandingRewards) XXX_Unmarshal

func (m *ValidatorOutstandingRewards) XXX_Unmarshal(b []byte) error

type ValidatorOutstandingRewardsRecord

type ValidatorOutstandingRewardsRecord struct {
	ValidatorAddress   chainType.AccountID `json:"validator_address" yaml:"validator_address"`
	OutstandingRewards sdk.DecCoins        `json:"outstanding_rewards" yaml:"outstanding_rewards"`
}

used for import/export via genesis json

type ValidatorSlashEvent

type ValidatorSlashEvent struct {
	ValidatorPeriod uint64                                 `` /* 131-byte string literal not displayed */
	Fraction        github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=fraction,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fraction"`
}

validator slash event height is implicit within the store key needed to calculate appropriate amounts of staking token for delegations which withdraw after a slash has occurred

func NewValidatorSlashEvent

func NewValidatorSlashEvent(validatorPeriod uint64, fraction sdk.Dec) ValidatorSlashEvent

create a new ValidatorSlashEvent

func (*ValidatorSlashEvent) Descriptor

func (*ValidatorSlashEvent) Descriptor() ([]byte, []int)

func (*ValidatorSlashEvent) Equal

func (this *ValidatorSlashEvent) Equal(that interface{}) bool

func (*ValidatorSlashEvent) GetValidatorPeriod

func (m *ValidatorSlashEvent) GetValidatorPeriod() uint64

func (*ValidatorSlashEvent) Marshal

func (m *ValidatorSlashEvent) Marshal() (dAtA []byte, err error)

func (*ValidatorSlashEvent) MarshalTo

func (m *ValidatorSlashEvent) MarshalTo(dAtA []byte) (int, error)

func (*ValidatorSlashEvent) MarshalToSizedBuffer

func (m *ValidatorSlashEvent) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ValidatorSlashEvent) ProtoMessage

func (*ValidatorSlashEvent) ProtoMessage()

func (*ValidatorSlashEvent) Reset

func (m *ValidatorSlashEvent) Reset()

func (*ValidatorSlashEvent) Size

func (m *ValidatorSlashEvent) Size() (n int)

func (*ValidatorSlashEvent) String

func (m *ValidatorSlashEvent) String() string

func (*ValidatorSlashEvent) Unmarshal

func (m *ValidatorSlashEvent) Unmarshal(dAtA []byte) error

func (*ValidatorSlashEvent) XXX_DiscardUnknown

func (m *ValidatorSlashEvent) XXX_DiscardUnknown()

func (*ValidatorSlashEvent) XXX_Marshal

func (m *ValidatorSlashEvent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValidatorSlashEvent) XXX_Merge

func (m *ValidatorSlashEvent) XXX_Merge(src proto.Message)

func (*ValidatorSlashEvent) XXX_Size

func (m *ValidatorSlashEvent) XXX_Size() int

func (*ValidatorSlashEvent) XXX_Unmarshal

func (m *ValidatorSlashEvent) XXX_Unmarshal(b []byte) error

type ValidatorSlashEventRecord

type ValidatorSlashEventRecord struct {
	ValidatorAddress chainType.AccountID `json:"validator_address" yaml:"validator_address"`
	Height           uint64              `json:"height" yaml:"height"`
	Period           uint64              `json:"period" yaml:"period"`
	Event            ValidatorSlashEvent `json:"validator_slash_event" yaml:"validator_slash_event"`
}

used for import / export via genesis json

type ValidatorSlashEvents

type ValidatorSlashEvents struct {
	ValidatorSlashEvents []ValidatorSlashEvent `` /* 143-byte string literal not displayed */
}

ValidatorSlashEvents is a collection of ValidatorSlashEvent

func (*ValidatorSlashEvents) Descriptor

func (*ValidatorSlashEvents) Descriptor() ([]byte, []int)

func (*ValidatorSlashEvents) Equal

func (this *ValidatorSlashEvents) Equal(that interface{}) bool

func (*ValidatorSlashEvents) GetValidatorSlashEvents

func (m *ValidatorSlashEvents) GetValidatorSlashEvents() []ValidatorSlashEvent

func (*ValidatorSlashEvents) Marshal

func (m *ValidatorSlashEvents) Marshal() (dAtA []byte, err error)

func (*ValidatorSlashEvents) MarshalTo

func (m *ValidatorSlashEvents) MarshalTo(dAtA []byte) (int, error)

func (*ValidatorSlashEvents) MarshalToSizedBuffer

func (m *ValidatorSlashEvents) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ValidatorSlashEvents) ProtoMessage

func (*ValidatorSlashEvents) ProtoMessage()

func (*ValidatorSlashEvents) Reset

func (m *ValidatorSlashEvents) Reset()

func (*ValidatorSlashEvents) Size

func (m *ValidatorSlashEvents) Size() (n int)

func (ValidatorSlashEvents) String

func (vs ValidatorSlashEvents) String() string

func (*ValidatorSlashEvents) Unmarshal

func (m *ValidatorSlashEvents) Unmarshal(dAtA []byte) error

func (*ValidatorSlashEvents) XXX_DiscardUnknown

func (m *ValidatorSlashEvents) XXX_DiscardUnknown()

func (*ValidatorSlashEvents) XXX_Marshal

func (m *ValidatorSlashEvents) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ValidatorSlashEvents) XXX_Merge

func (m *ValidatorSlashEvents) XXX_Merge(src proto.Message)

func (*ValidatorSlashEvents) XXX_Size

func (m *ValidatorSlashEvents) XXX_Size() int

func (*ValidatorSlashEvents) XXX_Unmarshal

func (m *ValidatorSlashEvents) XXX_Unmarshal(b []byte) error

type WithDrawAddrInfo

type WithDrawAddrInfo struct {
	WithDrawAddress  chainType.AccountID `json:"withdraw_account" yaml:"withdraw_account"`
	ValidatorAddress chainType.AccountID `json:"validator_account" yaml:"validator_account"`
	DelegatorAddress chainType.AccountID `json:"delegator_account" yaml:"delegator_account"`
}

func NewWithDrawAddrInfo

func NewWithDrawAddrInfo(withdrawAddr, valAddr, delAddr chainType.AccountID) WithDrawAddrInfo

func (WithDrawAddrInfo) String

func (res WithDrawAddrInfo) String() string

Jump to

Keyboard shortcuts

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