types

package
v0.0.0-...-04b9a03 Latest Latest
Warning

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

Go to latest
Published: May 28, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Overview

Package types is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	CollateralAuctionType = "collateral"
	SurplusAuctionType    = "surplus"
	DebtAuctionType       = "debt"
	ForwardAuctionPhase   = "forward"
	ReverseAuctionPhase   = "reverse"
)
View Source
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

View Source
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
)
View Source
const (
	// DefaultMaxAuctionDuration max length of auction
	DefaultMaxAuctionDuration time.Duration = 2 * 24 * time.Hour
	// DefaultForwardBidDuration how long an auction gets extended when someone bids for a forward auction
	DefaultForwardBidDuration time.Duration = 24 * time.Hour
	// DefaultReverseBidDuration how long an auction gets extended when someone bids for a reverse auction
	DefaultReverseBidDuration time.Duration = 1 * time.Hour
)

Defaults for auction params

View Source
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"
)
View Source
const DefaultNextAuctionID uint64 = 1

DefaultNextAuctionID is the starting point for auction IDs.

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 (
	// ErrInvalidInitialAuctionID error for when the initial auction ID hasn't been set
	ErrInvalidInitialAuctionID = errorsmod.Register(ModuleName, 2, "initial auction ID hasn't been set")
	// ErrUnrecognizedAuctionType error for unrecognized auction type
	ErrUnrecognizedAuctionType = errorsmod.Register(ModuleName, 3, "unrecognized auction type")
	// ErrAuctionNotFound error for when an auction is not found
	ErrAuctionNotFound = errorsmod.Register(ModuleName, 4, "auction not found")
	// ErrAuctionHasNotExpired error for attempting to close an auction that has not passed its end time
	ErrAuctionHasNotExpired = errorsmod.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 = errorsmod.Register(ModuleName, 6, "auction has closed")
	// ErrInvalidBidDenom error for when bid denom doesn't match auction bid denom
	ErrInvalidBidDenom = errorsmod.Register(ModuleName, 7, "bid denom doesn't match auction bid denom")
	// ErrInvalidLotDenom error for when lot denom doesn't match auction lot denom
	ErrInvalidLotDenom = errorsmod.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 = errorsmod.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 = errorsmod.Register(ModuleName, 10, "bid is greater than auction's max bid")
	// ErrLotTooSmall error for when lot is less than zero
	ErrLotTooSmall = errorsmod.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 = errorsmod.Register(ModuleName, 12, "lot is greater than auction's max new lot amount")
)
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 (
	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

View Source
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
	KeyForwardBidDuration  = []byte("ForwardBidDuration")
	KeyReverseBidDuration  = []byte("ReverseBidDuration")
	KeyMaxAuctionDuration  = []byte("MaxAuctionDuration")
	KeyIncrementSurplus    = []byte("IncrementSurplus")
	KeyIncrementDebt       = []byte("IncrementDebt")
	KeyIncrementCollateral = []byte("IncrementCollateral")
)
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 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.

View Source
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

func GetAuctionByTimeKey(endTime time.Time, auctionID uint64) []byte

GetAuctionByTimeKey returns the key for iterating auctions by time

func GetAuctionKey

func GetAuctionKey(auctionID uint64) []byte

GetAuctionKey returns the bytes of an auction key

func PackGenesisAuctions

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

func RegisterInterfaces(registry types.InterfaceRegistry)

func RegisterLegacyAminoCodec

func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino)

RegisterLegacyAminoCodec registers all the necessary types and interfaces for the governance module.

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 Uint64FromBytes

func Uint64FromBytes(bz []byte) uint64

Uint64FromBytes converts some fixed length bytes back into a uint64.

func Uint64ToBytes

func Uint64ToBytes(id uint64) []byte

Uint64ToBytes converts a uint64 into fixed length bytes for use in store keys.

func ValidateAuction

func ValidateAuction(a Auction) error

ValidateAuction verifies that the auction end time is before max end time

Types

type AccountKeeper

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

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

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

func (a BaseAuction) GetMaxEndTime() time.Time

func (*BaseAuction) Marshal

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

func (*BaseAuction) MarshalTo

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

func (*BaseAuction) MarshalToSizedBuffer

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

func (*BaseAuction) ProtoMessage

func (*BaseAuction) ProtoMessage()

func (*BaseAuction) Reset

func (m *BaseAuction) Reset()

func (*BaseAuction) Size

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

func (*BaseAuction) String

func (m *BaseAuction) String() string

func (*BaseAuction) Unmarshal

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

func (*BaseAuction) XXX_DiscardUnknown

func (m *BaseAuction) XXX_DiscardUnknown()

func (*BaseAuction) XXX_Marshal

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

func (*BaseAuction) XXX_Merge

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

func (*BaseAuction) XXX_Size

func (m *BaseAuction) XXX_Size() int

func (*BaseAuction) XXX_Unmarshal

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

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

func (CollateralAuction) GetLotReturns

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

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

func (*CollateralAuction) MarshalTo

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

func (*CollateralAuction) MarshalToSizedBuffer

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

func (*CollateralAuction) ProtoMessage

func (*CollateralAuction) ProtoMessage()

func (*CollateralAuction) Reset

func (m *CollateralAuction) Reset()

func (*CollateralAuction) Size

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

func (*CollateralAuction) String

func (m *CollateralAuction) String() string

func (*CollateralAuction) Unmarshal

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

func (CollateralAuction) Validate

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

func (m *CollateralAuction) XXX_DiscardUnknown()

func (*CollateralAuction) XXX_Marshal

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

func (*CollateralAuction) XXX_Merge

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

func (*CollateralAuction) XXX_Size

func (m *CollateralAuction) XXX_Size() int

func (*CollateralAuction) XXX_Unmarshal

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

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

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

func (*DebtAuction) MarshalTo

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

func (*DebtAuction) MarshalToSizedBuffer

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

func (*DebtAuction) ProtoMessage

func (*DebtAuction) ProtoMessage()

func (*DebtAuction) Reset

func (m *DebtAuction) Reset()

func (*DebtAuction) Size

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

func (*DebtAuction) String

func (m *DebtAuction) String() string

func (*DebtAuction) Unmarshal

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

func (DebtAuction) Validate

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

func (m *DebtAuction) XXX_DiscardUnknown()

func (*DebtAuction) XXX_Marshal

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

func (*DebtAuction) XXX_Merge

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

func (*DebtAuction) XXX_Size

func (m *DebtAuction) XXX_Size() int

func (*DebtAuction) XXX_Unmarshal

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

type GenesisAuction

type GenesisAuction interface {
	Auction
	GetModuleAccountCoins() sdk.Coins
	Validate() error
}

GenesisAuction extends the auction interface to add functionality needed for initializing auctions from genesis.

func UnpackGenesisAuctions

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

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

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

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

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 MsgClient

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

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

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

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

Route return the message type used for routing the message.

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

Type returns a human-readable string for the message, intended for utilization within tags.

func (*MsgPlaceBid) Unmarshal

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

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 {
}

MsgPlaceBidResponse defines the Msg/PlaceBid response type.

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 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"`
	ForwardBidDuration  time.Duration                          `protobuf:"bytes,6,opt,name=forward_bid_duration,json=forwardBidDuration,proto3,stdduration" json:"forward_bid_duration"`
	ReverseBidDuration  time.Duration                          `protobuf:"bytes,7,opt,name=reverse_bid_duration,json=reverseBidDuration,proto3,stdduration" json:"reverse_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, forwardBidDuration, reverseBidDuration time.Duration,
	incrementSurplus,
	incrementDebt,
	incrementCollateral sdk.Dec,
) Params

NewParams returns a new Params object.

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

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

ParamSetPairs implements the ParamSet interface and returns all the key/value pairs.

func (*Params) ProtoMessage

func (*Params) ProtoMessage()

func (*Params) Reset

func (m *Params) Reset()

func (*Params) Size

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal

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

func (Params) Validate

func (p Params) Validate() error

Validate checks that the parameters have valid values.

func (*Params) XXX_DiscardUnknown

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal

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

func (*Params) XXX_Merge

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

func (*Params) XXX_Size

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal

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

type 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

func NewQueryAuctionParams(id uint64) QueryAuctionParams

NewQueryAuctionParams returns a new QueryAuctionParams

type QueryAuctionRequest

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

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

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

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

func (*QueryAuctionResponse) GetAuction

func (m *QueryAuctionResponse) GetAuction() *types.Any

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

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

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 []*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

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

func (*QueryAuctionsResponse) GetAuctions

func (m *QueryAuctionsResponse) GetAuctions() []*types.Any

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 {
	// 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

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryNextAuctionIDRequest

type QueryNextAuctionIDRequest struct {
}

QueryNextAuctionIDRequest defines the request type for querying x/auction next auction ID.

func (*QueryNextAuctionIDRequest) Descriptor

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

func (*QueryNextAuctionIDRequest) Marshal

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

func (*QueryNextAuctionIDRequest) MarshalTo

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

func (*QueryNextAuctionIDRequest) MarshalToSizedBuffer

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

func (*QueryNextAuctionIDRequest) ProtoMessage

func (*QueryNextAuctionIDRequest) ProtoMessage()

func (*QueryNextAuctionIDRequest) Reset

func (m *QueryNextAuctionIDRequest) Reset()

func (*QueryNextAuctionIDRequest) Size

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

func (*QueryNextAuctionIDRequest) String

func (m *QueryNextAuctionIDRequest) String() string

func (*QueryNextAuctionIDRequest) Unmarshal

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

func (*QueryNextAuctionIDRequest) XXX_DiscardUnknown

func (m *QueryNextAuctionIDRequest) XXX_DiscardUnknown()

func (*QueryNextAuctionIDRequest) XXX_Marshal

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

func (*QueryNextAuctionIDRequest) XXX_Merge

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

func (*QueryNextAuctionIDRequest) XXX_Size

func (m *QueryNextAuctionIDRequest) XXX_Size() int

func (*QueryNextAuctionIDRequest) XXX_Unmarshal

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

type QueryNextAuctionIDResponse

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

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

func (*QueryNextAuctionIDResponse) GetId

func (*QueryNextAuctionIDResponse) Marshal

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

func (*QueryNextAuctionIDResponse) MarshalTo

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

func (*QueryNextAuctionIDResponse) MarshalToSizedBuffer

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

func (*QueryNextAuctionIDResponse) ProtoMessage

func (*QueryNextAuctionIDResponse) ProtoMessage()

func (*QueryNextAuctionIDResponse) Reset

func (m *QueryNextAuctionIDResponse) Reset()

func (*QueryNextAuctionIDResponse) Size

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

func (*QueryNextAuctionIDResponse) String

func (m *QueryNextAuctionIDResponse) String() string

func (*QueryNextAuctionIDResponse) Unmarshal

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

func (*QueryNextAuctionIDResponse) XXX_DiscardUnknown

func (m *QueryNextAuctionIDResponse) XXX_DiscardUnknown()

func (*QueryNextAuctionIDResponse) XXX_Marshal

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

func (*QueryNextAuctionIDResponse) XXX_Merge

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

func (*QueryNextAuctionIDResponse) XXX_Size

func (m *QueryNextAuctionIDResponse) XXX_Size() int

func (*QueryNextAuctionIDResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

QueryParamsRequest defines the request type for querying x/auction parameters.

func (*QueryParamsRequest) Descriptor

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

func (*QueryParamsRequest) Marshal

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

func (*QueryParamsRequest) MarshalTo

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

func (*QueryParamsRequest) MarshalToSizedBuffer

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

func (*QueryParamsRequest) ProtoMessage

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size

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

func (*QueryParamsRequest) String

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal

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

func (*QueryParamsRequest) XXX_DiscardUnknown

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal

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

func (*QueryParamsRequest) XXX_Merge

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

func (*QueryParamsRequest) XXX_Size

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal

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

type QueryParamsResponse

type QueryParamsResponse struct {
	Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"`
}

QueryParamsResponse defines the response type for querying x/auction parameters.

func (*QueryParamsResponse) Descriptor

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

func (*QueryParamsResponse) GetParams

func (m *QueryParamsResponse) GetParams() Params

func (*QueryParamsResponse) Marshal

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

func (*QueryParamsResponse) MarshalTo

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

func (*QueryParamsResponse) MarshalToSizedBuffer

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

func (*QueryParamsResponse) ProtoMessage

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size

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

func (*QueryParamsResponse) String

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal

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

func (*QueryParamsResponse) XXX_DiscardUnknown

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal

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

func (*QueryParamsResponse) XXX_Merge

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

func (*QueryParamsResponse) XXX_Size

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// 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

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

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

func (*SurplusAuction) MarshalTo

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

func (*SurplusAuction) MarshalToSizedBuffer

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

func (*SurplusAuction) ProtoMessage

func (*SurplusAuction) ProtoMessage()

func (*SurplusAuction) Reset

func (m *SurplusAuction) Reset()

func (*SurplusAuction) Size

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

func (*SurplusAuction) String

func (m *SurplusAuction) String() string

func (*SurplusAuction) Unmarshal

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

func (SurplusAuction) Validate

func (a SurplusAuction) Validate() error

func (SurplusAuction) WithID

func (a SurplusAuction) WithID(id uint64) Auction

func (*SurplusAuction) XXX_DiscardUnknown

func (m *SurplusAuction) XXX_DiscardUnknown()

func (*SurplusAuction) XXX_Marshal

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

func (*SurplusAuction) XXX_Merge

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

func (*SurplusAuction) XXX_Size

func (m *SurplusAuction) XXX_Size() int

func (*SurplusAuction) XXX_Unmarshal

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

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) PlaceBid

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Auction

func (*UnimplementedQueryServer) Auctions

func (*UnimplementedQueryServer) NextAuctionID

func (*UnimplementedQueryServer) Params

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 []sdkmath.Int) (WeightedAddresses, error)

NewWeightedAddresses returns a new list addresses with weights.

func (*WeightedAddresses) Descriptor

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

func (*WeightedAddresses) Marshal

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

func (*WeightedAddresses) MarshalTo

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

func (*WeightedAddresses) MarshalToSizedBuffer

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

func (*WeightedAddresses) ProtoMessage

func (*WeightedAddresses) ProtoMessage()

func (*WeightedAddresses) Reset

func (m *WeightedAddresses) Reset()

func (*WeightedAddresses) Size

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

func (*WeightedAddresses) String

func (m *WeightedAddresses) String() string

func (*WeightedAddresses) Unmarshal

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

func (WeightedAddresses) Validate

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

func (m *WeightedAddresses) XXX_DiscardUnknown()

func (*WeightedAddresses) XXX_Marshal

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

func (*WeightedAddresses) XXX_Merge

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

func (*WeightedAddresses) XXX_Size

func (m *WeightedAddresses) XXX_Size() int

func (*WeightedAddresses) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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