Documentation
¶
Index ¶
- Constants
- Variables
- func ParamKeyTable() subspace.KeyTable
- func RegisterCodec(cdc *codec.Codec)
- func ValidateGenesis(data GenesisState) error
- type BankKeeper
- type GenesisState
- type InstanceKeeper
- type MsgCreateExecution
- type MsgUpdateExecution
- type ParamSubspace
- type Params
- type ProcessKeeper
- type RunnerKeeper
- type ServiceKeeper
Constants ¶
const ( EventTypeExecutionProposed = "ExecutionProposed" EventTypeExecutionInProgress = "ExecutionInProgress" EventTypeUpdateExecution = "UpdateExecution" AttributeHash = "hash" AttributeValueCategory = ModuleName )
execution module event types
const ( // ModuleName is the name of the module ModuleName = "execution" // StoreKey to be used when creating the KVStore StoreKey = ModuleName // RouterKey to be used for routing msgs RouterKey = ModuleName // QuerierRoute to be used for routing QuerierRoute = ModuleName )
const ( DefaultParamspace = ModuleName DefaultMinPrice = "10000atto" )
Default parameter namespace
const ( QueryGetExecution = "get" QueryListExecution = "list" )
Variables ¶
var ( // KeyMinPrice key for the parameter MinPrice KeyMinPrice = []byte("MinPrice") )
var ModuleCdc *codec.Codec
ModuleCdc defines the module codec
Functions ¶
func RegisterCodec ¶
RegisterCodec registers concrete types on codec
func ValidateGenesis ¶
func ValidateGenesis(data GenesisState) error
ValidateGenesis validates the instance genesis parameters
Types ¶
type BankKeeper ¶
type BankKeeper interface {
SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error
InputOutputCoins(ctx sdk.Context, inputs []bank.Input, outputs []bank.Output) error
}
BankKeeper module interface.
type GenesisState ¶
type GenesisState struct {
Params Params `json:"params" yaml:"params"`
}
GenesisState - all instance state that must be provided at genesis
func DefaultGenesisState ¶
func DefaultGenesisState() GenesisState
DefaultGenesisState - default GenesisState used by Cosmos Hub
func NewGenesisState ¶
func NewGenesisState(params Params) GenesisState
NewGenesisState creates a new GenesisState object
type InstanceKeeper ¶
type InstanceKeeper interface {
Get(ctx sdk.Context, instanceHash hash.Hash) (*instancepb.Instance, error)
}
InstanceKeeper module interface.
type MsgCreateExecution ¶
type MsgCreateExecution struct {
Request *api.CreateExecutionRequest `json:"request"`
Signer sdk.AccAddress `json:"signer"`
}
MsgCreateExecution defines a state transition to create a execution.
func NewMsgCreateExecution ¶
func NewMsgCreateExecution(req *api.CreateExecutionRequest, signer sdk.AccAddress) *MsgCreateExecution
NewMsgCreateExecution is a constructor function for MsgCreateExecution.
func (MsgCreateExecution) GetSignBytes ¶
func (msg MsgCreateExecution) GetSignBytes() []byte
GetSignBytes encodes the message for signing.
func (MsgCreateExecution) GetSigners ¶
func (msg MsgCreateExecution) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (MsgCreateExecution) Route ¶
func (msg MsgCreateExecution) Route() string
Route should return the name of the module.
func (MsgCreateExecution) Type ¶
func (msg MsgCreateExecution) Type() string
Type returns the action.
func (MsgCreateExecution) ValidateBasic ¶
func (msg MsgCreateExecution) ValidateBasic() error
ValidateBasic runs stateless checks on the message.
type MsgUpdateExecution ¶
type MsgUpdateExecution struct {
Request *api.UpdateExecutionRequest `json:"request"`
Executor sdk.AccAddress `json:"executor"`
}
MsgUpdateExecution defines a state transition to update a execution.
func NewMsgUpdateExecution ¶
func NewMsgUpdateExecution(req *api.UpdateExecutionRequest, executor sdk.AccAddress) *MsgUpdateExecution
NewMsgUpdateExecution is a constructor function for MsgUpdateExecution.
func (MsgUpdateExecution) GetSignBytes ¶
func (msg MsgUpdateExecution) GetSignBytes() []byte
GetSignBytes encodes the message for signing.
func (MsgUpdateExecution) GetSigners ¶
func (msg MsgUpdateExecution) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (MsgUpdateExecution) Route ¶
func (msg MsgUpdateExecution) Route() string
Route should return the name of the module.
func (MsgUpdateExecution) Type ¶
func (msg MsgUpdateExecution) Type() string
Type returns the action.
func (MsgUpdateExecution) ValidateBasic ¶
func (msg MsgUpdateExecution) ValidateBasic() error
ValidateBasic runs stateless checks on the message.
type ParamSubspace ¶
type ParamSubspace interface {
WithKeyTable(table params.KeyTable) params.Subspace
Get(ctx sdk.Context, key []byte, ptr interface{})
GetParamSet(ctx sdk.Context, ps params.ParamSet)
SetParamSet(ctx sdk.Context, ps params.ParamSet)
}
ParamSubspace defines the expected Subspace interfacace
type Params ¶
type Params struct {
MinPrice string `json:"minPrice" yaml:"minPrice"` // min price to pay for an execution
}
Params - used for initializing default parameter for instance at genesis
func DefaultParams ¶
func DefaultParams() Params
DefaultParams defines the parameters for this module
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() params.ParamSetPairs
ParamSetPairs - Implements params.ParamSet
type ProcessKeeper ¶
ProcessKeeper module interface.