types

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeClaim = "claim"

	AttributeKeyActionType = "action"
)

claim module event types

View Source
const (
	// ModuleName defines the module name
	ModuleName = "claims"

	// StoreKey defines the primary module store key
	StoreKey = ModuleName

	// RouterKey is the message route for claims
	RouterKey = ModuleName
)

Variables

View Source
var (
	ErrInvalidLengthClaims        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowClaims          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupClaims = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrClaimsRecordNotFound = sdkerrors.Register(ModuleName, 2, "claim record not found")
	ErrInvalidAction        = sdkerrors.Register(ModuleName, 3, "invalid claim action type")
)

errors

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 (
	// DefaultClaimsDenom is aevmos
	DefaultClaimsDenom = "aevmos"
	// DefaultDurationUntilDecay is 1 month = 30.4375 days
	DefaultDurationUntilDecay = 2629800 * time.Second
	// DefaultDurationOfDecay is 2 months
	DefaultDurationOfDecay = 2 * DefaultDurationUntilDecay
	// DefaultChannels defines the list of default IBC authorized channels that can perform
	// IBC address attestations in order to migrate claimable amounts. By default
	// only Osmosis and Cosmos Hub channels are authorized
	DefaultAuthorizedChannels = []string{
		"channel-0",
		"channel-3",
	}
	DefaultEVMChannels = []string{
		"channel-2",
	}
)
View Source
var (
	ParamStoreKeyEnableClaims       = []byte("EnableClaims")
	ParamStoreKeyAirdropStartTime   = []byte("AirdropStartTime")
	ParamStoreKeyDurationUntilDecay = []byte("DurationUntilDecay")
	ParamStoreKeyDurationOfDecay    = []byte("DurationOfDecay")
	ParamStoreKeyClaimsDenom        = []byte("ClaimsDenom")
	ParamStoreKeyAuthorizedChannels = []byte("AuthorizedChannels")
	ParamStoreKeyEVMChannels        = []byte("EVMChannels")
)

Parameter store key

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 Action_name = map[int32]string{
	0: "ACTION_UNSPECIFIED",
	1: "ACTION_VOTE",
	2: "ACTION_DELEGATE",
	3: "ACTION_EVM",
	4: "ACTION_IBC_TRANSFER",
}
View Source
var Action_value = map[string]int32{
	"ACTION_UNSPECIFIED":  0,
	"ACTION_VOTE":         1,
	"ACTION_DELEGATE":     2,
	"ACTION_EVM":          3,
	"ACTION_IBC_TRANSFER": 4,
}
View Source
var (
	KeyPrefixClaimsRecords = []byte{prefixClaimsRecords}
)

KVStore key prefixes

Functions

func ParamKeyTable

func ParamKeyTable() paramtypes.KeyTable

ParamKeyTable returns the parameter key table.

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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateChannels

func ValidateChannels(i interface{}) error

ValidateChannels checks if channels ids are valid

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAddress(name string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, name string) authtypes.ModuleAccountI
	SetModuleAccount(ctx sdk.Context, macc authtypes.ModuleAccountI)
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI
	GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)
	RemoveAccount(ctx sdk.Context, account authtypes.AccountI)
}

AccountKeeper defines the expected account keeper used for simulations (noalias)

type Action

type Action int32

Action defines the list of available actions to claim the airdrop tokens.

const (
	// UNSPECIFIED defines an invalid action.
	ActionUnspecified Action = 0
	// VOTE defines a proposal vote.
	ActionVote Action = 1
	// DELEGATE defines an staking delegation.
	ActionDelegate Action = 2
	// EVM defines an EVM transaction.
	ActionEVM Action = 3
	// IBC Transfer defines a fungible token transfer transaction via IBC.
	ActionIBCTransfer Action = 4
)

func (Action) EnumDescriptor

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

func (Action) String

func (x Action) String() string

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToModule(ctx sdk.Context, senderPool, recipientPool string, amt sdk.Coins) error
	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
}

BankKeeper defines the banking contract that must be fulfilled when creating a x/claims keeper.

type Claim

type Claim struct {
	// action enum
	Action Action `protobuf:"varint,1,opt,name=action,proto3,enum=evmos.claims.v1.Action" json:"action,omitempty"`
	// true if the action has been completed
	Completed bool `protobuf:"varint,2,opt,name=completed,proto3" json:"completed,omitempty"`
	// claimable token amount for the action. Zero if completed
	ClaimableAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 146-byte string literal not displayed */
}

Claim marks defines the action, completed flag and the remaining claimable amount for a given user. This is only used during client queries.

func (*Claim) Descriptor

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

func (*Claim) GetAction

func (m *Claim) GetAction() Action

func (*Claim) GetCompleted

func (m *Claim) GetCompleted() bool

func (*Claim) Marshal

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

func (*Claim) MarshalTo

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

func (*Claim) MarshalToSizedBuffer

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

func (*Claim) ProtoMessage

func (*Claim) ProtoMessage()

func (*Claim) Reset

func (m *Claim) Reset()

func (*Claim) Size

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

func (*Claim) String

func (m *Claim) String() string

func (*Claim) Unmarshal

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

func (*Claim) XXX_DiscardUnknown

func (m *Claim) XXX_DiscardUnknown()

func (*Claim) XXX_Marshal

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

func (*Claim) XXX_Merge

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

func (*Claim) XXX_Size

func (m *Claim) XXX_Size() int

func (*Claim) XXX_Unmarshal

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

type ClaimsRecord

type ClaimsRecord struct {
	// total initial claimable amount for the user
	InitialClaimableAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 169-byte string literal not displayed */
	// slice of the available actions completed
	ActionsCompleted []bool `protobuf:"varint,2,rep,packed,name=actions_completed,json=actionsCompleted,proto3" json:"actions_completed,omitempty"`
}

ClaimsRecord defines the initial claimable airdrop amount and the list of completed actions to claim the tokens.

func NewClaimsRecord

func NewClaimsRecord(initialClaimableAmt sdk.Int) ClaimsRecord

NewClaimsRecord creates a new claim record instance

func (*ClaimsRecord) ClaimAction

func (cr *ClaimsRecord) ClaimAction(action Action)

ClaimAction marks the given action as completed. It performs a no-op if the action is invalid or if the ActionsCompleted slice has an invalid length.

func (*ClaimsRecord) Descriptor

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

func (*ClaimsRecord) GetActionsCompleted

func (m *ClaimsRecord) GetActionsCompleted() []bool

func (ClaimsRecord) HasClaimedAction

func (cr ClaimsRecord) HasClaimedAction(action Action) bool

HasClaimedAction checks if the user has claimed a given action. It also returns false if the action is invalid or if the ActionsCompleted slice has an invalid length.

func (ClaimsRecord) HasClaimedAll

func (cr ClaimsRecord) HasClaimedAll() bool

HasClaimedAll returns true if the user has claimed all the rewards from the available actions

func (ClaimsRecord) HasClaimedAny

func (cr ClaimsRecord) HasClaimedAny() bool

HasClaimedAny returns true if the user has claimed at least one reward from the available actions

func (*ClaimsRecord) Marshal

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

func (*ClaimsRecord) MarshalTo

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

func (*ClaimsRecord) MarshalToSizedBuffer

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

func (*ClaimsRecord) ProtoMessage

func (*ClaimsRecord) ProtoMessage()

func (*ClaimsRecord) Reset

func (m *ClaimsRecord) Reset()

func (*ClaimsRecord) Size

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

func (*ClaimsRecord) String

func (m *ClaimsRecord) String() string

func (*ClaimsRecord) Unmarshal

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

func (ClaimsRecord) Validate

func (cr ClaimsRecord) Validate() error

Validate performs a stateless validation of the fields

func (*ClaimsRecord) XXX_DiscardUnknown

func (m *ClaimsRecord) XXX_DiscardUnknown()

func (*ClaimsRecord) XXX_Marshal

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

func (*ClaimsRecord) XXX_Merge

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

func (*ClaimsRecord) XXX_Size

func (m *ClaimsRecord) XXX_Size() int

func (*ClaimsRecord) XXX_Unmarshal

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

type ClaimsRecordAddress

type ClaimsRecordAddress struct {
	// bech32 or hex address of claim user
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// total initial claimable amount for the user
	InitialClaimableAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 169-byte string literal not displayed */
	// slice of the available actions completed
	ActionsCompleted []bool `protobuf:"varint,3,rep,packed,name=actions_completed,json=actionsCompleted,proto3" json:"actions_completed,omitempty"`
}

ClaimsRecordAddress is the metadata of claims data per address

func NewClaimsRecordAddress

func NewClaimsRecordAddress(address sdk.AccAddress, initialClaimableAmt sdk.Int) ClaimsRecordAddress

NewClaimsRecordAddress creates a new claim record instance

func (*ClaimsRecordAddress) Descriptor

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

func (*ClaimsRecordAddress) GetActionsCompleted

func (m *ClaimsRecordAddress) GetActionsCompleted() []bool

func (*ClaimsRecordAddress) GetAddress

func (m *ClaimsRecordAddress) GetAddress() string

func (*ClaimsRecordAddress) Marshal

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

func (*ClaimsRecordAddress) MarshalTo

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

func (*ClaimsRecordAddress) MarshalToSizedBuffer

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

func (*ClaimsRecordAddress) ProtoMessage

func (*ClaimsRecordAddress) ProtoMessage()

func (*ClaimsRecordAddress) Reset

func (m *ClaimsRecordAddress) Reset()

func (*ClaimsRecordAddress) Size

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

func (*ClaimsRecordAddress) String

func (m *ClaimsRecordAddress) String() string

func (*ClaimsRecordAddress) Unmarshal

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

func (ClaimsRecordAddress) Validate

func (cra ClaimsRecordAddress) Validate() error

Validate performs a stateless validation of the fields

func (*ClaimsRecordAddress) XXX_DiscardUnknown

func (m *ClaimsRecordAddress) XXX_DiscardUnknown()

func (*ClaimsRecordAddress) XXX_Marshal

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

func (*ClaimsRecordAddress) XXX_Merge

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

func (*ClaimsRecordAddress) XXX_Size

func (m *ClaimsRecordAddress) XXX_Size() int

func (*ClaimsRecordAddress) XXX_Unmarshal

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

type DistrKeeper

type DistrKeeper interface {
	FundCommunityPool(ctx sdk.Context, amount sdk.Coins, sender sdk.AccAddress) error
}

DistrKeeper is the keeper of the distribution store

type GenesisState

type GenesisState struct {
	// params defines all the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// list of claim records with the corresponding airdrop recipient
	ClaimsRecords []ClaimsRecordAddress `protobuf:"bytes,2,rep,name=claims_records,json=claimsRecords,proto3" json:"claims_records"`
}

GenesisState defines the claims module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default claims module genesis state

func GetGenesisStateFromAppState

func GetGenesisStateFromAppState(cdc codec.JSONCodec, appState map[string]json.RawMessage) *GenesisState

GetGenesisStateFromAppState returns x/claims GenesisState given raw application genesis state.

func (*GenesisState) Descriptor

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

func (*GenesisState) GetClaimsRecords

func (m *GenesisState) GetClaimsRecords() []ClaimsRecordAddress

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

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) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

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 Params

type Params struct {
	// enable claiming process
	EnableClaims bool `protobuf:"varint,1,opt,name=enable_claims,json=enableClaims,proto3" json:"enable_claims,omitempty"`
	// timestamp of the airdrop start
	AirdropStartTime time.Time `protobuf:"bytes,2,opt,name=airdrop_start_time,json=airdropStartTime,proto3,stdtime" json:"airdrop_start_time"`
	// duration until decay of claimable tokens begin
	DurationUntilDecay time.Duration `protobuf:"bytes,3,opt,name=duration_until_decay,json=durationUntilDecay,proto3,stdduration" json:"duration_until_decay"`
	// duration of the token claim decay period
	DurationOfDecay time.Duration `protobuf:"bytes,4,opt,name=duration_of_decay,json=durationOfDecay,proto3,stdduration" json:"duration_of_decay"`
	// denom of claimable coin
	ClaimsDenom string `protobuf:"bytes,5,opt,name=claims_denom,json=claimsDenom,proto3" json:"claims_denom,omitempty"`
	// list of authorized channel identifiers that can perform address attestations
	// via IBC.
	AuthorizedChannels []string `protobuf:"bytes,6,rep,name=authorized_channels,json=authorizedChannels,proto3" json:"authorized_channels,omitempty"`
	// list of channel identifiers from EVM compatible chains
	EVMChannels []string `protobuf:"bytes,7,rep,name=evm_channels,json=evmChannels,proto3" json:"evm_channels,omitempty"`
}

Params defines the claims module's parameters.

func DefaultParams

func DefaultParams() Params

DefaultParams creates a parameter instance with default values for the claims module.

func NewParams

func NewParams(
	enableClaim bool,
	airdropStartTime time.Time,
	claimsDenom string,
	durationUntilDecay,
	durationOfDecay time.Duration,
	authorizedChannels,
	evmChannels []string,
) Params

NewParams creates a new Params object

func (Params) AirdropEndTime

func (p Params) AirdropEndTime() time.Time

AirdropEndTime returns the time at which no further claims will be processed.

func (Params) DecayStartTime

func (p Params) DecayStartTime() time.Time

DecayStartTime returns the time at which the Decay period starts

func (*Params) Descriptor

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

func (*Params) GetAirdropStartTime

func (m *Params) GetAirdropStartTime() time.Time

func (*Params) GetAuthorizedChannels

func (m *Params) GetAuthorizedChannels() []string

func (*Params) GetClaimsDenom

func (m *Params) GetClaimsDenom() string

func (*Params) GetDurationOfDecay

func (m *Params) GetDurationOfDecay() time.Duration

func (*Params) GetDurationUntilDecay

func (m *Params) GetDurationUntilDecay() time.Duration

func (*Params) GetEVMChannels

func (m *Params) GetEVMChannels() []string

func (*Params) GetEnableClaims

func (m *Params) GetEnableClaims() bool

func (Params) IsAuthorizedChannel

func (p Params) IsAuthorizedChannel(channel string) bool

IsAuthorizedChannel returns true if the channel provided is in the list of authorized channels

func (Params) IsClaimsActive

func (p Params) IsClaimsActive(blockTime time.Time) bool

IsClaimsActive returns true if the claiming process is active, i.e block time is after the airdrop start time and claims are enabled.

func (Params) IsEVMChannel

func (p Params) IsEVMChannel(channel string) bool

IsEVMChannel returns true if the channel provided is in the list of EVM channels

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 returns the parameter set pairs.

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) Validate

func (p Params) Validate() error

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 QueryClaimsRecordRequest

type QueryClaimsRecordRequest struct {
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

QueryClaimsRecordRequest is the request type for the Query/ClaimsRecord RPC method.

func (*QueryClaimsRecordRequest) Descriptor

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

func (*QueryClaimsRecordRequest) GetAddress

func (m *QueryClaimsRecordRequest) GetAddress() string

func (*QueryClaimsRecordRequest) Marshal

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

func (*QueryClaimsRecordRequest) MarshalTo

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

func (*QueryClaimsRecordRequest) MarshalToSizedBuffer

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

func (*QueryClaimsRecordRequest) ProtoMessage

func (*QueryClaimsRecordRequest) ProtoMessage()

func (*QueryClaimsRecordRequest) Reset

func (m *QueryClaimsRecordRequest) Reset()

func (*QueryClaimsRecordRequest) Size

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

func (*QueryClaimsRecordRequest) String

func (m *QueryClaimsRecordRequest) String() string

func (*QueryClaimsRecordRequest) Unmarshal

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

func (*QueryClaimsRecordRequest) XXX_DiscardUnknown

func (m *QueryClaimsRecordRequest) XXX_DiscardUnknown()

func (*QueryClaimsRecordRequest) XXX_Marshal

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

func (*QueryClaimsRecordRequest) XXX_Merge

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

func (*QueryClaimsRecordRequest) XXX_Size

func (m *QueryClaimsRecordRequest) XXX_Size() int

func (*QueryClaimsRecordRequest) XXX_Unmarshal

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

type QueryClaimsRecordResponse

type QueryClaimsRecordResponse struct {
	// total initial claimable amount for the user
	InitialClaimableAmount github_com_cosmos_cosmos_sdk_types.Int `` /* 169-byte string literal not displayed */
	Claims                 []Claim                                `protobuf:"bytes,2,rep,name=claims,proto3" json:"claims"`
}

QueryClaimsRecordResponse is the response type for the Query/ClaimsRecord RPC method.

func (*QueryClaimsRecordResponse) Descriptor

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

func (*QueryClaimsRecordResponse) GetClaims

func (m *QueryClaimsRecordResponse) GetClaims() []Claim

func (*QueryClaimsRecordResponse) Marshal

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

func (*QueryClaimsRecordResponse) MarshalTo

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

func (*QueryClaimsRecordResponse) MarshalToSizedBuffer

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

func (*QueryClaimsRecordResponse) ProtoMessage

func (*QueryClaimsRecordResponse) ProtoMessage()

func (*QueryClaimsRecordResponse) Reset

func (m *QueryClaimsRecordResponse) Reset()

func (*QueryClaimsRecordResponse) Size

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

func (*QueryClaimsRecordResponse) String

func (m *QueryClaimsRecordResponse) String() string

func (*QueryClaimsRecordResponse) Unmarshal

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

func (*QueryClaimsRecordResponse) XXX_DiscardUnknown

func (m *QueryClaimsRecordResponse) XXX_DiscardUnknown()

func (*QueryClaimsRecordResponse) XXX_Marshal

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

func (*QueryClaimsRecordResponse) XXX_Merge

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

func (*QueryClaimsRecordResponse) XXX_Size

func (m *QueryClaimsRecordResponse) XXX_Size() int

func (*QueryClaimsRecordResponse) XXX_Unmarshal

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

type QueryClaimsRecordsRequest

type QueryClaimsRecordsRequest struct {
	// pagination defines an optional pagination for the request.
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryClaimsRecordsRequest is the request type for the Query/ClaimsRecords RPC method.

func (*QueryClaimsRecordsRequest) Descriptor

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

func (*QueryClaimsRecordsRequest) GetPagination

func (m *QueryClaimsRecordsRequest) GetPagination() *query.PageRequest

func (*QueryClaimsRecordsRequest) Marshal

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

func (*QueryClaimsRecordsRequest) MarshalTo

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

func (*QueryClaimsRecordsRequest) MarshalToSizedBuffer

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

func (*QueryClaimsRecordsRequest) ProtoMessage

func (*QueryClaimsRecordsRequest) ProtoMessage()

func (*QueryClaimsRecordsRequest) Reset

func (m *QueryClaimsRecordsRequest) Reset()

func (*QueryClaimsRecordsRequest) Size

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

func (*QueryClaimsRecordsRequest) String

func (m *QueryClaimsRecordsRequest) String() string

func (*QueryClaimsRecordsRequest) Unmarshal

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

func (*QueryClaimsRecordsRequest) XXX_DiscardUnknown

func (m *QueryClaimsRecordsRequest) XXX_DiscardUnknown()

func (*QueryClaimsRecordsRequest) XXX_Marshal

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

func (*QueryClaimsRecordsRequest) XXX_Merge

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

func (*QueryClaimsRecordsRequest) XXX_Size

func (m *QueryClaimsRecordsRequest) XXX_Size() int

func (*QueryClaimsRecordsRequest) XXX_Unmarshal

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

type QueryClaimsRecordsResponse

type QueryClaimsRecordsResponse struct {
	Claims []ClaimsRecordAddress `protobuf:"bytes,1,rep,name=claims,proto3" json:"claims"`
	// pagination defines the pagination in the response.
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryClaimsRecordsResponse is the response type for the Query/ClaimsRecords RPC method.

func (*QueryClaimsRecordsResponse) Descriptor

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

func (*QueryClaimsRecordsResponse) GetClaims

func (*QueryClaimsRecordsResponse) GetPagination

func (m *QueryClaimsRecordsResponse) GetPagination() *query.PageResponse

func (*QueryClaimsRecordsResponse) Marshal

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

func (*QueryClaimsRecordsResponse) MarshalTo

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

func (*QueryClaimsRecordsResponse) MarshalToSizedBuffer

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

func (*QueryClaimsRecordsResponse) ProtoMessage

func (*QueryClaimsRecordsResponse) ProtoMessage()

func (*QueryClaimsRecordsResponse) Reset

func (m *QueryClaimsRecordsResponse) Reset()

func (*QueryClaimsRecordsResponse) Size

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

func (*QueryClaimsRecordsResponse) String

func (m *QueryClaimsRecordsResponse) String() string

func (*QueryClaimsRecordsResponse) Unmarshal

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

func (*QueryClaimsRecordsResponse) XXX_DiscardUnknown

func (m *QueryClaimsRecordsResponse) XXX_DiscardUnknown()

func (*QueryClaimsRecordsResponse) XXX_Marshal

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

func (*QueryClaimsRecordsResponse) XXX_Merge

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

func (*QueryClaimsRecordsResponse) XXX_Size

func (m *QueryClaimsRecordsResponse) XXX_Size() int

func (*QueryClaimsRecordsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// TotalUnclaimed queries the total unclaimed tokens from the airdrop
	TotalUnclaimed(ctx context.Context, in *QueryTotalUnclaimedRequest, opts ...grpc.CallOption) (*QueryTotalUnclaimedResponse, error)
	// Params returns the claims module parameters
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// ClaimsRecords returns all the claims record
	ClaimsRecords(ctx context.Context, in *QueryClaimsRecordsRequest, opts ...grpc.CallOption) (*QueryClaimsRecordsResponse, error)
	// ClaimsRecord returns the claims record for a given address
	ClaimsRecord(ctx context.Context, in *QueryClaimsRecordRequest, opts ...grpc.CallOption) (*QueryClaimsRecordResponse, error)
}

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 QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest is the request type for the Query/Params RPC method.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	// params defines the parameters of the module.
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse is the response type for the Query/Params RPC method.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// TotalUnclaimed queries the total unclaimed tokens from the airdrop
	TotalUnclaimed(context.Context, *QueryTotalUnclaimedRequest) (*QueryTotalUnclaimedResponse, error)
	// Params returns the claims module parameters
	Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// ClaimsRecords returns all the claims record
	ClaimsRecords(context.Context, *QueryClaimsRecordsRequest) (*QueryClaimsRecordsResponse, error)
	// ClaimsRecord returns the claims record for a given address
	ClaimsRecord(context.Context, *QueryClaimsRecordRequest) (*QueryClaimsRecordResponse, error)
}

QueryServer is the server API for Query service.

type QueryTotalUnclaimedRequest

type QueryTotalUnclaimedRequest struct {
}

QueryTotalUnclaimedRequest is the request type for the Query/TotalUnclaimed RPC method.

func (*QueryTotalUnclaimedRequest) Descriptor

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

func (*QueryTotalUnclaimedRequest) Marshal

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

func (*QueryTotalUnclaimedRequest) MarshalTo

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

func (*QueryTotalUnclaimedRequest) MarshalToSizedBuffer

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

func (*QueryTotalUnclaimedRequest) ProtoMessage

func (*QueryTotalUnclaimedRequest) ProtoMessage()

func (*QueryTotalUnclaimedRequest) Reset

func (m *QueryTotalUnclaimedRequest) Reset()

func (*QueryTotalUnclaimedRequest) Size

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

func (*QueryTotalUnclaimedRequest) String

func (m *QueryTotalUnclaimedRequest) String() string

func (*QueryTotalUnclaimedRequest) Unmarshal

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

func (*QueryTotalUnclaimedRequest) XXX_DiscardUnknown

func (m *QueryTotalUnclaimedRequest) XXX_DiscardUnknown()

func (*QueryTotalUnclaimedRequest) XXX_Marshal

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

func (*QueryTotalUnclaimedRequest) XXX_Merge

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

func (*QueryTotalUnclaimedRequest) XXX_Size

func (m *QueryTotalUnclaimedRequest) XXX_Size() int

func (*QueryTotalUnclaimedRequest) XXX_Unmarshal

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

type QueryTotalUnclaimedResponse

type QueryTotalUnclaimedResponse struct {
	// coins define the unclaimed coins
	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"`
}

QueryTotalUnclaimedResponse is the response type for the Query/TotalUnclaimed RPC method.

func (*QueryTotalUnclaimedResponse) Descriptor

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

func (*QueryTotalUnclaimedResponse) GetCoins

func (*QueryTotalUnclaimedResponse) Marshal

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

func (*QueryTotalUnclaimedResponse) MarshalTo

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

func (*QueryTotalUnclaimedResponse) MarshalToSizedBuffer

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

func (*QueryTotalUnclaimedResponse) ProtoMessage

func (*QueryTotalUnclaimedResponse) ProtoMessage()

func (*QueryTotalUnclaimedResponse) Reset

func (m *QueryTotalUnclaimedResponse) Reset()

func (*QueryTotalUnclaimedResponse) Size

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

func (*QueryTotalUnclaimedResponse) String

func (m *QueryTotalUnclaimedResponse) String() string

func (*QueryTotalUnclaimedResponse) Unmarshal

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

func (*QueryTotalUnclaimedResponse) XXX_DiscardUnknown

func (m *QueryTotalUnclaimedResponse) XXX_DiscardUnknown()

func (*QueryTotalUnclaimedResponse) XXX_Marshal

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

func (*QueryTotalUnclaimedResponse) XXX_Merge

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

func (*QueryTotalUnclaimedResponse) XXX_Size

func (m *QueryTotalUnclaimedResponse) XXX_Size() int

func (*QueryTotalUnclaimedResponse) XXX_Unmarshal

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

type StakingKeeper

type StakingKeeper interface {
	// BondDenom - Bondable coin denomination
	BondDenom(sdk.Context) string
}

StakingKeeper expected staking keeper (noalias)

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ClaimsRecord

func (*UnimplementedQueryServer) ClaimsRecords

func (*UnimplementedQueryServer) Params

func (*UnimplementedQueryServer) TotalUnclaimed

Jump to

Keyboard shortcuts

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