types

package
v1.3.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "operations"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey to be used for routing msgs
	RouterKey = ModuleName

	// QuerierRoute to be used for querierer msgs
	QuerierRoute = ModuleName

	QueryMinGasPrice = "min-gas-price"
)
View Source
const (
	DefaultParamspace = ModuleName
	DefaultDenom      = "udec"
)

Variables

View Source
var (
	DefaultSupervisors = make([]string, 0)
	DefaultMinGasPrice = sdk.NewDecCoinFromDec(DefaultDenom, sdk.MustNewDecFromStr("0.025"))
)
View Source
var (
	KeySupervisors = []byte("Supervisors")
	KeyFixedGas    = []byte("FixedGas")
	KeyMinGasPrice = []byte("MinGasPrice")
)
View Source
var ModuleCdc = codec.New()

ModuleCdc is the codec for the module

Functions

func ParamKeyTable

func ParamKeyTable() params.KeyTable

ParamKeyTable type declaration for parameters

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec

Types

type FixedGasParams

type FixedGasParams struct {
	ResetAccount      sdk.Gas `json:"delete_account" yaml:"delete_account"`
	DistributeRewards sdk.Gas `json:"distribute_rewards" yaml:"distribute_rewards"`
}

func DefaultFixedGasParams

func DefaultFixedGasParams() FixedGasParams

func NewFixedGasParams

func NewFixedGasParams(resetAccount, distributeReward sdk.Gas) FixedGasParams

type MsgDistributeRewards

type MsgDistributeRewards struct {
	Owner   sdk.AccAddress `json:"owner"`
	Rewards []Reward       `json:"rewards"`
}

MsgDistributeRewards defines a CreatePDV message

func NewMsgDistributeRewards

func NewMsgDistributeRewards(owner sdk.AccAddress, rewards []Reward) MsgDistributeRewards

NewMsgDistributeRewards is a constructor function for MsgDistributeRewards

func (MsgDistributeRewards) GetSignBytes

func (msg MsgDistributeRewards) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgDistributeRewards) GetSigners

func (msg MsgDistributeRewards) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgDistributeRewards) Route

func (msg MsgDistributeRewards) Route() string

Route should return the name of the module

func (MsgDistributeRewards) Type

func (msg MsgDistributeRewards) Type() string

Type should return the action

func (MsgDistributeRewards) ValidateBasic

func (msg MsgDistributeRewards) ValidateBasic() error

ValidateBasic runs stateless checks on the message

type MsgResetAccount

type MsgResetAccount struct {
	Owner        sdk.AccAddress `json:"owner"`
	AccountOwner sdk.AccAddress `json:"accountOwner"`
}

func NewMsgResetAccount

func NewMsgResetAccount(owner, accountOwner sdk.AccAddress) MsgResetAccount

func (MsgResetAccount) GetSignBytes

func (msg MsgResetAccount) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgResetAccount) GetSigners

func (msg MsgResetAccount) GetSigners() []sdk.AccAddress

GetSigners defines whose signature is required

func (MsgResetAccount) Route

func (msg MsgResetAccount) Route() string

Route should return the name of the module

func (MsgResetAccount) Type

func (msg MsgResetAccount) Type() string

Type should return the action

func (MsgResetAccount) ValidateBasic

func (msg MsgResetAccount) ValidateBasic() error

ValidateBasic runs stateless checks on the message

type Reward

type Reward struct {
	Receiver sdk.AccAddress `json:"receiver"`
	ID       uint64         `json:"id"`
	Reward   uint64         `json:"reward"`
}

Jump to

Keyboard shortcuts

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