mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-25 15:55:18 +00:00
remove unused message types
This commit is contained in:
parent
983de010df
commit
b2fa8d81ee
@ -9,7 +9,7 @@ type GenesisAuctions []Auction
|
||||
|
||||
// GenesisState - auction state that must be provided at genesis
|
||||
type GenesisState struct {
|
||||
NextAuctionID uint64 `json:"next_auction_id" yaml:"next_auction_id"`
|
||||
NextAuctionID uint64 `json:"next_auction_id" yaml:"next_auction_id"`
|
||||
AuctionParams AuctionParams `json:"auction_params" yaml:"auction_params"`
|
||||
Auctions GenesisAuctions `json:"genesis_auctions" yaml:"genesis_auctions"`
|
||||
}
|
||||
|
@ -2,6 +2,9 @@ package types
|
||||
|
||||
import sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
// ensure Msg interface compliance at compile time
|
||||
var _ sdk.Msg = &MsgPlaceBid{}
|
||||
|
||||
// MsgPlaceBid is the message type used to place a bid on any type of auction.
|
||||
type MsgPlaceBid struct {
|
||||
AuctionID uint64
|
||||
@ -21,7 +24,7 @@ func NewMsgPlaceBid(auctionID uint64, bidder sdk.AccAddress, bid sdk.Coin, lot s
|
||||
}
|
||||
|
||||
// Route return the message type used for routing the message.
|
||||
func (msg MsgPlaceBid) Route() string { return "auction" }
|
||||
func (msg MsgPlaceBid) Route() string { return RouterKey }
|
||||
|
||||
// Type returns a human-readable string for the message, intended for utilization within tags.
|
||||
func (msg MsgPlaceBid) Type() string { return "place_bid" }
|
||||
@ -50,44 +53,4 @@ func (msg MsgPlaceBid) GetSignBytes() []byte {
|
||||
// GetSigners returns the addresses of signers that must sign.
|
||||
func (msg MsgPlaceBid) GetSigners() []sdk.AccAddress {
|
||||
return []sdk.AccAddress{msg.Bidder}
|
||||
}
|
||||
|
||||
// The CDP system doesn't need Msgs for starting auctions. But they could be added to allow people to create random auctions of their own, and to make this module more general purpose.
|
||||
|
||||
// type MsgStartForwardAuction struct {
|
||||
// Seller sdk.AccAddress
|
||||
// Amount sdk.Coins
|
||||
// // TODO add starting bid amount?
|
||||
// // TODO specify asset denom to be received
|
||||
// }
|
||||
|
||||
// // NewMsgStartAuction returns a new MsgStartAuction.
|
||||
// func NewMsgStartAuction(seller sdk.AccAddress, amount sdk.Coins, maxBid sdk.Coins) MsgStartAuction {
|
||||
// return MsgStartAuction{
|
||||
// Seller: seller,
|
||||
// Amount: amount,
|
||||
// MaxBid: maxBid,
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Route return the message type used for routing the message.
|
||||
// func (msg MsgStartAuction) Route() string { return "auction" }
|
||||
|
||||
// // Type returns a human-readable string for the message, intended for utilization within tags.
|
||||
// func (msg MsgStartAuction) Type() string { return "start_auction" }
|
||||
|
||||
// // ValidateBasic does a simple validation check that doesn't require access to any other information.
|
||||
// func (msg MsgStartAuction) ValidateBasic() sdk.Error {
|
||||
// return nil
|
||||
// }
|
||||
|
||||
// // GetSignBytes gets the canonical byte representation of the Msg.
|
||||
// func (msg MsgStartAuction) GetSignBytes() []byte {
|
||||
// bz := msgCdc.MustMarshalJSON(msg)
|
||||
// return sdk.MustSortJSON(bz)
|
||||
// }
|
||||
|
||||
// // GetSigners returns the addresses of signers that must sign.
|
||||
// func (msg MsgStartAuction) GetSigners() []sdk.AccAddress {
|
||||
// return []sdk.AccAddress{msg.Seller}
|
||||
// }
|
||||
}
|
Loading…
Reference in New Issue
Block a user