v2

package
v2.10.0-rc2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthOracle        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowOracle          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupOracle = fmt.Errorf("proto: unexpected end of group")
)
View Source
var TaskStatus_name = map[int32]string{
	0: "TASK_STATUS_UNSPECIFIED",
	1: "TASK_STATUS_PENDING",
	2: "TASK_STATUS_SUCCEEDED",
	3: "TASK_STATUS_FAILED",
}
View Source
var TaskStatus_value = map[string]int32{
	"TASK_STATUS_UNSPECIFIED": 0,
	"TASK_STATUS_PENDING":     1,
	"TASK_STATUS_SUCCEEDED":   2,
	"TASK_STATUS_FAILED":      3,
}

Functions

func MigrateTaskStore

func MigrateTaskStore(ctx sdk.Context, storeKey storetypes.StoreKey, cdc codec.BinaryCodec) error

func UpdateParams

func UpdateParams(ctx sdk.Context, paramSubspace types.ParamSubspace)

Types

type CoinsProto

type CoinsProto struct {
	Coins github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,1,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins" yaml:"amount"`
}

func (*CoinsProto) Descriptor

func (*CoinsProto) Descriptor() ([]byte, []int)

func (*CoinsProto) GetCoins

func (*CoinsProto) Marshal

func (m *CoinsProto) Marshal() (dAtA []byte, err error)

func (*CoinsProto) MarshalTo

func (m *CoinsProto) MarshalTo(dAtA []byte) (int, error)

func (*CoinsProto) MarshalToSizedBuffer

func (m *CoinsProto) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*CoinsProto) ProtoMessage

func (*CoinsProto) ProtoMessage()

func (*CoinsProto) Reset

func (m *CoinsProto) Reset()

func (*CoinsProto) Size

func (m *CoinsProto) Size() (n int)

func (*CoinsProto) String

func (m *CoinsProto) String() string

func (*CoinsProto) Unmarshal

func (m *CoinsProto) Unmarshal(dAtA []byte) error

func (*CoinsProto) XXX_DiscardUnknown

func (m *CoinsProto) XXX_DiscardUnknown()

func (*CoinsProto) XXX_Marshal

func (m *CoinsProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*CoinsProto) XXX_Merge

func (m *CoinsProto) XXX_Merge(src proto.Message)

func (*CoinsProto) XXX_Size

func (m *CoinsProto) XXX_Size() int

func (*CoinsProto) XXX_Unmarshal

func (m *CoinsProto) XXX_Unmarshal(b []byte) error

type LockedPoolParams

type LockedPoolParams struct {
	LockedInBlocks    int64 `` /* 130-byte string literal not displayed */
	MinimumCollateral int64 `` /* 139-byte string literal not displayed */
}

func (*LockedPoolParams) Descriptor

func (*LockedPoolParams) Descriptor() ([]byte, []int)

func (*LockedPoolParams) Marshal

func (m *LockedPoolParams) Marshal() (dAtA []byte, err error)

func (*LockedPoolParams) MarshalTo

func (m *LockedPoolParams) MarshalTo(dAtA []byte) (int, error)

func (*LockedPoolParams) MarshalToSizedBuffer

func (m *LockedPoolParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*LockedPoolParams) ProtoMessage

func (*LockedPoolParams) ProtoMessage()

func (*LockedPoolParams) Reset

func (m *LockedPoolParams) Reset()

func (*LockedPoolParams) Size

func (m *LockedPoolParams) Size() (n int)

func (*LockedPoolParams) String

func (m *LockedPoolParams) String() string

func (*LockedPoolParams) Unmarshal

func (m *LockedPoolParams) Unmarshal(dAtA []byte) error

func (*LockedPoolParams) XXX_DiscardUnknown

func (m *LockedPoolParams) XXX_DiscardUnknown()

func (*LockedPoolParams) XXX_Marshal

func (m *LockedPoolParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LockedPoolParams) XXX_Merge

func (m *LockedPoolParams) XXX_Merge(src proto.Message)

func (*LockedPoolParams) XXX_Size

func (m *LockedPoolParams) XXX_Size() int

func (*LockedPoolParams) XXX_Unmarshal

func (m *LockedPoolParams) XXX_Unmarshal(b []byte) error

type Operator

type Operator struct {
	Address            string                                   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	Proposer           string                                   `protobuf:"bytes,2,opt,name=proposer,proto3" json:"proposer,omitempty" yaml:"proposer"`
	Collateral         github_com_cosmos_cosmos_sdk_types.Coins `` /* 135-byte string literal not displayed */
	AccumulatedRewards github_com_cosmos_cosmos_sdk_types.Coins `` /* 186-byte string literal not displayed */
	Name               string                                   `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty" yaml:"name"`
}

func (*Operator) Descriptor

func (*Operator) Descriptor() ([]byte, []int)

func (*Operator) Marshal

func (m *Operator) Marshal() (dAtA []byte, err error)

func (*Operator) MarshalTo

func (m *Operator) MarshalTo(dAtA []byte) (int, error)

func (*Operator) MarshalToSizedBuffer

func (m *Operator) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Operator) ProtoMessage

func (*Operator) ProtoMessage()

func (*Operator) Reset

func (m *Operator) Reset()

func (*Operator) Size

func (m *Operator) Size() (n int)

func (*Operator) String

func (m *Operator) String() string

func (*Operator) Unmarshal

func (m *Operator) Unmarshal(dAtA []byte) error

func (*Operator) XXX_DiscardUnknown

func (m *Operator) XXX_DiscardUnknown()

func (*Operator) XXX_Marshal

func (m *Operator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Operator) XXX_Merge

func (m *Operator) XXX_Merge(src proto.Message)

func (*Operator) XXX_Size

func (m *Operator) XXX_Size() int

func (*Operator) XXX_Unmarshal

func (m *Operator) XXX_Unmarshal(b []byte) error

type Response

type Response struct {
	Operator string                                   `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty" yaml:"operator"`
	Score    github_com_cosmos_cosmos_sdk_types.Int   `protobuf:"bytes,2,opt,name=score,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"score" yaml:"score"`
	Weight   github_com_cosmos_cosmos_sdk_types.Int   `protobuf:"bytes,3,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"weight" yaml:"weight"`
	Reward   github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=reward,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"reward" yaml:"reward"`
}

func (*Response) Descriptor

func (*Response) Descriptor() ([]byte, []int)

func (*Response) Marshal

func (m *Response) Marshal() (dAtA []byte, err error)

func (*Response) MarshalTo

func (m *Response) MarshalTo(dAtA []byte) (int, error)

func (*Response) MarshalToSizedBuffer

func (m *Response) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) Reset

func (m *Response) Reset()

func (*Response) Size

func (m *Response) Size() (n int)

func (*Response) String

func (m *Response) String() string

func (*Response) Unmarshal

func (m *Response) Unmarshal(dAtA []byte) error

func (*Response) XXX_DiscardUnknown

func (m *Response) XXX_DiscardUnknown()

func (*Response) XXX_Marshal

func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Response) XXX_Merge

func (m *Response) XXX_Merge(src proto.Message)

func (*Response) XXX_Size

func (m *Response) XXX_Size() int

func (*Response) XXX_Unmarshal

func (m *Response) XXX_Unmarshal(b []byte) error

type Responses

type Responses []Response

func (Responses) String

func (r Responses) String() string

String implements the Stringer interface.

type Task

type Task struct {
	Contract      string                                   `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty" yaml:"contract"`
	Function      string                                   `protobuf:"bytes,2,opt,name=function,proto3" json:"function,omitempty" yaml:"function"`
	BeginBlock    int64                                    `protobuf:"varint,3,opt,name=begin_block,json=beginBlock,proto3" json:"begin_block,omitempty" yaml:"begin_block"`
	Bounty        github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,4,rep,name=bounty,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"bounty" yaml:"bounty"`
	Description   string                                   `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty" yaml:"description"`
	Expiration    time.Time                                `protobuf:"bytes,6,opt,name=expiration,proto3,stdtime" json:"expiration" yaml:"expiration"`
	Creator       string                                   `protobuf:"bytes,7,opt,name=creator,proto3" json:"creator,omitempty" yaml:"creator"`
	Responses     Responses                                `protobuf:"bytes,8,rep,name=responses,proto3,castrepeated=Responses" json:"responses" yaml:"responses"`
	Result        github_com_cosmos_cosmos_sdk_types.Int   `protobuf:"bytes,9,opt,name=result,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"result" yaml:"result"`
	ClosingBlock  int64                                    `protobuf:"varint,10,opt,name=closing_block,json=closingBlock,proto3" json:"closing_block,omitempty" yaml:"closing_block"`
	WaitingBlocks int64                                    `protobuf:"varint,11,opt,name=waiting_blocks,json=waitingBlocks,proto3" json:"waiting_blocks,omitempty" yaml:"waiting_blocks"`
	Status        TaskStatus                               `protobuf:"varint,12,opt,name=status,proto3,enum=shentu.oracle.v1alpha1.TaskStatus" json:"status,omitempty" yaml:"status"`
}

func (*Task) Descriptor

func (*Task) Descriptor() ([]byte, []int)

func (*Task) Marshal

func (m *Task) Marshal() (dAtA []byte, err error)

func (*Task) MarshalTo

func (m *Task) MarshalTo(dAtA []byte) (int, error)

func (*Task) MarshalToSizedBuffer

func (m *Task) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Task) ProtoMessage

func (*Task) ProtoMessage()

func (*Task) Reset

func (m *Task) Reset()

func (*Task) Size

func (m *Task) Size() (n int)

func (*Task) String

func (m *Task) String() string

func (*Task) Unmarshal

func (m *Task) Unmarshal(dAtA []byte) error

func (*Task) XXX_DiscardUnknown

func (m *Task) XXX_DiscardUnknown()

func (*Task) XXX_Marshal

func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Task) XXX_Merge

func (m *Task) XXX_Merge(src proto.Message)

func (*Task) XXX_Size

func (m *Task) XXX_Size() int

func (*Task) XXX_Unmarshal

func (m *Task) XXX_Unmarshal(b []byte) error

type TaskID

type TaskID struct {
	Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty" yaml:"contract"`
	Function string `protobuf:"bytes,2,opt,name=function,proto3" json:"function,omitempty" yaml:"function"`
}

func (*TaskID) Descriptor

func (*TaskID) Descriptor() ([]byte, []int)

func (*TaskID) Marshal

func (m *TaskID) Marshal() (dAtA []byte, err error)

func (*TaskID) MarshalTo

func (m *TaskID) MarshalTo(dAtA []byte) (int, error)

func (*TaskID) MarshalToSizedBuffer

func (m *TaskID) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TaskID) ProtoMessage

func (*TaskID) ProtoMessage()

func (*TaskID) Reset

func (m *TaskID) Reset()

func (*TaskID) Size

func (m *TaskID) Size() (n int)

func (*TaskID) String

func (m *TaskID) String() string

func (*TaskID) Unmarshal

func (m *TaskID) Unmarshal(dAtA []byte) error

func (*TaskID) XXX_DiscardUnknown

func (m *TaskID) XXX_DiscardUnknown()

func (*TaskID) XXX_Marshal

func (m *TaskID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TaskID) XXX_Merge

func (m *TaskID) XXX_Merge(src proto.Message)

func (*TaskID) XXX_Size

func (m *TaskID) XXX_Size() int

func (*TaskID) XXX_Unmarshal

func (m *TaskID) XXX_Unmarshal(b []byte) error

type TaskIDs

type TaskIDs struct {
	TaskIds []TaskID `protobuf:"bytes,1,rep,name=task_ids,json=taskIds,proto3" json:"task_ids"`
}

func (*TaskIDs) Descriptor

func (*TaskIDs) Descriptor() ([]byte, []int)

func (*TaskIDs) GetTaskIds

func (m *TaskIDs) GetTaskIds() []TaskID

func (*TaskIDs) Marshal

func (m *TaskIDs) Marshal() (dAtA []byte, err error)

func (*TaskIDs) MarshalTo

func (m *TaskIDs) MarshalTo(dAtA []byte) (int, error)

func (*TaskIDs) MarshalToSizedBuffer

func (m *TaskIDs) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TaskIDs) ProtoMessage

func (*TaskIDs) ProtoMessage()

func (*TaskIDs) Reset

func (m *TaskIDs) Reset()

func (*TaskIDs) Size

func (m *TaskIDs) Size() (n int)

func (*TaskIDs) String

func (m *TaskIDs) String() string

func (*TaskIDs) Unmarshal

func (m *TaskIDs) Unmarshal(dAtA []byte) error

func (*TaskIDs) XXX_DiscardUnknown

func (m *TaskIDs) XXX_DiscardUnknown()

func (*TaskIDs) XXX_Marshal

func (m *TaskIDs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TaskIDs) XXX_Merge

func (m *TaskIDs) XXX_Merge(src proto.Message)

func (*TaskIDs) XXX_Size

func (m *TaskIDs) XXX_Size() int

func (*TaskIDs) XXX_Unmarshal

func (m *TaskIDs) XXX_Unmarshal(b []byte) error

type TaskParams

type TaskParams struct {
	ExpirationDuration time.Duration                          `` /* 144-byte string literal not displayed */
	AggregationWindow  int64                                  `` /* 139-byte string literal not displayed */
	AggregationResult  github_com_cosmos_cosmos_sdk_types.Int `` /* 178-byte string literal not displayed */
	ThresholdScore     github_com_cosmos_cosmos_sdk_types.Int `` /* 166-byte string literal not displayed */
	Epsilon1           github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,5,opt,name=epsilon1,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"epsilon1" yaml:"epsilon1"`
	Epsilon2           github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,6,opt,name=epsilon2,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"epsilon2" yaml:"epsilon2"`
}

func (*TaskParams) Descriptor

func (*TaskParams) Descriptor() ([]byte, []int)

func (*TaskParams) Marshal

func (m *TaskParams) Marshal() (dAtA []byte, err error)

func (*TaskParams) MarshalTo

func (m *TaskParams) MarshalTo(dAtA []byte) (int, error)

func (*TaskParams) MarshalToSizedBuffer

func (m *TaskParams) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*TaskParams) ProtoMessage

func (*TaskParams) ProtoMessage()

func (*TaskParams) Reset

func (m *TaskParams) Reset()

func (*TaskParams) Size

func (m *TaskParams) Size() (n int)

func (*TaskParams) String

func (m *TaskParams) String() string

func (*TaskParams) Unmarshal

func (m *TaskParams) Unmarshal(dAtA []byte) error

func (*TaskParams) XXX_DiscardUnknown

func (m *TaskParams) XXX_DiscardUnknown()

func (*TaskParams) XXX_Marshal

func (m *TaskParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TaskParams) XXX_Merge

func (m *TaskParams) XXX_Merge(src proto.Message)

func (*TaskParams) XXX_Size

func (m *TaskParams) XXX_Size() int

func (*TaskParams) XXX_Unmarshal

func (m *TaskParams) XXX_Unmarshal(b []byte) error

type TaskStatus

type TaskStatus int32

TaskStatus enumerates the valid statuses of a task.

const (
	TaskStatusNil       TaskStatus = 0
	TaskStatusPending   TaskStatus = 1
	TaskStatusSucceeded TaskStatus = 2
	TaskStatusFailed    TaskStatus = 3
)

func (TaskStatus) EnumDescriptor

func (TaskStatus) EnumDescriptor() ([]byte, []int)

func (TaskStatus) String

func (x TaskStatus) String() string

type Withdraw

type Withdraw struct {
	Address  string                                   `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" yaml:"address"`
	Amount   github_com_cosmos_cosmos_sdk_types.Coins `protobuf:"bytes,2,rep,name=amount,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"amount" yaml:"amount"`
	DueBlock int64                                    `protobuf:"varint,3,opt,name=due_block,json=dueBlock,proto3" json:"due_block,omitempty" yaml:"due_block"`
}

Withdraw stores a withdraw of "Amount" scheduled for a given "DueBlock."

func (*Withdraw) Descriptor

func (*Withdraw) Descriptor() ([]byte, []int)

func (*Withdraw) Marshal

func (m *Withdraw) Marshal() (dAtA []byte, err error)

func (*Withdraw) MarshalTo

func (m *Withdraw) MarshalTo(dAtA []byte) (int, error)

func (*Withdraw) MarshalToSizedBuffer

func (m *Withdraw) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Withdraw) ProtoMessage

func (*Withdraw) ProtoMessage()

func (*Withdraw) Reset

func (m *Withdraw) Reset()

func (*Withdraw) Size

func (m *Withdraw) Size() (n int)

func (*Withdraw) String

func (m *Withdraw) String() string

func (*Withdraw) Unmarshal

func (m *Withdraw) Unmarshal(dAtA []byte) error

func (*Withdraw) XXX_DiscardUnknown

func (m *Withdraw) XXX_DiscardUnknown()

func (*Withdraw) XXX_Marshal

func (m *Withdraw) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Withdraw) XXX_Merge

func (m *Withdraw) XXX_Merge(src proto.Message)

func (*Withdraw) XXX_Size

func (m *Withdraw) XXX_Size() int

func (*Withdraw) XXX_Unmarshal

func (m *Withdraw) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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