types

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 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 defines the module name
	ModuleName = "auction"

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

	// RouterKey is the message route for slashing
	RouterKey = ModuleName

	// QuerierRoute defines the module's query routing key
	QuerierRoute = ModuleName

	// MemStoreKey defines the in-memory store key
	MemStoreKey = "mem_capability"
)
View Source
const (
	ParamsKey        = "Params-value-"
	AuctionKey       = "Auction-value-"
	AuctionCountKey  = "Auction-count-"
	AuctionByTimeKey = "Auction-by-time-"
	NextAuctionIDKey = "NextAuctionID-value-"
)
View Source
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

View Source
const DefaultIndex uint64 = 1

DefaultIndex is the default capability global index

View Source
const DefaultNextAuctionID uint64 = 1

DefaultNextAuctionID is the starting poiint 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 = 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")
)

x/auction module sentinel errors

View Source
var (
	ErrInvalidLengthGenesis        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowGenesis          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// 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")
)
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 = 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 KeyPrefix

func KeyPrefix(p string) []byte

func PackGenesisAuctions

func PackGenesisAuctions(auctions GenesisAuctions) ([]*codectypes.Any, error)

func ParamKeyTable

func ParamKeyTable() paramstype.KeyTable

ParamKeyTable Key declaration for parameters

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

func RegisterQueryHandler

func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterQueryHandler registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterQueryHandlerClient

func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error

RegisterQueryHandlerClient registers the http handlers for service Query to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "QueryClient" to call the correct interceptors.

func RegisterQueryHandlerFromEndpoint

func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterQueryHandlerServer

func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error

RegisterQueryHandlerServer registers the http handlers for service Query to "mux". UnaryRPC :call QueryServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

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.

Types

type AccountKeeper

type AccountKeeper interface {
	// Return a new account with the next account number and the specified address. Does not save the new account to the store.
	NewAccountWithAddress(sdk.Context, sdk.AccAddress) authtypes.AccountI

	// Return a new account with the next account number. Does not save the new account to the store.
	NewAccount(sdk.Context, authtypes.AccountI) authtypes.AccountI

	// Retrieve an account from the store.
	GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI

	// Set an account in the store.
	SetAccount(sdk.Context, authtypes.AccountI)

	// Remove an account from the store.
	RemoveAccount(sdk.Context, authtypes.AccountI)

	// Iterate over all accounts, calling the provided function. Stop iteraiton when it returns false.
	IterateAccounts(sdk.Context, func(authtypes.AccountI) bool)

	// Fetch the public key of an account at a specified address
	GetPubKey(sdk.Context, sdk.AccAddress) (cryptotypes.PubKey, error)

	// Fetch the sequence of an account at a specified address.
	GetSequence(sdk.Context, sdk.AccAddress) (uint64, error)

	// Fetch the next account number, and increment the internal counter.
	GetNextAccountNumber(sdk.Context) uint64

	GetModuleAddress(moduleName string) sdk.AccAddress
	GetModuleAccount(ctx sdk.Context, moduleName string) authtypes.ModuleAccountI
}

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

	GetType() string
	GetPhase() string
}

Auction is an interface for handling common actions on auctions.

func UnpackAuction

func UnpackAuction(auctionAny *types.Any) (Auction, error)

type Auctions

type Auctions []Auction

Auctions is a slice of auctions.

type BankKeeper

type BankKeeper interface {
	// View
	ValidateBalance(ctx sdk.Context, addr sdk.AccAddress) error
	HasBalance(ctx sdk.Context, addr sdk.AccAddress, amt sdk.Coin) bool

	GetAllBalances(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	GetAccountsBalances(ctx sdk.Context) []banktypes.Balance
	GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin
	LockedCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins
	SpendableCoins(ctx sdk.Context, addr sdk.AccAddress) sdk.Coins

	IterateAccountBalances(ctx sdk.Context, addr sdk.AccAddress, cb func(coin sdk.Coin) (stop bool))
	IterateAllBalances(ctx sdk.Context, cb func(address sdk.AccAddress, coin sdk.Coin) (stop bool))

	// Send
	InputOutputCoins(ctx sdk.Context, inputs []banktypes.Input, outputs []banktypes.Output) error
	SendCoins(ctx sdk.Context, fromAddr sdk.AccAddress, toAddr sdk.AccAddress, amt sdk.Coins) error

	GetParams(ctx sdk.Context) banktypes.Params
	SetParams(ctx sdk.Context, params banktypes.Params)

	BlockedAddr(addr sdk.AccAddress) bool

	//
	InitGenesis(sdk.Context, *banktypes.GenesisState)
	ExportGenesis(sdk.Context) *banktypes.GenesisState

	GetSupply(ctx sdk.Context, denom string) sdk.Coin
	GetPaginatedTotalSupply(ctx sdk.Context, pagination *query.PageRequest) (sdk.Coins, *query.PageResponse, error)
	IterateTotalSupply(ctx sdk.Context, cb func(sdk.Coin) bool)

	GetDenomMetaData(ctx sdk.Context, denom string) (banktypes.Metadata, bool)
	SetDenomMetaData(ctx sdk.Context, denomMetaData banktypes.Metadata)
	IterateAllDenomMetaData(ctx sdk.Context, cb func(banktypes.Metadata) bool)

	SendCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	SendCoinsFromModuleToModule(ctx sdk.Context, senderModule, recipientModule string, amt sdk.Coins) error
	SendCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	DelegateCoinsFromAccountToModule(ctx sdk.Context, senderAddr sdk.AccAddress, recipientModule string, amt sdk.Coins) error
	UndelegateCoinsFromModuleToAccount(ctx sdk.Context, senderModule string, recipientAddr sdk.AccAddress, amt sdk.Coins) error
	MintCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error
	BurnCoins(ctx sdk.Context, moduleName string, amt sdk.Coins) error

	DelegateCoins(ctx sdk.Context, delegatorAddr, moduleAccAddr sdk.AccAddress, amt sdk.Coins) error
	UndelegateCoins(ctx sdk.Context, moduleAccAddr, delegatorAddr sdk.AccAddress, amt sdk.Coins) error
}

type BaseAuction

type BaseAuction struct {
	Id              uint64                                          `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"`
	Initiator       string                                          `protobuf:"bytes,2,opt,name=initiator,proto3" json:"initiator,omitempty" yaml:"initiator"`
	Lot             types.Coin                                      `protobuf:"bytes,3,opt,name=lot,proto3" json:"lot" yaml:"lot"`
	Bidder          github_com_UnUniFi_chain_types.StringAccAddress `` /* 128-byte string literal not displayed */
	Bid             types.Coin                                      `protobuf:"bytes,5,opt,name=bid,proto3" json:"bid" yaml:"bid"`
	HasReceivedBids bool                                            `` /* 135-byte string literal not displayed */
	EndTime         time.Time                                       `protobuf:"bytes,7,opt,name=end_time,json=endTime,proto3,stdtime" json:"end_time" yaml:"end_time"`
	MaxEndTime      time.Time                                       `protobuf:"bytes,8,opt,name=max_end_time,json=maxEndTime,proto3,stdtime" json:"max_end_time" yaml:"max_end_time"`
}

func (*BaseAuction) Descriptor

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

func (*BaseAuction) GetBid

func (m *BaseAuction) GetBid() types.Coin

func (BaseAuction) GetBidder

func (a BaseAuction) GetBidder() sdk.AccAddress

GetBidder is a getter for auction Bidder.

func (*BaseAuction) GetEndTime

func (m *BaseAuction) GetEndTime() time.Time

func (*BaseAuction) GetHasReceivedBids

func (m *BaseAuction) GetHasReceivedBids() bool

func (BaseAuction) GetID

func (a BaseAuction) GetID() uint64

GetID is a getter for auction ID.

func (*BaseAuction) GetId

func (m *BaseAuction) GetId() uint64

func (*BaseAuction) GetInitiator

func (m *BaseAuction) GetInitiator() string

func (*BaseAuction) GetLot

func (m *BaseAuction) GetLot() types.Coin

func (*BaseAuction) GetMaxEndTime

func (m *BaseAuction) GetMaxEndTime() time.Time

func (BaseAuction) GetType

func (a BaseAuction) GetType() string

GetType returns the auction type. Used to identify auctions in event attributes.

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

func (a BaseAuction) Validate() error

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

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       ``                /* 126-byte string literal not displayed */
	CorrespondingDebt types.Coin        `` /* 128-byte string literal not displayed */
	MaxBid            types.Coin        `protobuf:"bytes,3,opt,name=max_bid,json=maxBid,proto3" json:"max_bid" yaml:"max_bid"`
	LotReturns        WeightedAddresses `` /* 131-byte string literal not displayed */
}

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

func (m *CollateralAuction) GetCorrespondingDebt() types.Coin

func (*CollateralAuction) GetLotReturns

func (m *CollateralAuction) GetLotReturns() WeightedAddresses

func (*CollateralAuction) GetMaxBid

func (m *CollateralAuction) GetMaxBid() types.Coin

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

WithID returns an auction with the ID set.

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       ``         /* 126-byte string literal not displayed */
	CorrespondingDebt types.Coin `` /* 128-byte string literal not displayed */
}

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

func (m *DebtAuction) GetCorrespondingDebt() types.Coin

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

WithID returns an auction with the ID set.

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 is an interface that extends the auction interface to add functionality needed for initializing auctions from genesis.

type GenesisAuctions

type GenesisAuctions []GenesisAuction

GenesisAuctions is a slice of genesis auctions.

func UnpackGenesisAuctions

func UnpackGenesisAuctions(auctionsAny []*types.Any) (GenesisAuctions, error)

type GenesisState

type GenesisState struct {
	NextAuctionId uint64       `` /* 126-byte string literal not displayed */
	Params        Params       `protobuf:"bytes,2,opt,name=params,proto3" json:"params" yaml:"params"`
	Auctions      []*types.Any `protobuf:"bytes,3,rep,name=auctions,proto3" json:"auctions,omitempty" yaml:"auctions"`
}

GenesisState defines the auction module's genesis state.

func DefaultGenesis

func DefaultGenesis() *GenesisState

DefaultGenesis returns the default Capability genesis state

func NewGenesisState

func NewGenesisState(nextID uint64, ap Params, ga []*types.Any) GenesisState

NewGenesisState returns a new genesis state object for auctions module.

func (*GenesisState) Descriptor

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

func (GenesisState) Equal

func (gs GenesisState) Equal(gs2 GenesisState) bool

Equal checks whether two GenesisState structs are equivalent.

func (*GenesisState) GetAuctions

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

func (*GenesisState) GetNextAuctionId

func (m *GenesisState) GetNextAuctionId() uint64

func (*GenesisState) GetParams

func (m *GenesisState) GetParams() Params

func (GenesisState) IsEmpty

func (gs GenesisState) IsEmpty() bool

IsEmpty returns true if a GenesisState is empty.

func (*GenesisState) Marshal

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

func (*GenesisState) MarshalTo

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

func (*GenesisState) MarshalToSizedBuffer

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

func (*GenesisState) ProtoMessage

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset

func (m *GenesisState) Reset()

func (*GenesisState) Size

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

func (*GenesisState) String

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal

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

func (GenesisState) Validate

func (gs GenesisState) Validate() error

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

func (*GenesisState) XXX_DiscardUnknown

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal

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

func (*GenesisState) XXX_Merge

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

func (*GenesisState) XXX_Size

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal

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

type MsgClient

type MsgClient interface {
	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" yaml:"auction_id"`
	Bidder    github_com_UnUniFi_chain_types.StringAccAddress `` /* 128-byte string literal not displayed */
	Amount    types.Coin                                      `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount" yaml:"amount"`
}

func NewMsgPlaceBid

func NewMsgPlaceBid(auctionID uint64, bidder sdk.AccAddress, amt sdk.Coin) MsgPlaceBid

NewMsgPlaceBid returns a new MsgPlaceBid.

func (*MsgPlaceBid) Descriptor

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

func (*MsgPlaceBid) GetAmount

func (m *MsgPlaceBid) GetAmount() types.Coin

func (*MsgPlaceBid) GetAuctionId

func (m *MsgPlaceBid) GetAuctionId() uint64

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

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(context.Context, *MsgPlaceBid) (*MsgPlaceBidResponse, error)
}

MsgServer is the server API for Msg service.

type Params

type Params struct {
	MaxAuctionDuration  time.Duration                          `` /* 147-byte string literal not displayed */
	BidDuration         time.Duration                          `protobuf:"bytes,2,opt,name=bid_duration,json=bidDuration,proto3,stdduration" json:"bid_duration" yaml:"bid_duration"`
	IncrementSurplus    github_com_cosmos_cosmos_sdk_types.Dec `` /* 174-byte string literal not displayed */
	IncrementDebt       github_com_cosmos_cosmos_sdk_types.Dec `` /* 162-byte string literal not displayed */
	IncrementCollateral github_com_cosmos_cosmos_sdk_types.Dec `` /* 186-byte string literal not displayed */
}

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

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

func (Params) Equal

func (p Params) Equal(p2 Params) bool

Equal returns a boolean determining if two Params types are identical.

func (*Params) GetBidDuration

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

func (*Params) GetMaxAuctionDuration

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

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() paramstype.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 QueryAllAuctionRequest

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

func (*QueryAllAuctionRequest) Descriptor

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

func (*QueryAllAuctionRequest) GetPagination

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

func (*QueryAllAuctionRequest) Marshal

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

func (*QueryAllAuctionRequest) MarshalTo

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

func (*QueryAllAuctionRequest) MarshalToSizedBuffer

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

func (*QueryAllAuctionRequest) ProtoMessage

func (*QueryAllAuctionRequest) ProtoMessage()

func (*QueryAllAuctionRequest) Reset

func (m *QueryAllAuctionRequest) Reset()

func (*QueryAllAuctionRequest) Size

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

func (*QueryAllAuctionRequest) String

func (m *QueryAllAuctionRequest) String() string

func (*QueryAllAuctionRequest) Unmarshal

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

func (*QueryAllAuctionRequest) XXX_DiscardUnknown

func (m *QueryAllAuctionRequest) XXX_DiscardUnknown()

func (*QueryAllAuctionRequest) XXX_Marshal

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

func (*QueryAllAuctionRequest) XXX_Merge

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

func (*QueryAllAuctionRequest) XXX_Size

func (m *QueryAllAuctionRequest) XXX_Size() int

func (*QueryAllAuctionRequest) XXX_Unmarshal

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

type QueryAllAuctionResponse

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

func (*QueryAllAuctionResponse) Descriptor

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

func (*QueryAllAuctionResponse) GetAuctions

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

func (*QueryAllAuctionResponse) GetPagination

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

func (*QueryAllAuctionResponse) Marshal

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

func (*QueryAllAuctionResponse) MarshalTo

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

func (*QueryAllAuctionResponse) MarshalToSizedBuffer

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

func (*QueryAllAuctionResponse) ProtoMessage

func (*QueryAllAuctionResponse) ProtoMessage()

func (*QueryAllAuctionResponse) Reset

func (m *QueryAllAuctionResponse) Reset()

func (*QueryAllAuctionResponse) Size

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

func (*QueryAllAuctionResponse) String

func (m *QueryAllAuctionResponse) String() string

func (*QueryAllAuctionResponse) Unmarshal

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

func (*QueryAllAuctionResponse) XXX_DiscardUnknown

func (m *QueryAllAuctionResponse) XXX_DiscardUnknown()

func (*QueryAllAuctionResponse) XXX_Marshal

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

func (*QueryAllAuctionResponse) XXX_Merge

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

func (*QueryAllAuctionResponse) XXX_Size

func (m *QueryAllAuctionResponse) XXX_Size() int

func (*QueryAllAuctionResponse) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
	// this line is used by starport scaffolding # 2
	Auction(ctx context.Context, in *QueryGetAuctionRequest, opts ...grpc.CallOption) (*QueryGetAuctionResponse, error)
	AuctionAll(ctx context.Context, in *QueryAllAuctionRequest, opts ...grpc.CallOption) (*QueryAllAuctionResponse, 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 QueryGetAuctionRequest

type QueryGetAuctionRequest struct {
	Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
}

this line is used by starport scaffolding # 3

func (*QueryGetAuctionRequest) Descriptor

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

func (*QueryGetAuctionRequest) GetId

func (m *QueryGetAuctionRequest) GetId() uint64

func (*QueryGetAuctionRequest) Marshal

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

func (*QueryGetAuctionRequest) MarshalTo

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

func (*QueryGetAuctionRequest) MarshalToSizedBuffer

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

func (*QueryGetAuctionRequest) ProtoMessage

func (*QueryGetAuctionRequest) ProtoMessage()

func (*QueryGetAuctionRequest) Reset

func (m *QueryGetAuctionRequest) Reset()

func (*QueryGetAuctionRequest) Size

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

func (*QueryGetAuctionRequest) String

func (m *QueryGetAuctionRequest) String() string

func (*QueryGetAuctionRequest) Unmarshal

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

func (*QueryGetAuctionRequest) XXX_DiscardUnknown

func (m *QueryGetAuctionRequest) XXX_DiscardUnknown()

func (*QueryGetAuctionRequest) XXX_Marshal

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

func (*QueryGetAuctionRequest) XXX_Merge

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

func (*QueryGetAuctionRequest) XXX_Size

func (m *QueryGetAuctionRequest) XXX_Size() int

func (*QueryGetAuctionRequest) XXX_Unmarshal

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

type QueryGetAuctionResponse

type QueryGetAuctionResponse struct {
	Auction *types.Any `protobuf:"bytes,1,opt,name=auction,proto3" json:"auction,omitempty"`
}

func (*QueryGetAuctionResponse) Descriptor

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

func (*QueryGetAuctionResponse) GetAuction

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

func (*QueryGetAuctionResponse) Marshal

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

func (*QueryGetAuctionResponse) MarshalTo

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

func (*QueryGetAuctionResponse) MarshalToSizedBuffer

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

func (*QueryGetAuctionResponse) ProtoMessage

func (*QueryGetAuctionResponse) ProtoMessage()

func (*QueryGetAuctionResponse) Reset

func (m *QueryGetAuctionResponse) Reset()

func (*QueryGetAuctionResponse) Size

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

func (*QueryGetAuctionResponse) String

func (m *QueryGetAuctionResponse) String() string

func (*QueryGetAuctionResponse) Unmarshal

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

func (*QueryGetAuctionResponse) XXX_DiscardUnknown

func (m *QueryGetAuctionResponse) XXX_DiscardUnknown()

func (*QueryGetAuctionResponse) XXX_Marshal

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

func (*QueryGetAuctionResponse) XXX_Merge

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

func (*QueryGetAuctionResponse) XXX_Size

func (m *QueryGetAuctionResponse) XXX_Size() int

func (*QueryGetAuctionResponse) XXX_Unmarshal

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

type QueryParamsRequest

type QueryParamsRequest struct {
}

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,omitempty"`
}

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(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
	// this line is used by starport scaffolding # 2
	Auction(context.Context, *QueryGetAuctionRequest) (*QueryGetAuctionResponse, error)
	AuctionAll(context.Context, *QueryAllAuctionRequest) (*QueryAllAuctionResponse, error)
}

QueryServer is the server API for Query service.

type SurplusAuction

type SurplusAuction struct {
	BaseAuction `` /* 126-byte string literal not displayed */
}

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

func (a SurplusAuction) WithID(id uint64) Auction

WithID returns an auction with the ID set.

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

func (*UnimplementedQueryServer) Params

type WeightedAddress

type WeightedAddress struct {
	Address github_com_UnUniFi_chain_types.StringAccAddress `` /* 131-byte string literal not displayed */
	Weight  github_com_cosmos_cosmos_sdk_types.Int          `protobuf:"bytes,2,opt,name=weight,proto3,customtype=github.com/cosmos/cosmos-sdk/types.Int" json:"weight" yaml:"weight"`
}

func (*WeightedAddress) Descriptor

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

func (*WeightedAddress) Marshal

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

func (*WeightedAddress) MarshalTo

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

func (*WeightedAddress) MarshalToSizedBuffer

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

func (*WeightedAddress) ProtoMessage

func (*WeightedAddress) ProtoMessage()

func (*WeightedAddress) Reset

func (m *WeightedAddress) Reset()

func (*WeightedAddress) Size

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

func (*WeightedAddress) String

func (m *WeightedAddress) String() string

func (*WeightedAddress) Unmarshal

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

func (*WeightedAddress) XXX_DiscardUnknown

func (m *WeightedAddress) XXX_DiscardUnknown()

func (*WeightedAddress) XXX_Marshal

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

func (*WeightedAddress) XXX_Merge

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

func (*WeightedAddress) XXX_Size

func (m *WeightedAddress) XXX_Size() int

func (*WeightedAddress) XXX_Unmarshal

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

type WeightedAddresses

type WeightedAddresses []WeightedAddress

func NewWeightedAddresses

func NewWeightedAddresses(addrs []sdk.AccAddress, weights []sdk.Int) (WeightedAddresses, error)

NewWeightedAddresses returns a new list addresses with weights.

func (WeightedAddresses) Addresses

func (was WeightedAddresses) Addresses() []sdk.AccAddress

func (WeightedAddresses) Validate

func (was WeightedAddresses) Validate() error

Validate checks for that the weights are not negative, not all zero, and the lengths match.

func (WeightedAddresses) Weights

func (was WeightedAddresses) Weights() []sdk.Int

Jump to

Keyboard shortcuts

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