Documentation ¶
Overview ¶
Package types is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func GetAuctionByTimeKey(endTime time.Time, auctionID uint64) []byte
- func GetAuctionKey(auctionID uint64) []byte
- func PackGenesisAuctions(ga []GenesisAuction) ([]*types.Any, error)
- func ParamKeyTable() paramtypes.KeyTable
- func RegisterInterfaces(registry types.InterfaceRegistry)
- func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
- func RegisterMsgServer(s grpc1.Server, srv MsgServer)
- func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error
- func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error
- func RegisterQueryServer(s grpc1.Server, srv QueryServer)
- func Uint64FromBytes(bz []byte) uint64
- func Uint64ToBytes(id uint64) []byte
- func ValidateAuction(a Auction) error
- type AccountKeeper
- type Auction
- type AuctionWithPhase
- type BankKeeper
- type BaseAuction
- func (*BaseAuction) Descriptor() ([]byte, []int)
- func (a BaseAuction) GetBid() sdk.Coin
- func (a BaseAuction) GetBidder() sdk.AccAddress
- func (a BaseAuction) GetEndTime() time.Time
- func (a BaseAuction) GetID() uint64
- func (a BaseAuction) GetInitiator() string
- func (a BaseAuction) GetLot() sdk.Coin
- func (a BaseAuction) GetMaxEndTime() time.Time
- func (m *BaseAuction) Marshal() (dAtA []byte, err error)
- func (m *BaseAuction) MarshalTo(dAtA []byte) (int, error)
- func (m *BaseAuction) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*BaseAuction) ProtoMessage()
- func (m *BaseAuction) Reset()
- func (m *BaseAuction) Size() (n int)
- func (m *BaseAuction) String() string
- func (m *BaseAuction) Unmarshal(dAtA []byte) error
- func (m *BaseAuction) XXX_DiscardUnknown()
- func (m *BaseAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *BaseAuction) XXX_Merge(src proto.Message)
- func (m *BaseAuction) XXX_Size() int
- func (m *BaseAuction) XXX_Unmarshal(b []byte) error
- type CollateralAuction
- func (*CollateralAuction) Descriptor() ([]byte, []int)
- func (a CollateralAuction) GetLotReturns() WeightedAddresses
- func (a CollateralAuction) GetModuleAccountCoins() sdk.Coins
- func (a CollateralAuction) GetPhase() string
- func (a CollateralAuction) GetType() string
- func (a CollateralAuction) IsReversePhase() bool
- func (m *CollateralAuction) Marshal() (dAtA []byte, err error)
- func (m *CollateralAuction) MarshalTo(dAtA []byte) (int, error)
- func (m *CollateralAuction) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*CollateralAuction) ProtoMessage()
- func (m *CollateralAuction) Reset()
- func (m *CollateralAuction) Size() (n int)
- func (m *CollateralAuction) String() string
- func (m *CollateralAuction) Unmarshal(dAtA []byte) error
- func (a CollateralAuction) Validate() error
- func (a CollateralAuction) WithID(id uint64) Auction
- func (m *CollateralAuction) XXX_DiscardUnknown()
- func (m *CollateralAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *CollateralAuction) XXX_Merge(src proto.Message)
- func (m *CollateralAuction) XXX_Size() int
- func (m *CollateralAuction) XXX_Unmarshal(b []byte) error
- type DebtAuction
- func (*DebtAuction) Descriptor() ([]byte, []int)
- func (a DebtAuction) GetModuleAccountCoins() sdk.Coins
- func (a DebtAuction) GetPhase() string
- func (a DebtAuction) GetType() string
- func (m *DebtAuction) Marshal() (dAtA []byte, err error)
- func (m *DebtAuction) MarshalTo(dAtA []byte) (int, error)
- func (m *DebtAuction) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*DebtAuction) ProtoMessage()
- func (m *DebtAuction) Reset()
- func (m *DebtAuction) Size() (n int)
- func (m *DebtAuction) String() string
- func (m *DebtAuction) Unmarshal(dAtA []byte) error
- func (a DebtAuction) Validate() error
- func (a DebtAuction) WithID(id uint64) Auction
- func (m *DebtAuction) XXX_DiscardUnknown()
- func (m *DebtAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *DebtAuction) XXX_Merge(src proto.Message)
- func (m *DebtAuction) XXX_Size() int
- func (m *DebtAuction) XXX_Unmarshal(b []byte) error
- type GenesisAuction
- type GenesisState
- func (*GenesisState) Descriptor() ([]byte, []int)
- func (m *GenesisState) Marshal() (dAtA []byte, err error)
- func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
- func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*GenesisState) ProtoMessage()
- func (m *GenesisState) Reset()
- func (m *GenesisState) Size() (n int)
- func (m *GenesisState) String() string
- func (m *GenesisState) Unmarshal(dAtA []byte) error
- func (gs GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error
- func (gs GenesisState) Validate() error
- func (m *GenesisState) XXX_DiscardUnknown()
- func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GenesisState) XXX_Merge(src proto.Message)
- func (m *GenesisState) XXX_Size() int
- func (m *GenesisState) XXX_Unmarshal(b []byte) error
- type MsgClient
- type MsgPlaceBid
- func (*MsgPlaceBid) Descriptor() ([]byte, []int)
- func (msg MsgPlaceBid) GetSignBytes() []byte
- func (msg MsgPlaceBid) GetSigners() []sdk.AccAddress
- func (m *MsgPlaceBid) Marshal() (dAtA []byte, err error)
- func (m *MsgPlaceBid) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPlaceBid) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPlaceBid) ProtoMessage()
- func (m *MsgPlaceBid) Reset()
- func (msg MsgPlaceBid) Route() string
- func (m *MsgPlaceBid) Size() (n int)
- func (m *MsgPlaceBid) String() string
- func (msg MsgPlaceBid) Type() string
- func (m *MsgPlaceBid) Unmarshal(dAtA []byte) error
- func (msg MsgPlaceBid) ValidateBasic() error
- func (m *MsgPlaceBid) XXX_DiscardUnknown()
- func (m *MsgPlaceBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPlaceBid) XXX_Merge(src proto.Message)
- func (m *MsgPlaceBid) XXX_Size() int
- func (m *MsgPlaceBid) XXX_Unmarshal(b []byte) error
- type MsgPlaceBidResponse
- func (*MsgPlaceBidResponse) Descriptor() ([]byte, []int)
- func (m *MsgPlaceBidResponse) Marshal() (dAtA []byte, err error)
- func (m *MsgPlaceBidResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgPlaceBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*MsgPlaceBidResponse) ProtoMessage()
- func (m *MsgPlaceBidResponse) Reset()
- func (m *MsgPlaceBidResponse) Size() (n int)
- func (m *MsgPlaceBidResponse) String() string
- func (m *MsgPlaceBidResponse) Unmarshal(dAtA []byte) error
- func (m *MsgPlaceBidResponse) XXX_DiscardUnknown()
- func (m *MsgPlaceBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *MsgPlaceBidResponse) XXX_Merge(src proto.Message)
- func (m *MsgPlaceBidResponse) XXX_Size() int
- func (m *MsgPlaceBidResponse) XXX_Unmarshal(b []byte) error
- type MsgServer
- type Params
- func (*Params) Descriptor() ([]byte, []int)
- func (m *Params) Marshal() (dAtA []byte, err error)
- func (m *Params) MarshalTo(dAtA []byte) (int, error)
- func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
- func (*Params) ProtoMessage()
- func (m *Params) Reset()
- func (m *Params) Size() (n int)
- func (m *Params) String() string
- func (m *Params) Unmarshal(dAtA []byte) error
- func (p Params) Validate() error
- func (m *Params) XXX_DiscardUnknown()
- func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Params) XXX_Merge(src proto.Message)
- func (m *Params) XXX_Size() int
- func (m *Params) XXX_Unmarshal(b []byte) error
- type QueryAllAuctionParams
- type QueryAuctionParams
- type QueryAuctionRequest
- func (*QueryAuctionRequest) Descriptor() ([]byte, []int)
- func (m *QueryAuctionRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAuctionRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAuctionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAuctionRequest) ProtoMessage()
- func (m *QueryAuctionRequest) Reset()
- func (m *QueryAuctionRequest) Size() (n int)
- func (m *QueryAuctionRequest) String() string
- func (m *QueryAuctionRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAuctionRequest) XXX_DiscardUnknown()
- func (m *QueryAuctionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAuctionRequest) XXX_Merge(src proto.Message)
- func (m *QueryAuctionRequest) XXX_Size() int
- func (m *QueryAuctionRequest) XXX_Unmarshal(b []byte) error
- type QueryAuctionResponse
- func (*QueryAuctionResponse) Descriptor() ([]byte, []int)
- func (m *QueryAuctionResponse) GetAuction() *types.Any
- func (m *QueryAuctionResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAuctionResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAuctionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAuctionResponse) ProtoMessage()
- func (m *QueryAuctionResponse) Reset()
- func (m *QueryAuctionResponse) Size() (n int)
- func (m *QueryAuctionResponse) String() string
- func (m *QueryAuctionResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAuctionResponse) XXX_DiscardUnknown()
- func (m *QueryAuctionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAuctionResponse) XXX_Merge(src proto.Message)
- func (m *QueryAuctionResponse) XXX_Size() int
- func (m *QueryAuctionResponse) XXX_Unmarshal(b []byte) error
- type QueryAuctionsRequest
- func (*QueryAuctionsRequest) Descriptor() ([]byte, []int)
- func (m *QueryAuctionsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryAuctionsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAuctionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAuctionsRequest) ProtoMessage()
- func (m *QueryAuctionsRequest) Reset()
- func (m *QueryAuctionsRequest) Size() (n int)
- func (m *QueryAuctionsRequest) String() string
- func (m *QueryAuctionsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryAuctionsRequest) XXX_DiscardUnknown()
- func (m *QueryAuctionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAuctionsRequest) XXX_Merge(src proto.Message)
- func (m *QueryAuctionsRequest) XXX_Size() int
- func (m *QueryAuctionsRequest) XXX_Unmarshal(b []byte) error
- type QueryAuctionsResponse
- func (*QueryAuctionsResponse) Descriptor() ([]byte, []int)
- func (m *QueryAuctionsResponse) GetAuctions() []*types.Any
- func (m *QueryAuctionsResponse) GetPagination() *query.PageResponse
- func (m *QueryAuctionsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryAuctionsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryAuctionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryAuctionsResponse) ProtoMessage()
- func (m *QueryAuctionsResponse) Reset()
- func (m *QueryAuctionsResponse) Size() (n int)
- func (m *QueryAuctionsResponse) String() string
- func (m *QueryAuctionsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryAuctionsResponse) XXX_DiscardUnknown()
- func (m *QueryAuctionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryAuctionsResponse) XXX_Merge(src proto.Message)
- func (m *QueryAuctionsResponse) XXX_Size() int
- func (m *QueryAuctionsResponse) XXX_Unmarshal(b []byte) error
- type QueryClient
- type QueryNextAuctionIDRequest
- func (*QueryNextAuctionIDRequest) Descriptor() ([]byte, []int)
- func (m *QueryNextAuctionIDRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryNextAuctionIDRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryNextAuctionIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryNextAuctionIDRequest) ProtoMessage()
- func (m *QueryNextAuctionIDRequest) Reset()
- func (m *QueryNextAuctionIDRequest) Size() (n int)
- func (m *QueryNextAuctionIDRequest) String() string
- func (m *QueryNextAuctionIDRequest) Unmarshal(dAtA []byte) error
- func (m *QueryNextAuctionIDRequest) XXX_DiscardUnknown()
- func (m *QueryNextAuctionIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryNextAuctionIDRequest) XXX_Merge(src proto.Message)
- func (m *QueryNextAuctionIDRequest) XXX_Size() int
- func (m *QueryNextAuctionIDRequest) XXX_Unmarshal(b []byte) error
- type QueryNextAuctionIDResponse
- func (*QueryNextAuctionIDResponse) Descriptor() ([]byte, []int)
- func (m *QueryNextAuctionIDResponse) GetId() uint64
- func (m *QueryNextAuctionIDResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryNextAuctionIDResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryNextAuctionIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryNextAuctionIDResponse) ProtoMessage()
- func (m *QueryNextAuctionIDResponse) Reset()
- func (m *QueryNextAuctionIDResponse) Size() (n int)
- func (m *QueryNextAuctionIDResponse) String() string
- func (m *QueryNextAuctionIDResponse) Unmarshal(dAtA []byte) error
- func (m *QueryNextAuctionIDResponse) XXX_DiscardUnknown()
- func (m *QueryNextAuctionIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryNextAuctionIDResponse) XXX_Merge(src proto.Message)
- func (m *QueryNextAuctionIDResponse) XXX_Size() int
- func (m *QueryNextAuctionIDResponse) XXX_Unmarshal(b []byte) error
- type QueryParamsRequest
- func (*QueryParamsRequest) Descriptor() ([]byte, []int)
- func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsRequest) ProtoMessage()
- func (m *QueryParamsRequest) Reset()
- func (m *QueryParamsRequest) Size() (n int)
- func (m *QueryParamsRequest) String() string
- func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
- func (m *QueryParamsRequest) XXX_DiscardUnknown()
- func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
- func (m *QueryParamsRequest) XXX_Size() int
- func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
- type QueryParamsResponse
- func (*QueryParamsResponse) Descriptor() ([]byte, []int)
- func (m *QueryParamsResponse) GetParams() Params
- func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
- func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
- func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*QueryParamsResponse) ProtoMessage()
- func (m *QueryParamsResponse) Reset()
- func (m *QueryParamsResponse) Size() (n int)
- func (m *QueryParamsResponse) String() string
- func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
- func (m *QueryParamsResponse) XXX_DiscardUnknown()
- func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
- func (m *QueryParamsResponse) XXX_Size() int
- func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
- type QueryServer
- type SurplusAuction
- func (*SurplusAuction) Descriptor() ([]byte, []int)
- func (a SurplusAuction) GetModuleAccountCoins() sdk.Coins
- func (a SurplusAuction) GetPhase() string
- func (a SurplusAuction) GetType() string
- func (m *SurplusAuction) Marshal() (dAtA []byte, err error)
- func (m *SurplusAuction) MarshalTo(dAtA []byte) (int, error)
- func (m *SurplusAuction) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*SurplusAuction) ProtoMessage()
- func (m *SurplusAuction) Reset()
- func (m *SurplusAuction) Size() (n int)
- func (m *SurplusAuction) String() string
- func (m *SurplusAuction) Unmarshal(dAtA []byte) error
- func (a SurplusAuction) Validate() error
- func (a SurplusAuction) WithID(id uint64) Auction
- func (m *SurplusAuction) XXX_DiscardUnknown()
- func (m *SurplusAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *SurplusAuction) XXX_Merge(src proto.Message)
- func (m *SurplusAuction) XXX_Size() int
- func (m *SurplusAuction) XXX_Unmarshal(b []byte) error
- type UnimplementedMsgServer
- type UnimplementedQueryServer
- func (*UnimplementedQueryServer) Auction(ctx context.Context, req *QueryAuctionRequest) (*QueryAuctionResponse, error)
- func (*UnimplementedQueryServer) Auctions(ctx context.Context, req *QueryAuctionsRequest) (*QueryAuctionsResponse, error)
- func (*UnimplementedQueryServer) NextAuctionID(ctx context.Context, req *QueryNextAuctionIDRequest) (*QueryNextAuctionIDResponse, error)
- func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
- type WeightedAddresses
- func (*WeightedAddresses) Descriptor() ([]byte, []int)
- func (m *WeightedAddresses) Marshal() (dAtA []byte, err error)
- func (m *WeightedAddresses) MarshalTo(dAtA []byte) (int, error)
- func (m *WeightedAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*WeightedAddresses) ProtoMessage()
- func (m *WeightedAddresses) Reset()
- func (m *WeightedAddresses) Size() (n int)
- func (m *WeightedAddresses) String() string
- func (m *WeightedAddresses) Unmarshal(dAtA []byte) error
- func (wa WeightedAddresses) Validate() error
- func (m *WeightedAddresses) XXX_DiscardUnknown()
- func (m *WeightedAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *WeightedAddresses) XXX_Merge(src proto.Message)
- func (m *WeightedAddresses) XXX_Size() int
- func (m *WeightedAddresses) XXX_Unmarshal(b []byte) error
Constants ¶
const ( CollateralAuctionType = "collateral" SurplusAuctionType = "surplus" DebtAuctionType = "debt" ForwardAuctionPhase = "forward" ReverseAuctionPhase = "reverse" )
const ( EventTypeAuctionStart = "auction_start" EventTypeAuctionBid = "auction_bid" EventTypeAuctionClose = "auction_close" AttributeValueCategory = ModuleName AttributeKeyAuctionID = "auction_id" AttributeKeyAuctionType = "auction_type" AttributeKeyBidder = "bidder" AttributeKeyLot = "lot" AttributeKeyMaxBid = "max_bid" AttributeKeyBid = "bid" AttributeKeyEndTime = "end_time" AttributeKeyCloseBlock = "close_block" )
Events for the module
const ( // ModuleName The name that will be used throughout the module ModuleName = "auction" // StoreKey Top level store key where all module items will be stored StoreKey = ModuleName // RouterKey Top level router key RouterKey = ModuleName // DefaultParamspace default name for parameter store DefaultParamspace = ModuleName // QuerierRoute route used for abci queries QuerierRoute = ModuleName )
const ( // DefaultMaxAuctionDuration max length of auction DefaultMaxAuctionDuration time.Duration = 2 * 24 * time.Hour // DefaultBidDuration how long an auction gets extended when someone bids DefaultBidDuration time.Duration = 1 * time.Hour )
Defaults for auction params
const ( // QueryGetAuction is the query path for querying one auction QueryGetAuction = "auction" // QueryGetAuctions is the query path for querying all auctions QueryGetAuctions = "auctions" // QueryGetParams is the query path for querying the global auction params QueryGetParams = "params" // QueryNextAuctionID is the query path for querying the id of the next auction QueryNextAuctionID = "next-auction-id" )
const DefaultNextAuctionID uint64 = 1
DefaultNextAuctionID is the starting point for auction IDs.
Variables ¶
var ( ErrInvalidLengthAuction = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowAuction = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupAuction = fmt.Errorf("proto: unexpected end of group") )
var ( // ErrInvalidInitialAuctionID error for when the initial auction ID hasn't been set ErrInvalidInitialAuctionID = sdkerrors.Register(ModuleName, 2, "initial auction ID hasn't been set") // ErrUnrecognizedAuctionType error for unrecognized auction type ErrUnrecognizedAuctionType = sdkerrors.Register(ModuleName, 3, "unrecognized auction type") // ErrAuctionNotFound error for when an auction is not found ErrAuctionNotFound = sdkerrors.Register(ModuleName, 4, "auction not found") // ErrAuctionHasNotExpired error for attempting to close an auction that has not passed its end time ErrAuctionHasNotExpired = sdkerrors.Register(ModuleName, 5, "auction can't be closed as curent block time has not passed auction end time") // ErrAuctionHasExpired error for when an auction is closed and unavailable for bidding ErrAuctionHasExpired = sdkerrors.Register(ModuleName, 6, "auction has closed") // ErrInvalidBidDenom error for when bid denom doesn't match auction bid denom ErrInvalidBidDenom = sdkerrors.Register(ModuleName, 7, "bid denom doesn't match auction bid denom") // ErrInvalidLotDenom error for when lot denom doesn't match auction lot denom ErrInvalidLotDenom = sdkerrors.Register(ModuleName, 8, "lot denom doesn't match auction lot denom") // ErrBidTooSmall error for when bid is not greater than auction's min bid amount ErrBidTooSmall = sdkerrors.Register(ModuleName, 9, "bid is not greater than auction's min new bid amount") // ErrBidTooLarge error for when bid is larger than auction's maximum allowed bid ErrBidTooLarge = sdkerrors.Register(ModuleName, 10, "bid is greater than auction's max bid") // ErrLotTooSmall error for when lot is less than zero ErrLotTooSmall = sdkerrors.Register(ModuleName, 11, "lot is not greater than auction's min new lot amount") // ErrLotTooLarge error for when lot is not smaller than auction's max new lot amount ErrLotTooLarge = sdkerrors.Register(ModuleName, 12, "lot is greater than auction's max new lot amount") )
var ( ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") )
var ( AuctionKeyPrefix = []byte{0x00} // prefix for keys that store auctions AuctionByTimeKeyPrefix = []byte{0x01} // prefix for keys that are part of the auctionsByTime index NextAuctionIDKey = []byte{0x02} // key for the next auction id )
Key prefixes
var ( // DefaultIncrement is the smallest percent change a new bid must have from the old one DefaultIncrement sdk.Dec = sdk.MustNewDecFromStr("0.05") // ParamStoreKeyParams Param store key for auction params KeyBidDuration = []byte("BidDuration") KeyMaxAuctionDuration = []byte("MaxAuctionDuration") KeyIncrementSurplus = []byte("IncrementSurplus") KeyIncrementDebt = []byte("IncrementDebt") KeyIncrementCollateral = []byte("IncrementCollateral") )
var ( ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") )
var DistantFuture = time.Date(9000, 1, 1, 0, 0, 0, 0, time.UTC)
DistantFuture is a very large time value to use as initial the ending time for auctions. It is not set to the max time supported. This can cause problems with time comparisons, see https://stackoverflow.com/a/32620397. Also amino panics when encoding times ≥ the start of year 10000.
var ( // ModuleCdc is an amino codec instance with this module's types registered. // // Deprecated: The codec used for serialization should be provided to this module and // defined at the application level. ModuleCdc = codec.NewAminoCodec(amino) )
Functions ¶
func GetAuctionByTimeKey ¶
GetAuctionByTimeKey returns the key for iterating auctions by time
func GetAuctionKey ¶
GetAuctionKey returns the bytes of an auction key
func PackGenesisAuctions ¶ added in v0.16.0
func PackGenesisAuctions(ga []GenesisAuction) ([]*types.Any, error)
PackGenesisAuctions converts a GenesisAuction slice to Any slice
func ParamKeyTable ¶
func ParamKeyTable() paramtypes.KeyTable
ParamKeyTable Key declaration for parameters
func RegisterInterfaces ¶ added in v0.16.0
func RegisterInterfaces(registry types.InterfaceRegistry)
func RegisterLegacyAminoCodec ¶ added in v0.16.0
func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)
RegisterLegacyAminoCodec registers all the necessary types and interfaces for the governance module.
func RegisterMsgServer ¶ added in v0.16.0
func RegisterQueryHandler ¶ added in v0.16.0
RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterQueryHandlerClient ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
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 ¶ added in v0.16.0
func RegisterQueryServer(s grpc1.Server, srv QueryServer)
func Uint64FromBytes ¶
Uint64FromBytes converts some fixed length bytes back into a uint64.
func Uint64ToBytes ¶
Uint64ToBytes converts a uint64 into fixed length bytes for use in store keys.
func ValidateAuction ¶ added in v0.16.0
ValidateAuction verifies that the auction end time is before max end time
Types ¶
type AccountKeeper ¶ added in v0.16.0
type AccountKeeper interface { GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI GetModuleAccount(ctx sdk.Context, name string) types.ModuleAccountI }
AccountKeeper expected interface for the account keeper (noalias)
type Auction ¶
type Auction interface { proto.Message GetID() uint64 WithID(uint64) Auction GetInitiator() string GetLot() sdk.Coin GetBidder() sdk.AccAddress GetBid() sdk.Coin GetEndTime() time.Time GetMaxEndTime() time.Time GetType() string GetPhase() string }
Auction is an interface for handling common actions on auctions.
type AuctionWithPhase ¶
type AuctionWithPhase struct { Auction Auction `json:"auction" yaml:"auction"` Type string `json:"type" yaml:"type"` Phase string `json:"phase" yaml:"phase"` }
AuctionWithPhase augmented type for collateral auctions which includes auction phase for querying
func NewAuctionWithPhase ¶
func NewAuctionWithPhase(a Auction) AuctionWithPhase
NewAuctionWithPhase returns new AuctionWithPhase
type BankKeeper ¶ added in v0.16.0
type BankKeeper interface { SendCoinsFromModuleToModule(ctx sdk.Context, sender, recipient string, amt sdk.Coins) error SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error BurnCoins(ctx sdk.Context, name string, amt sdk.Coins) error MintCoins(ctx sdk.Context, name string, amt sdk.Coins) error GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins }
BankKeeper defines the expected interface needed to send coins
type BaseAuction ¶
type BaseAuction struct { ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Initiator string `protobuf:"bytes,2,opt,name=initiator,proto3" json:"initiator,omitempty"` Lot types.Coin `protobuf:"bytes,3,opt,name=lot,proto3" json:"lot"` Bidder github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=bidder,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"bidder,omitempty"` Bid types.Coin `protobuf:"bytes,5,opt,name=bid,proto3" json:"bid"` HasReceivedBids bool `protobuf:"varint,6,opt,name=has_received_bids,json=hasReceivedBids,proto3" json:"has_received_bids,omitempty"` EndTime time.Time `protobuf:"bytes,7,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time"` MaxEndTime time.Time `protobuf:"bytes,8,opt,name=max_end_time,json=maxEndTime,proto3,stdtime" json:"max_end_time"` }
BaseAuction defines common attributes of all auctions
func (*BaseAuction) Descriptor ¶ added in v0.16.0
func (*BaseAuction) Descriptor() ([]byte, []int)
func (BaseAuction) GetBid ¶
func (a BaseAuction) GetBid() sdk.Coin
func (BaseAuction) GetBidder ¶
func (a BaseAuction) GetBidder() sdk.AccAddress
func (BaseAuction) GetEndTime ¶
func (a BaseAuction) GetEndTime() time.Time
func (BaseAuction) GetID ¶
func (a BaseAuction) GetID() uint64
func (BaseAuction) GetInitiator ¶
func (a BaseAuction) GetInitiator() string
func (BaseAuction) GetLot ¶
func (a BaseAuction) GetLot() sdk.Coin
func (BaseAuction) GetMaxEndTime ¶ added in v0.16.0
func (a BaseAuction) GetMaxEndTime() time.Time
func (*BaseAuction) Marshal ¶ added in v0.16.0
func (m *BaseAuction) Marshal() (dAtA []byte, err error)
func (*BaseAuction) MarshalTo ¶ added in v0.16.0
func (m *BaseAuction) MarshalTo(dAtA []byte) (int, error)
func (*BaseAuction) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *BaseAuction) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*BaseAuction) ProtoMessage ¶ added in v0.16.0
func (*BaseAuction) ProtoMessage()
func (*BaseAuction) Reset ¶ added in v0.16.0
func (m *BaseAuction) Reset()
func (*BaseAuction) Size ¶ added in v0.16.0
func (m *BaseAuction) Size() (n int)
func (*BaseAuction) String ¶
func (m *BaseAuction) String() string
func (*BaseAuction) Unmarshal ¶ added in v0.16.0
func (m *BaseAuction) Unmarshal(dAtA []byte) error
func (*BaseAuction) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *BaseAuction) XXX_DiscardUnknown()
func (*BaseAuction) XXX_Marshal ¶ added in v0.16.0
func (m *BaseAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*BaseAuction) XXX_Merge ¶ added in v0.16.0
func (m *BaseAuction) XXX_Merge(src proto.Message)
func (*BaseAuction) XXX_Size ¶ added in v0.16.0
func (m *BaseAuction) XXX_Size() int
func (*BaseAuction) XXX_Unmarshal ¶ added in v0.16.0
func (m *BaseAuction) XXX_Unmarshal(b []byte) error
type CollateralAuction ¶
type CollateralAuction struct { BaseAuction `protobuf:"bytes,1,opt,name=base_auction,json=baseAuction,proto3,embedded=base_auction" json:"base_auction"` CorrespondingDebt types.Coin `protobuf:"bytes,2,opt,name=corresponding_debt,json=correspondingDebt,proto3" json:"corresponding_debt"` MaxBid types.Coin `protobuf:"bytes,3,opt,name=max_bid,json=maxBid,proto3" json:"max_bid"` LotReturns WeightedAddresses `protobuf:"bytes,4,opt,name=lot_returns,json=lotReturns,proto3" json:"lot_returns"` }
CollateralAuction is a two phase auction. Initially, in forward auction phase, bids can be placed up to a max bid. Then it switches to a reverse auction phase, where the initial amount up for auction is bid down. Unsold Lot is sent to LotReturns, being divided among the addresses by weight. Collateral auctions are normally used to sell off collateral seized from CDPs.
func NewCollateralAuction ¶
func NewCollateralAuction(seller string, lot sdk.Coin, endTime time.Time, maxBid sdk.Coin, lotReturns WeightedAddresses, debt sdk.Coin) CollateralAuction
NewCollateralAuction returns a new collateral auction.
func (*CollateralAuction) Descriptor ¶ added in v0.16.0
func (*CollateralAuction) Descriptor() ([]byte, []int)
func (CollateralAuction) GetLotReturns ¶ added in v0.11.0
func (a CollateralAuction) GetLotReturns() WeightedAddresses
GetLotReturns returns the auction's lot returns as weighted addresses
func (CollateralAuction) GetModuleAccountCoins ¶
func (a CollateralAuction) GetModuleAccountCoins() sdk.Coins
GetModuleAccountCoins returns the total number of coins held in the module account for this auction. It is used in genesis initialize the module account correctly.
func (CollateralAuction) GetPhase ¶
func (a CollateralAuction) GetPhase() string
GetPhase returns the direction of a collateral auction.
func (CollateralAuction) GetType ¶
func (a CollateralAuction) GetType() string
GetType returns the auction type. Used to identify auctions in event attributes.
func (CollateralAuction) IsReversePhase ¶
func (a CollateralAuction) IsReversePhase() bool
IsReversePhase returns whether the auction has switched over to reverse phase or not. CollateralAuctions initially start in forward phase.
func (*CollateralAuction) Marshal ¶ added in v0.16.0
func (m *CollateralAuction) Marshal() (dAtA []byte, err error)
func (*CollateralAuction) MarshalTo ¶ added in v0.16.0
func (m *CollateralAuction) MarshalTo(dAtA []byte) (int, error)
func (*CollateralAuction) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *CollateralAuction) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*CollateralAuction) ProtoMessage ¶ added in v0.16.0
func (*CollateralAuction) ProtoMessage()
func (*CollateralAuction) Reset ¶ added in v0.16.0
func (m *CollateralAuction) Reset()
func (*CollateralAuction) Size ¶ added in v0.16.0
func (m *CollateralAuction) Size() (n int)
func (*CollateralAuction) String ¶
func (m *CollateralAuction) String() string
func (*CollateralAuction) Unmarshal ¶ added in v0.16.0
func (m *CollateralAuction) Unmarshal(dAtA []byte) error
func (CollateralAuction) Validate ¶ added in v0.8.0
func (a CollateralAuction) Validate() error
Validate validates the CollateralAuction fields values.
func (CollateralAuction) WithID ¶
func (a CollateralAuction) WithID(id uint64) Auction
func (*CollateralAuction) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *CollateralAuction) XXX_DiscardUnknown()
func (*CollateralAuction) XXX_Marshal ¶ added in v0.16.0
func (m *CollateralAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*CollateralAuction) XXX_Merge ¶ added in v0.16.0
func (m *CollateralAuction) XXX_Merge(src proto.Message)
func (*CollateralAuction) XXX_Size ¶ added in v0.16.0
func (m *CollateralAuction) XXX_Size() int
func (*CollateralAuction) XXX_Unmarshal ¶ added in v0.16.0
func (m *CollateralAuction) XXX_Unmarshal(b []byte) error
type DebtAuction ¶
type DebtAuction struct { BaseAuction `protobuf:"bytes,1,opt,name=base_auction,json=baseAuction,proto3,embedded=base_auction" json:"base_auction"` CorrespondingDebt types.Coin `protobuf:"bytes,2,opt,name=corresponding_debt,json=correspondingDebt,proto3" json:"corresponding_debt"` }
DebtAuction is a reverse auction that mints what it pays out. It is normally used to acquire pegged asset to cover the CDP system's debts that were not covered by selling collateral.
func NewDebtAuction ¶
func NewDebtAuction(buyerModAccName string, bid sdk.Coin, initialLot sdk.Coin, endTime time.Time, debt sdk.Coin) DebtAuction
NewDebtAuction returns a new debt auction.
func (*DebtAuction) Descriptor ¶ added in v0.16.0
func (*DebtAuction) Descriptor() ([]byte, []int)
func (DebtAuction) GetModuleAccountCoins ¶
func (a DebtAuction) GetModuleAccountCoins() sdk.Coins
GetModuleAccountCoins returns the total number of coins held in the module account for this auction. It is used in genesis initialize the module account correctly.
func (DebtAuction) GetPhase ¶
func (a DebtAuction) GetPhase() string
GetPhase returns the direction of a debt auction, which never changes.
func (DebtAuction) GetType ¶
func (a DebtAuction) GetType() string
GetType returns the auction type. Used to identify auctions in event attributes.
func (*DebtAuction) Marshal ¶ added in v0.16.0
func (m *DebtAuction) Marshal() (dAtA []byte, err error)
func (*DebtAuction) MarshalTo ¶ added in v0.16.0
func (m *DebtAuction) MarshalTo(dAtA []byte) (int, error)
func (*DebtAuction) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *DebtAuction) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*DebtAuction) ProtoMessage ¶ added in v0.16.0
func (*DebtAuction) ProtoMessage()
func (*DebtAuction) Reset ¶ added in v0.16.0
func (m *DebtAuction) Reset()
func (*DebtAuction) Size ¶ added in v0.16.0
func (m *DebtAuction) Size() (n int)
func (*DebtAuction) String ¶ added in v0.16.0
func (m *DebtAuction) String() string
func (*DebtAuction) Unmarshal ¶ added in v0.16.0
func (m *DebtAuction) Unmarshal(dAtA []byte) error
func (DebtAuction) Validate ¶ added in v0.8.0
func (a DebtAuction) Validate() error
Validate validates the DebtAuction fields values.
func (DebtAuction) WithID ¶
func (a DebtAuction) WithID(id uint64) Auction
func (*DebtAuction) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *DebtAuction) XXX_DiscardUnknown()
func (*DebtAuction) XXX_Marshal ¶ added in v0.16.0
func (m *DebtAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DebtAuction) XXX_Merge ¶ added in v0.16.0
func (m *DebtAuction) XXX_Merge(src proto.Message)
func (*DebtAuction) XXX_Size ¶ added in v0.16.0
func (m *DebtAuction) XXX_Size() int
func (*DebtAuction) XXX_Unmarshal ¶ added in v0.16.0
func (m *DebtAuction) XXX_Unmarshal(b []byte) error
type GenesisAuction ¶
GenesisAuction extends the auction interface to add functionality needed for initializing auctions from genesis.
func UnpackGenesisAuctions ¶ added in v0.16.0
func UnpackGenesisAuctions(genesisAuctionsAny []*types.Any) ([]GenesisAuction, error)
UnpackGenesisAuctions converts Any slice to GenesisAuctions slice
type GenesisState ¶
type GenesisState struct { NextAuctionId uint64 `protobuf:"varint,1,opt,name=next_auction_id,json=nextAuctionId,proto3" json:"next_auction_id,omitempty"` Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` // Genesis auctions Auctions []*types.Any `protobuf:"bytes,3,rep,name=auctions,proto3" json:"auctions,omitempty"` }
GenesisState defines the auction module's genesis state.
func DefaultGenesisState ¶
func DefaultGenesisState() *GenesisState
DefaultGenesisState returns the default genesis state for auction module.
func NewGenesisState ¶
func NewGenesisState(nextID uint64, ap Params, ga []GenesisAuction) (*GenesisState, error)
NewGenesisState returns a new genesis state object for auctions module.
func (*GenesisState) Descriptor ¶ added in v0.16.0
func (*GenesisState) Descriptor() ([]byte, []int)
func (*GenesisState) Marshal ¶ added in v0.16.0
func (m *GenesisState) Marshal() (dAtA []byte, err error)
func (*GenesisState) MarshalTo ¶ added in v0.16.0
func (m *GenesisState) MarshalTo(dAtA []byte) (int, error)
func (*GenesisState) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*GenesisState) ProtoMessage ¶ added in v0.16.0
func (*GenesisState) ProtoMessage()
func (*GenesisState) Reset ¶ added in v0.16.0
func (m *GenesisState) Reset()
func (*GenesisState) Size ¶ added in v0.16.0
func (m *GenesisState) Size() (n int)
func (*GenesisState) String ¶ added in v0.16.0
func (m *GenesisState) String() string
func (*GenesisState) Unmarshal ¶ added in v0.16.0
func (m *GenesisState) Unmarshal(dAtA []byte) error
func (GenesisState) UnpackInterfaces ¶ added in v0.16.0
func (gs GenesisState) UnpackInterfaces(unpacker types.AnyUnpacker) error
UnpackInterfaces hooks into unmarshalling to unpack any interface types contained within the GenesisState.
func (GenesisState) Validate ¶
func (gs GenesisState) Validate() error
Validate validates genesis inputs. It returns error if validation of any input fails.
func (*GenesisState) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *GenesisState) XXX_DiscardUnknown()
func (*GenesisState) XXX_Marshal ¶ added in v0.16.0
func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GenesisState) XXX_Merge ¶ added in v0.16.0
func (m *GenesisState) XXX_Merge(src proto.Message)
func (*GenesisState) XXX_Size ¶ added in v0.16.0
func (m *GenesisState) XXX_Size() int
func (*GenesisState) XXX_Unmarshal ¶ added in v0.16.0
func (m *GenesisState) XXX_Unmarshal(b []byte) error
type MsgClient ¶ added in v0.16.0
type MsgClient interface { // PlaceBid message type used by bidders to place bids on auctions PlaceBid(ctx context.Context, in *MsgPlaceBid, opts ...grpc.CallOption) (*MsgPlaceBidResponse, 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 ¶ added in v0.16.0
func NewMsgClient(cc grpc1.ClientConn) MsgClient
type MsgPlaceBid ¶
type MsgPlaceBid struct { AuctionId uint64 `protobuf:"varint,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"` Bidder string `protobuf:"bytes,2,opt,name=bidder,proto3" json:"bidder,omitempty"` Amount types.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount"` }
MsgPlaceBid represents a message used by bidders to place bids on auctions
func NewMsgPlaceBid ¶
func NewMsgPlaceBid(auctionID uint64, bidder string, amt sdk.Coin) MsgPlaceBid
NewMsgPlaceBid returns a new MsgPlaceBid.
func (*MsgPlaceBid) Descriptor ¶ added in v0.16.0
func (*MsgPlaceBid) Descriptor() ([]byte, []int)
func (MsgPlaceBid) GetSignBytes ¶
func (msg MsgPlaceBid) GetSignBytes() []byte
GetSignBytes gets the canonical byte representation of the Msg.
func (MsgPlaceBid) GetSigners ¶
func (msg MsgPlaceBid) GetSigners() []sdk.AccAddress
GetSigners returns the addresses of signers that must sign.
func (*MsgPlaceBid) Marshal ¶ added in v0.16.0
func (m *MsgPlaceBid) Marshal() (dAtA []byte, err error)
func (*MsgPlaceBid) MarshalTo ¶ added in v0.16.0
func (m *MsgPlaceBid) MarshalTo(dAtA []byte) (int, error)
func (*MsgPlaceBid) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgPlaceBid) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPlaceBid) ProtoMessage ¶ added in v0.16.0
func (*MsgPlaceBid) ProtoMessage()
func (*MsgPlaceBid) Reset ¶ added in v0.16.0
func (m *MsgPlaceBid) Reset()
func (MsgPlaceBid) Route ¶
func (msg MsgPlaceBid) Route() string
Route return the message type used for routing the message.
func (*MsgPlaceBid) Size ¶ added in v0.16.0
func (m *MsgPlaceBid) Size() (n int)
func (*MsgPlaceBid) String ¶ added in v0.8.0
func (m *MsgPlaceBid) String() string
func (MsgPlaceBid) Type ¶
func (msg MsgPlaceBid) Type() string
Type returns a human-readable string for the message, intended for utilization within tags.
func (*MsgPlaceBid) Unmarshal ¶ added in v0.16.0
func (m *MsgPlaceBid) Unmarshal(dAtA []byte) error
func (MsgPlaceBid) ValidateBasic ¶
func (msg MsgPlaceBid) ValidateBasic() error
ValidateBasic does a simple validation check that doesn't require access to state.
func (*MsgPlaceBid) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *MsgPlaceBid) XXX_DiscardUnknown()
func (*MsgPlaceBid) XXX_Marshal ¶ added in v0.16.0
func (m *MsgPlaceBid) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPlaceBid) XXX_Merge ¶ added in v0.16.0
func (m *MsgPlaceBid) XXX_Merge(src proto.Message)
func (*MsgPlaceBid) XXX_Size ¶ added in v0.16.0
func (m *MsgPlaceBid) XXX_Size() int
func (*MsgPlaceBid) XXX_Unmarshal ¶ added in v0.16.0
func (m *MsgPlaceBid) XXX_Unmarshal(b []byte) error
type MsgPlaceBidResponse ¶ added in v0.16.0
type MsgPlaceBidResponse struct { }
MsgPlaceBidResponse defines the Msg/PlaceBid response type.
func (*MsgPlaceBidResponse) Descriptor ¶ added in v0.16.0
func (*MsgPlaceBidResponse) Descriptor() ([]byte, []int)
func (*MsgPlaceBidResponse) Marshal ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) Marshal() (dAtA []byte, err error)
func (*MsgPlaceBidResponse) MarshalTo ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) MarshalTo(dAtA []byte) (int, error)
func (*MsgPlaceBidResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgPlaceBidResponse) ProtoMessage ¶ added in v0.16.0
func (*MsgPlaceBidResponse) ProtoMessage()
func (*MsgPlaceBidResponse) Reset ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) Reset()
func (*MsgPlaceBidResponse) Size ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) Size() (n int)
func (*MsgPlaceBidResponse) String ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) String() string
func (*MsgPlaceBidResponse) Unmarshal ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) Unmarshal(dAtA []byte) error
func (*MsgPlaceBidResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) XXX_DiscardUnknown()
func (*MsgPlaceBidResponse) XXX_Marshal ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*MsgPlaceBidResponse) XXX_Merge ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) XXX_Merge(src proto.Message)
func (*MsgPlaceBidResponse) XXX_Size ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) XXX_Size() int
func (*MsgPlaceBidResponse) XXX_Unmarshal ¶ added in v0.16.0
func (m *MsgPlaceBidResponse) XXX_Unmarshal(b []byte) error
type MsgServer ¶ added in v0.16.0
type MsgServer interface { // PlaceBid message type used by bidders to place bids on auctions PlaceBid(context.Context, *MsgPlaceBid) (*MsgPlaceBidResponse, error) }
MsgServer is the server API for Msg service.
type Params ¶
type Params struct { MaxAuctionDuration time.Duration `protobuf:"bytes,1,opt,name=max_auction_duration,json=maxAuctionDuration,proto3,stdduration" json:"max_auction_duration"` BidDuration time.Duration `protobuf:"bytes,2,opt,name=bid_duration,json=bidDuration,proto3,stdduration" json:"bid_duration"` IncrementSurplus github_com_cosmos_cosmos_sdk_types.Dec `` /* 149-byte string literal not displayed */ IncrementDebt github_com_cosmos_cosmos_sdk_types.Dec `` /* 140-byte string literal not displayed */ IncrementCollateral github_com_cosmos_cosmos_sdk_types.Dec `` /* 158-byte string literal not displayed */ }
Params defines the parameters for the issuance module.
func DefaultParams ¶
func DefaultParams() Params
DefaultParams returns the default parameters for auctions.
func NewParams ¶
func NewParams(maxAuctionDuration, bidDuration time.Duration, incrementSurplus, incrementDebt, incrementCollateral sdk.Dec) Params
NewParams returns a new Params object.
func (*Params) Descriptor ¶ added in v0.16.0
func (*Params) MarshalToSizedBuffer ¶ added in v0.16.0
func (*Params) ParamSetPairs ¶
func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs
ParamSetPairs implements the ParamSet interface and returns all the key/value pairs.
func (*Params) ProtoMessage ¶ added in v0.16.0
func (*Params) ProtoMessage()
func (*Params) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *Params) XXX_DiscardUnknown()
func (*Params) XXX_Marshal ¶ added in v0.16.0
func (*Params) XXX_Unmarshal ¶ added in v0.16.0
type QueryAllAuctionParams ¶
type QueryAllAuctionParams struct { Page int `json:"page" yaml:"page"` Limit int `json:"limit" yaml:"limit"` Type string `json:"type" yaml:"type"` Owner sdk.AccAddress `json:"owner" yaml:"owner"` Denom string `json:"denom" yaml:"denom"` Phase string `json:"phase" yaml:"phase"` }
QueryAllAuctionParams is the params for an auctions query
func NewQueryAllAuctionParams ¶
func NewQueryAllAuctionParams(page, limit int, aucType, aucDenom, aucPhase string, aucOwner sdk.AccAddress) QueryAllAuctionParams
NewQueryAllAuctionParams creates a new QueryAllAuctionParams
type QueryAuctionParams ¶
type QueryAuctionParams struct {
AuctionID uint64
}
QueryAuctionParams params for query /auction/auction
func NewQueryAuctionParams ¶ added in v0.11.0
func NewQueryAuctionParams(id uint64) QueryAuctionParams
NewQueryAuctionParams returns a new QueryAuctionParams
type QueryAuctionRequest ¶ added in v0.16.0
type QueryAuctionRequest struct {
AuctionId uint64 `protobuf:"varint,1,opt,name=auction_id,json=auctionId,proto3" json:"auction_id,omitempty"`
}
QueryAuctionRequest is the request type for the Query/Auction RPC method.
func (*QueryAuctionRequest) Descriptor ¶ added in v0.16.0
func (*QueryAuctionRequest) Descriptor() ([]byte, []int)
func (*QueryAuctionRequest) Marshal ¶ added in v0.16.0
func (m *QueryAuctionRequest) Marshal() (dAtA []byte, err error)
func (*QueryAuctionRequest) MarshalTo ¶ added in v0.16.0
func (m *QueryAuctionRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAuctionRequest) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryAuctionRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAuctionRequest) ProtoMessage ¶ added in v0.16.0
func (*QueryAuctionRequest) ProtoMessage()
func (*QueryAuctionRequest) Reset ¶ added in v0.16.0
func (m *QueryAuctionRequest) Reset()
func (*QueryAuctionRequest) Size ¶ added in v0.16.0
func (m *QueryAuctionRequest) Size() (n int)
func (*QueryAuctionRequest) String ¶ added in v0.16.0
func (m *QueryAuctionRequest) String() string
func (*QueryAuctionRequest) Unmarshal ¶ added in v0.16.0
func (m *QueryAuctionRequest) Unmarshal(dAtA []byte) error
func (*QueryAuctionRequest) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryAuctionRequest) XXX_DiscardUnknown()
func (*QueryAuctionRequest) XXX_Marshal ¶ added in v0.16.0
func (m *QueryAuctionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAuctionRequest) XXX_Merge ¶ added in v0.16.0
func (m *QueryAuctionRequest) XXX_Merge(src proto.Message)
func (*QueryAuctionRequest) XXX_Size ¶ added in v0.16.0
func (m *QueryAuctionRequest) XXX_Size() int
func (*QueryAuctionRequest) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryAuctionRequest) XXX_Unmarshal(b []byte) error
type QueryAuctionResponse ¶ added in v0.16.0
type QueryAuctionResponse struct {
Auction *types.Any `protobuf:"bytes,1,opt,name=auction,proto3" json:"auction,omitempty"`
}
QueryAuctionResponse is the response type for the Query/Auction RPC method.
func (*QueryAuctionResponse) Descriptor ¶ added in v0.16.0
func (*QueryAuctionResponse) Descriptor() ([]byte, []int)
func (*QueryAuctionResponse) GetAuction ¶ added in v0.16.0
func (m *QueryAuctionResponse) GetAuction() *types.Any
func (*QueryAuctionResponse) Marshal ¶ added in v0.16.0
func (m *QueryAuctionResponse) Marshal() (dAtA []byte, err error)
func (*QueryAuctionResponse) MarshalTo ¶ added in v0.16.0
func (m *QueryAuctionResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAuctionResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryAuctionResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAuctionResponse) ProtoMessage ¶ added in v0.16.0
func (*QueryAuctionResponse) ProtoMessage()
func (*QueryAuctionResponse) Reset ¶ added in v0.16.0
func (m *QueryAuctionResponse) Reset()
func (*QueryAuctionResponse) Size ¶ added in v0.16.0
func (m *QueryAuctionResponse) Size() (n int)
func (*QueryAuctionResponse) String ¶ added in v0.16.0
func (m *QueryAuctionResponse) String() string
func (*QueryAuctionResponse) Unmarshal ¶ added in v0.16.0
func (m *QueryAuctionResponse) Unmarshal(dAtA []byte) error
func (*QueryAuctionResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryAuctionResponse) XXX_DiscardUnknown()
func (*QueryAuctionResponse) XXX_Marshal ¶ added in v0.16.0
func (m *QueryAuctionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAuctionResponse) XXX_Merge ¶ added in v0.16.0
func (m *QueryAuctionResponse) XXX_Merge(src proto.Message)
func (*QueryAuctionResponse) XXX_Size ¶ added in v0.16.0
func (m *QueryAuctionResponse) XXX_Size() int
func (*QueryAuctionResponse) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryAuctionResponse) XXX_Unmarshal(b []byte) error
type QueryAuctionsRequest ¶ added in v0.16.0
type QueryAuctionsRequest struct { Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"` Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` Denom string `protobuf:"bytes,3,opt,name=denom,proto3" json:"denom,omitempty"` Phase string `protobuf:"bytes,4,opt,name=phase,proto3" json:"phase,omitempty"` // pagination defines an optional pagination for the request. Pagination *query.PageRequest `protobuf:"bytes,5,opt,name=pagination,proto3" json:"pagination,omitempty"` }
QueryAuctionsRequest is the request type for the Query/Auctions RPC method.
func (*QueryAuctionsRequest) Descriptor ¶ added in v0.16.0
func (*QueryAuctionsRequest) Descriptor() ([]byte, []int)
func (*QueryAuctionsRequest) Marshal ¶ added in v0.16.0
func (m *QueryAuctionsRequest) Marshal() (dAtA []byte, err error)
func (*QueryAuctionsRequest) MarshalTo ¶ added in v0.16.0
func (m *QueryAuctionsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryAuctionsRequest) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryAuctionsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAuctionsRequest) ProtoMessage ¶ added in v0.16.0
func (*QueryAuctionsRequest) ProtoMessage()
func (*QueryAuctionsRequest) Reset ¶ added in v0.16.0
func (m *QueryAuctionsRequest) Reset()
func (*QueryAuctionsRequest) Size ¶ added in v0.16.0
func (m *QueryAuctionsRequest) Size() (n int)
func (*QueryAuctionsRequest) String ¶ added in v0.16.0
func (m *QueryAuctionsRequest) String() string
func (*QueryAuctionsRequest) Unmarshal ¶ added in v0.16.0
func (m *QueryAuctionsRequest) Unmarshal(dAtA []byte) error
func (*QueryAuctionsRequest) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryAuctionsRequest) XXX_DiscardUnknown()
func (*QueryAuctionsRequest) XXX_Marshal ¶ added in v0.16.0
func (m *QueryAuctionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAuctionsRequest) XXX_Merge ¶ added in v0.16.0
func (m *QueryAuctionsRequest) XXX_Merge(src proto.Message)
func (*QueryAuctionsRequest) XXX_Size ¶ added in v0.16.0
func (m *QueryAuctionsRequest) XXX_Size() int
func (*QueryAuctionsRequest) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryAuctionsRequest) XXX_Unmarshal(b []byte) error
type QueryAuctionsResponse ¶ added in v0.16.0
type QueryAuctionsResponse struct { Auctions []*types.Any `protobuf:"bytes,1,rep,name=auctions,proto3" json:"auctions,omitempty"` // pagination defines the pagination in the response. 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 ¶ added in v0.16.0
func (*QueryAuctionsResponse) Descriptor() ([]byte, []int)
func (*QueryAuctionsResponse) GetAuctions ¶ added in v0.16.0
func (m *QueryAuctionsResponse) GetAuctions() []*types.Any
func (*QueryAuctionsResponse) GetPagination ¶ added in v0.16.0
func (m *QueryAuctionsResponse) GetPagination() *query.PageResponse
func (*QueryAuctionsResponse) Marshal ¶ added in v0.16.0
func (m *QueryAuctionsResponse) Marshal() (dAtA []byte, err error)
func (*QueryAuctionsResponse) MarshalTo ¶ added in v0.16.0
func (m *QueryAuctionsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryAuctionsResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryAuctionsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryAuctionsResponse) ProtoMessage ¶ added in v0.16.0
func (*QueryAuctionsResponse) ProtoMessage()
func (*QueryAuctionsResponse) Reset ¶ added in v0.16.0
func (m *QueryAuctionsResponse) Reset()
func (*QueryAuctionsResponse) Size ¶ added in v0.16.0
func (m *QueryAuctionsResponse) Size() (n int)
func (*QueryAuctionsResponse) String ¶ added in v0.16.0
func (m *QueryAuctionsResponse) String() string
func (*QueryAuctionsResponse) Unmarshal ¶ added in v0.16.0
func (m *QueryAuctionsResponse) Unmarshal(dAtA []byte) error
func (*QueryAuctionsResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryAuctionsResponse) XXX_DiscardUnknown()
func (*QueryAuctionsResponse) XXX_Marshal ¶ added in v0.16.0
func (m *QueryAuctionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryAuctionsResponse) XXX_Merge ¶ added in v0.16.0
func (m *QueryAuctionsResponse) XXX_Merge(src proto.Message)
func (*QueryAuctionsResponse) XXX_Size ¶ added in v0.16.0
func (m *QueryAuctionsResponse) XXX_Size() int
func (*QueryAuctionsResponse) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryAuctionsResponse) XXX_Unmarshal(b []byte) error
type QueryClient ¶ added in v0.16.0
type QueryClient interface { // Params queries all parameters of the auction module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Auction queries an individual Auction by auction ID Auction(ctx context.Context, in *QueryAuctionRequest, opts ...grpc.CallOption) (*QueryAuctionResponse, error) // Auctions queries auctions filtered by asset denom, owner address, phase, and auction type Auctions(ctx context.Context, in *QueryAuctionsRequest, opts ...grpc.CallOption) (*QueryAuctionsResponse, error) // NextAuctionID queries the next auction ID NextAuctionID(ctx context.Context, in *QueryNextAuctionIDRequest, opts ...grpc.CallOption) (*QueryNextAuctionIDResponse, 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 ¶ added in v0.16.0
func NewQueryClient(cc grpc1.ClientConn) QueryClient
type QueryNextAuctionIDRequest ¶ added in v0.16.0
type QueryNextAuctionIDRequest struct { }
QueryNextAuctionIDRequest defines the request type for querying x/auction next auction ID.
func (*QueryNextAuctionIDRequest) Descriptor ¶ added in v0.16.0
func (*QueryNextAuctionIDRequest) Descriptor() ([]byte, []int)
func (*QueryNextAuctionIDRequest) Marshal ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) Marshal() (dAtA []byte, err error)
func (*QueryNextAuctionIDRequest) MarshalTo ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryNextAuctionIDRequest) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryNextAuctionIDRequest) ProtoMessage ¶ added in v0.16.0
func (*QueryNextAuctionIDRequest) ProtoMessage()
func (*QueryNextAuctionIDRequest) Reset ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) Reset()
func (*QueryNextAuctionIDRequest) Size ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) Size() (n int)
func (*QueryNextAuctionIDRequest) String ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) String() string
func (*QueryNextAuctionIDRequest) Unmarshal ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) Unmarshal(dAtA []byte) error
func (*QueryNextAuctionIDRequest) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) XXX_DiscardUnknown()
func (*QueryNextAuctionIDRequest) XXX_Marshal ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryNextAuctionIDRequest) XXX_Merge ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) XXX_Merge(src proto.Message)
func (*QueryNextAuctionIDRequest) XXX_Size ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) XXX_Size() int
func (*QueryNextAuctionIDRequest) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryNextAuctionIDRequest) XXX_Unmarshal(b []byte) error
type QueryNextAuctionIDResponse ¶ added in v0.16.0
type QueryNextAuctionIDResponse struct {
Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}
QueryNextAuctionIDResponse defines the response type for querying x/auction next auction ID.
func (*QueryNextAuctionIDResponse) Descriptor ¶ added in v0.16.0
func (*QueryNextAuctionIDResponse) Descriptor() ([]byte, []int)
func (*QueryNextAuctionIDResponse) GetId ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) GetId() uint64
func (*QueryNextAuctionIDResponse) Marshal ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) Marshal() (dAtA []byte, err error)
func (*QueryNextAuctionIDResponse) MarshalTo ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryNextAuctionIDResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryNextAuctionIDResponse) ProtoMessage ¶ added in v0.16.0
func (*QueryNextAuctionIDResponse) ProtoMessage()
func (*QueryNextAuctionIDResponse) Reset ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) Reset()
func (*QueryNextAuctionIDResponse) Size ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) Size() (n int)
func (*QueryNextAuctionIDResponse) String ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) String() string
func (*QueryNextAuctionIDResponse) Unmarshal ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) Unmarshal(dAtA []byte) error
func (*QueryNextAuctionIDResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) XXX_DiscardUnknown()
func (*QueryNextAuctionIDResponse) XXX_Marshal ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryNextAuctionIDResponse) XXX_Merge ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) XXX_Merge(src proto.Message)
func (*QueryNextAuctionIDResponse) XXX_Size ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) XXX_Size() int
func (*QueryNextAuctionIDResponse) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryNextAuctionIDResponse) XXX_Unmarshal(b []byte) error
type QueryParamsRequest ¶ added in v0.16.0
type QueryParamsRequest struct { }
QueryParamsRequest defines the request type for querying x/auction parameters.
func (*QueryParamsRequest) Descriptor ¶ added in v0.16.0
func (*QueryParamsRequest) Descriptor() ([]byte, []int)
func (*QueryParamsRequest) Marshal ¶ added in v0.16.0
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error)
func (*QueryParamsRequest) MarshalTo ¶ added in v0.16.0
func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsRequest) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsRequest) ProtoMessage ¶ added in v0.16.0
func (*QueryParamsRequest) ProtoMessage()
func (*QueryParamsRequest) Reset ¶ added in v0.16.0
func (m *QueryParamsRequest) Reset()
func (*QueryParamsRequest) Size ¶ added in v0.16.0
func (m *QueryParamsRequest) Size() (n int)
func (*QueryParamsRequest) String ¶ added in v0.16.0
func (m *QueryParamsRequest) String() string
func (*QueryParamsRequest) Unmarshal ¶ added in v0.16.0
func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error
func (*QueryParamsRequest) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_DiscardUnknown()
func (*QueryParamsRequest) XXX_Marshal ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsRequest) XXX_Merge ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_Merge(src proto.Message)
func (*QueryParamsRequest) XXX_Size ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_Size() int
func (*QueryParamsRequest) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error
type QueryParamsResponse ¶ added in v0.16.0
type QueryParamsResponse struct {
Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}
QueryParamsResponse defines the response type for querying x/auction parameters.
func (*QueryParamsResponse) Descriptor ¶ added in v0.16.0
func (*QueryParamsResponse) Descriptor() ([]byte, []int)
func (*QueryParamsResponse) GetParams ¶ added in v0.16.0
func (m *QueryParamsResponse) GetParams() Params
func (*QueryParamsResponse) Marshal ¶ added in v0.16.0
func (m *QueryParamsResponse) Marshal() (dAtA []byte, err error)
func (*QueryParamsResponse) MarshalTo ¶ added in v0.16.0
func (m *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error)
func (*QueryParamsResponse) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*QueryParamsResponse) ProtoMessage ¶ added in v0.16.0
func (*QueryParamsResponse) ProtoMessage()
func (*QueryParamsResponse) Reset ¶ added in v0.16.0
func (m *QueryParamsResponse) Reset()
func (*QueryParamsResponse) Size ¶ added in v0.16.0
func (m *QueryParamsResponse) Size() (n int)
func (*QueryParamsResponse) String ¶ added in v0.16.0
func (m *QueryParamsResponse) String() string
func (*QueryParamsResponse) Unmarshal ¶ added in v0.16.0
func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error
func (*QueryParamsResponse) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_DiscardUnknown()
func (*QueryParamsResponse) XXX_Marshal ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryParamsResponse) XXX_Merge ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_Merge(src proto.Message)
func (*QueryParamsResponse) XXX_Size ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_Size() int
func (*QueryParamsResponse) XXX_Unmarshal ¶ added in v0.16.0
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error
type QueryServer ¶ added in v0.16.0
type QueryServer interface { // Params queries all parameters of the auction module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) // Auction queries an individual Auction by auction ID Auction(context.Context, *QueryAuctionRequest) (*QueryAuctionResponse, error) // Auctions queries auctions filtered by asset denom, owner address, phase, and auction type Auctions(context.Context, *QueryAuctionsRequest) (*QueryAuctionsResponse, error) // NextAuctionID queries the next auction ID NextAuctionID(context.Context, *QueryNextAuctionIDRequest) (*QueryNextAuctionIDResponse, error) }
QueryServer is the server API for Query service.
type SurplusAuction ¶
type SurplusAuction struct {
BaseAuction `protobuf:"bytes,1,opt,name=base_auction,json=baseAuction,proto3,embedded=base_auction" json:"base_auction"`
}
SurplusAuction is a forward auction that burns what it receives from bids. It is normally used to sell off excess pegged asset acquired by the CDP system.
func NewSurplusAuction ¶
func NewSurplusAuction(seller string, lot sdk.Coin, bidDenom string, endTime time.Time) SurplusAuction
NewSurplusAuction returns a new surplus auction.
func (*SurplusAuction) Descriptor ¶ added in v0.16.0
func (*SurplusAuction) Descriptor() ([]byte, []int)
func (SurplusAuction) GetModuleAccountCoins ¶
func (a SurplusAuction) GetModuleAccountCoins() sdk.Coins
GetModuleAccountCoins returns the total number of coins held in the module account for this auction. It is used in genesis initialize the module account correctly.
func (SurplusAuction) GetPhase ¶
func (a SurplusAuction) GetPhase() string
GetPhase returns the direction of a surplus auction, which never changes.
func (SurplusAuction) GetType ¶
func (a SurplusAuction) GetType() string
GetType returns the auction type. Used to identify auctions in event attributes.
func (*SurplusAuction) Marshal ¶ added in v0.16.0
func (m *SurplusAuction) Marshal() (dAtA []byte, err error)
func (*SurplusAuction) MarshalTo ¶ added in v0.16.0
func (m *SurplusAuction) MarshalTo(dAtA []byte) (int, error)
func (*SurplusAuction) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *SurplusAuction) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*SurplusAuction) ProtoMessage ¶ added in v0.16.0
func (*SurplusAuction) ProtoMessage()
func (*SurplusAuction) Reset ¶ added in v0.16.0
func (m *SurplusAuction) Reset()
func (*SurplusAuction) Size ¶ added in v0.16.0
func (m *SurplusAuction) Size() (n int)
func (*SurplusAuction) String ¶ added in v0.16.0
func (m *SurplusAuction) String() string
func (*SurplusAuction) Unmarshal ¶ added in v0.16.0
func (m *SurplusAuction) Unmarshal(dAtA []byte) error
func (SurplusAuction) Validate ¶ added in v0.16.0
func (a SurplusAuction) Validate() error
func (SurplusAuction) WithID ¶
func (a SurplusAuction) WithID(id uint64) Auction
func (*SurplusAuction) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *SurplusAuction) XXX_DiscardUnknown()
func (*SurplusAuction) XXX_Marshal ¶ added in v0.16.0
func (m *SurplusAuction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*SurplusAuction) XXX_Merge ¶ added in v0.16.0
func (m *SurplusAuction) XXX_Merge(src proto.Message)
func (*SurplusAuction) XXX_Size ¶ added in v0.16.0
func (m *SurplusAuction) XXX_Size() int
func (*SurplusAuction) XXX_Unmarshal ¶ added in v0.16.0
func (m *SurplusAuction) XXX_Unmarshal(b []byte) error
type UnimplementedMsgServer ¶ added in v0.16.0
type UnimplementedMsgServer struct { }
UnimplementedMsgServer can be embedded to have forward compatible implementations.
func (*UnimplementedMsgServer) PlaceBid ¶ added in v0.16.0
func (*UnimplementedMsgServer) PlaceBid(ctx context.Context, req *MsgPlaceBid) (*MsgPlaceBidResponse, error)
type UnimplementedQueryServer ¶ added in v0.16.0
type UnimplementedQueryServer struct { }
UnimplementedQueryServer can be embedded to have forward compatible implementations.
func (*UnimplementedQueryServer) Auction ¶ added in v0.16.0
func (*UnimplementedQueryServer) Auction(ctx context.Context, req *QueryAuctionRequest) (*QueryAuctionResponse, error)
func (*UnimplementedQueryServer) Auctions ¶ added in v0.16.0
func (*UnimplementedQueryServer) Auctions(ctx context.Context, req *QueryAuctionsRequest) (*QueryAuctionsResponse, error)
func (*UnimplementedQueryServer) NextAuctionID ¶ added in v0.16.0
func (*UnimplementedQueryServer) NextAuctionID(ctx context.Context, req *QueryNextAuctionIDRequest) (*QueryNextAuctionIDResponse, error)
func (*UnimplementedQueryServer) Params ¶ added in v0.16.0
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error)
type WeightedAddresses ¶
type WeightedAddresses struct { Addresses []github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 126-byte string literal not displayed */ Weights []github_com_cosmos_cosmos_sdk_types.Int `protobuf:"bytes,2,rep,name=weights,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"weights"` }
WeightedAddresses is a type for storing some addresses and associated weights.
func NewWeightedAddresses ¶
func NewWeightedAddresses(addrs []sdk.AccAddress, weights []sdk.Int) (WeightedAddresses, error)
NewWeightedAddresses returns a new list addresses with weights.
func (*WeightedAddresses) Descriptor ¶ added in v0.16.0
func (*WeightedAddresses) Descriptor() ([]byte, []int)
func (*WeightedAddresses) Marshal ¶ added in v0.16.0
func (m *WeightedAddresses) Marshal() (dAtA []byte, err error)
func (*WeightedAddresses) MarshalTo ¶ added in v0.16.0
func (m *WeightedAddresses) MarshalTo(dAtA []byte) (int, error)
func (*WeightedAddresses) MarshalToSizedBuffer ¶ added in v0.16.0
func (m *WeightedAddresses) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*WeightedAddresses) ProtoMessage ¶ added in v0.16.0
func (*WeightedAddresses) ProtoMessage()
func (*WeightedAddresses) Reset ¶ added in v0.16.0
func (m *WeightedAddresses) Reset()
func (*WeightedAddresses) Size ¶ added in v0.16.0
func (m *WeightedAddresses) Size() (n int)
func (*WeightedAddresses) String ¶ added in v0.16.0
func (m *WeightedAddresses) String() string
func (*WeightedAddresses) Unmarshal ¶ added in v0.16.0
func (m *WeightedAddresses) Unmarshal(dAtA []byte) error
func (WeightedAddresses) Validate ¶ added in v0.8.0
func (wa WeightedAddresses) Validate() error
Validate checks for that the weights are not negative, not all zero, and the lengths match.
func (*WeightedAddresses) XXX_DiscardUnknown ¶ added in v0.16.0
func (m *WeightedAddresses) XXX_DiscardUnknown()
func (*WeightedAddresses) XXX_Marshal ¶ added in v0.16.0
func (m *WeightedAddresses) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*WeightedAddresses) XXX_Merge ¶ added in v0.16.0
func (m *WeightedAddresses) XXX_Merge(src proto.Message)
func (*WeightedAddresses) XXX_Size ¶ added in v0.16.0
func (m *WeightedAddresses) XXX_Size() int
func (*WeightedAddresses) XXX_Unmarshal ¶ added in v0.16.0
func (m *WeightedAddresses) XXX_Unmarshal(b []byte) error