types

package
v26.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2025 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	EventTypeBidPlaced   = "bid_placed"
	EventTypeBidAccepted = "bid_accepted"

	AttributeKeyAuctionName   = "auction_name"
	AttributeKeyBidder        = "bidder"
	AttributeKeyPaymentAmount = "payment_amount"
	AttributeKeyPaymentDenom  = "payment_denom"
	AttributeKeySellingAmount = "selling_amount"
	AttributeKeySellingDenom  = "selling_denom"
	AttributeKeyPrice         = "discounted_price"
)

Event types and attribute keys for auction module

View Source
const (
	ModuleName = "auction"

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

	// RouterKey defines the routing key
	RouterKey = ModuleName
)
View Source
const (
	TypeMsgPlaceBid      = "place_bid"
	TypeMsgCreateAuction = "create_auction"
	TypeMsgUpdateAuction = "update_auction"
)

Variables

View Source
var (
	ErrInvalidLengthAuction        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAuction          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAuction = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrAuctionAlreadyExists = sdkerrors.Register(ModuleName, 7001, "auction already exists")
	ErrAuctionDoesntExist   = sdkerrors.Register(ModuleName, 7002, "auction doesn't exists")
)

x/auction module sentinel 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 (
	ParamsKey     = []byte("params")
	AuctionPrefix = []byte("auction")
)
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 AuctionType_name = map[int32]string{
	0: "AUCTION_TYPE_UNSPECIFIED",
	1: "AUCTION_TYPE_FCFS",
}
View Source
var AuctionType_value = map[string]int32{
	"AUCTION_TYPE_UNSPECIFIED": 0,
	"AUCTION_TYPE_FCFS":        1,
}
View Source
var (
	ModuleCdc = codec.NewAminoCodec(amino)
)

Functions

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

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 ValidateCreateAuctionParams

func ValidateCreateAuctionParams(
	auctionName string,
	auctionType AuctionType,
	sellingDenom string,
	paymentDenom string,
	minPriceMultiplier math.LegacyDec,
	minBidAmount math.Int,
	beneficiary string,
) error

Types

type AccountKeeper

type AccountKeeper interface {
	GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI
	GetModuleAddress(moduleName string) sdk.AccAddress
}

Required AccountKeeper functions

type Auction

type Auction struct {
	// Auction type
	Type AuctionType `protobuf:"varint,1,opt,name=type,proto3,enum=stride.auction.AuctionType" json:"type,omitempty"`
	// A unique auction name
	Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	// Token denom being sold in the auction
	SellingDenom string `protobuf:"bytes,3,opt,name=selling_denom,json=sellingDenom,proto3" json:"selling_denom,omitempty"`
	// Token denom used to place bids
	PaymentDenom string `protobuf:"bytes,4,opt,name=payment_denom,json=paymentDenom,proto3" json:"payment_denom,omitempty"`
	// Whether auction is active
	Enabled bool `protobuf:"varint,5,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Minimum price multiplier (e.g. 0.95 for 5% discount off the oracle price)
	// bids_floor_price = oracle_price * min_price_multiplier
	MinPriceMultiplier cosmossdk_io_math.LegacyDec `` /* 146-byte string literal not displayed */
	// Minimum payment token bid amount
	MinBidAmount cosmossdk_io_math.Int `protobuf:"bytes,7,opt,name=min_bid_amount,json=minBidAmount,proto3,customtype=cosmossdk.io/math.Int" json:"min_bid_amount"`
	// Address to send the auction proceeds to
	Beneficiary string `protobuf:"bytes,8,opt,name=beneficiary,proto3" json:"beneficiary,omitempty"`
	// Total amount of payment token received
	TotalPaymentTokenReceived cosmossdk_io_math.Int `` /* 163-byte string literal not displayed */
	// Total amount of selling token sold
	TotalSellingTokenSold cosmossdk_io_math.Int `` /* 152-byte string literal not displayed */
}

func (*Auction) Descriptor

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

func (*Auction) GetBeneficiary

func (m *Auction) GetBeneficiary() string

func (*Auction) GetEnabled

func (m *Auction) GetEnabled() bool

func (*Auction) GetName

func (m *Auction) GetName() string

func (*Auction) GetPaymentDenom

func (m *Auction) GetPaymentDenom() string

func (*Auction) GetSellingDenom

func (m *Auction) GetSellingDenom() string

func (*Auction) GetType

func (m *Auction) GetType() AuctionType

func (*Auction) Marshal

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

func (*Auction) MarshalTo

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

func (*Auction) MarshalToSizedBuffer

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

func (*Auction) ProtoMessage

func (*Auction) ProtoMessage()

func (*Auction) Reset

func (m *Auction) Reset()

func (*Auction) Size

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

func (*Auction) String

func (m *Auction) String() string

func (*Auction) Unmarshal

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

func (*Auction) XXX_DiscardUnknown

func (m *Auction) XXX_DiscardUnknown()

func (*Auction) XXX_Marshal

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

func (*Auction) XXX_Merge

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

func (*Auction) XXX_Size

func (m *Auction) XXX_Size() int

func (*Auction) XXX_Unmarshal

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

type AuctionType

type AuctionType int32
const (
	// Default value - should not be used
	AuctionType_AUCTION_TYPE_UNSPECIFIED AuctionType = 0
	// First-Come First-Served auction
	AuctionType_AUCTION_TYPE_FCFS AuctionType = 1
)

func (AuctionType) EnumDescriptor

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

func (AuctionType) String

func (x AuctionType) String() string

type BankKeeper

type BankKeeper interface {
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	SendCoins(ctx sdk.Context, from, to sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
}

Required BankKeeper functions

type GenesisState

type GenesisState struct {
	// Module parameters
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
	// List of token auctions
	Auctions []Auction `protobuf:"bytes,2,rep,name=auctions,proto3" json:"auctions"`
}

GenesisState defines the auction module's genesis state

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default genesis state

func (*GenesisState) Descriptor

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

func (*GenesisState) GetAuctions

func (m *GenesisState) GetAuctions() []Auction

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

Performs basic genesis state validation by iterating through all auctions and validating using ValidateCreateAuctionParams()

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 IcqOracleKeeper

type IcqOracleKeeper interface {
	GetTokenPriceForQuoteDenom(ctx sdk.Context, baseDenom string, quoteDenom string) (price math.LegacyDec, err error)
}

Required IcqOracleKeeper functions

type MsgClient

type MsgClient interface {
	// PlaceBid places a bid to buy a token off an auction
	PlaceBid(ctx context.Context, in *MsgPlaceBid, opts ...grpc.CallOption) (*MsgPlaceBidResponse, error)
	// CreateAuction creates a new auction
	CreateAuction(ctx context.Context, in *MsgCreateAuction, opts ...grpc.CallOption) (*MsgCreateAuctionResponse, error)
	// CreateAuction updates an existing auction
	UpdateAuction(ctx context.Context, in *MsgUpdateAuction, opts ...grpc.CallOption) (*MsgUpdateAuctionResponse, 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 MsgCreateAuction

type MsgCreateAuction struct {
	// Admin's address
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// A unique auction name
	AuctionName string `protobuf:"bytes,2,opt,name=auction_name,json=auctionName,proto3" json:"auction_name,omitempty"`
	// Auction type
	AuctionType AuctionType `` /* 127-byte string literal not displayed */
	// Denom on Stride of the token being auctioned off (e.g. "ibc/...")
	SellingDenom string `protobuf:"bytes,4,opt,name=selling_denom,json=sellingDenom,proto3" json:"selling_denom,omitempty"`
	// Denom on Stride of the token being used to place bids (e.g. "ustrd")
	PaymentDenom string `protobuf:"bytes,5,opt,name=payment_denom,json=paymentDenom,proto3" json:"payment_denom,omitempty"`
	// Whether auction is active
	Enabled bool `protobuf:"varint,6,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Minimum price multiplier (e.g. 0.95 for 5% discount off the oracle price)
	// bids_floor_price = oracle_price * min_price_multiplier
	MinPriceMultiplier cosmossdk_io_math.LegacyDec `` /* 146-byte string literal not displayed */
	// Minimum payment token bid amount
	MinBidAmount cosmossdk_io_math.Int `protobuf:"bytes,8,opt,name=min_bid_amount,json=minBidAmount,proto3,customtype=cosmossdk.io/math.Int" json:"min_bid_amount"`
	Beneficiary  string                `protobuf:"bytes,9,opt,name=beneficiary,proto3" json:"beneficiary,omitempty"`
}

MsgCreateAuction defines the message for adding a token auction

func NewMsgCreateAuction

func NewMsgCreateAuction(
	admin string,
	auctionName string,
	auctionType AuctionType,
	sellingDenom string,
	paymentDenom string,
	enabled bool,
	minPriceMultiplier string,
	minBidAmount uint64,
	beneficiary string,
) *MsgCreateAuction

func (*MsgCreateAuction) Descriptor

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

func (*MsgCreateAuction) GetAdmin

func (m *MsgCreateAuction) GetAdmin() string

func (*MsgCreateAuction) GetAuctionName

func (m *MsgCreateAuction) GetAuctionName() string

func (*MsgCreateAuction) GetAuctionType

func (m *MsgCreateAuction) GetAuctionType() AuctionType

func (*MsgCreateAuction) GetBeneficiary

func (m *MsgCreateAuction) GetBeneficiary() string

func (*MsgCreateAuction) GetEnabled

func (m *MsgCreateAuction) GetEnabled() bool

func (*MsgCreateAuction) GetPaymentDenom

func (m *MsgCreateAuction) GetPaymentDenom() string

func (*MsgCreateAuction) GetSellingDenom

func (m *MsgCreateAuction) GetSellingDenom() string

func (*MsgCreateAuction) GetSignBytes

func (msg *MsgCreateAuction) GetSignBytes() []byte

func (*MsgCreateAuction) GetSigners

func (msg *MsgCreateAuction) GetSigners() []sdk.AccAddress

func (*MsgCreateAuction) Marshal

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

func (*MsgCreateAuction) MarshalTo

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

func (*MsgCreateAuction) MarshalToSizedBuffer

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

func (*MsgCreateAuction) ProtoMessage

func (*MsgCreateAuction) ProtoMessage()

func (*MsgCreateAuction) Reset

func (m *MsgCreateAuction) Reset()

func (MsgCreateAuction) Route

func (msg MsgCreateAuction) Route() string

func (*MsgCreateAuction) Size

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

func (*MsgCreateAuction) String

func (m *MsgCreateAuction) String() string

func (MsgCreateAuction) Type

func (msg MsgCreateAuction) Type() string

func (*MsgCreateAuction) Unmarshal

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

func (*MsgCreateAuction) ValidateBasic

func (msg *MsgCreateAuction) ValidateBasic() error

func (*MsgCreateAuction) XXX_DiscardUnknown

func (m *MsgCreateAuction) XXX_DiscardUnknown()

func (*MsgCreateAuction) XXX_Marshal

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

func (*MsgCreateAuction) XXX_Merge

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

func (*MsgCreateAuction) XXX_Size

func (m *MsgCreateAuction) XXX_Size() int

func (*MsgCreateAuction) XXX_Unmarshal

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

type MsgCreateAuctionResponse

type MsgCreateAuctionResponse struct {
}

func (*MsgCreateAuctionResponse) Descriptor

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

func (*MsgCreateAuctionResponse) Marshal

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

func (*MsgCreateAuctionResponse) MarshalTo

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

func (*MsgCreateAuctionResponse) MarshalToSizedBuffer

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

func (*MsgCreateAuctionResponse) ProtoMessage

func (*MsgCreateAuctionResponse) ProtoMessage()

func (*MsgCreateAuctionResponse) Reset

func (m *MsgCreateAuctionResponse) Reset()

func (*MsgCreateAuctionResponse) Size

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

func (*MsgCreateAuctionResponse) String

func (m *MsgCreateAuctionResponse) String() string

func (*MsgCreateAuctionResponse) Unmarshal

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

func (*MsgCreateAuctionResponse) XXX_DiscardUnknown

func (m *MsgCreateAuctionResponse) XXX_DiscardUnknown()

func (*MsgCreateAuctionResponse) XXX_Marshal

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

func (*MsgCreateAuctionResponse) XXX_Merge

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

func (*MsgCreateAuctionResponse) XXX_Size

func (m *MsgCreateAuctionResponse) XXX_Size() int

func (*MsgCreateAuctionResponse) XXX_Unmarshal

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

type MsgPlaceBid

type MsgPlaceBid struct {
	// Bidder's address
	Bidder string `protobuf:"bytes,1,opt,name=bidder,proto3" json:"bidder,omitempty"`
	// Token being bid on
	AuctionName string `protobuf:"bytes,2,opt,name=auction_name,json=auctionName,proto3" json:"auction_name,omitempty"`
	// Amount of tokens requested in base units (utoken)
	SellingTokenAmount cosmossdk_io_math.Int `` /* 140-byte string literal not displayed */
	// Amount of tokens being paid in base units (utoken)
	PaymentTokenAmount cosmossdk_io_math.Int `` /* 140-byte string literal not displayed */
}

MsgPlaceBid defines the message for bidding in a token auction

func NewMsgPlaceBid

func NewMsgPlaceBid(
	bidder string,
	AuctionName string,
	sellingTokenAmount uint64,
	paymentTokenAmount uint64,
) *MsgPlaceBid

func (*MsgPlaceBid) Descriptor

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

func (*MsgPlaceBid) GetAuctionName

func (m *MsgPlaceBid) GetAuctionName() string

func (*MsgPlaceBid) GetBidder

func (m *MsgPlaceBid) GetBidder() string

func (*MsgPlaceBid) GetSignBytes

func (msg *MsgPlaceBid) GetSignBytes() []byte

func (*MsgPlaceBid) GetSigners

func (msg *MsgPlaceBid) GetSigners() []sdk.AccAddress

func (*MsgPlaceBid) Marshal

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

func (*MsgPlaceBid) MarshalTo

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

func (*MsgPlaceBid) MarshalToSizedBuffer

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

func (*MsgPlaceBid) ProtoMessage

func (*MsgPlaceBid) ProtoMessage()

func (*MsgPlaceBid) Reset

func (m *MsgPlaceBid) Reset()

func (MsgPlaceBid) Route

func (msg MsgPlaceBid) Route() string

func (*MsgPlaceBid) Size

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

func (*MsgPlaceBid) String

func (m *MsgPlaceBid) String() string

func (MsgPlaceBid) Type

func (msg MsgPlaceBid) Type() string

func (*MsgPlaceBid) Unmarshal

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

func (*MsgPlaceBid) ValidateBasic

func (msg *MsgPlaceBid) ValidateBasic() error

func (*MsgPlaceBid) XXX_DiscardUnknown

func (m *MsgPlaceBid) XXX_DiscardUnknown()

func (*MsgPlaceBid) XXX_Marshal

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

func (*MsgPlaceBid) XXX_Merge

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

func (*MsgPlaceBid) XXX_Size

func (m *MsgPlaceBid) XXX_Size() int

func (*MsgPlaceBid) XXX_Unmarshal

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

type MsgPlaceBidResponse

type MsgPlaceBidResponse struct {
}

func (*MsgPlaceBidResponse) Descriptor

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

func (*MsgPlaceBidResponse) Marshal

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

func (*MsgPlaceBidResponse) MarshalTo

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

func (*MsgPlaceBidResponse) MarshalToSizedBuffer

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

func (*MsgPlaceBidResponse) ProtoMessage

func (*MsgPlaceBidResponse) ProtoMessage()

func (*MsgPlaceBidResponse) Reset

func (m *MsgPlaceBidResponse) Reset()

func (*MsgPlaceBidResponse) Size

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

func (*MsgPlaceBidResponse) String

func (m *MsgPlaceBidResponse) String() string

func (*MsgPlaceBidResponse) Unmarshal

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

func (*MsgPlaceBidResponse) XXX_DiscardUnknown

func (m *MsgPlaceBidResponse) XXX_DiscardUnknown()

func (*MsgPlaceBidResponse) XXX_Marshal

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

func (*MsgPlaceBidResponse) XXX_Merge

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

func (*MsgPlaceBidResponse) XXX_Size

func (m *MsgPlaceBidResponse) XXX_Size() int

func (*MsgPlaceBidResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// PlaceBid places a bid to buy a token off an auction
	PlaceBid(context.Context, *MsgPlaceBid) (*MsgPlaceBidResponse, error)
	// CreateAuction creates a new auction
	CreateAuction(context.Context, *MsgCreateAuction) (*MsgCreateAuctionResponse, error)
	// CreateAuction updates an existing auction
	UpdateAuction(context.Context, *MsgUpdateAuction) (*MsgUpdateAuctionResponse, error)
}

MsgServer is the server API for Msg service.

type MsgUpdateAuction

type MsgUpdateAuction struct {
	// Admin's address
	Admin string `protobuf:"bytes,1,opt,name=admin,proto3" json:"admin,omitempty"`
	// A unique auction name
	AuctionName string `protobuf:"bytes,2,opt,name=auction_name,json=auctionName,proto3" json:"auction_name,omitempty"`
	// Auction type
	AuctionType AuctionType `` /* 127-byte string literal not displayed */
	// Whether auction is active
	Enabled bool `protobuf:"varint,4,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// Minimum price multiplier (e.g. 0.95 for 5% discount off the oracle price)
	// bids_floor_price = oracle_price * min_price_multiplier
	MinPriceMultiplier cosmossdk_io_math.LegacyDec `` /* 146-byte string literal not displayed */
	// Minimum payment token bid amount
	MinBidAmount cosmossdk_io_math.Int `protobuf:"bytes,6,opt,name=min_bid_amount,json=minBidAmount,proto3,customtype=cosmossdk.io/math.Int" json:"min_bid_amount"`
	Beneficiary  string                `protobuf:"bytes,7,opt,name=beneficiary,proto3" json:"beneficiary,omitempty"`
}

MsgUpdateAuction defines the message for adding a token auction

func NewMsgUpdateAuction

func NewMsgUpdateAuction(
	admin string,
	auctionName string,
	auctionType AuctionType,
	enabled bool,
	minPriceMultiplier string,
	minBidAmount uint64,
	beneficiary string,
) *MsgUpdateAuction

func (*MsgUpdateAuction) Descriptor

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

func (*MsgUpdateAuction) GetAdmin

func (m *MsgUpdateAuction) GetAdmin() string

func (*MsgUpdateAuction) GetAuctionName

func (m *MsgUpdateAuction) GetAuctionName() string

func (*MsgUpdateAuction) GetAuctionType

func (m *MsgUpdateAuction) GetAuctionType() AuctionType

func (*MsgUpdateAuction) GetBeneficiary

func (m *MsgUpdateAuction) GetBeneficiary() string

func (*MsgUpdateAuction) GetEnabled

func (m *MsgUpdateAuction) GetEnabled() bool

func (*MsgUpdateAuction) GetSignBytes

func (msg *MsgUpdateAuction) GetSignBytes() []byte

func (*MsgUpdateAuction) GetSigners

func (msg *MsgUpdateAuction) GetSigners() []sdk.AccAddress

func (*MsgUpdateAuction) Marshal

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

func (*MsgUpdateAuction) MarshalTo

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

func (*MsgUpdateAuction) MarshalToSizedBuffer

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

func (*MsgUpdateAuction) ProtoMessage

func (*MsgUpdateAuction) ProtoMessage()

func (*MsgUpdateAuction) Reset

func (m *MsgUpdateAuction) Reset()

func (MsgUpdateAuction) Route

func (msg MsgUpdateAuction) Route() string

func (*MsgUpdateAuction) Size

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

func (*MsgUpdateAuction) String

func (m *MsgUpdateAuction) String() string

func (MsgUpdateAuction) Type

func (msg MsgUpdateAuction) Type() string

func (*MsgUpdateAuction) Unmarshal

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

func (*MsgUpdateAuction) ValidateBasic

func (msg *MsgUpdateAuction) ValidateBasic() error

func (*MsgUpdateAuction) XXX_DiscardUnknown

func (m *MsgUpdateAuction) XXX_DiscardUnknown()

func (*MsgUpdateAuction) XXX_Marshal

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

func (*MsgUpdateAuction) XXX_Merge

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

func (*MsgUpdateAuction) XXX_Size

func (m *MsgUpdateAuction) XXX_Size() int

func (*MsgUpdateAuction) XXX_Unmarshal

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

type MsgUpdateAuctionResponse

type MsgUpdateAuctionResponse struct {
}

func (*MsgUpdateAuctionResponse) Descriptor

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

func (*MsgUpdateAuctionResponse) Marshal

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

func (*MsgUpdateAuctionResponse) MarshalTo

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

func (*MsgUpdateAuctionResponse) MarshalToSizedBuffer

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

func (*MsgUpdateAuctionResponse) ProtoMessage

func (*MsgUpdateAuctionResponse) ProtoMessage()

func (*MsgUpdateAuctionResponse) Reset

func (m *MsgUpdateAuctionResponse) Reset()

func (*MsgUpdateAuctionResponse) Size

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

func (*MsgUpdateAuctionResponse) String

func (m *MsgUpdateAuctionResponse) String() string

func (*MsgUpdateAuctionResponse) Unmarshal

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

func (*MsgUpdateAuctionResponse) XXX_DiscardUnknown

func (m *MsgUpdateAuctionResponse) XXX_DiscardUnknown()

func (*MsgUpdateAuctionResponse) XXX_Marshal

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

func (*MsgUpdateAuctionResponse) XXX_Merge

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

func (*MsgUpdateAuctionResponse) XXX_Size

func (m *MsgUpdateAuctionResponse) XXX_Size() int

func (*MsgUpdateAuctionResponse) XXX_Unmarshal

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

type Params

type Params struct {
}

func DefaultParams

func DefaultParams() Params

DefaultParams returns a default set of parameters

func NewParams

func NewParams() Params

NewParams creates a new Params instance

func (*Params) Descriptor

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

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

Validate validates the set of params

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 QueryAuctionRequest

type QueryAuctionRequest struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
}

QueryAuctionRequest is the request type for the Query/Auction RPC method

func (*QueryAuctionRequest) Descriptor

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

func (*QueryAuctionRequest) GetName

func (m *QueryAuctionRequest) GetName() string

func (*QueryAuctionRequest) Marshal

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

func (*QueryAuctionRequest) MarshalTo

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

func (*QueryAuctionRequest) MarshalToSizedBuffer

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

func (*QueryAuctionRequest) ProtoMessage

func (*QueryAuctionRequest) ProtoMessage()

func (*QueryAuctionRequest) Reset

func (m *QueryAuctionRequest) Reset()

func (*QueryAuctionRequest) Size

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

func (*QueryAuctionRequest) String

func (m *QueryAuctionRequest) String() string

func (*QueryAuctionRequest) Unmarshal

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

func (*QueryAuctionRequest) XXX_DiscardUnknown

func (m *QueryAuctionRequest) XXX_DiscardUnknown()

func (*QueryAuctionRequest) XXX_Marshal

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

func (*QueryAuctionRequest) XXX_Merge

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

func (*QueryAuctionRequest) XXX_Size

func (m *QueryAuctionRequest) XXX_Size() int

func (*QueryAuctionRequest) XXX_Unmarshal

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

type QueryAuctionResponse

type QueryAuctionResponse struct {
	Auction Auction `protobuf:"bytes,1,opt,name=auction,proto3" json:"auction"`
}

QueryAuctionResponse is the response type for the Query/Auction RPC method

func (*QueryAuctionResponse) Descriptor

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

func (*QueryAuctionResponse) GetAuction

func (m *QueryAuctionResponse) GetAuction() Auction

func (*QueryAuctionResponse) Marshal

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

func (*QueryAuctionResponse) MarshalTo

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

func (*QueryAuctionResponse) MarshalToSizedBuffer

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

func (*QueryAuctionResponse) ProtoMessage

func (*QueryAuctionResponse) ProtoMessage()

func (*QueryAuctionResponse) Reset

func (m *QueryAuctionResponse) Reset()

func (*QueryAuctionResponse) Size

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

func (*QueryAuctionResponse) String

func (m *QueryAuctionResponse) String() string

func (*QueryAuctionResponse) Unmarshal

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

func (*QueryAuctionResponse) XXX_DiscardUnknown

func (m *QueryAuctionResponse) XXX_DiscardUnknown()

func (*QueryAuctionResponse) XXX_Marshal

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

func (*QueryAuctionResponse) XXX_Merge

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

func (*QueryAuctionResponse) XXX_Size

func (m *QueryAuctionResponse) XXX_Size() int

func (*QueryAuctionResponse) XXX_Unmarshal

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

type QueryAuctionsRequest

type QueryAuctionsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAuctionsRequest is the request type for the Query/Auctions RPC method

func (*QueryAuctionsRequest) Descriptor

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

func (*QueryAuctionsRequest) GetPagination

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

func (*QueryAuctionsRequest) Marshal

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

func (*QueryAuctionsRequest) MarshalTo

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

func (*QueryAuctionsRequest) MarshalToSizedBuffer

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

func (*QueryAuctionsRequest) ProtoMessage

func (*QueryAuctionsRequest) ProtoMessage()

func (*QueryAuctionsRequest) Reset

func (m *QueryAuctionsRequest) Reset()

func (*QueryAuctionsRequest) Size

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

func (*QueryAuctionsRequest) String

func (m *QueryAuctionsRequest) String() string

func (*QueryAuctionsRequest) Unmarshal

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

func (*QueryAuctionsRequest) XXX_DiscardUnknown

func (m *QueryAuctionsRequest) XXX_DiscardUnknown()

func (*QueryAuctionsRequest) XXX_Marshal

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

func (*QueryAuctionsRequest) XXX_Merge

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

func (*QueryAuctionsRequest) XXX_Size

func (m *QueryAuctionsRequest) XXX_Size() int

func (*QueryAuctionsRequest) XXX_Unmarshal

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

type QueryAuctionsResponse

type QueryAuctionsResponse struct {
	Auctions   []Auction           `protobuf:"bytes,1,rep,name=auctions,proto3" json:"auctions"`
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryAuctionsResponse is the response type for the Query/Auctions RPC method

func (*QueryAuctionsResponse) Descriptor

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

func (*QueryAuctionsResponse) GetAuctions

func (m *QueryAuctionsResponse) GetAuctions() []Auction

func (*QueryAuctionsResponse) GetPagination

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

func (*QueryAuctionsResponse) Marshal

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

func (*QueryAuctionsResponse) MarshalTo

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

func (*QueryAuctionsResponse) MarshalToSizedBuffer

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

func (*QueryAuctionsResponse) ProtoMessage

func (*QueryAuctionsResponse) ProtoMessage()

func (*QueryAuctionsResponse) Reset

func (m *QueryAuctionsResponse) Reset()

func (*QueryAuctionsResponse) Size

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

func (*QueryAuctionsResponse) String

func (m *QueryAuctionsResponse) String() string

func (*QueryAuctionsResponse) Unmarshal

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

func (*QueryAuctionsResponse) XXX_DiscardUnknown

func (m *QueryAuctionsResponse) XXX_DiscardUnknown()

func (*QueryAuctionsResponse) XXX_Marshal

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

func (*QueryAuctionsResponse) XXX_Merge

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

func (*QueryAuctionsResponse) XXX_Size

func (m *QueryAuctionsResponse) XXX_Size() int

func (*QueryAuctionsResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Auction queries the auction info for a specific token
	Auction(ctx context.Context, in *QueryAuctionRequest, opts ...grpc.CallOption) (*QueryAuctionResponse, error)
	// Auctions queries the auction info for a specific token
	Auctions(ctx context.Context, in *QueryAuctionsRequest, opts ...grpc.CallOption) (*QueryAuctionsResponse, 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 QueryServer

type QueryServer interface {
	// Auction queries the auction info for a specific token
	Auction(context.Context, *QueryAuctionRequest) (*QueryAuctionResponse, error)
	// Auctions queries the auction info for a specific token
	Auctions(context.Context, *QueryAuctionsRequest) (*QueryAuctionsResponse, error)
}

QueryServer is the server API for Query service.

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) CreateAuction

func (*UnimplementedMsgServer) PlaceBid

func (*UnimplementedMsgServer) UpdateAuction

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Auction

func (*UnimplementedQueryServer) Auctions

Jump to

Keyboard shortcuts

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