mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-27 00:35:18 +00:00
remove unused message types
This commit is contained in:
parent
983de010df
commit
b2fa8d81ee
@ -2,6 +2,9 @@ package types
|
|||||||
|
|
||||||
import sdk "github.com/cosmos/cosmos-sdk/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.
|
// MsgPlaceBid is the message type used to place a bid on any type of auction.
|
||||||
type MsgPlaceBid struct {
|
type MsgPlaceBid struct {
|
||||||
AuctionID uint64
|
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.
|
// 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.
|
// Type returns a human-readable string for the message, intended for utilization within tags.
|
||||||
func (msg MsgPlaceBid) Type() string { return "place_bid" }
|
func (msg MsgPlaceBid) Type() string { return "place_bid" }
|
||||||
@ -51,43 +54,3 @@ func (msg MsgPlaceBid) GetSignBytes() []byte {
|
|||||||
func (msg MsgPlaceBid) GetSigners() []sdk.AccAddress {
|
func (msg MsgPlaceBid) GetSigners() []sdk.AccAddress {
|
||||||
return []sdk.AccAddress{msg.Bidder}
|
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