types

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2021 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 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 added in v0.2.0

func KeyPrefix(p string) []byte

func PackAuctions added in v0.2.0

func PackAuctions(auctions Auctions) ([]*codectypes.Any, error)

func PackGenesisAuctions added in v0.2.0

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 added in v0.2.0

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

func RegisterQueryHandler added in v0.2.0

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 added in v0.2.0

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

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

func RegisterQueryHandlerFromEndpoint added in v0.2.0

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

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

func RegisterQueryHandlerServer added in v0.2.0

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

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

func RegisterQueryServer added in v0.2.0

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 added in v0.2.0

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.

type Auctions

type Auctions []Auction

Auctions is a slice of auctions.

func UnpackAuctions added in v0.2.0

func UnpackAuctions(auctionsAny []*types.Any) (Auctions, error)

type BankKeeper added in v0.2.0

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)

	SendEnabledCoin(ctx sdk.Context, coin sdk.Coin) bool
	SendEnabledCoins(ctx sdk.Context, coins ...sdk.Coin) error

	BlockedAddr(addr sdk.AccAddress) bool

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

	GetSupply(ctx sdk.Context) exported.SupplyI
	SetSupply(ctx sdk.Context, supply exported.SupplyI)

	GetDenomMetaData(ctx sdk.Context, denom string) banktypes.Metadata
	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
	MarshalSupply(supplyI exported.SupplyI) ([]byte, error)
	UnmarshalSupply(bz []byte) (exported.SupplyI, 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:"id"`
	Lot             types.Coin                                   `protobuf:"bytes,3,opt,name=lot,proto3" json:"lot" yaml:"lot"`
	Bidder          github_com_lcnem_eurx_types.StringAccAddress `protobuf:"bytes,4,opt,name=bidder,proto3,customtype=github.com/lcnem/eurx/types.StringAccAddress" json:"bidder" yaml:"bidder"`
	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 added in v0.2.0

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 added in v0.2.0

func (m *BaseAuction) GetHasReceivedBids() bool

func (BaseAuction) GetID

func (a BaseAuction) GetID() uint64

GetID is a getter for auction ID.

func (*BaseAuction) GetId added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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

func (*BaseAuction) MarshalTo added in v0.2.0

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

func (*BaseAuction) MarshalToSizedBuffer added in v0.2.0

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

func (*BaseAuction) ProtoMessage added in v0.2.0

func (*BaseAuction) ProtoMessage()

func (*BaseAuction) Reset added in v0.2.0

func (m *BaseAuction) Reset()

func (*BaseAuction) Size added in v0.2.0

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

func (*BaseAuction) String

func (m *BaseAuction) String() string

func (*BaseAuction) Unmarshal added in v0.2.0

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 added in v0.2.0

func (m *BaseAuction) XXX_DiscardUnknown()

func (*BaseAuction) XXX_Marshal added in v0.2.0

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

func (*BaseAuction) XXX_Merge added in v0.2.0

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

func (*BaseAuction) XXX_Size added in v0.2.0

func (m *BaseAuction) XXX_Size() int

func (*BaseAuction) XXX_Unmarshal added in v0.2.0

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 `protobuf:"bytes,4,opt,name=lot_returns,json=lotReturns,proto3" json:"lot_returns" yaml:"lot_returns"`
}

func NewCollateralAuction

func NewCollateralAuction(seller string, lot sdk.Coin, endTime time.Time, maxBid sdk.Coin, lotReturns WeightedAddresses, debt sdk.Coin) CollateralAuction

NewCollateralAuction returns a new collateral auction.

func (*CollateralAuction) Descriptor added in v0.2.0

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

func (*CollateralAuction) GetCorrespondingDebt added in v0.2.0

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

func (*CollateralAuction) GetLotReturns added in v0.2.0

func (m *CollateralAuction) GetLotReturns() WeightedAddresses

func (*CollateralAuction) GetMaxBid added in v0.2.0

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 added in v0.2.0

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

func (*CollateralAuction) MarshalTo added in v0.2.0

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

func (*CollateralAuction) MarshalToSizedBuffer added in v0.2.0

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

func (*CollateralAuction) ProtoMessage added in v0.2.0

func (*CollateralAuction) ProtoMessage()

func (*CollateralAuction) Reset added in v0.2.0

func (m *CollateralAuction) Reset()

func (*CollateralAuction) Size added in v0.2.0

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

func (*CollateralAuction) String

func (m *CollateralAuction) String() string

func (*CollateralAuction) Unmarshal added in v0.2.0

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 added in v0.2.0

func (m *CollateralAuction) XXX_DiscardUnknown()

func (*CollateralAuction) XXX_Marshal added in v0.2.0

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

func (*CollateralAuction) XXX_Merge added in v0.2.0

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

func (*CollateralAuction) XXX_Size added in v0.2.0

func (m *CollateralAuction) XXX_Size() int

func (*CollateralAuction) XXX_Unmarshal added in v0.2.0

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 added in v0.2.0

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

func (*DebtAuction) GetCorrespondingDebt added in v0.2.0

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 added in v0.2.0

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

func (*DebtAuction) MarshalTo added in v0.2.0

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

func (*DebtAuction) MarshalToSizedBuffer added in v0.2.0

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

func (*DebtAuction) ProtoMessage added in v0.2.0

func (*DebtAuction) ProtoMessage()

func (*DebtAuction) Reset added in v0.2.0

func (m *DebtAuction) Reset()

func (*DebtAuction) Size added in v0.2.0

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

func (*DebtAuction) String added in v0.2.0

func (m *DebtAuction) String() string

func (*DebtAuction) Unmarshal added in v0.2.0

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 added in v0.2.0

func (m *DebtAuction) XXX_DiscardUnknown()

func (*DebtAuction) XXX_Marshal added in v0.2.0

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

func (*DebtAuction) XXX_Merge added in v0.2.0

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

func (*DebtAuction) XXX_Size added in v0.2.0

func (m *DebtAuction) XXX_Size() int

func (*DebtAuction) XXX_Unmarshal added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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

func (*GenesisState) GetNextAuctionId added in v0.2.0

func (m *GenesisState) GetNextAuctionId() uint64

func (*GenesisState) GetParams added in v0.2.0

func (m *GenesisState) GetParams() Params

func (GenesisState) IsEmpty

func (gs GenesisState) IsEmpty() bool

IsEmpty returns true if a GenesisState is empty.

func (*GenesisState) Marshal added in v0.2.0

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

func (*GenesisState) MarshalTo added in v0.2.0

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

func (*GenesisState) MarshalToSizedBuffer added in v0.2.0

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

func (*GenesisState) ProtoMessage added in v0.2.0

func (*GenesisState) ProtoMessage()

func (*GenesisState) Reset added in v0.2.0

func (m *GenesisState) Reset()

func (*GenesisState) Size added in v0.2.0

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

func (*GenesisState) String added in v0.2.0

func (m *GenesisState) String() string

func (*GenesisState) Unmarshal added in v0.2.0

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 added in v0.2.0

func (m *GenesisState) XXX_DiscardUnknown()

func (*GenesisState) XXX_Marshal added in v0.2.0

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

func (*GenesisState) XXX_Merge added in v0.2.0

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

func (*GenesisState) XXX_Size added in v0.2.0

func (m *GenesisState) XXX_Size() int

func (*GenesisState) XXX_Unmarshal added in v0.2.0

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

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_lcnem_eurx_types.StringAccAddress `protobuf:"bytes,2,opt,name=bidder,proto3,customtype=github.com/lcnem/eurx/types.StringAccAddress" json:"bidder" yaml:"bidder"`
	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 added in v0.2.0

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

func (*MsgPlaceBid) GetAmount added in v0.2.0

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

func (*MsgPlaceBid) GetAuctionId added in v0.2.0

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 added in v0.2.0

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

func (*MsgPlaceBid) MarshalTo added in v0.2.0

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

func (*MsgPlaceBid) MarshalToSizedBuffer added in v0.2.0

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

func (*MsgPlaceBid) ProtoMessage added in v0.2.0

func (*MsgPlaceBid) ProtoMessage()

func (*MsgPlaceBid) Reset added in v0.2.0

func (m *MsgPlaceBid) Reset()

func (MsgPlaceBid) Route

func (msg MsgPlaceBid) Route() string

Route return the message type used for routing the message.

func (*MsgPlaceBid) Size added in v0.2.0

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 added in v0.2.0

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

func (MsgPlaceBid) ValidateBasic

func (msg MsgPlaceBid) ValidateBasic() error

ValidateBasic does a simple validation check that doesn't require access to state.

func (*MsgPlaceBid) XXX_DiscardUnknown added in v0.2.0

func (m *MsgPlaceBid) XXX_DiscardUnknown()

func (*MsgPlaceBid) XXX_Marshal added in v0.2.0

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

func (*MsgPlaceBid) XXX_Merge added in v0.2.0

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

func (*MsgPlaceBid) XXX_Size added in v0.2.0

func (m *MsgPlaceBid) XXX_Size() int

func (*MsgPlaceBid) XXX_Unmarshal added in v0.2.0

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

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 added in v0.2.0

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 added in v0.2.0

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

func (*Params) GetMaxAuctionDuration added in v0.2.0

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

func (*Params) Marshal added in v0.2.0

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

func (*Params) MarshalTo added in v0.2.0

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

func (*Params) MarshalToSizedBuffer added in v0.2.0

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 added in v0.2.0

func (*Params) ProtoMessage()

func (*Params) Reset added in v0.2.0

func (m *Params) Reset()

func (*Params) Size added in v0.2.0

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

func (*Params) String

func (m *Params) String() string

func (*Params) Unmarshal added in v0.2.0

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 added in v0.2.0

func (m *Params) XXX_DiscardUnknown()

func (*Params) XXX_Marshal added in v0.2.0

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

func (*Params) XXX_Merge added in v0.2.0

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

func (*Params) XXX_Size added in v0.2.0

func (m *Params) XXX_Size() int

func (*Params) XXX_Unmarshal added in v0.2.0

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

type QueryAllAuctionRequest added in v0.2.0

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

func (*QueryAllAuctionRequest) Descriptor added in v0.2.0

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

func (*QueryAllAuctionRequest) GetPagination added in v0.2.0

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

func (*QueryAllAuctionRequest) Marshal added in v0.2.0

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

func (*QueryAllAuctionRequest) MarshalTo added in v0.2.0

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

func (*QueryAllAuctionRequest) MarshalToSizedBuffer added in v0.2.0

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

func (*QueryAllAuctionRequest) ProtoMessage added in v0.2.0

func (*QueryAllAuctionRequest) ProtoMessage()

func (*QueryAllAuctionRequest) Reset added in v0.2.0

func (m *QueryAllAuctionRequest) Reset()

func (*QueryAllAuctionRequest) Size added in v0.2.0

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

func (*QueryAllAuctionRequest) String added in v0.2.0

func (m *QueryAllAuctionRequest) String() string

func (*QueryAllAuctionRequest) Unmarshal added in v0.2.0

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

func (*QueryAllAuctionRequest) XXX_DiscardUnknown added in v0.2.0

func (m *QueryAllAuctionRequest) XXX_DiscardUnknown()

func (*QueryAllAuctionRequest) XXX_Marshal added in v0.2.0

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

func (*QueryAllAuctionRequest) XXX_Merge added in v0.2.0

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

func (*QueryAllAuctionRequest) XXX_Size added in v0.2.0

func (m *QueryAllAuctionRequest) XXX_Size() int

func (*QueryAllAuctionRequest) XXX_Unmarshal added in v0.2.0

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

type QueryAllAuctionResponse added in v0.2.0

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 added in v0.2.0

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

func (*QueryAllAuctionResponse) GetAuctions added in v0.2.0

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

func (*QueryAllAuctionResponse) GetPagination added in v0.2.0

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

func (*QueryAllAuctionResponse) Marshal added in v0.2.0

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

func (*QueryAllAuctionResponse) MarshalTo added in v0.2.0

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

func (*QueryAllAuctionResponse) MarshalToSizedBuffer added in v0.2.0

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

func (*QueryAllAuctionResponse) ProtoMessage added in v0.2.0

func (*QueryAllAuctionResponse) ProtoMessage()

func (*QueryAllAuctionResponse) Reset added in v0.2.0

func (m *QueryAllAuctionResponse) Reset()

func (*QueryAllAuctionResponse) Size added in v0.2.0

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

func (*QueryAllAuctionResponse) String added in v0.2.0

func (m *QueryAllAuctionResponse) String() string

func (*QueryAllAuctionResponse) Unmarshal added in v0.2.0

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

func (*QueryAllAuctionResponse) XXX_DiscardUnknown added in v0.2.0

func (m *QueryAllAuctionResponse) XXX_DiscardUnknown()

func (*QueryAllAuctionResponse) XXX_Marshal added in v0.2.0

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

func (*QueryAllAuctionResponse) XXX_Merge added in v0.2.0

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

func (*QueryAllAuctionResponse) XXX_Size added in v0.2.0

func (m *QueryAllAuctionResponse) XXX_Size() int

func (*QueryAllAuctionResponse) XXX_Unmarshal added in v0.2.0

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

type QueryClient added in v0.2.0

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 added in v0.2.0

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryGetAuctionRequest added in v0.2.0

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 added in v0.2.0

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

func (*QueryGetAuctionRequest) GetId added in v0.2.0

func (m *QueryGetAuctionRequest) GetId() uint64

func (*QueryGetAuctionRequest) Marshal added in v0.2.0

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

func (*QueryGetAuctionRequest) MarshalTo added in v0.2.0

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

func (*QueryGetAuctionRequest) MarshalToSizedBuffer added in v0.2.0

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

func (*QueryGetAuctionRequest) ProtoMessage added in v0.2.0

func (*QueryGetAuctionRequest) ProtoMessage()

func (*QueryGetAuctionRequest) Reset added in v0.2.0

func (m *QueryGetAuctionRequest) Reset()

func (*QueryGetAuctionRequest) Size added in v0.2.0

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

func (*QueryGetAuctionRequest) String added in v0.2.0

func (m *QueryGetAuctionRequest) String() string

func (*QueryGetAuctionRequest) Unmarshal added in v0.2.0

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

func (*QueryGetAuctionRequest) XXX_DiscardUnknown added in v0.2.0

func (m *QueryGetAuctionRequest) XXX_DiscardUnknown()

func (*QueryGetAuctionRequest) XXX_Marshal added in v0.2.0

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

func (*QueryGetAuctionRequest) XXX_Merge added in v0.2.0

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

func (*QueryGetAuctionRequest) XXX_Size added in v0.2.0

func (m *QueryGetAuctionRequest) XXX_Size() int

func (*QueryGetAuctionRequest) XXX_Unmarshal added in v0.2.0

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

type QueryGetAuctionResponse added in v0.2.0

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

func (*QueryGetAuctionResponse) Descriptor added in v0.2.0

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

func (*QueryGetAuctionResponse) GetAuction added in v0.2.0

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

func (*QueryGetAuctionResponse) Marshal added in v0.2.0

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

func (*QueryGetAuctionResponse) MarshalTo added in v0.2.0

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

func (*QueryGetAuctionResponse) MarshalToSizedBuffer added in v0.2.0

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

func (*QueryGetAuctionResponse) ProtoMessage added in v0.2.0

func (*QueryGetAuctionResponse) ProtoMessage()

func (*QueryGetAuctionResponse) Reset added in v0.2.0

func (m *QueryGetAuctionResponse) Reset()

func (*QueryGetAuctionResponse) Size added in v0.2.0

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

func (*QueryGetAuctionResponse) String added in v0.2.0

func (m *QueryGetAuctionResponse) String() string

func (*QueryGetAuctionResponse) Unmarshal added in v0.2.0

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

func (*QueryGetAuctionResponse) XXX_DiscardUnknown added in v0.2.0

func (m *QueryGetAuctionResponse) XXX_DiscardUnknown()

func (*QueryGetAuctionResponse) XXX_Marshal added in v0.2.0

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

func (*QueryGetAuctionResponse) XXX_Merge added in v0.2.0

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

func (*QueryGetAuctionResponse) XXX_Size added in v0.2.0

func (m *QueryGetAuctionResponse) XXX_Size() int

func (*QueryGetAuctionResponse) XXX_Unmarshal added in v0.2.0

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

type QueryParamsRequest added in v0.2.0

type QueryParamsRequest struct {
}

func (*QueryParamsRequest) Descriptor added in v0.2.0

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

func (*QueryParamsRequest) Marshal added in v0.2.0

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

func (*QueryParamsRequest) MarshalTo added in v0.2.0

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

func (*QueryParamsRequest) MarshalToSizedBuffer added in v0.2.0

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

func (*QueryParamsRequest) ProtoMessage added in v0.2.0

func (*QueryParamsRequest) ProtoMessage()

func (*QueryParamsRequest) Reset added in v0.2.0

func (m *QueryParamsRequest) Reset()

func (*QueryParamsRequest) Size added in v0.2.0

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

func (*QueryParamsRequest) String added in v0.2.0

func (m *QueryParamsRequest) String() string

func (*QueryParamsRequest) Unmarshal added in v0.2.0

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

func (*QueryParamsRequest) XXX_DiscardUnknown added in v0.2.0

func (m *QueryParamsRequest) XXX_DiscardUnknown()

func (*QueryParamsRequest) XXX_Marshal added in v0.2.0

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

func (*QueryParamsRequest) XXX_Merge added in v0.2.0

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

func (*QueryParamsRequest) XXX_Size added in v0.2.0

func (m *QueryParamsRequest) XXX_Size() int

func (*QueryParamsRequest) XXX_Unmarshal added in v0.2.0

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

type QueryParamsResponse added in v0.2.0

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

func (*QueryParamsResponse) Descriptor added in v0.2.0

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

func (*QueryParamsResponse) GetParams added in v0.2.0

func (m *QueryParamsResponse) GetParams() *Params

func (*QueryParamsResponse) Marshal added in v0.2.0

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

func (*QueryParamsResponse) MarshalTo added in v0.2.0

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

func (*QueryParamsResponse) MarshalToSizedBuffer added in v0.2.0

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

func (*QueryParamsResponse) ProtoMessage added in v0.2.0

func (*QueryParamsResponse) ProtoMessage()

func (*QueryParamsResponse) Reset added in v0.2.0

func (m *QueryParamsResponse) Reset()

func (*QueryParamsResponse) Size added in v0.2.0

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

func (*QueryParamsResponse) String added in v0.2.0

func (m *QueryParamsResponse) String() string

func (*QueryParamsResponse) Unmarshal added in v0.2.0

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

func (*QueryParamsResponse) XXX_DiscardUnknown added in v0.2.0

func (m *QueryParamsResponse) XXX_DiscardUnknown()

func (*QueryParamsResponse) XXX_Marshal added in v0.2.0

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

func (*QueryParamsResponse) XXX_Merge added in v0.2.0

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

func (*QueryParamsResponse) XXX_Size added in v0.2.0

func (m *QueryParamsResponse) XXX_Size() int

func (*QueryParamsResponse) XXX_Unmarshal added in v0.2.0

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

type QueryServer added in v0.2.0

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 added in v0.2.0

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

func (SurplusAuction) GetModuleAccountCoins

func (a SurplusAuction) GetModuleAccountCoins() sdk.Coins

GetModuleAccountCoins returns the total number of coins held in the module account for this auction. It is used in genesis initialize the module account correctly.

func (SurplusAuction) GetPhase

func (a SurplusAuction) GetPhase() string

GetPhase returns the direction of a surplus auction, which never changes.

func (SurplusAuction) GetType

func (a SurplusAuction) GetType() string

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

func (*SurplusAuction) Marshal added in v0.2.0

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

func (*SurplusAuction) MarshalTo added in v0.2.0

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

func (*SurplusAuction) MarshalToSizedBuffer added in v0.2.0

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

func (*SurplusAuction) ProtoMessage added in v0.2.0

func (*SurplusAuction) ProtoMessage()

func (*SurplusAuction) Reset added in v0.2.0

func (m *SurplusAuction) Reset()

func (*SurplusAuction) Size added in v0.2.0

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

func (*SurplusAuction) String added in v0.2.0

func (m *SurplusAuction) String() string

func (*SurplusAuction) Unmarshal added in v0.2.0

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 added in v0.2.0

func (m *SurplusAuction) XXX_DiscardUnknown()

func (*SurplusAuction) XXX_Marshal added in v0.2.0

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

func (*SurplusAuction) XXX_Merge added in v0.2.0

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

func (*SurplusAuction) XXX_Size added in v0.2.0

func (m *SurplusAuction) XXX_Size() int

func (*SurplusAuction) XXX_Unmarshal added in v0.2.0

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

type UnimplementedQueryServer added in v0.2.0

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) Auction added in v0.2.0

func (*UnimplementedQueryServer) AuctionAll added in v0.2.0

func (*UnimplementedQueryServer) Params added in v0.2.0

type WeightedAddresses

type WeightedAddresses struct {
	Addresses []github_com_lcnem_eurx_types.StringAccAddress `` /* 134-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" yaml:"weights"`
}

func NewWeightedAddresses

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

NewWeightedAddresses returns a new list addresses with weights.

func (*WeightedAddresses) Descriptor added in v0.2.0

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

func (*WeightedAddresses) Marshal added in v0.2.0

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

func (*WeightedAddresses) MarshalTo added in v0.2.0

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

func (*WeightedAddresses) MarshalToSizedBuffer added in v0.2.0

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

func (*WeightedAddresses) ProtoMessage added in v0.2.0

func (*WeightedAddresses) ProtoMessage()

func (*WeightedAddresses) Reset added in v0.2.0

func (m *WeightedAddresses) Reset()

func (*WeightedAddresses) Size added in v0.2.0

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

func (*WeightedAddresses) String added in v0.2.0

func (m *WeightedAddresses) String() string

func (*WeightedAddresses) Unmarshal added in v0.2.0

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 added in v0.2.0

func (m *WeightedAddresses) XXX_DiscardUnknown()

func (*WeightedAddresses) XXX_Marshal added in v0.2.0

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

func (*WeightedAddresses) XXX_Merge added in v0.2.0

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

func (*WeightedAddresses) XXX_Size added in v0.2.0

func (m *WeightedAddresses) XXX_Size() int

func (*WeightedAddresses) XXX_Unmarshal added in v0.2.0

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