types

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	ModuleName   = "airdrop"
	StoreKey     = ModuleName
	RouterKey    = ModuleName
	QuerierRoute = ModuleName
)

Variables

View Source
var (
	ErrTokenAllocCannotExceedMaxCap = errors.Register(ModuleName, 1, "token allocation cannot exceed max cap")
	ErrTimeConditionNotMet          = errors.Register(ModuleName, 2, "time condition not met")
	ErrAirdropWasOver               = errors.Register(ModuleName, 3, "airdrop was over")
	ErrUserNotEligible              = errors.Register(ModuleName, 4, "user not eligible for the airdrop")
)
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 (
	KeyAirdropInfo = []byte{0x00}
	KeyUserState   = []byte{0x01}
)
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 (
	ErrInvalidLengthTx        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTx          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)
View Source
var QuestStateType_name = map[int32]string{
	0: "QUEST_STATE_NOT_STARTED",
	1: "QUEST_STATE_CLAIMABLE",
	2: "QUEST_STATE_CLAIMED",
}
View Source
var QuestStateType_value = map[string]int32{
	"QUEST_STATE_NOT_STARTED": 0,
	"QUEST_STATE_CLAIMABLE":   1,
	"QUEST_STATE_CLAIMED":     2,
}
View Source
var QuestType_name = map[int32]string{
	0: "QUEST_NOTHING_TO_DO",
	1: "QUEST_SOCIAL",
	2: "QUEST_SN_ASSET_CLAIM",
	3: "QUEST_PROVIDE_LIQUIDITY",
	4: "QUEST_VOTE_ON_PROPOSALS",
}
View Source
var QuestType_value = map[string]int32{
	"QUEST_NOTHING_TO_DO":     0,
	"QUEST_SOCIAL":            1,
	"QUEST_SN_ASSET_CLAIM":    2,
	"QUEST_PROVIDE_LIQUIDITY": 3,
	"QUEST_VOTE_ON_PROPOSALS": 4,
}

Functions

func EmptyQuestState

func EmptyQuestState(blockTime time.Time) map[int32]*QuestState

EmptyQuestState returns initial state of quest.

func GetKeyAirdropInfo

func GetKeyAirdropInfo() []byte

func GetKeyUserState

func GetKeyUserState(user string) []byte

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers the airdrop module's types on the given LegacyAmino codec.

func RegisterInterfaces

func RegisterInterfaces(registry types.InterfaceRegistry)

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)

Types

type AirdropInfo

type AirdropInfo struct {
	// The snapshot date based for the distribution of the airdrop.
	SnapshotTimestamp time.Time `protobuf:"bytes,1,opt,name=snapshot_timestamp,json=snapshotTimestamp,proto3,stdtime" json:"snapshot_timestamp"`
	// THe time when you can claim your airdrop nova tokens.
	AirdropStartTimestamp time.Time `protobuf:"bytes,2,opt,name=airdrop_start_timestamp,json=airdropStartTimestamp,proto3,stdtime" json:"airdrop_start_timestamp"`
	// THe time when the user no longer can claim the airdrop tokens.
	AirdropEndTimestamp time.Time `protobuf:"bytes,3,opt,name=airdrop_end_timestamp,json=airdropEndTimestamp,proto3,stdtime" json:"airdrop_end_timestamp"`
	// The denom for the airdrop coin.
	AirdropDenom string `protobuf:"bytes,4,opt,name=airdrop_denom,json=airdropDenom,proto3" json:"airdrop_denom,omitempty"`
	// the number of quests user to do
	QuestsCount int32 `protobuf:"varint,5,opt,name=quests_count,json=questsCount,proto3" json:"quests_count,omitempty"`
	// controller address is responsible to check the user has performed the social quest (e.g. twitter, facebook or etc)
	ControllerAddress string `protobuf:"bytes,6,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"`
	// maximum token allocation for each user, an use cannot claim more than this amount;
	MaximumTokenAllocPerUser string `` /* 139-byte string literal not displayed */
}

AirdropInfo stores metadata related to airdrop. This includes airdrop start and end times, maximum acceptable quantity, etc.

func (*AirdropInfo) Descriptor

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

func (*AirdropInfo) GetAirdropDenom

func (m *AirdropInfo) GetAirdropDenom() string

func (*AirdropInfo) GetAirdropEndTimestamp

func (m *AirdropInfo) GetAirdropEndTimestamp() time.Time

func (*AirdropInfo) GetAirdropStartTimestamp

func (m *AirdropInfo) GetAirdropStartTimestamp() time.Time

func (*AirdropInfo) GetControllerAddress

func (m *AirdropInfo) GetControllerAddress() string

func (*AirdropInfo) GetMaximumTokenAllocPerUser

func (m *AirdropInfo) GetMaximumTokenAllocPerUser() string

func (*AirdropInfo) GetQuestsCount

func (m *AirdropInfo) GetQuestsCount() int32

func (*AirdropInfo) GetSnapshotTimestamp

func (m *AirdropInfo) GetSnapshotTimestamp() time.Time

func (*AirdropInfo) Marshal

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

func (*AirdropInfo) MarshalTo

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

func (*AirdropInfo) MarshalToSizedBuffer

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

func (*AirdropInfo) ProtoMessage

func (*AirdropInfo) ProtoMessage()

func (*AirdropInfo) Reset

func (m *AirdropInfo) Reset()

func (*AirdropInfo) Size

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

func (*AirdropInfo) String

func (m *AirdropInfo) String() string

func (*AirdropInfo) Unmarshal

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

func (*AirdropInfo) XXX_DiscardUnknown

func (m *AirdropInfo) XXX_DiscardUnknown()

func (*AirdropInfo) XXX_Marshal

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

func (*AirdropInfo) XXX_Merge

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

func (*AirdropInfo) XXX_Size

func (m *AirdropInfo) XXX_Size() int

func (*AirdropInfo) XXX_Unmarshal

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

type BankKeeper

type BankKeeper interface {
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error
}

type GenesisState

type GenesisState struct {
	// states for the airdrop, how much coins are allocated for each address is must be pre-defined.
	States []*UserState `protobuf:"bytes,2,rep,name=states,proto3" json:"states,omitempty"`
	// information for the airdrop
	AirdropInfo *AirdropInfo `protobuf:"bytes,3,opt,name=airdrop_info,json=airdropInfo,proto3" json:"airdrop_info,omitempty"`
}

func DefaultGenesis

func DefaultGenesis() *GenesisState

func NewGenesisState

func NewGenesisState(state []*UserState, airdropInfo *AirdropInfo) *GenesisState

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAirdropInfo

func (m *GenesisState) GetAirdropInfo() *AirdropInfo

func (*GenesisState) GetStates

func (m *GenesisState) GetStates() []*UserState

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

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 MsgClaimAirdropRequest

type MsgClaimAirdropRequest struct {
	// address of the airdrop recipient.
	UserAddress string `protobuf:"bytes,1,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty"`
	// quest type of the airdrop to claim.
	QuestType QuestType `protobuf:"varint,2,opt,name=quest_type,json=questType,proto3,enum=nova.airdrop.v1.QuestType" json:"quest_type,omitempty"`
}

MsgClaimAirdropRequest is an airdrop volume request message.

func (*MsgClaimAirdropRequest) Descriptor

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

func (*MsgClaimAirdropRequest) GetQuestType

func (m *MsgClaimAirdropRequest) GetQuestType() QuestType

func (*MsgClaimAirdropRequest) GetSigners

func (m *MsgClaimAirdropRequest) GetSigners() []sdk.AccAddress

func (*MsgClaimAirdropRequest) GetUserAddress

func (m *MsgClaimAirdropRequest) GetUserAddress() string

func (*MsgClaimAirdropRequest) Marshal

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

func (*MsgClaimAirdropRequest) MarshalTo

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

func (*MsgClaimAirdropRequest) MarshalToSizedBuffer

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

func (*MsgClaimAirdropRequest) ProtoMessage

func (*MsgClaimAirdropRequest) ProtoMessage()

func (*MsgClaimAirdropRequest) Reset

func (m *MsgClaimAirdropRequest) Reset()

func (*MsgClaimAirdropRequest) Size

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

func (*MsgClaimAirdropRequest) String

func (m *MsgClaimAirdropRequest) String() string

func (*MsgClaimAirdropRequest) Unmarshal

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

func (*MsgClaimAirdropRequest) ValidateBasic

func (m *MsgClaimAirdropRequest) ValidateBasic() error

func (*MsgClaimAirdropRequest) XXX_DiscardUnknown

func (m *MsgClaimAirdropRequest) XXX_DiscardUnknown()

func (*MsgClaimAirdropRequest) XXX_Marshal

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

func (*MsgClaimAirdropRequest) XXX_Merge

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

func (*MsgClaimAirdropRequest) XXX_Size

func (m *MsgClaimAirdropRequest) XXX_Size() int

func (*MsgClaimAirdropRequest) XXX_Unmarshal

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

type MsgClaimAirdropResponse

type MsgClaimAirdropResponse struct {
}

MsgClaimAirdropResponse is a response message for MsgClaimAirdropRequest.

func (*MsgClaimAirdropResponse) Descriptor

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

func (*MsgClaimAirdropResponse) Marshal

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

func (*MsgClaimAirdropResponse) MarshalTo

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

func (*MsgClaimAirdropResponse) MarshalToSizedBuffer

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

func (*MsgClaimAirdropResponse) ProtoMessage

func (*MsgClaimAirdropResponse) ProtoMessage()

func (*MsgClaimAirdropResponse) Reset

func (m *MsgClaimAirdropResponse) Reset()

func (*MsgClaimAirdropResponse) Size

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

func (*MsgClaimAirdropResponse) String

func (m *MsgClaimAirdropResponse) String() string

func (*MsgClaimAirdropResponse) Unmarshal

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

func (*MsgClaimAirdropResponse) XXX_DiscardUnknown

func (m *MsgClaimAirdropResponse) XXX_DiscardUnknown()

func (*MsgClaimAirdropResponse) XXX_Marshal

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

func (*MsgClaimAirdropResponse) XXX_Merge

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

func (*MsgClaimAirdropResponse) XXX_Size

func (m *MsgClaimAirdropResponse) XXX_Size() int

func (*MsgClaimAirdropResponse) XXX_Unmarshal

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

type MsgClient

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 MsgMarkSocialQuestPerformedRequest

type MsgMarkSocialQuestPerformedRequest struct {
	// controller address for the airdrop module.
	ControllerAddress string `protobuf:"bytes,1,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"`
	// the addresses of the users who performed the social quest.
	UserAddresses []string `protobuf:"bytes,2,rep,name=user_addresses,json=userAddresses,proto3" json:"user_addresses,omitempty"`
}

MsgMarkSocialQuestPerformedRequest the controller marks social quest performed for the users.

func (*MsgMarkSocialQuestPerformedRequest) Descriptor

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

func (*MsgMarkSocialQuestPerformedRequest) GetControllerAddress

func (m *MsgMarkSocialQuestPerformedRequest) GetControllerAddress() string

func (*MsgMarkSocialQuestPerformedRequest) GetSigners

func (*MsgMarkSocialQuestPerformedRequest) GetUserAddresses

func (m *MsgMarkSocialQuestPerformedRequest) GetUserAddresses() []string

func (*MsgMarkSocialQuestPerformedRequest) Marshal

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

func (*MsgMarkSocialQuestPerformedRequest) MarshalTo

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

func (*MsgMarkSocialQuestPerformedRequest) MarshalToSizedBuffer

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

func (*MsgMarkSocialQuestPerformedRequest) ProtoMessage

func (*MsgMarkSocialQuestPerformedRequest) ProtoMessage()

func (*MsgMarkSocialQuestPerformedRequest) Reset

func (*MsgMarkSocialQuestPerformedRequest) Size

func (*MsgMarkSocialQuestPerformedRequest) String

func (*MsgMarkSocialQuestPerformedRequest) Unmarshal

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

func (*MsgMarkSocialQuestPerformedRequest) ValidateBasic

func (m *MsgMarkSocialQuestPerformedRequest) ValidateBasic() error

func (*MsgMarkSocialQuestPerformedRequest) XXX_DiscardUnknown

func (m *MsgMarkSocialQuestPerformedRequest) XXX_DiscardUnknown()

func (*MsgMarkSocialQuestPerformedRequest) XXX_Marshal

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

func (*MsgMarkSocialQuestPerformedRequest) XXX_Merge

func (*MsgMarkSocialQuestPerformedRequest) XXX_Size

func (*MsgMarkSocialQuestPerformedRequest) XXX_Unmarshal

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

type MsgMarkSocialQuestPerformedResponse

type MsgMarkSocialQuestPerformedResponse struct {
}

MsgMarkSocialQuestPerformedResponse is a response message for MsgMarkSocialQuestPerformedRequest.

func (*MsgMarkSocialQuestPerformedResponse) Descriptor

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

func (*MsgMarkSocialQuestPerformedResponse) Marshal

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

func (*MsgMarkSocialQuestPerformedResponse) MarshalTo

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

func (*MsgMarkSocialQuestPerformedResponse) MarshalToSizedBuffer

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

func (*MsgMarkSocialQuestPerformedResponse) ProtoMessage

func (*MsgMarkSocialQuestPerformedResponse) ProtoMessage()

func (*MsgMarkSocialQuestPerformedResponse) Reset

func (*MsgMarkSocialQuestPerformedResponse) Size

func (*MsgMarkSocialQuestPerformedResponse) String

func (*MsgMarkSocialQuestPerformedResponse) Unmarshal

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

func (*MsgMarkSocialQuestPerformedResponse) XXX_DiscardUnknown

func (m *MsgMarkSocialQuestPerformedResponse) XXX_DiscardUnknown()

func (*MsgMarkSocialQuestPerformedResponse) XXX_Marshal

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

func (*MsgMarkSocialQuestPerformedResponse) XXX_Merge

func (*MsgMarkSocialQuestPerformedResponse) XXX_Size

func (*MsgMarkSocialQuestPerformedResponse) XXX_Unmarshal

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

type MsgMarkUserProvidedLiquidityRequest

type MsgMarkUserProvidedLiquidityRequest struct {
	// controller address for the airdrop module.
	ControllerAddress string `protobuf:"bytes,1,opt,name=controller_address,json=controllerAddress,proto3" json:"controller_address,omitempty"`
	// the addresses of the users who provided the liquidities.
	UserAddresses []string `protobuf:"bytes,2,rep,name=user_addresses,json=userAddresses,proto3" json:"user_addresses,omitempty"`
}

MsgMarkUserProvidedLiquidityRequest is a message that marks a particular user as having provided liquidity to Supernova.

func (*MsgMarkUserProvidedLiquidityRequest) Descriptor

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

func (*MsgMarkUserProvidedLiquidityRequest) GetControllerAddress

func (m *MsgMarkUserProvidedLiquidityRequest) GetControllerAddress() string

func (*MsgMarkUserProvidedLiquidityRequest) GetSigners

func (*MsgMarkUserProvidedLiquidityRequest) GetUserAddresses

func (m *MsgMarkUserProvidedLiquidityRequest) GetUserAddresses() []string

func (*MsgMarkUserProvidedLiquidityRequest) Marshal

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

func (*MsgMarkUserProvidedLiquidityRequest) MarshalTo

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

func (*MsgMarkUserProvidedLiquidityRequest) MarshalToSizedBuffer

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

func (*MsgMarkUserProvidedLiquidityRequest) ProtoMessage

func (*MsgMarkUserProvidedLiquidityRequest) ProtoMessage()

func (*MsgMarkUserProvidedLiquidityRequest) Reset

func (*MsgMarkUserProvidedLiquidityRequest) Size

func (*MsgMarkUserProvidedLiquidityRequest) String

func (*MsgMarkUserProvidedLiquidityRequest) Unmarshal

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

func (*MsgMarkUserProvidedLiquidityRequest) ValidateBasic

func (m *MsgMarkUserProvidedLiquidityRequest) ValidateBasic() error

func (*MsgMarkUserProvidedLiquidityRequest) XXX_DiscardUnknown

func (m *MsgMarkUserProvidedLiquidityRequest) XXX_DiscardUnknown()

func (*MsgMarkUserProvidedLiquidityRequest) XXX_Marshal

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

func (*MsgMarkUserProvidedLiquidityRequest) XXX_Merge

func (*MsgMarkUserProvidedLiquidityRequest) XXX_Size

func (*MsgMarkUserProvidedLiquidityRequest) XXX_Unmarshal

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

type MsgMarkUserProvidedLiquidityResponse

type MsgMarkUserProvidedLiquidityResponse struct {
}

MsgMarkUserProvidedLiquidityResponse is a response message for MsgMarkUserProvidedLiquidityRequest.

func (*MsgMarkUserProvidedLiquidityResponse) Descriptor

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

func (*MsgMarkUserProvidedLiquidityResponse) Marshal

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

func (*MsgMarkUserProvidedLiquidityResponse) MarshalTo

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

func (*MsgMarkUserProvidedLiquidityResponse) MarshalToSizedBuffer

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

func (*MsgMarkUserProvidedLiquidityResponse) ProtoMessage

func (*MsgMarkUserProvidedLiquidityResponse) ProtoMessage()

func (*MsgMarkUserProvidedLiquidityResponse) Reset

func (*MsgMarkUserProvidedLiquidityResponse) Size

func (*MsgMarkUserProvidedLiquidityResponse) String

func (*MsgMarkUserProvidedLiquidityResponse) Unmarshal

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

func (*MsgMarkUserProvidedLiquidityResponse) XXX_DiscardUnknown

func (m *MsgMarkUserProvidedLiquidityResponse) XXX_DiscardUnknown()

func (*MsgMarkUserProvidedLiquidityResponse) XXX_Marshal

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

func (*MsgMarkUserProvidedLiquidityResponse) XXX_Merge

func (*MsgMarkUserProvidedLiquidityResponse) XXX_Size

func (*MsgMarkUserProvidedLiquidityResponse) XXX_Unmarshal

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

type MsgServer

MsgServer is the server API for Msg service.

type QueryAirdropInfoRequest

type QueryAirdropInfoRequest struct {
}

func (*QueryAirdropInfoRequest) Descriptor

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

func (*QueryAirdropInfoRequest) Marshal

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

func (*QueryAirdropInfoRequest) MarshalTo

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

func (*QueryAirdropInfoRequest) MarshalToSizedBuffer

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

func (*QueryAirdropInfoRequest) ProtoMessage

func (*QueryAirdropInfoRequest) ProtoMessage()

func (*QueryAirdropInfoRequest) Reset

func (m *QueryAirdropInfoRequest) Reset()

func (*QueryAirdropInfoRequest) Size

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

func (*QueryAirdropInfoRequest) String

func (m *QueryAirdropInfoRequest) String() string

func (*QueryAirdropInfoRequest) Unmarshal

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

func (*QueryAirdropInfoRequest) XXX_DiscardUnknown

func (m *QueryAirdropInfoRequest) XXX_DiscardUnknown()

func (*QueryAirdropInfoRequest) XXX_Marshal

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

func (*QueryAirdropInfoRequest) XXX_Merge

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

func (*QueryAirdropInfoRequest) XXX_Size

func (m *QueryAirdropInfoRequest) XXX_Size() int

func (*QueryAirdropInfoRequest) XXX_Unmarshal

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

type QueryAirdropInfoResponse

type QueryAirdropInfoResponse struct {
	AirdropInfo *AirdropInfo `protobuf:"bytes,1,opt,name=airdrop_info,json=airdropInfo,proto3" json:"airdrop_info,omitempty"`
}

func (*QueryAirdropInfoResponse) Descriptor

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

func (*QueryAirdropInfoResponse) GetAirdropInfo

func (m *QueryAirdropInfoResponse) GetAirdropInfo() *AirdropInfo

func (*QueryAirdropInfoResponse) Marshal

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

func (*QueryAirdropInfoResponse) MarshalTo

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

func (*QueryAirdropInfoResponse) MarshalToSizedBuffer

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

func (*QueryAirdropInfoResponse) ProtoMessage

func (*QueryAirdropInfoResponse) ProtoMessage()

func (*QueryAirdropInfoResponse) Reset

func (m *QueryAirdropInfoResponse) Reset()

func (*QueryAirdropInfoResponse) Size

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

func (*QueryAirdropInfoResponse) String

func (m *QueryAirdropInfoResponse) String() string

func (*QueryAirdropInfoResponse) Unmarshal

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

func (*QueryAirdropInfoResponse) XXX_DiscardUnknown

func (m *QueryAirdropInfoResponse) XXX_DiscardUnknown()

func (*QueryAirdropInfoResponse) XXX_Marshal

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

func (*QueryAirdropInfoResponse) XXX_Merge

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

func (*QueryAirdropInfoResponse) XXX_Size

func (m *QueryAirdropInfoResponse) XXX_Size() int

func (*QueryAirdropInfoResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// get airdrop info
	AirdropInfo(ctx context.Context, in *QueryAirdropInfoRequest, opts ...grpc.CallOption) (*QueryAirdropInfoResponse, error)
	// get total assets of the airdrop for a given address
	TotalAllocatedAirdropToken(ctx context.Context, in *QueryTotalAllocatedAirdropTokenRequest, opts ...grpc.CallOption) (*QueryTotalAllocatedAirdropTokenResponse, error)
	// query for state of quests
	QuestState(ctx context.Context, in *QueryQuestStateRequest, opts ...grpc.CallOption) (*QueryQuestStateResponse, 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 QueryQuestStateRequest

type QueryQuestStateRequest struct {
	// address of the airdrop recipient.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

func (*QueryQuestStateRequest) Descriptor

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

func (*QueryQuestStateRequest) GetAddress

func (m *QueryQuestStateRequest) GetAddress() string

func (*QueryQuestStateRequest) Marshal

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

func (*QueryQuestStateRequest) MarshalTo

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

func (*QueryQuestStateRequest) MarshalToSizedBuffer

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

func (*QueryQuestStateRequest) ProtoMessage

func (*QueryQuestStateRequest) ProtoMessage()

func (*QueryQuestStateRequest) Reset

func (m *QueryQuestStateRequest) Reset()

func (*QueryQuestStateRequest) Size

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

func (*QueryQuestStateRequest) String

func (m *QueryQuestStateRequest) String() string

func (*QueryQuestStateRequest) Unmarshal

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

func (*QueryQuestStateRequest) XXX_DiscardUnknown

func (m *QueryQuestStateRequest) XXX_DiscardUnknown()

func (*QueryQuestStateRequest) XXX_Marshal

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

func (*QueryQuestStateRequest) XXX_Merge

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

func (*QueryQuestStateRequest) XXX_Size

func (m *QueryQuestStateRequest) XXX_Size() int

func (*QueryQuestStateRequest) XXX_Unmarshal

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

type QueryQuestStateResponse

type QueryQuestStateResponse struct {
	QuestStates map[int32]*QuestState `` /* 183-byte string literal not displayed */
}

func (*QueryQuestStateResponse) Descriptor

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

func (*QueryQuestStateResponse) GetQuestStates

func (m *QueryQuestStateResponse) GetQuestStates() map[int32]*QuestState

func (*QueryQuestStateResponse) Marshal

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

func (*QueryQuestStateResponse) MarshalTo

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

func (*QueryQuestStateResponse) MarshalToSizedBuffer

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

func (*QueryQuestStateResponse) ProtoMessage

func (*QueryQuestStateResponse) ProtoMessage()

func (*QueryQuestStateResponse) Reset

func (m *QueryQuestStateResponse) Reset()

func (*QueryQuestStateResponse) Size

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

func (*QueryQuestStateResponse) String

func (m *QueryQuestStateResponse) String() string

func (*QueryQuestStateResponse) Unmarshal

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

func (*QueryQuestStateResponse) XXX_DiscardUnknown

func (m *QueryQuestStateResponse) XXX_DiscardUnknown()

func (*QueryQuestStateResponse) XXX_Marshal

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

func (*QueryQuestStateResponse) XXX_Merge

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

func (*QueryQuestStateResponse) XXX_Size

func (m *QueryQuestStateResponse) XXX_Size() int

func (*QueryQuestStateResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// get airdrop info
	AirdropInfo(context.Context, *QueryAirdropInfoRequest) (*QueryAirdropInfoResponse, error)
	// get total assets of the airdrop for a given address
	TotalAllocatedAirdropToken(context.Context, *QueryTotalAllocatedAirdropTokenRequest) (*QueryTotalAllocatedAirdropTokenResponse, error)
	// query for state of quests
	QuestState(context.Context, *QueryQuestStateRequest) (*QueryQuestStateResponse, error)
}

QueryServer is the server API for Query service.

type QueryTotalAllocatedAirdropTokenRequest

type QueryTotalAllocatedAirdropTokenRequest struct {
	// address of the airdrop recipient.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
}

func (*QueryTotalAllocatedAirdropTokenRequest) Descriptor

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

func (*QueryTotalAllocatedAirdropTokenRequest) GetAddress

func (*QueryTotalAllocatedAirdropTokenRequest) Marshal

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

func (*QueryTotalAllocatedAirdropTokenRequest) MarshalTo

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

func (*QueryTotalAllocatedAirdropTokenRequest) MarshalToSizedBuffer

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

func (*QueryTotalAllocatedAirdropTokenRequest) ProtoMessage

func (*QueryTotalAllocatedAirdropTokenRequest) Reset

func (*QueryTotalAllocatedAirdropTokenRequest) Size

func (*QueryTotalAllocatedAirdropTokenRequest) String

func (*QueryTotalAllocatedAirdropTokenRequest) Unmarshal

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

func (*QueryTotalAllocatedAirdropTokenRequest) XXX_DiscardUnknown

func (m *QueryTotalAllocatedAirdropTokenRequest) XXX_DiscardUnknown()

func (*QueryTotalAllocatedAirdropTokenRequest) XXX_Marshal

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

func (*QueryTotalAllocatedAirdropTokenRequest) XXX_Merge

func (*QueryTotalAllocatedAirdropTokenRequest) XXX_Size

func (*QueryTotalAllocatedAirdropTokenRequest) XXX_Unmarshal

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

type QueryTotalAllocatedAirdropTokenResponse

type QueryTotalAllocatedAirdropTokenResponse struct {
	// total_asset_for_airdrop is the total asset for airdrop.
	TotalAssets types.Coin `` /* 138-byte string literal not displayed */
}

func (*QueryTotalAllocatedAirdropTokenResponse) Descriptor

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

func (*QueryTotalAllocatedAirdropTokenResponse) GetTotalAssets

func (*QueryTotalAllocatedAirdropTokenResponse) Marshal

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

func (*QueryTotalAllocatedAirdropTokenResponse) MarshalTo

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

func (*QueryTotalAllocatedAirdropTokenResponse) MarshalToSizedBuffer

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

func (*QueryTotalAllocatedAirdropTokenResponse) ProtoMessage

func (*QueryTotalAllocatedAirdropTokenResponse) Reset

func (*QueryTotalAllocatedAirdropTokenResponse) Size

func (*QueryTotalAllocatedAirdropTokenResponse) String

func (*QueryTotalAllocatedAirdropTokenResponse) Unmarshal

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

func (*QueryTotalAllocatedAirdropTokenResponse) XXX_DiscardUnknown

func (m *QueryTotalAllocatedAirdropTokenResponse) XXX_DiscardUnknown()

func (*QueryTotalAllocatedAirdropTokenResponse) XXX_Marshal

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

func (*QueryTotalAllocatedAirdropTokenResponse) XXX_Merge

func (*QueryTotalAllocatedAirdropTokenResponse) XXX_Size

func (*QueryTotalAllocatedAirdropTokenResponse) XXX_Unmarshal

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

type QuestState

type QuestState struct {
	// state to indicate that quest is not started, claimable or claimed.
	State QuestStateType `protobuf:"varint,1,opt,name=state,proto3,enum=nova.airdrop.v1.QuestStateType" json:"state,omitempty"`
	// achieve_timestamp is the timestamp when the quest is achieved.
	AchievedAt time.Time `protobuf:"bytes,2,opt,name=achieved_at,json=achievedAt,proto3,stdtime" json:"achieved_at"`
	// claim_timestamp is the timestamp when the user claimed the amount.
	ClaimedAt time.Time `protobuf:"bytes,3,opt,name=claimed_at,json=claimedAt,proto3,stdtime" json:"claimed_at"`
	// claimed amount, this field is empty if user not claimed for this quest yet
	ClaimedAmount string `protobuf:"bytes,4,opt,name=claimed_amount,json=claimedAmount,proto3" json:"claimed_amount,omitempty"`
}

QuestState indicates the status of the quest that users perform.

func (*QuestState) Descriptor

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

func (*QuestState) GetAchievedAt

func (m *QuestState) GetAchievedAt() time.Time

func (*QuestState) GetClaimedAmount

func (m *QuestState) GetClaimedAmount() string

func (*QuestState) GetClaimedAt

func (m *QuestState) GetClaimedAt() time.Time

func (*QuestState) GetState

func (m *QuestState) GetState() QuestStateType

func (*QuestState) Marshal

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

func (*QuestState) MarshalTo

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

func (*QuestState) MarshalToSizedBuffer

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

func (*QuestState) ProtoMessage

func (*QuestState) ProtoMessage()

func (*QuestState) Reset

func (m *QuestState) Reset()

func (*QuestState) Size

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

func (*QuestState) String

func (m *QuestState) String() string

func (*QuestState) Unmarshal

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

func (*QuestState) XXX_DiscardUnknown

func (m *QuestState) XXX_DiscardUnknown()

func (*QuestState) XXX_Marshal

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

func (*QuestState) XXX_Merge

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

func (*QuestState) XXX_Size

func (m *QuestState) XXX_Size() int

func (*QuestState) XXX_Unmarshal

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

type QuestStateType

type QuestStateType int32
const (
	// quest is not conducted by user yet
	QuestStateType_QUEST_STATE_NOT_STARTED QuestStateType = 0
	// quest is done, now user can claim her/his airdrop reward.
	QuestStateType_QUEST_STATE_CLAIMABLE QuestStateType = 1
	// quest is done, and user has claimed her/his airdrop reward.
	QuestStateType_QUEST_STATE_CLAIMED QuestStateType = 2
)

func (QuestStateType) EnumDescriptor

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

func (QuestStateType) String

func (x QuestStateType) String() string

type QuestType

type QuestType int32
const (
	QuestType_QUEST_NOTHING_TO_DO     QuestType = 0
	QuestType_QUEST_SOCIAL            QuestType = 1
	QuestType_QUEST_SN_ASSET_CLAIM    QuestType = 2
	QuestType_QUEST_PROVIDE_LIQUIDITY QuestType = 3
	QuestType_QUEST_VOTE_ON_PROPOSALS QuestType = 4
)

func (QuestType) EnumDescriptor

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

func (QuestType) String

func (x QuestType) String() string

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) ClaimAirdrop

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) AirdropInfo

func (*UnimplementedQueryServer) QuestState

type UserState

type UserState struct {
	// address of the airdrop recipient.
	Recipient string `protobuf:"bytes,1,opt,name=recipient,proto3" json:"recipient,omitempty"`
	// amount of coins to be allocated to the recipient.
	TotalAmount string `protobuf:"bytes,2,opt,name=total_amount,json=totalAmount,proto3" json:"total_amount,omitempty"`
	// claim histories
	QuestStates map[int32]*QuestState `` /* 183-byte string literal not displayed */
}

UserState indicates the status of the user performing the quest.

func (*UserState) Descriptor

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

func (*UserState) GetQuestStates

func (m *UserState) GetQuestStates() map[int32]*QuestState

func (*UserState) GetRecipient

func (m *UserState) GetRecipient() string

func (*UserState) GetTotalAmount

func (m *UserState) GetTotalAmount() string

func (*UserState) Marshal

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

func (*UserState) MarshalTo

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

func (*UserState) MarshalToSizedBuffer

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

func (*UserState) ProtoMessage

func (*UserState) ProtoMessage()

func (*UserState) Reset

func (m *UserState) Reset()

func (*UserState) Size

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

func (*UserState) String

func (m *UserState) String() string

func (*UserState) Unmarshal

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

func (*UserState) XXX_DiscardUnknown

func (m *UserState) XXX_DiscardUnknown()

func (*UserState) XXX_Marshal

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

func (*UserState) XXX_Merge

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

func (*UserState) XXX_Size

func (m *UserState) XXX_Size() int

func (*UserState) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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