auction

package
v0.12.2-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2021 License: Apache-2.0 Imports: 19 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AttributeKeyAuctionID     = types.AttributeKeyAuctionID
	AttributeKeyAuctionType   = types.AttributeKeyAuctionType
	AttributeKeyBid           = types.AttributeKeyBid
	AttributeKeyBidder        = types.AttributeKeyBidder
	AttributeKeyCloseBlock    = types.AttributeKeyCloseBlock
	AttributeKeyEndTime       = types.AttributeKeyEndTime
	AttributeKeyLot           = types.AttributeKeyLot
	AttributeKeyMaxBid        = types.AttributeKeyMaxBid
	AttributeValueCategory    = types.AttributeValueCategory
	CollateralAuctionType     = types.CollateralAuctionType
	DebtAuctionType           = types.DebtAuctionType
	DefaultBidDuration        = types.DefaultBidDuration
	DefaultMaxAuctionDuration = types.DefaultMaxAuctionDuration
	DefaultNextAuctionID      = types.DefaultNextAuctionID
	DefaultParamspace         = types.DefaultParamspace
	EventTypeAuctionBid       = types.EventTypeAuctionBid
	EventTypeAuctionClose     = types.EventTypeAuctionClose
	EventTypeAuctionStart     = types.EventTypeAuctionStart
	ForwardAuctionPhase       = types.ForwardAuctionPhase
	ModuleName                = types.ModuleName
	QuerierRoute              = types.QuerierRoute
	QueryGetAuction           = types.QueryGetAuction
	QueryGetAuctions          = types.QueryGetAuctions
	QueryGetParams            = types.QueryGetParams
	QueryNextAuctionID        = types.QueryNextAuctionID
	ReverseAuctionPhase       = types.ReverseAuctionPhase
	RouterKey                 = types.RouterKey
	StoreKey                  = types.StoreKey
	SurplusAuctionType        = types.SurplusAuctionType
)

Variables

View Source
var (
	// function aliases
	ModuleAccountInvariants  = keeper.ModuleAccountInvariants
	NewKeeper                = keeper.NewKeeper
	NewQuerier               = keeper.NewQuerier
	RegisterInvariants       = keeper.RegisterInvariants
	ValidAuctionInvariant    = keeper.ValidAuctionInvariant
	ValidIndexInvariant      = keeper.ValidIndexInvariant
	DefaultGenesisState      = types.DefaultGenesisState
	DefaultParams            = types.DefaultParams
	GetAuctionByTimeKey      = types.GetAuctionByTimeKey
	GetAuctionKey            = types.GetAuctionKey
	NewAuctionWithPhase      = types.NewAuctionWithPhase
	NewCollateralAuction     = types.NewCollateralAuction
	NewDebtAuction           = types.NewDebtAuction
	NewGenesisState          = types.NewGenesisState
	NewMsgPlaceBid           = types.NewMsgPlaceBid
	NewParams                = types.NewParams
	NewQueryAllAuctionParams = types.NewQueryAllAuctionParams
	NewQueryAuctionParams    = types.NewQueryAuctionParams
	NewSurplusAuction        = types.NewSurplusAuction
	NewWeightedAddresses     = types.NewWeightedAddresses
	ParamKeyTable            = types.ParamKeyTable
	RegisterCodec            = types.RegisterCodec
	Uint64FromBytes          = types.Uint64FromBytes
	Uint64ToBytes            = types.Uint64ToBytes

	// variable aliases
	AuctionByTimeKeyPrefix     = types.AuctionByTimeKeyPrefix
	AuctionKeyPrefix           = types.AuctionKeyPrefix
	DefaultIncrement           = types.DefaultIncrement
	DistantFuture              = types.DistantFuture
	ErrAuctionHasExpired       = types.ErrAuctionHasExpired
	ErrAuctionHasNotExpired    = types.ErrAuctionHasNotExpired
	ErrAuctionNotFound         = types.ErrAuctionNotFound
	ErrBidTooLarge             = types.ErrBidTooLarge
	ErrBidTooSmall             = types.ErrBidTooSmall
	ErrInvalidBidDenom         = types.ErrInvalidBidDenom
	ErrInvalidInitialAuctionID = types.ErrInvalidInitialAuctionID
	ErrInvalidLotDenom         = types.ErrInvalidLotDenom
	ErrLotTooLarge             = types.ErrLotTooLarge
	ErrLotTooSmall             = types.ErrLotTooSmall
	ErrUnrecognizedAuctionType = types.ErrUnrecognizedAuctionType
	KeyBidDuration             = types.KeyBidDuration
	KeyIncrementCollateral     = types.KeyIncrementCollateral
	KeyIncrementDebt           = types.KeyIncrementDebt
	KeyIncrementSurplus        = types.KeyIncrementSurplus
	KeyMaxAuctionDuration      = types.KeyMaxAuctionDuration
	ModuleCdc                  = types.ModuleCdc
	NextAuctionIDKey           = types.NextAuctionIDKey
)

Functions

func BeginBlocker added in v0.5.0

func BeginBlocker(ctx sdk.Context, k Keeper)

BeginBlocker closes all expired auctions at the end of each block. It panics if there's an error other than ErrAuctionNotFound.

func InitGenesis

func InitGenesis(ctx sdk.Context, keeper Keeper, supplyKeeper types.SupplyKeeper, gs GenesisState)

InitGenesis initializes the store state from a genesis state.

func NewHandler

func NewHandler(keeper Keeper) sdk.Handler

NewHandler returns a function to handle all "auction" type messages.

Types

type AppModule

type AppModule struct {
	AppModuleBasic
	// contains filtered or unexported fields
}

AppModule implements the sdk.AppModule interface.

func NewAppModule

func NewAppModule(keeper Keeper, accountKeeper auth.AccountKeeper, supplyKeeper types.SupplyKeeper) AppModule

NewAppModule creates a new AppModule object

func (AppModule) BeginBlock

func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock)

BeginBlock module begin-block

func (AppModule) EndBlock

EndBlock module end-block

func (AppModule) ExportGenesis

func (am AppModule) ExportGenesis(ctx sdk.Context) json.RawMessage

ExportGenesis module export genesis

func (AppModule) InitGenesis

func (am AppModule) InitGenesis(ctx sdk.Context, data json.RawMessage) []abci.ValidatorUpdate

InitGenesis performs genesis initialization for the auction module. It returns no validator updates.

func (AppModule) NewHandler

func (am AppModule) NewHandler() sdk.Handler

NewHandler module handler

func (AppModule) NewQuerierHandler

func (am AppModule) NewQuerierHandler() sdk.Querier

NewQuerierHandler module querier

func (AppModule) QuerierRoute

func (AppModule) QuerierRoute() string

QuerierRoute module querier route name

func (AppModule) RegisterInvariants

func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry)

RegisterInvariants registers the module invariants.

func (AppModule) Route

func (AppModule) Route() string

Route module message route name

func (AppModule) WeightedOperations added in v0.8.0

func (am AppModule) WeightedOperations(simState module.SimulationState) []sim.WeightedOperation

WeightedOperations returns the all the auction module operations with their respective weights.

type AppModuleBasic

type AppModuleBasic struct{}

AppModuleBasic implements the sdk.AppModuleBasic interface.

func (AppModuleBasic) DefaultGenesis

func (AppModuleBasic) DefaultGenesis() json.RawMessage

DefaultGenesis returns the default genesis state.

func (AppModuleBasic) GenerateGenesisState added in v0.8.0

func (AppModuleBasic) GenerateGenesisState(simState *module.SimulationState)

GenerateGenesisState creates a randomized GenState of the auction module

func (AppModuleBasic) GetQueryCmd

func (AppModuleBasic) GetQueryCmd(cdc *codec.Codec) *cobra.Command

GetQueryCmd returns the root query command for the auction module.

func (AppModuleBasic) GetTxCmd

func (AppModuleBasic) GetTxCmd(cdc *codec.Codec) *cobra.Command

GetTxCmd returns the root tx command for the auction module.

func (AppModuleBasic) Name

func (AppModuleBasic) Name() string

Name returns the module name.

func (AppModuleBasic) ProposalContents added in v0.8.0

ProposalContents doesn't return any content functions for governance proposals.

func (AppModuleBasic) RandomizedParams added in v0.8.0

func (AppModuleBasic) RandomizedParams(r *rand.Rand) []sim.ParamChange

RandomizedParams returns nil because auction has no params.

func (AppModuleBasic) RegisterCodec

func (AppModuleBasic) RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the module codec.

func (AppModuleBasic) RegisterRESTRoutes

func (AppModuleBasic) RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router)

RegisterRESTRoutes registers the REST routes for the auction module.

func (AppModuleBasic) RegisterStoreDecoder added in v0.8.0

func (AppModuleBasic) RegisterStoreDecoder(sdr sdk.StoreDecoderRegistry)

RegisterStoreDecoder registers a decoder for auction module's types

func (AppModuleBasic) ValidateGenesis

func (AppModuleBasic) ValidateGenesis(bz json.RawMessage) error

ValidateGenesis performs genesis state validation for the auction module.

type Auction

type Auction = types.Auction

type AuctionWithPhase added in v0.5.0

type AuctionWithPhase = types.AuctionWithPhase

type Auctions added in v0.5.0

type Auctions = types.Auctions

type BaseAuction

type BaseAuction = types.BaseAuction

type CollateralAuction

type CollateralAuction = types.CollateralAuction

type DebtAuction

type DebtAuction = types.DebtAuction

type GenesisAuction

type GenesisAuction = types.GenesisAuction

type GenesisAuctions

type GenesisAuctions = types.GenesisAuctions

type GenesisState

type GenesisState = types.GenesisState

func ExportGenesis

func ExportGenesis(ctx sdk.Context, keeper Keeper) GenesisState

ExportGenesis returns a GenesisState for a given context and keeper.

type Keeper

type Keeper = keeper.Keeper

type MsgPlaceBid

type MsgPlaceBid = types.MsgPlaceBid

type Params

type Params = types.Params

type QueryAllAuctionParams added in v0.5.0

type QueryAllAuctionParams = types.QueryAllAuctionParams

type QueryAuctionParams added in v0.5.0

type QueryAuctionParams = types.QueryAuctionParams

type SupplyKeeper

type SupplyKeeper = types.SupplyKeeper

type SurplusAuction

type SurplusAuction = types.SurplusAuction

type WeightedAddresses

type WeightedAddresses = types.WeightedAddresses

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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