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 MsgCreate
- func (*MsgCreate) Descriptor() ([]byte, []int)
- func (m *MsgCreate) GetEventHash() github_com_mesg_foundation_engine_hash.Hash
- func (m *MsgCreate) GetExecutorHash() github_com_mesg_foundation_engine_hash.Hash
- func (m *MsgCreate) GetInputs() *types.Struct
- func (m *MsgCreate) GetNodeKey() string
- func (m *MsgCreate) GetParentHash() github_com_mesg_foundation_engine_hash.Hash
- func (m *MsgCreate) GetPrice() string
- func (m *MsgCreate) GetProcessHash() github_com_mesg_foundation_engine_hash.Hash
- func (msg MsgCreate) GetSignBytes() []byte
- func (m *MsgCreate) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress
- func (msg MsgCreate) GetSigners() []sdk.AccAddress
- func (m *MsgCreate) GetTags() []string
- func (m *MsgCreate) GetTaskKey() string
- func (*MsgCreate) ProtoMessage()
- func (m *MsgCreate) Reset()
- func (msg MsgCreate) Route() string
- func (m *MsgCreate) String() string
- func (msg MsgCreate) Type() string
- func (msg MsgCreate) ValidateBasic() error
- func (m *MsgCreate) XXX_DiscardUnknown()
- func (m *MsgCreate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgCreate) XXX_Merge(src proto.Message)
- func (m *MsgCreate) XXX_Size() int
- func (m *MsgCreate) XXX_Unmarshal(b []byte) error
- type MsgUpdate
- func (*MsgUpdate) Descriptor() ([]byte, []int)
- func (m *MsgUpdate) GetError() string
- func (m *MsgUpdate) GetExecutor() github_com_cosmos_cosmos_sdk_types.AccAddress
- func (m *MsgUpdate) GetHash() github_com_mesg_foundation_engine_hash.Hash
- func (m *MsgUpdate) GetOutputs() *types.Struct
- func (m *MsgUpdate) GetResult() isMsgUpdate_Result
- func (msg MsgUpdate) GetSignBytes() []byte
- func (msg MsgUpdate) GetSigners() []sdk.AccAddress
- func (*MsgUpdate) ProtoMessage()
- func (m *MsgUpdate) Reset()
- func (msg MsgUpdate) Route() string
- func (m *MsgUpdate) String() string
- func (msg MsgUpdate) Type() string
- func (msg MsgUpdate) ValidateBasic() error
- func (m *MsgUpdate) XXX_DiscardUnknown()
- func (m *MsgUpdate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgUpdate) XXX_Merge(src proto.Message)
- func (*MsgUpdate) XXX_OneofWrappers() []interface{}
- func (m *MsgUpdate) XXX_Size() int
- func (m *MsgUpdate) XXX_Unmarshal(b []byte) error
- type MsgUpdate_Error
- type MsgUpdate_Outputs
- type ParamSubspace
- type Params
- type ProcessKeeper
- type RunnerKeeper
- type ServiceKeeper
Constants ¶
const ( EventType = "execution" AttributeKeyHash = "hash" AttributeKeyAddress = "address" AttributeKeyExecutor = "executor" AttributeKeyProcess = "process" AttributeKeyInstance = "instance" AttributeActionProposed = "proposed" AttributeActionCreated = "created" AttributeActionCompleted = "completed" AttributeActionFailed = "failed" )
module event types and attributes
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 ( QueryGet = "get" QueryList = "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 MsgCreate ¶ added in v0.21.0
type MsgCreate struct { // The msg's signer. Signer github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 151-byte string literal not displayed */ // taskKey to filter executions. TaskKey string `protobuf:"bytes,2,opt,name=taskKey,proto3" json:"taskKey,omitempty" validate:"required,printascii"` Inputs *types.Struct `protobuf:"bytes,3,opt,name=inputs,proto3" json:"inputs,omitempty"` // tags the execution. Tags []string `protobuf:"bytes,4,rep,name=tags,proto3" json:"tags,omitempty" validate:"dive,printascii"` ParentHash github_com_mesg_foundation_engine_hash.Hash `` /* 179-byte string literal not displayed */ EventHash github_com_mesg_foundation_engine_hash.Hash `` /* 178-byte string literal not displayed */ ProcessHash github_com_mesg_foundation_engine_hash.Hash `` /* 154-byte string literal not displayed */ NodeKey string `protobuf:"bytes,8,opt,name=nodeKey,proto3" json:"nodeKey,omitempty"` ExecutorHash github_com_mesg_foundation_engine_hash.Hash `` /* 155-byte string literal not displayed */ // price of running the execution. Price string `protobuf:"bytes,10,opt,name=price,proto3" json:"price,omitempty" validate:"coinsPositiveZero"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The message to create an Execution.
func (*MsgCreate) Descriptor ¶ added in v0.21.0
func (*MsgCreate) GetEventHash ¶ added in v0.21.0
func (m *MsgCreate) GetEventHash() github_com_mesg_foundation_engine_hash.Hash
func (*MsgCreate) GetExecutorHash ¶ added in v0.21.0
func (m *MsgCreate) GetExecutorHash() github_com_mesg_foundation_engine_hash.Hash
func (*MsgCreate) GetNodeKey ¶ added in v0.21.0
func (*MsgCreate) GetParentHash ¶ added in v0.21.0
func (m *MsgCreate) GetParentHash() github_com_mesg_foundation_engine_hash.Hash
func (*MsgCreate) GetProcessHash ¶ added in v0.21.0
func (m *MsgCreate) GetProcessHash() github_com_mesg_foundation_engine_hash.Hash
func (MsgCreate) GetSignBytes ¶ added in v0.21.0
GetSignBytes encodes the message for signing.
func (*MsgCreate) GetSigner ¶ added in v0.21.0
func (m *MsgCreate) GetSigner() github_com_cosmos_cosmos_sdk_types.AccAddress
func (MsgCreate) GetSigners ¶ added in v0.21.0
func (msg MsgCreate) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (*MsgCreate) GetTaskKey ¶ added in v0.21.0
func (*MsgCreate) ProtoMessage ¶ added in v0.21.0
func (*MsgCreate) ProtoMessage()
func (MsgCreate) ValidateBasic ¶ added in v0.21.0
ValidateBasic runs stateless checks on the message.
func (*MsgCreate) XXX_DiscardUnknown ¶ added in v0.21.0
func (m *MsgCreate) XXX_DiscardUnknown()
func (*MsgCreate) XXX_Marshal ¶ added in v0.21.0
func (*MsgCreate) XXX_Unmarshal ¶ added in v0.21.0
type MsgUpdate ¶ added in v0.21.0
type MsgUpdate struct { // The execution's executor. Executor github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 155-byte string literal not displayed */ // Hash represents execution. Hash github_com_mesg_foundation_engine_hash.Hash `` /* 139-byte string literal not displayed */ // result pass to execution // // Types that are valid to be assigned to Result: // *MsgUpdate_Outputs // *MsgUpdate_Error Result isMsgUpdate_Result `protobuf_oneof:"result"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
The message to update an Execution.
func (*MsgUpdate) Descriptor ¶ added in v0.21.0
func (*MsgUpdate) GetExecutor ¶ added in v0.21.0
func (m *MsgUpdate) GetExecutor() github_com_cosmos_cosmos_sdk_types.AccAddress
func (*MsgUpdate) GetHash ¶ added in v0.21.0
func (m *MsgUpdate) GetHash() github_com_mesg_foundation_engine_hash.Hash
func (*MsgUpdate) GetOutputs ¶ added in v0.21.0
func (MsgUpdate) GetSignBytes ¶ added in v0.21.0
GetSignBytes encodes the message for signing.
func (MsgUpdate) GetSigners ¶ added in v0.21.0
func (msg MsgUpdate) GetSigners() []sdk.AccAddress
GetSigners defines whose signature is required.
func (*MsgUpdate) ProtoMessage ¶ added in v0.21.0
func (*MsgUpdate) ProtoMessage()
func (MsgUpdate) ValidateBasic ¶ added in v0.21.0
ValidateBasic runs stateless checks on the message.
func (*MsgUpdate) XXX_DiscardUnknown ¶ added in v0.21.0
func (m *MsgUpdate) XXX_DiscardUnknown()
func (*MsgUpdate) XXX_Marshal ¶ added in v0.21.0
func (*MsgUpdate) XXX_OneofWrappers ¶ added in v0.21.0
func (*MsgUpdate) XXX_OneofWrappers() []interface{}
XXX_OneofWrappers is for the internal use of the proto package.
func (*MsgUpdate) XXX_Unmarshal ¶ added in v0.21.0
type MsgUpdate_Error ¶ added in v0.21.0
type MsgUpdate_Error struct {
Error string `protobuf:"bytes,4,opt,name=error,proto3,oneof" json:"error,omitempty"`
}
type MsgUpdate_Outputs ¶ added in v0.21.0
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.