bid_action

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//Bid
	BID_CREATE          action.Type = 0x901
	BID_CONTER_OFFER    action.Type = 0x902
	BID_CANCEL          action.Type = 0x903
	BID_BIDDER_DECISION action.Type = 0x904
	BID_EXPIRE          action.Type = 0x905
	BID_OWNER_DECISION  action.Type = 0x906
)

Variables

Functions

func CloseBidConv

func CloseBidConv(bidConv *bid_data.BidConv, bidMasterStore *bid_data.BidMasterStore, targetState bid_data.BidConvState) error

func DeactivateOffer

func DeactivateOffer(deal bool, bidder action.Address, ctx *action.Context, activeOffer *bid_data.BidOffer, bidMasterStore *bid_data.BidMasterStore) error

func ExchangeAsset

func ExchangeAsset(ctx *action.Context, assetName string, assetType bid_data.BidAssetType, assetOwner keys.Address, bidder keys.Address) (bool, error)

func GetBidMasterStore

func GetBidMasterStore(ctx *action.Context) (*bid_data.BidMasterStore, error)

func IsAssetAvailable

func IsAssetAvailable(ctx *action.Context, assetName string, assetType bid_data.BidAssetType, assetOwner keys.Address) (bool, error)

Types

type BidderDecision

type BidderDecision struct {
	BidConvId bid_data.BidConvId   `json:"bidConvId"`
	Bidder    keys.Address         `json:"bidder"`
	Decision  bid_data.BidDecision `json:"decision"`
}

func (BidderDecision) Marshal

func (b BidderDecision) Marshal() ([]byte, error)

func (BidderDecision) Signers

func (b BidderDecision) Signers() []action.Address

func (BidderDecision) Tags

func (b BidderDecision) Tags() kv.Pairs

func (BidderDecision) Type

func (b BidderDecision) Type() action.Type

func (*BidderDecision) Unmarshal

func (b *BidderDecision) Unmarshal(bytes []byte) error

type BidderDecisionTx

type BidderDecisionTx struct {
}

func (BidderDecisionTx) ProcessCheck

func (b BidderDecisionTx) ProcessCheck(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (BidderDecisionTx) ProcessDeliver

func (b BidderDecisionTx) ProcessDeliver(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (BidderDecisionTx) ProcessFee

func (b BidderDecisionTx) ProcessFee(ctx *action.Context, signedTx action.SignedTx, start action.Gas, size action.Gas, gasUsed action.Gas) (bool, action.Response)

func (BidderDecisionTx) Validate

func (b BidderDecisionTx) Validate(ctx *action.Context, signedTx action.SignedTx) (bool, error)

type CancelBid

type CancelBid struct {
	BidConvId bid_data.BidConvId `json:"bidConvId"`
	Bidder    keys.Address       `json:"bidder"`
}

func (CancelBid) Marshal

func (c CancelBid) Marshal() ([]byte, error)

func (CancelBid) Signers

func (c CancelBid) Signers() []action.Address

func (CancelBid) Tags

func (c CancelBid) Tags() kv.Pairs

func (CancelBid) Type

func (c CancelBid) Type() action.Type

func (*CancelBid) Unmarshal

func (c *CancelBid) Unmarshal(bytes []byte) error

type CancelBidTx

type CancelBidTx struct {
}

func (CancelBidTx) ProcessCheck

func (c CancelBidTx) ProcessCheck(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (CancelBidTx) ProcessDeliver

func (c CancelBidTx) ProcessDeliver(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (CancelBidTx) ProcessFee

func (c CancelBidTx) ProcessFee(ctx *action.Context, signedTx action.SignedTx, start action.Gas, size action.Gas, gasUsed action.Gas) (bool, action.Response)

func (CancelBidTx) Validate

func (c CancelBidTx) Validate(ctx *action.Context, signedTx action.SignedTx) (bool, error)

type CounterOffer

type CounterOffer struct {
	BidConvId  bid_data.BidConvId `json:"bidConvId"`
	AssetOwner keys.Address       `json:"assetOwner"`
	Amount     action.Amount      `json:"amount"`
}

func (CounterOffer) Marshal

func (c CounterOffer) Marshal() ([]byte, error)

func (CounterOffer) Signers

func (c CounterOffer) Signers() []action.Address

func (CounterOffer) Tags

func (c CounterOffer) Tags() kv.Pairs

func (CounterOffer) Type

func (c CounterOffer) Type() action.Type

func (*CounterOffer) Unmarshal

func (c *CounterOffer) Unmarshal(bytes []byte) error

type CounterOfferTx

type CounterOfferTx struct {
}

func (CounterOfferTx) ProcessCheck

func (c CounterOfferTx) ProcessCheck(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (CounterOfferTx) ProcessDeliver

func (c CounterOfferTx) ProcessDeliver(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (CounterOfferTx) ProcessFee

func (c CounterOfferTx) ProcessFee(ctx *action.Context, signedTx action.SignedTx, start action.Gas, size action.Gas, gasUsed action.Gas) (bool, action.Response)

func (CounterOfferTx) Validate

func (c CounterOfferTx) Validate(ctx *action.Context, signedTx action.SignedTx) (bool, error)

type CreateBid

type CreateBid struct {
	BidConvId  bid_data.BidConvId    `json:"bidConvId"`
	AssetOwner keys.Address          `json:"assetOwner"`
	AssetName  string                `json:"assetName"`
	AssetType  bid_data.BidAssetType `json:"assetType"`
	Bidder     keys.Address          `json:"bidder"`
	Amount     action.Amount         `json:"amount"`
	Deadline   int64                 `json:"deadline"`
}

func (CreateBid) Marshal

func (c CreateBid) Marshal() ([]byte, error)

func (CreateBid) Signers

func (c CreateBid) Signers() []action.Address

func (CreateBid) Tags

func (c CreateBid) Tags() kv.Pairs

func (CreateBid) Type

func (c CreateBid) Type() action.Type

func (*CreateBid) Unmarshal

func (c *CreateBid) Unmarshal(bytes []byte) error

type CreateBidTx

type CreateBidTx struct {
}

func (CreateBidTx) ProcessCheck

func (c CreateBidTx) ProcessCheck(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (CreateBidTx) ProcessDeliver

func (c CreateBidTx) ProcessDeliver(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (CreateBidTx) ProcessFee

func (c CreateBidTx) ProcessFee(ctx *action.Context, signedTx action.SignedTx, start action.Gas, size action.Gas, gasUsed action.Gas) (bool, action.Response)

func (CreateBidTx) Validate

func (c CreateBidTx) Validate(ctx *action.Context, signedTx action.SignedTx) (bool, error)

type ExpireBid

type ExpireBid struct {
	BidConvId        bid_data.BidConvId `json:"bidConvId"`
	ValidatorAddress action.Address     `json:"validatorAddress"`
}

func (ExpireBid) Marshal

func (e ExpireBid) Marshal() ([]byte, error)

func (ExpireBid) Signers

func (e ExpireBid) Signers() []action.Address

func (ExpireBid) Tags

func (e ExpireBid) Tags() kv.Pairs

func (ExpireBid) Type

func (e ExpireBid) Type() action.Type

func (*ExpireBid) Unmarshal

func (e *ExpireBid) Unmarshal(bytes []byte) error

type ExpireBidTx

type ExpireBidTx struct {
}

func (ExpireBidTx) ProcessCheck

func (e ExpireBidTx) ProcessCheck(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (ExpireBidTx) ProcessDeliver

func (e ExpireBidTx) ProcessDeliver(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (ExpireBidTx) ProcessFee

func (e ExpireBidTx) ProcessFee(ctx *action.Context, signedTx action.SignedTx, start action.Gas, size action.Gas, gasUsed action.Gas) (bool, action.Response)

func (ExpireBidTx) Validate

func (e ExpireBidTx) Validate(ctx *action.Context, signedTx action.SignedTx) (bool, error)

type OwnerDecision

type OwnerDecision struct {
	BidConvId bid_data.BidConvId   `json:"bidConvId"`
	Owner     keys.Address         `json:"owner"`
	Decision  bid_data.BidDecision `json:"decision"`
}

func (OwnerDecision) Marshal

func (o OwnerDecision) Marshal() ([]byte, error)

func (OwnerDecision) Signers

func (o OwnerDecision) Signers() []action.Address

func (OwnerDecision) Tags

func (o OwnerDecision) Tags() kv.Pairs

func (OwnerDecision) Type

func (o OwnerDecision) Type() action.Type

func (*OwnerDecision) Unmarshal

func (o *OwnerDecision) Unmarshal(bytes []byte) error

type OwnerDecisionTx

type OwnerDecisionTx struct {
}

func (OwnerDecisionTx) ProcessCheck

func (o OwnerDecisionTx) ProcessCheck(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (OwnerDecisionTx) ProcessDeliver

func (o OwnerDecisionTx) ProcessDeliver(ctx *action.Context, tx action.RawTx) (bool, action.Response)

func (OwnerDecisionTx) ProcessFee

func (o OwnerDecisionTx) ProcessFee(ctx *action.Context, signedTx action.SignedTx, start action.Gas, size action.Gas, gasUsed action.Gas) (bool, action.Response)

func (OwnerDecisionTx) Validate

func (o OwnerDecisionTx) Validate(ctx *action.Context, signedTx action.SignedTx) (bool, error)

Jump to

Keyboard shortcuts

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