Documentation ¶
Index ¶
- Variables
- type Auction
- func (a *Auction) ClearAuction(env *setypes.ScriptEnv, cb *meter.AuctionCB, validatorBenefitRatio *big.Int) (*big.Int, *big.Int, []*meter.DistMtrg, error)
- func (a *Auction) CloseAuctionCB(env *setypes.ScriptEnv, ab *AuctionBody, gas uint64) (leftOverGas uint64, err error)
- func (a *Auction) Handle(senv *setypes.ScriptEnv, payload []byte, to *meter.Address, gas uint64) (seOutput *setypes.ScriptEngineOutput, leftOverGas uint64, err error)
- func (a *Auction) HandleAuctionTx(env *setypes.ScriptEnv, ab *AuctionBody, gas uint64) (leftOverGas uint64, err error)
- func (a *Auction) MintMTRGToBidder(env *setypes.ScriptEnv, addr meter.Address, amount *big.Int)
- func (a *Auction) StartAuctionCB(env *setypes.ScriptEnv, ab *AuctionBody, gas uint64) (leftOverGas uint64, err error)
- type AuctionBody
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Auction ¶
type Auction struct {
// contains filtered or unexported fields
}
Candidate indicates the structure of a candidate
func (*Auction) ClearAuction ¶
func (a *Auction) ClearAuction(env *setypes.ScriptEnv, cb *meter.AuctionCB, validatorBenefitRatio *big.Int) (*big.Int, *big.Int, []*meter.DistMtrg, error)
////////////////////// called when auction is over
func (*Auction) CloseAuctionCB ¶
func (*Auction) HandleAuctionTx ¶
func (*Auction) MintMTRGToBidder ¶
func (*Auction) StartAuctionCB ¶
type AuctionBody ¶
type AuctionBody struct { Opcode uint32 Version uint32 Option uint32 StartHeight uint64 StartEpoch uint64 EndHeight uint64 EndEpoch uint64 Sequence uint64 AuctionID meter.Bytes32 Bidder meter.Address Amount *big.Int ReserveAmount *big.Int Token byte // meter or meter gov Timestamp uint64 // timestamp Nonce uint64 // nonce }
Candidate indicates the structure of a candidate
func DecodeFromBytes ¶
func DecodeFromBytes(bytes []byte) (*AuctionBody, error)
func (*AuctionBody) GetOpName ¶
func (ab *AuctionBody) GetOpName(op uint32) string
func (*AuctionBody) String ¶ added in v1.2.0
func (sb *AuctionBody) String() string
func (*AuctionBody) ToString ¶
func (ab *AuctionBody) ToString() string
func (*AuctionBody) UniteHash ¶ added in v1.2.0
func (sb *AuctionBody) UniteHash() (hash meter.Bytes32)
Click to show internal directories.
Click to hide internal directories.