common

package
v1.8.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDelegator added in v1.7.0

func IsDelegator(cliCtx context.CLIContext, cdc *codec.Codec, delAddr sdk.AccAddress) bool

func IsValidator added in v1.7.0

func IsValidator(cliCtx context.CLIContext, cdc *codec.Codec, valAddress sdk.ValAddress) bool

func QueryDelegationRewards added in v1.6.3

func QueryDelegationRewards(cliCtx context.CLIContext, queryRoute, delAddr, valAddr string) ([]byte, int64, error)

QueryDelegationRewards queries a delegation rewards between a delegator and a validator.

func QueryDelegatorValidators added in v1.6.3

func QueryDelegatorValidators(cliCtx context.CLIContext, queryRoute string, delegatorAddr sdk.AccAddress) ([]byte, error)

QueryDelegatorValidators returns delegator's list of validators it submitted delegations to.

func QueryParams

func QueryParams(cliCtx context.CLIContext, queryRoute string) (params types.Params, err error)

QueryParams actually queries distribution params

func QueryValidatorCommission

func QueryValidatorCommission(cliCtx context.CLIContext, queryRoute string, validatorAddr sdk.ValAddress) (
	[]byte, error)

QueryValidatorCommission returns a validator's commission.

func WithdrawAllDelegatorRewards added in v1.6.3

func WithdrawAllDelegatorRewards(cliCtx context.CLIContext, queryRoute string, delegatorAddr sdk.AccAddress) ([]sdk.Msg, error)

WithdrawAllDelegatorRewards builds a multi-message slice to be used to withdraw all delegations rewards for the given delegator.

func WithdrawValidatorRewardsAndCommission

func WithdrawValidatorRewardsAndCommission(validatorAddr sdk.ValAddress) ([]sdk.Msg, error)

WithdrawValidatorRewardsAndCommission builds a two-message message slice to be used to withdraw both validation's commission and self-delegation reward.

Types

type WrapError added in v1.7.0

type WrapError struct {
	Code      uint32 `json:"code"`
	Log       string `json:"log"`
	Codespace string `json:"codespace"`
	Changed   bool   `json:"-"`
	RawError  error  `json:"-"`
}

func NewWrapError added in v1.7.0

func NewWrapError(err error) *WrapError

func (*WrapError) Error added in v1.7.0

func (e *WrapError) Error() string

func (*WrapError) Trans added in v1.7.0

func (e *WrapError) Trans(code uint32, newLog string)

Jump to

Keyboard shortcuts

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