types

package
v1.4.5 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 6 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
)
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() subspace.KeyTable

ParamKeyTable for operations module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers concrete types on codec

Types

type FixedGasParams

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

func DefaultFixedGasParams

func DefaultFixedGasParams() FixedGasParams

func NewFixedGasParams

func NewFixedGasParams(resetAccount, distributeReward, banAccount sdk.Gas) FixedGasParams

type MsgBanAccount added in v1.4.0

type MsgBanAccount struct {
	Owner   sdk.AccAddress `json:"owner"`
	Address sdk.AccAddress `json:"address"`
	Ban     bool           `json:"ban"`
}

func NewMsgBanAccount added in v1.4.0

func NewMsgBanAccount(owner, address sdk.AccAddress, ban bool) MsgBanAccount

func (MsgBanAccount) GetSignBytes added in v1.4.0

func (msg MsgBanAccount) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgBanAccount) GetSigners added in v1.4.0

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

GetSigners defines whose signature is required

func (MsgBanAccount) Route added in v1.4.0

func (msg MsgBanAccount) Route() string

Route should return the name of the module

func (MsgBanAccount) Type added in v1.4.0

func (msg MsgBanAccount) Type() string

Type should return the action

func (MsgBanAccount) ValidateBasic added in v1.4.0

func (msg MsgBanAccount) ValidateBasic() error

ValidateBasic runs stateless checks on the message

type MsgBurn added in v1.4.1

type MsgBurn struct {
	Owner sdk.AccAddress `json:"owner"`
	Coin  sdk.Coin       `json:"coin"`
}

func NewMsgBurn added in v1.4.1

func NewMsgBurn(owner sdk.AccAddress, coin sdk.Coin) MsgBurn

func (MsgBurn) GetSignBytes added in v1.4.1

func (msg MsgBurn) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgBurn) GetSigners added in v1.4.1

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

GetSigners defines whose signature is required

func (MsgBurn) Route added in v1.4.1

func (msg MsgBurn) Route() string

Route should return the name of the module

func (MsgBurn) Type added in v1.4.1

func (msg MsgBurn) Type() string

Type should return the action

func (MsgBurn) ValidateBasic added in v1.4.1

func (msg MsgBurn) ValidateBasic() error

ValidateBasic runs stateless checks on the message

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 MsgMint added in v1.4.0

type MsgMint struct {
	Owner sdk.AccAddress `json:"owner"`
	Coin  sdk.Coin       `json:"coin"`
}

func NewMsgMint added in v1.4.0

func NewMsgMint(owner sdk.AccAddress, coin sdk.Coin) MsgMint

func (MsgMint) GetSignBytes added in v1.4.0

func (msg MsgMint) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgMint) GetSigners added in v1.4.0

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

GetSigners defines whose signature is required

func (MsgMint) Route added in v1.4.0

func (msg MsgMint) Route() string

Route should return the name of the module

func (MsgMint) Type added in v1.4.0

func (msg MsgMint) Type() string

Type should return the action

func (MsgMint) ValidateBasic added in v1.4.0

func (msg MsgMint) 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 Params added in v1.4.0

type Params struct {
	Supervisors []string       `json:"supervisors" yaml:"supervisors"`
	FixedGas    FixedGasParams `json:"fixed_gas" yaml:"fixed_gas"`
	MinGasPrice sdk.DecCoin    `json:"min_gas_price" yaml:"min_gas_price"`
}

func DefaultParams added in v1.4.0

func DefaultParams() Params

DefaultParams returns a default set of parameters.

func (*Params) ParamSetPairs added in v1.4.0

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

func (Params) Validate added in v1.4.0

func (p Params) Validate() error

type Reward

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

type SupplyKeeper added in v1.4.0

type SupplyKeeper interface {
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
}

SupplyKeeper defines the expected supply Keeper (noalias)

Jump to

Keyboard shortcuts

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