types

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EventTypeExecutionProposed   = "ExecutionProposed"
	EventTypeExecutionInProgress = "ExecutionInProgress"
	EventTypeUpdateExecution     = "UpdateExecution"

	AttributeHash = "hash"

	AttributeValueCategory = ModuleName
)

execution module event types

View Source
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
)
View Source
const (
	DefaultParamspace = ModuleName
	DefaultMinPrice   = "10000atto"
)

Default parameter namespace

View Source
const (
	QueryGetExecution  = "get"
	QueryListExecution = "list"
)

Variables

View Source
var (
	// KeyMinPrice key for the parameter MinPrice
	KeyMinPrice = []byte("MinPrice")
)
View Source
var ModuleCdc *codec.Codec

ModuleCdc defines the module codec

Functions

func ParamKeyTable

func ParamKeyTable() subspace.KeyTable

ParamKeyTable for auth module

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

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 NewParams

func NewParams(minPrice string) Params

NewParams creates a new Params object

func (*Params) ParamSetPairs

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

ParamSetPairs - Implements params.ParamSet

func (Params) String

func (p Params) String() string

String implements the stringer interface for Params

type ProcessKeeper

type ProcessKeeper interface {
	Get(ctx sdk.Context, hash hash.Hash) (*processpb.Process, error)
}

ProcessKeeper module interface.

type RunnerKeeper

type RunnerKeeper interface {
	Get(ctx sdk.Context, hash hash.Hash) (*runnerpb.Runner, error)
	List(ctx sdk.Context) ([]*runnerpb.Runner, error)
}

RunnerKeeper module interface.

type ServiceKeeper

type ServiceKeeper interface {
	Get(ctx sdk.Context, hash hash.Hash) (*servicepb.Service, error)
}

ServiceKeeper module interface.

Jump to

Keyboard shortcuts

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