types

package
v0.0.0-...-4334f35 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 35 Imported by: 1

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeObservation        = "observation"
	AttributeKeyAttestationID   = "attestation_id"
	AttributeKeyAttestationType = "attestation_type"
	AttributeKeyNonce           = "nonce"
)
View Source
const (
	// ModuleName is the name of the module
	ModuleName = "oracle"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// RouterKey is the module name router key
	RouterKey = ModuleName

	// QuerierRoute to be used for querierer msgs
	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthAttestation        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAttestation          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAttestation = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInternal                = sdkerrors.Register(ModuleName, 1, "internal")
	ErrDuplicate               = sdkerrors.Register(ModuleName, 2, "duplicate")
	ErrInvalid                 = sdkerrors.Register(ModuleName, 3, "invalid")
	ErrTimeout                 = sdkerrors.Register(ModuleName, 4, "timeout")
	ErrUnknown                 = sdkerrors.Register(ModuleName, 5, "unknown")
	ErrEmpty                   = sdkerrors.Register(ModuleName, 6, "empty")
	ErrOutdated                = sdkerrors.Register(ModuleName, 7, "outdated")
	ErrUnsupported             = sdkerrors.Register(ModuleName, 8, "unsupported")
	ErrNonContiguousEventNonce = sdkerrors.Register(ModuleName, 9, "non contiguous event nonce")
)
View Source
var (
	// AttestationVotesPowerThreshold threshold of votes power to succeed
	AttestationVotesPowerThreshold = sdk.NewInt(66)

	// ParamsStoreKeySignedClaimsWindow stores the signed blocks window
	ParamsStoreKeySignedClaimsWindow = []byte("SignedClaimsWindow")

	// ParamsStoreSlashFractionClaim stores the slash fraction Claim
	ParamsStoreSlashFractionClaim = []byte("SlashFractionClaim")

	// ParamsStoreSlashFractionConflictingClaim stores the slash fraction ConflictingClaim
	ParamsStoreSlashFractionConflictingClaim = []byte("SlashFractionConflictingClaim")
)
View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// OracleClaimKey Claim details by nonce and validator address
	// i.e. cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn
	// A claim is named more intuitively than an Attestation, it is literally
	// a validator making a claim to have seen something happen. Claims are
	// attached to attestations which can be thought of as 'the event' that
	// will eventually be executed.
	OracleClaimKey = []byte{0x1}

	// OracleAttestationKey attestation details by nonce and validator address
	// i.e. cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn
	// An attestation can be thought of as the 'event to be executed' while
	// the Claims are an individual validator saying that they saw an event
	// occur the Attestation is 'the event' that multiple claims vote on and
	// eventually executes
	OracleAttestationKey = []byte{0x2}

	CurrentEpochKey = []byte{0x3}

	CurrentPricesKey  = []byte{0x4}
	CurrentHoldersKey = []byte{0x5}
)
View Source
var (
	ErrInvalidLengthMsgs        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsgs          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMsgs = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthPrices        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowPrices          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupPrices = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
View Source
var ClaimType_name = map[int32]string{
	0: "CLAIM_TYPE_UNKNOWN",
	1: "CLAIM_TYPE_PRICE",
	2: "CLAIM_TYPE_HOLDER",
}
View Source
var ClaimType_value = map[string]int32{
	"CLAIM_TYPE_UNKNOWN": 0,
	"CLAIM_TYPE_PRICE":   1,
	"CLAIM_TYPE_HOLDER":  2,
}
View Source
var ModuleCdc = codec.NewLegacyAmino()

ModuleCdc is the codec for the module

Functions

func GetAttestationKey

func GetAttestationKey(epoch uint64, details Claim) []byte

GetAttestationKey returns the following key format prefix nonce claim-details-hash [0x5][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] An attestation is an event multiple people are voting on, this function needs the claim details because each Attestation is aggregating all claims of a specific event, lets say validator X and validator y where making different claims about the same event nonce Note that the claim hash does NOT include the claimer address and only identifies an event

func GetAttestationKeyWithHash

func GetAttestationKeyWithHash(epoch uint64, claimHash []byte) []byte

GetAttestationKeyWithHash returns the following key format prefix nonce claim-details-hash [0x5][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] An attestation is an event multiple people are voting on, this function needs the claim details because each Attestation is aggregating all claims of a specific event, lets say validator X and validator y where making different claims about the same event nonce Note that the claim hash does NOT include the claimer address and only identifies an event

func GetClaimKey

func GetClaimKey(details Claim) []byte

GetClaimKey returns the following key format prefix type cosmos-validator-address nonce attestation-details-hash [0x0][0 0 0 1][cosmosvaloper1ahx7f8wyertuus9r20284ej0asrs085case3kn][0 0 0 0 0 0 0 1][fd1af8cec6c67fcf156f1b61fdf91ebc04d05484d007436e75342fc05bbff35a] The Claim hash identifies a unique event, for example it would have a event nonce, a sender and a receiver. Or an event nonce and a batch nonce. But the Claim is stored indexed with the claimer key to make sure that it is unique.

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable for auth module

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers concrete types on the Amino codec

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

RegisterInterfaces regiesteres the interfaces for the proto stuff

func RegisterMsgHandler

func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterMsgHandler registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterMsgHandlerClient

func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error

RegisterMsgHandlerClient registers the http handlers for service Msg to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "MsgClient" to call the correct interceptors.

func RegisterMsgHandlerFromEndpoint

func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterMsgHandlerServer

func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error

RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". UnaryRPC :call MsgServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead.

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func UInt64Bytes

func UInt64Bytes(n uint64) []byte

UInt64Bytes uses the SDK byte marshaling to encode a uint64

func UInt64FromBytes

func UInt64FromBytes(s []byte) uint64

UInt64FromBytes create uint from binary big endian representation

func UInt64FromString

func UInt64FromString(s string) (uint64, error)

UInt64FromString to parse out a uint64 for a nonce

Types

type Attestation

type Attestation struct {
	Epoch     uint64   `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
	Observed  bool     `protobuf:"varint,2,opt,name=observed,proto3" json:"observed,omitempty"`
	Votes     []string `protobuf:"bytes,3,rep,name=votes,proto3" json:"votes,omitempty"`
	ClaimHash []byte   `protobuf:"bytes,4,opt,name=claim_hash,json=claimHash,proto3" json:"claim_hash,omitempty"`
	Height    uint64   `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"`
}

Attestation is an aggregate of `claims` that eventually becomes `observed` by all orchestrators EVENT_NONCE: EventNonce a nonce provided by the peggy contract that is unique per event fired These event nonces must be relayed in order. This is a correctness issue, if relaying out of order transaction replay attacks become possible OBSERVED: Observed indicates that >67% of validators have attested to the event, and that the event should be executed by the peggy state machine

The actual content of the claims is passed in with the transaction making the claim and then passed through the call stack alongside the attestation while it is processed the key in which the attestation is stored is keyed on the exact details of the claim but there is no reason to store those exact details becuause the next message sender will kindly provide you with them.

func (*Attestation) Descriptor

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

func (*Attestation) GetClaimHash

func (m *Attestation) GetClaimHash() []byte

func (*Attestation) GetEpoch

func (m *Attestation) GetEpoch() uint64

func (*Attestation) GetHeight

func (m *Attestation) GetHeight() uint64

func (*Attestation) GetObserved

func (m *Attestation) GetObserved() bool

func (*Attestation) GetVotes

func (m *Attestation) GetVotes() []string

func (*Attestation) Marshal

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

func (*Attestation) MarshalTo

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

func (*Attestation) MarshalToSizedBuffer

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

func (*Attestation) ProtoMessage

func (*Attestation) ProtoMessage()

func (*Attestation) Reset

func (m *Attestation) Reset()

func (*Attestation) Size

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

func (*Attestation) String

func (m *Attestation) String() string

func (*Attestation) Unmarshal

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

func (*Attestation) XXX_DiscardUnknown

func (m *Attestation) XXX_DiscardUnknown()

func (*Attestation) XXX_Marshal

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

func (*Attestation) XXX_Merge

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

func (*Attestation) XXX_Size

func (m *Attestation) XXX_Size() int

func (*Attestation) XXX_Unmarshal

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

type BankKeeper

type BankKeeper 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, name string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
}

BankKeeper defines the expected bank keeper methods

type Claim

type Claim interface {
	GetEpoch() uint64
	GetClaimer() sdk.AccAddress
	GetType() ClaimType
	ValidateBasic() error
	ClaimHash() []byte
}

Claim represents a claim

type ClaimType

type ClaimType int32

ClaimType is the cosmos type of an event from the counterpart chain that can be handled

const (
	CLAIM_TYPE_UNKNOWN ClaimType = 0
	CLAIM_TYPE_PRICE   ClaimType = 1
	CLAIM_TYPE_HOLDER  ClaimType = 2
)

func (ClaimType) EnumDescriptor

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

func (ClaimType) String

func (x ClaimType) String() string

type Epoch

type Epoch struct {
	Nonce uint64  `protobuf:"varint,1,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Votes []*Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"`
}

func (*Epoch) Descriptor

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

func (*Epoch) GetNonce

func (m *Epoch) GetNonce() uint64

func (*Epoch) GetVotes

func (m *Epoch) GetVotes() []*Vote

func (*Epoch) Marshal

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

func (*Epoch) MarshalTo

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

func (*Epoch) MarshalToSizedBuffer

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

func (*Epoch) ProtoMessage

func (*Epoch) ProtoMessage()

func (*Epoch) Reset

func (m *Epoch) Reset()

func (*Epoch) Size

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

func (*Epoch) String

func (m *Epoch) String() string

func (*Epoch) Unmarshal

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

func (*Epoch) XXX_DiscardUnknown

func (m *Epoch) XXX_DiscardUnknown()

func (*Epoch) XXX_Marshal

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

func (*Epoch) XXX_Merge

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

func (*Epoch) XXX_Size

func (m *Epoch) XXX_Size() int

func (*Epoch) XXX_Unmarshal

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

type GenericClaim

type GenericClaim struct {
	Epoch        uint64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
	ClaimType    int32  `protobuf:"varint,2,opt,name=claim_type,json=claimType,proto3" json:"claim_type,omitempty"`
	Hash         []byte `protobuf:"bytes,3,opt,name=hash,proto3" json:"hash,omitempty"`
	EventClaimer string `protobuf:"bytes,4,opt,name=event_claimer,json=eventClaimer,proto3" json:"event_claimer,omitempty"`
	// Types that are valid to be assigned to Claim:
	//	*GenericClaim_PriceClaim
	//	*GenericClaim_HoldersClaim
	Claim isGenericClaim_Claim `protobuf_oneof:"claim"`
}

It's difficult to serialize and deserialize interfaces, instead we can make this struct that stores all the data the interface requires and use it to store and then re-create a interface object with all the same properties.

func GenericClaimFromInterface

func GenericClaimFromInterface(claim Claim) (*GenericClaim, error)

func (*GenericClaim) ClaimHash

func (e *GenericClaim) ClaimHash() []byte

func (*GenericClaim) Descriptor

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

func (*GenericClaim) GetClaim

func (m *GenericClaim) GetClaim() isGenericClaim_Claim

func (*GenericClaim) GetClaimType

func (m *GenericClaim) GetClaimType() int32

func (*GenericClaim) GetClaimer

func (e *GenericClaim) GetClaimer() sdk.AccAddress

func (*GenericClaim) GetEpoch

func (m *GenericClaim) GetEpoch() uint64

func (*GenericClaim) GetEventClaimer

func (m *GenericClaim) GetEventClaimer() string

func (*GenericClaim) GetHash

func (m *GenericClaim) GetHash() []byte

func (*GenericClaim) GetHoldersClaim

func (m *GenericClaim) GetHoldersClaim() *MsgHoldersClaim

func (*GenericClaim) GetPriceClaim

func (m *GenericClaim) GetPriceClaim() *MsgPriceClaim

func (*GenericClaim) GetType

func (e *GenericClaim) GetType() ClaimType

func (*GenericClaim) Marshal

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

func (*GenericClaim) MarshalTo

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

func (*GenericClaim) MarshalToSizedBuffer

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

func (*GenericClaim) ProtoMessage

func (*GenericClaim) ProtoMessage()

func (*GenericClaim) Reset

func (m *GenericClaim) Reset()

func (*GenericClaim) Size

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

func (*GenericClaim) String

func (m *GenericClaim) String() string

func (*GenericClaim) Unmarshal

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

func (*GenericClaim) ValidateBasic

func (e *GenericClaim) ValidateBasic() error

by the time anything is turned into a generic claim it has already been validated

func (*GenericClaim) XXX_DiscardUnknown

func (m *GenericClaim) XXX_DiscardUnknown()

func (*GenericClaim) XXX_Marshal

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

func (*GenericClaim) XXX_Merge

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

func (*GenericClaim) XXX_OneofWrappers

func (*GenericClaim) XXX_OneofWrappers() []interface{}

XXX_OneofWrappers is for the internal use of the proto package.

func (*GenericClaim) XXX_Size

func (m *GenericClaim) XXX_Size() int

func (*GenericClaim) XXX_Unmarshal

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

type GenericClaim_HoldersClaim

type GenericClaim_HoldersClaim struct {
	HoldersClaim *MsgHoldersClaim `protobuf:"bytes,6,opt,name=holders_claim,json=holdersClaim,proto3,oneof" json:"holders_claim,omitempty"`
}

func (*GenericClaim_HoldersClaim) MarshalTo

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

func (*GenericClaim_HoldersClaim) MarshalToSizedBuffer

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

func (*GenericClaim_HoldersClaim) Size

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

type GenericClaim_PriceClaim

type GenericClaim_PriceClaim struct {
	PriceClaim *MsgPriceClaim `protobuf:"bytes,5,opt,name=price_claim,json=priceClaim,proto3,oneof" json:"price_claim,omitempty"`
}

func (*GenericClaim_PriceClaim) MarshalTo

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

func (*GenericClaim_PriceClaim) MarshalToSizedBuffer

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

func (*GenericClaim_PriceClaim) Size

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

type GenesisState

type GenesisState struct {
	Params  *Params  `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
	Prices  *Prices  `protobuf:"bytes,2,opt,name=prices,proto3" json:"prices,omitempty"`
	Holders *Holders `protobuf:"bytes,3,opt,name=holders,proto3" json:"holders,omitempty"`
}

GenesisState struct

func DefaultGenesisState

func DefaultGenesisState() *GenesisState

DefaultGenesisState returns empty genesis state TODO: set some better defaults here

func (*GenesisState) Descriptor

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

func (*GenesisState) GetHolders

func (m *GenesisState) GetHolders() *Holders

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() *Params

func (*GenesisState) GetPrices

func (m *GenesisState) GetPrices() *Prices

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) ValidateBasic

func (s GenesisState) ValidateBasic() error

ValidateBasic validates genesis state by looping through the params and calling their validation functions

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type Holder

type Holder struct {
	Address string                                 `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	Value   github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"value"`
}

func (*Holder) Descriptor

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

func (*Holder) GetAddress

func (m *Holder) GetAddress() string

func (*Holder) Marshal

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

func (*Holder) MarshalTo

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

func (*Holder) MarshalToSizedBuffer

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

func (*Holder) ProtoMessage

func (*Holder) ProtoMessage()

func (*Holder) Reset

func (m *Holder) Reset()

func (*Holder) Size

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

func (*Holder) String

func (m *Holder) String() string

func (*Holder) Unmarshal

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

func (*Holder) XXX_DiscardUnknown

func (m *Holder) XXX_DiscardUnknown()

func (*Holder) XXX_Marshal

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

func (*Holder) XXX_Merge

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

func (*Holder) XXX_Size

func (m *Holder) XXX_Size() int

func (*Holder) XXX_Unmarshal

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

type Holders

type Holders struct {
	List []*Holder `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
}

func (*Holders) Descriptor

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

func (*Holders) GetList

func (m *Holders) GetList() []*Holder

func (*Holders) Marshal

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

func (*Holders) MarshalTo

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

func (*Holders) MarshalToSizedBuffer

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

func (*Holders) ProtoMessage

func (*Holders) ProtoMessage()

func (*Holders) Reset

func (m *Holders) Reset()

func (*Holders) Size

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

func (*Holders) String

func (m *Holders) String() string

func (*Holders) Unmarshal

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

func (*Holders) XXX_DiscardUnknown

func (m *Holders) XXX_DiscardUnknown()

func (*Holders) XXX_Marshal

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

func (*Holders) XXX_Merge

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

func (*Holders) XXX_Size

func (m *Holders) XXX_Size() int

func (*Holders) XXX_Unmarshal

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

type Mhub2Keeper

type Mhub2Keeper interface {
	GetTokenInfos(sdk.Context) *types.TokenInfos
}

type MsgClient

type MsgClient interface {
	PriceClaim(ctx context.Context, in *MsgPriceClaim, opts ...grpc.CallOption) (*MsgPriceClaimResponse, error)
	HoldersClaim(ctx context.Context, in *MsgHoldersClaim, opts ...grpc.CallOption) (*MsgHoldersClaimResponse, error)
}

MsgClient is the client API for Msg service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgHoldersClaim

type MsgHoldersClaim struct {
	Epoch        uint64   `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
	Holders      *Holders `protobuf:"bytes,2,opt,name=holders,proto3" json:"holders,omitempty"`
	Orchestrator string   `protobuf:"bytes,3,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"`
}

func (*MsgHoldersClaim) ClaimHash

func (msg *MsgHoldersClaim) ClaimHash() []byte

func (*MsgHoldersClaim) Descriptor

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

func (MsgHoldersClaim) GetClaimer

func (msg MsgHoldersClaim) GetClaimer() sdk.AccAddress

func (*MsgHoldersClaim) GetEpoch

func (m *MsgHoldersClaim) GetEpoch() uint64

func (*MsgHoldersClaim) GetHolders

func (m *MsgHoldersClaim) GetHolders() *Holders

func (*MsgHoldersClaim) GetOrchestrator

func (m *MsgHoldersClaim) GetOrchestrator() string

func (MsgHoldersClaim) GetSignBytes

func (msg MsgHoldersClaim) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgHoldersClaim) GetSigners

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

GetSigners defines whose signature is required

func (*MsgHoldersClaim) GetType

func (e *MsgHoldersClaim) GetType() ClaimType

GetType returns the type of the claim

func (*MsgHoldersClaim) Marshal

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

func (*MsgHoldersClaim) MarshalTo

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

func (*MsgHoldersClaim) MarshalToSizedBuffer

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

func (*MsgHoldersClaim) ProtoMessage

func (*MsgHoldersClaim) ProtoMessage()

func (*MsgHoldersClaim) Reset

func (m *MsgHoldersClaim) Reset()

func (MsgHoldersClaim) Route

func (msg MsgHoldersClaim) Route() string

Route should return the name of the module

func (*MsgHoldersClaim) Size

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

func (*MsgHoldersClaim) StabilizedClaimHash

func (msg *MsgHoldersClaim) StabilizedClaimHash() []byte

func (*MsgHoldersClaim) String

func (m *MsgHoldersClaim) String() string

func (MsgHoldersClaim) Type

func (msg MsgHoldersClaim) Type() string

Type should return the action

func (*MsgHoldersClaim) Unmarshal

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

func (*MsgHoldersClaim) ValidateBasic

func (e *MsgHoldersClaim) ValidateBasic() error

ValidateBasic performs stateless checks

func (*MsgHoldersClaim) XXX_DiscardUnknown

func (m *MsgHoldersClaim) XXX_DiscardUnknown()

func (*MsgHoldersClaim) XXX_Marshal

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

func (*MsgHoldersClaim) XXX_Merge

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

func (*MsgHoldersClaim) XXX_Size

func (m *MsgHoldersClaim) XXX_Size() int

func (*MsgHoldersClaim) XXX_Unmarshal

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

type MsgHoldersClaimResponse

type MsgHoldersClaimResponse struct {
}

func (*MsgHoldersClaimResponse) Descriptor

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

func (*MsgHoldersClaimResponse) Marshal

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

func (*MsgHoldersClaimResponse) MarshalTo

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

func (*MsgHoldersClaimResponse) MarshalToSizedBuffer

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

func (*MsgHoldersClaimResponse) ProtoMessage

func (*MsgHoldersClaimResponse) ProtoMessage()

func (*MsgHoldersClaimResponse) Reset

func (m *MsgHoldersClaimResponse) Reset()

func (*MsgHoldersClaimResponse) Size

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

func (*MsgHoldersClaimResponse) String

func (m *MsgHoldersClaimResponse) String() string

func (*MsgHoldersClaimResponse) Unmarshal

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

func (*MsgHoldersClaimResponse) XXX_DiscardUnknown

func (m *MsgHoldersClaimResponse) XXX_DiscardUnknown()

func (*MsgHoldersClaimResponse) XXX_Marshal

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

func (*MsgHoldersClaimResponse) XXX_Merge

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

func (*MsgHoldersClaimResponse) XXX_Size

func (m *MsgHoldersClaimResponse) XXX_Size() int

func (*MsgHoldersClaimResponse) XXX_Unmarshal

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

type MsgPriceClaim

type MsgPriceClaim struct {
	Epoch        uint64  `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
	Prices       *Prices `protobuf:"bytes,2,opt,name=prices,proto3" json:"prices,omitempty"`
	Orchestrator string  `protobuf:"bytes,3,opt,name=orchestrator,proto3" json:"orchestrator,omitempty"`
}

func (*MsgPriceClaim) ClaimHash

func (msg *MsgPriceClaim) ClaimHash() []byte

func (*MsgPriceClaim) Descriptor

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

func (MsgPriceClaim) GetClaimer

func (msg MsgPriceClaim) GetClaimer() sdk.AccAddress

func (*MsgPriceClaim) GetEpoch

func (m *MsgPriceClaim) GetEpoch() uint64

func (*MsgPriceClaim) GetOrchestrator

func (m *MsgPriceClaim) GetOrchestrator() string

func (*MsgPriceClaim) GetPrices

func (m *MsgPriceClaim) GetPrices() *Prices

func (MsgPriceClaim) GetSignBytes

func (msg MsgPriceClaim) GetSignBytes() []byte

GetSignBytes encodes the message for signing

func (MsgPriceClaim) GetSigners

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

GetSigners defines whose signature is required

func (*MsgPriceClaim) GetType

func (e *MsgPriceClaim) GetType() ClaimType

GetType returns the type of the claim

func (*MsgPriceClaim) Marshal

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

func (*MsgPriceClaim) MarshalTo

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

func (*MsgPriceClaim) MarshalToSizedBuffer

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

func (*MsgPriceClaim) ProtoMessage

func (*MsgPriceClaim) ProtoMessage()

func (*MsgPriceClaim) Reset

func (m *MsgPriceClaim) Reset()

func (MsgPriceClaim) Route

func (msg MsgPriceClaim) Route() string

Route should return the name of the module

func (*MsgPriceClaim) Size

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

func (*MsgPriceClaim) String

func (m *MsgPriceClaim) String() string

func (MsgPriceClaim) Type

func (msg MsgPriceClaim) Type() string

Type should return the action

func (*MsgPriceClaim) Unmarshal

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

func (*MsgPriceClaim) ValidateBasic

func (e *MsgPriceClaim) ValidateBasic() error

ValidateBasic performs stateless checks

func (*MsgPriceClaim) XXX_DiscardUnknown

func (m *MsgPriceClaim) XXX_DiscardUnknown()

func (*MsgPriceClaim) XXX_Marshal

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

func (*MsgPriceClaim) XXX_Merge

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

func (*MsgPriceClaim) XXX_Size

func (m *MsgPriceClaim) XXX_Size() int

func (*MsgPriceClaim) XXX_Unmarshal

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

type MsgPriceClaimResponse

type MsgPriceClaimResponse struct {
}

func (*MsgPriceClaimResponse) Descriptor

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

func (*MsgPriceClaimResponse) Marshal

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

func (*MsgPriceClaimResponse) MarshalTo

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

func (*MsgPriceClaimResponse) MarshalToSizedBuffer

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

func (*MsgPriceClaimResponse) ProtoMessage

func (*MsgPriceClaimResponse) ProtoMessage()

func (*MsgPriceClaimResponse) Reset

func (m *MsgPriceClaimResponse) Reset()

func (*MsgPriceClaimResponse) Size

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

func (*MsgPriceClaimResponse) String

func (m *MsgPriceClaimResponse) String() string

func (*MsgPriceClaimResponse) Unmarshal

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

func (*MsgPriceClaimResponse) XXX_DiscardUnknown

func (m *MsgPriceClaimResponse) XXX_DiscardUnknown()

func (*MsgPriceClaimResponse) XXX_Marshal

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

func (*MsgPriceClaimResponse) XXX_Merge

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

func (*MsgPriceClaimResponse) XXX_Size

func (m *MsgPriceClaimResponse) XXX_Size() int

func (*MsgPriceClaimResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	PriceClaim(context.Context, *MsgPriceClaim) (*MsgPriceClaimResponse, error)
	HoldersClaim(context.Context, *MsgHoldersClaim) (*MsgHoldersClaimResponse, error)
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
	SignedClaimsWindow            uint64                                 `protobuf:"varint,1,opt,name=signed_claims_window,json=signedClaimsWindow,proto3" json:"signed_claims_window,omitempty"`
	SlashFractionClaim            github_com_cosmos_cosmos_sdk_types.Dec `` /* 157-byte string literal not displayed */
	SlashFractionConflictingClaim github_com_cosmos_cosmos_sdk_types.Dec `` /* 192-byte string literal not displayed */
}

func DefaultParams

func DefaultParams() *Params

DefaultParams returns a copy of the default params

func (*Params) Descriptor

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

func (Params) Equal

func (p Params) Equal(p2 Params) bool

Equal returns a boolean determining if two Params types are identical.

func (*Params) GetSignedClaimsWindow

func (m *Params) GetSignedClaimsWindow() uint64

func (*Params) Marshal

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

func (*Params) MarshalTo

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

func (*Params) MarshalToSizedBuffer

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

func (*Params) ParamSetPairs

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

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs pairs of auth module's parameters.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) ValidateBasic

func (p Params) ValidateBasic() error

ValidateBasic checks that the parameters have valid values.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type Price

type Price struct {
	Name  string                                 `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Value github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=value,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"value"`
}

func (*Price) Descriptor

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

func (*Price) GetName

func (m *Price) GetName() string

func (*Price) Marshal

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

func (*Price) MarshalTo

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

func (*Price) MarshalToSizedBuffer

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

func (*Price) ProtoMessage

func (*Price) ProtoMessage()

func (*Price) Reset

func (m *Price) Reset()

func (*Price) Size

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

func (*Price) String

func (m *Price) String() string

func (*Price) Unmarshal

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

func (*Price) XXX_DiscardUnknown

func (m *Price) XXX_DiscardUnknown()

func (*Price) XXX_Marshal

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

func (*Price) XXX_Merge

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

func (*Price) XXX_Size

func (m *Price) XXX_Size() int

func (*Price) XXX_Unmarshal

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

type Prices

type Prices struct {
	List []*Price `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
}

func (*Prices) Descriptor

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

func (*Prices) GetList

func (m *Prices) GetList() []*Price

func (*Prices) Marshal

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

func (*Prices) MarshalTo

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

func (*Prices) MarshalToSizedBuffer

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

func (*Prices) ProtoMessage

func (*Prices) ProtoMessage()

func (*Prices) Reset

func (m *Prices) Reset()

func (*Prices) Size

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

func (*Prices) String

func (m *Prices) String() string

func (*Prices) Unmarshal

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

func (*Prices) XXX_DiscardUnknown

func (m *Prices) XXX_DiscardUnknown()

func (*Prices) XXX_Marshal

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

func (*Prices) XXX_Merge

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

func (*Prices) XXX_Size

func (m *Prices) XXX_Size() int

func (*Prices) XXX_Unmarshal

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

type QueryBscFeeRequest

type QueryBscFeeRequest struct {
}

func (*QueryBscFeeRequest) Descriptor

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

func (*QueryBscFeeRequest) Marshal

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

func (*QueryBscFeeRequest) MarshalTo

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

func (*QueryBscFeeRequest) MarshalToSizedBuffer

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

func (*QueryBscFeeRequest) ProtoMessage

func (*QueryBscFeeRequest) ProtoMessage()

func (*QueryBscFeeRequest) Reset

func (m *QueryBscFeeRequest) Reset()

func (*QueryBscFeeRequest) Size

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

func (*QueryBscFeeRequest) String

func (m *QueryBscFeeRequest) String() string

func (*QueryBscFeeRequest) Unmarshal

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

func (*QueryBscFeeRequest) XXX_DiscardUnknown

func (m *QueryBscFeeRequest) XXX_DiscardUnknown()

func (*QueryBscFeeRequest) XXX_Marshal

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

func (*QueryBscFeeRequest) XXX_Merge

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

func (*QueryBscFeeRequest) XXX_Size

func (m *QueryBscFeeRequest) XXX_Size() int

func (*QueryBscFeeRequest) XXX_Unmarshal

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

type QueryBscFeeResponse

type QueryBscFeeResponse struct {
	Min  github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=min,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min"`
	Fast github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=fast,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fast"`
}

func (*QueryBscFeeResponse) Descriptor

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

func (*QueryBscFeeResponse) Marshal

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

func (*QueryBscFeeResponse) MarshalTo

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

func (*QueryBscFeeResponse) MarshalToSizedBuffer

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

func (*QueryBscFeeResponse) ProtoMessage

func (*QueryBscFeeResponse) ProtoMessage()

func (*QueryBscFeeResponse) Reset

func (m *QueryBscFeeResponse) Reset()

func (*QueryBscFeeResponse) Size

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

func (*QueryBscFeeResponse) String

func (m *QueryBscFeeResponse) String() string

func (*QueryBscFeeResponse) Unmarshal

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

func (*QueryBscFeeResponse) XXX_DiscardUnknown

func (m *QueryBscFeeResponse) XXX_DiscardUnknown()

func (*QueryBscFeeResponse) XXX_Marshal

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

func (*QueryBscFeeResponse) XXX_Merge

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

func (*QueryBscFeeResponse) XXX_Size

func (m *QueryBscFeeResponse) XXX_Size() int

func (*QueryBscFeeResponse) XXX_Unmarshal

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

type QueryClient

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryCurrentEpochRequest

type QueryCurrentEpochRequest struct {
}

func (*QueryCurrentEpochRequest) Descriptor

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

func (*QueryCurrentEpochRequest) Marshal

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

func (*QueryCurrentEpochRequest) MarshalTo

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

func (*QueryCurrentEpochRequest) MarshalToSizedBuffer

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

func (*QueryCurrentEpochRequest) ProtoMessage

func (*QueryCurrentEpochRequest) ProtoMessage()

func (*QueryCurrentEpochRequest) Reset

func (m *QueryCurrentEpochRequest) Reset()

func (*QueryCurrentEpochRequest) Size

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

func (*QueryCurrentEpochRequest) String

func (m *QueryCurrentEpochRequest) String() string

func (*QueryCurrentEpochRequest) Unmarshal

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

func (*QueryCurrentEpochRequest) XXX_DiscardUnknown

func (m *QueryCurrentEpochRequest) XXX_DiscardUnknown()

func (*QueryCurrentEpochRequest) XXX_Marshal

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

func (*QueryCurrentEpochRequest) XXX_Merge

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

func (*QueryCurrentEpochRequest) XXX_Size

func (m *QueryCurrentEpochRequest) XXX_Size() int

func (*QueryCurrentEpochRequest) XXX_Unmarshal

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

type QueryCurrentEpochResponse

type QueryCurrentEpochResponse struct {
	Epoch *Epoch `protobuf:"bytes,1,opt,name=epoch,proto3" json:"epoch,omitempty"`
}

func (*QueryCurrentEpochResponse) Descriptor

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

func (*QueryCurrentEpochResponse) GetEpoch

func (m *QueryCurrentEpochResponse) GetEpoch() *Epoch

func (*QueryCurrentEpochResponse) Marshal

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

func (*QueryCurrentEpochResponse) MarshalTo

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

func (*QueryCurrentEpochResponse) MarshalToSizedBuffer

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

func (*QueryCurrentEpochResponse) ProtoMessage

func (*QueryCurrentEpochResponse) ProtoMessage()

func (*QueryCurrentEpochResponse) Reset

func (m *QueryCurrentEpochResponse) Reset()

func (*QueryCurrentEpochResponse) Size

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

func (*QueryCurrentEpochResponse) String

func (m *QueryCurrentEpochResponse) String() string

func (*QueryCurrentEpochResponse) Unmarshal

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

func (*QueryCurrentEpochResponse) XXX_DiscardUnknown

func (m *QueryCurrentEpochResponse) XXX_DiscardUnknown()

func (*QueryCurrentEpochResponse) XXX_Marshal

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

func (*QueryCurrentEpochResponse) XXX_Merge

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

func (*QueryCurrentEpochResponse) XXX_Size

func (m *QueryCurrentEpochResponse) XXX_Size() int

func (*QueryCurrentEpochResponse) XXX_Unmarshal

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

type QueryEthFeeRequest

type QueryEthFeeRequest struct {
}

func (*QueryEthFeeRequest) Descriptor

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

func (*QueryEthFeeRequest) Marshal

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

func (*QueryEthFeeRequest) MarshalTo

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

func (*QueryEthFeeRequest) MarshalToSizedBuffer

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

func (*QueryEthFeeRequest) ProtoMessage

func (*QueryEthFeeRequest) ProtoMessage()

func (*QueryEthFeeRequest) Reset

func (m *QueryEthFeeRequest) Reset()

func (*QueryEthFeeRequest) Size

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

func (*QueryEthFeeRequest) String

func (m *QueryEthFeeRequest) String() string

func (*QueryEthFeeRequest) Unmarshal

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

func (*QueryEthFeeRequest) XXX_DiscardUnknown

func (m *QueryEthFeeRequest) XXX_DiscardUnknown()

func (*QueryEthFeeRequest) XXX_Marshal

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

func (*QueryEthFeeRequest) XXX_Merge

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

func (*QueryEthFeeRequest) XXX_Size

func (m *QueryEthFeeRequest) XXX_Size() int

func (*QueryEthFeeRequest) XXX_Unmarshal

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

type QueryEthFeeResponse

type QueryEthFeeResponse struct {
	Min  github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,1,opt,name=min,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"min"`
	Fast github_com_cosmos_cosmos_sdk_types.Dec `protobuf:"bytes,2,opt,name=fast,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Dec" json:"fast"`
}

func (*QueryEthFeeResponse) Descriptor

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

func (*QueryEthFeeResponse) Marshal

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

func (*QueryEthFeeResponse) MarshalTo

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

func (*QueryEthFeeResponse) MarshalToSizedBuffer

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

func (*QueryEthFeeResponse) ProtoMessage

func (*QueryEthFeeResponse) ProtoMessage()

func (*QueryEthFeeResponse) Reset

func (m *QueryEthFeeResponse) Reset()

func (*QueryEthFeeResponse) Size

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

func (*QueryEthFeeResponse) String

func (m *QueryEthFeeResponse) String() string

func (*QueryEthFeeResponse) Unmarshal

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

func (*QueryEthFeeResponse) XXX_DiscardUnknown

func (m *QueryEthFeeResponse) XXX_DiscardUnknown()

func (*QueryEthFeeResponse) XXX_Marshal

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

func (*QueryEthFeeResponse) XXX_Merge

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

func (*QueryEthFeeResponse) XXX_Size

func (m *QueryEthFeeResponse) XXX_Size() int

func (*QueryEthFeeResponse) XXX_Unmarshal

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

type QueryHoldersRequest

type QueryHoldersRequest struct {
}

func (*QueryHoldersRequest) Descriptor

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

func (*QueryHoldersRequest) Marshal

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

func (*QueryHoldersRequest) MarshalTo

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

func (*QueryHoldersRequest) MarshalToSizedBuffer

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

func (*QueryHoldersRequest) ProtoMessage

func (*QueryHoldersRequest) ProtoMessage()

func (*QueryHoldersRequest) Reset

func (m *QueryHoldersRequest) Reset()

func (*QueryHoldersRequest) Size

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

func (*QueryHoldersRequest) String

func (m *QueryHoldersRequest) String() string

func (*QueryHoldersRequest) Unmarshal

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

func (*QueryHoldersRequest) XXX_DiscardUnknown

func (m *QueryHoldersRequest) XXX_DiscardUnknown()

func (*QueryHoldersRequest) XXX_Marshal

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

func (*QueryHoldersRequest) XXX_Merge

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

func (*QueryHoldersRequest) XXX_Size

func (m *QueryHoldersRequest) XXX_Size() int

func (*QueryHoldersRequest) XXX_Unmarshal

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

type QueryHoldersResponse

type QueryHoldersResponse struct {
	Holders *Holders `protobuf:"bytes,1,opt,name=holders,proto3" json:"holders,omitempty"`
}

func (*QueryHoldersResponse) Descriptor

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

func (*QueryHoldersResponse) GetHolders

func (m *QueryHoldersResponse) GetHolders() *Holders

func (*QueryHoldersResponse) Marshal

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

func (*QueryHoldersResponse) MarshalTo

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

func (*QueryHoldersResponse) MarshalToSizedBuffer

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

func (*QueryHoldersResponse) ProtoMessage

func (*QueryHoldersResponse) ProtoMessage()

func (*QueryHoldersResponse) Reset

func (m *QueryHoldersResponse) Reset()

func (*QueryHoldersResponse) Size

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

func (*QueryHoldersResponse) String

func (m *QueryHoldersResponse) String() string

func (*QueryHoldersResponse) Unmarshal

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

func (*QueryHoldersResponse) XXX_DiscardUnknown

func (m *QueryHoldersResponse) XXX_DiscardUnknown()

func (*QueryHoldersResponse) XXX_Marshal

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

func (*QueryHoldersResponse) XXX_Merge

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

func (*QueryHoldersResponse) XXX_Size

func (m *QueryHoldersResponse) XXX_Size() int

func (*QueryHoldersResponse) XXX_Unmarshal

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

type QueryPricesRequest

type QueryPricesRequest struct {
}

func (*QueryPricesRequest) Descriptor

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

func (*QueryPricesRequest) Marshal

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

func (*QueryPricesRequest) MarshalTo

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

func (*QueryPricesRequest) MarshalToSizedBuffer

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

func (*QueryPricesRequest) ProtoMessage

func (*QueryPricesRequest) ProtoMessage()

func (*QueryPricesRequest) Reset

func (m *QueryPricesRequest) Reset()

func (*QueryPricesRequest) Size

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

func (*QueryPricesRequest) String

func (m *QueryPricesRequest) String() string

func (*QueryPricesRequest) Unmarshal

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

func (*QueryPricesRequest) XXX_DiscardUnknown

func (m *QueryPricesRequest) XXX_DiscardUnknown()

func (*QueryPricesRequest) XXX_Marshal

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

func (*QueryPricesRequest) XXX_Merge

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

func (*QueryPricesRequest) XXX_Size

func (m *QueryPricesRequest) XXX_Size() int

func (*QueryPricesRequest) XXX_Unmarshal

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

type QueryPricesResponse

type QueryPricesResponse struct {
	Prices *Prices `protobuf:"bytes,1,opt,name=prices,proto3" json:"prices,omitempty"`
}

func (*QueryPricesResponse) Descriptor

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

func (*QueryPricesResponse) GetPrices

func (m *QueryPricesResponse) GetPrices() *Prices

func (*QueryPricesResponse) Marshal

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

func (*QueryPricesResponse) MarshalTo

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

func (*QueryPricesResponse) MarshalToSizedBuffer

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

func (*QueryPricesResponse) ProtoMessage

func (*QueryPricesResponse) ProtoMessage()

func (*QueryPricesResponse) Reset

func (m *QueryPricesResponse) Reset()

func (*QueryPricesResponse) Size

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

func (*QueryPricesResponse) String

func (m *QueryPricesResponse) String() string

func (*QueryPricesResponse) Unmarshal

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

func (*QueryPricesResponse) XXX_DiscardUnknown

func (m *QueryPricesResponse) XXX_DiscardUnknown()

func (*QueryPricesResponse) XXX_Marshal

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

func (*QueryPricesResponse) XXX_Merge

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

func (*QueryPricesResponse) XXX_Size

func (m *QueryPricesResponse) XXX_Size() int

func (*QueryPricesResponse) XXX_Unmarshal

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

type StakingKeeper

type StakingKeeper interface {
	GetBondedValidatorsByPower(ctx sdk.Context) []stakingtypes.Validator
	GetLastValidatorPower(ctx sdk.Context, operator sdk.ValAddress) int64
	GetLastTotalPower(ctx sdk.Context) (power sdk.Int)
	IterateValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool))
	IterateBondedValidatorsByPower(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool))
	IterateLastValidators(sdk.Context, func(index int64, validator stakingtypes.ValidatorI) (stop bool))
	Validator(sdk.Context, sdk.ValAddress) stakingtypes.ValidatorI
	ValidatorByConsAddr(sdk.Context, sdk.ConsAddress) stakingtypes.ValidatorI
	Slash(sdk.Context, sdk.ConsAddress, int64, int64, sdk.Dec)
	Jail(sdk.Context, sdk.ConsAddress)
}

StakingKeeper defines the expected staking keeper methods

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) HoldersClaim

func (*UnimplementedMsgServer) PriceClaim

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) BscFee

func (*UnimplementedQueryServer) CurrentEpoch

func (*UnimplementedQueryServer) EthFee

func (*UnimplementedQueryServer) Holders

func (*UnimplementedQueryServer) Prices

type Vote

type Vote struct {
	Oracle       string           `protobuf:"bytes,1,opt,name=oracle,proto3" json:"oracle,omitempty"`
	PriceClaim   *MsgPriceClaim   `protobuf:"bytes,2,opt,name=price_claim,json=priceClaim,proto3" json:"price_claim,omitempty"`
	HoldersClaim *MsgHoldersClaim `protobuf:"bytes,3,opt,name=holders_claim,json=holdersClaim,proto3" json:"holders_claim,omitempty"`
}

func (*Vote) Descriptor

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

func (*Vote) GetHoldersClaim

func (m *Vote) GetHoldersClaim() *MsgHoldersClaim

func (*Vote) GetOracle

func (m *Vote) GetOracle() string

func (*Vote) GetPriceClaim

func (m *Vote) GetPriceClaim() *MsgPriceClaim

func (*Vote) Marshal

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

func (*Vote) MarshalTo

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

func (*Vote) MarshalToSizedBuffer

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

func (*Vote) ProtoMessage

func (*Vote) ProtoMessage()

func (*Vote) Reset

func (m *Vote) Reset()

func (*Vote) Size

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

func (*Vote) String

func (m *Vote) String() string

func (*Vote) Unmarshal

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

func (*Vote) XXX_DiscardUnknown

func (m *Vote) XXX_DiscardUnknown()

func (*Vote) XXX_Marshal

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

func (*Vote) XXX_Merge

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

func (*Vote) XXX_Size

func (m *Vote) XXX_Size() int

func (*Vote) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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