executor

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OfferPerAsset = 128
	TenThousand   = 10000
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AtomicMatchExecutor

type AtomicMatchExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*AtomicMatchExecutor) ApplyTransaction

func (e *AtomicMatchExecutor) ApplyTransaction() error

func (*AtomicMatchExecutor) GeneratePubData

func (e *AtomicMatchExecutor) GeneratePubData() error

func (*AtomicMatchExecutor) GenerateTxDetails

func (e *AtomicMatchExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*AtomicMatchExecutor) GetExecutedTx

func (e *AtomicMatchExecutor) GetExecutedTx() (*tx.Tx, error)

func (*AtomicMatchExecutor) Prepare

func (e *AtomicMatchExecutor) Prepare() error

func (*AtomicMatchExecutor) VerifyInputs

func (e *AtomicMatchExecutor) VerifyInputs(skipGasAmtChk bool) error

type BaseExecutor

type BaseExecutor struct {
	// contains filtered or unexported fields
}

func NewBaseExecutor

func NewBaseExecutor(bc IBlockchain, tx *tx.Tx, txInfo txtypes.TxInfo) BaseExecutor

func (*BaseExecutor) ApplyTransaction

func (e *BaseExecutor) ApplyTransaction() error

func (*BaseExecutor) GeneratePubData

func (e *BaseExecutor) GeneratePubData() error

func (*BaseExecutor) GenerateTxDetails

func (e *BaseExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*BaseExecutor) GetExecutedTx

func (e *BaseExecutor) GetExecutedTx() (*tx.Tx, error)

func (*BaseExecutor) MarkAccountAssetsDirty

func (e *BaseExecutor) MarkAccountAssetsDirty(accountIndex int64, assets []int64)

func (*BaseExecutor) MarkNftDirty

func (e *BaseExecutor) MarkNftDirty(nftIndex int64)

func (*BaseExecutor) Prepare

func (e *BaseExecutor) Prepare() error

func (*BaseExecutor) SyncDirtyToStateCache

func (e *BaseExecutor) SyncDirtyToStateCache()

func (*BaseExecutor) VerifyInputs

func (e *BaseExecutor) VerifyInputs(skipGasAmtChk bool) error

type CancelOfferExecutor

type CancelOfferExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*CancelOfferExecutor) ApplyTransaction

func (e *CancelOfferExecutor) ApplyTransaction() error

func (*CancelOfferExecutor) GeneratePubData

func (e *CancelOfferExecutor) GeneratePubData() error

func (*CancelOfferExecutor) GenerateTxDetails

func (e *CancelOfferExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*CancelOfferExecutor) GetExecutedTx

func (e *CancelOfferExecutor) GetExecutedTx() (*tx.Tx, error)

func (*CancelOfferExecutor) Prepare

func (e *CancelOfferExecutor) Prepare() error

func (*CancelOfferExecutor) VerifyInputs

func (e *CancelOfferExecutor) VerifyInputs(skipGasAmtChk bool) error

type CreateCollectionExecutor

type CreateCollectionExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*CreateCollectionExecutor) ApplyTransaction

func (e *CreateCollectionExecutor) ApplyTransaction() error

func (*CreateCollectionExecutor) GeneratePubData

func (e *CreateCollectionExecutor) GeneratePubData() error

func (*CreateCollectionExecutor) GenerateTxDetails

func (e *CreateCollectionExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*CreateCollectionExecutor) GetExecutedTx

func (e *CreateCollectionExecutor) GetExecutedTx() (*tx.Tx, error)

func (*CreateCollectionExecutor) Prepare

func (e *CreateCollectionExecutor) Prepare() error

func (*CreateCollectionExecutor) VerifyInputs

func (e *CreateCollectionExecutor) VerifyInputs(skipGasAmtChk bool) error

type DepositExecutor

type DepositExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*DepositExecutor) ApplyTransaction

func (e *DepositExecutor) ApplyTransaction() error

func (*DepositExecutor) GeneratePubData

func (e *DepositExecutor) GeneratePubData() error

func (*DepositExecutor) GenerateTxDetails

func (e *DepositExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*DepositExecutor) GetExecutedTx

func (e *DepositExecutor) GetExecutedTx() (*tx.Tx, error)

func (*DepositExecutor) Prepare

func (e *DepositExecutor) Prepare() error

func (*DepositExecutor) VerifyInputs

func (e *DepositExecutor) VerifyInputs(skipGasAmtChk bool) error

type DepositNftExecutor

type DepositNftExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*DepositNftExecutor) ApplyTransaction

func (e *DepositNftExecutor) ApplyTransaction() error

func (*DepositNftExecutor) GeneratePubData

func (e *DepositNftExecutor) GeneratePubData() error

func (*DepositNftExecutor) GenerateTxDetails

func (e *DepositNftExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*DepositNftExecutor) GetExecutedTx

func (e *DepositNftExecutor) GetExecutedTx() (*tx.Tx, error)

func (*DepositNftExecutor) Prepare

func (e *DepositNftExecutor) Prepare() error

func (*DepositNftExecutor) VerifyInputs

func (e *DepositNftExecutor) VerifyInputs(skipGasAmtChk bool) error

type FullExitExecutor

type FullExitExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*FullExitExecutor) ApplyTransaction

func (e *FullExitExecutor) ApplyTransaction() error

func (*FullExitExecutor) GeneratePubData

func (e *FullExitExecutor) GeneratePubData() error

func (*FullExitExecutor) GenerateTxDetails

func (e *FullExitExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*FullExitExecutor) GetExecutedTx

func (e *FullExitExecutor) GetExecutedTx() (*tx.Tx, error)

func (*FullExitExecutor) Prepare

func (e *FullExitExecutor) Prepare() error

func (*FullExitExecutor) VerifyInputs

func (e *FullExitExecutor) VerifyInputs(skipGasAmtChk bool) error

type FullExitNftExecutor

type FullExitNftExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*FullExitNftExecutor) ApplyTransaction

func (e *FullExitNftExecutor) ApplyTransaction() error

func (*FullExitNftExecutor) GeneratePubData

func (e *FullExitNftExecutor) GeneratePubData() error

func (*FullExitNftExecutor) GenerateTxDetails

func (e *FullExitNftExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*FullExitNftExecutor) GetExecutedTx

func (e *FullExitNftExecutor) GetExecutedTx() (*tx.Tx, error)

func (*FullExitNftExecutor) Prepare

func (e *FullExitNftExecutor) Prepare() error

func (*FullExitNftExecutor) VerifyInputs

func (e *FullExitNftExecutor) VerifyInputs(skipGasAmtChk bool) error

type IBlockchain

type IBlockchain interface {
	VerifyExpiredAt(expiredAt int64) error
	VerifyNonce(accountIndex int64, nonce int64) error
	VerifyGas(gasAccountIndex, gasFeeAssetId int64, txType int, gasFeeAmount *big.Int, skipGasAmtChk bool) error
	StateDB() *sdb.StateDB
	DB() *sdb.ChainDB
	CurrentBlock() *block.Block
}

type MintNftExecutor

type MintNftExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*MintNftExecutor) ApplyTransaction

func (e *MintNftExecutor) ApplyTransaction() error

func (*MintNftExecutor) GeneratePubData

func (e *MintNftExecutor) GeneratePubData() error

func (*MintNftExecutor) GenerateTxDetails

func (e *MintNftExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*MintNftExecutor) GetExecutedTx

func (e *MintNftExecutor) GetExecutedTx() (*tx.Tx, error)

func (*MintNftExecutor) Prepare

func (e *MintNftExecutor) Prepare() error

func (*MintNftExecutor) VerifyInputs

func (e *MintNftExecutor) VerifyInputs(skipGasAmtChk bool) error

type RegisterZnsExecutor

type RegisterZnsExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*RegisterZnsExecutor) ApplyTransaction

func (e *RegisterZnsExecutor) ApplyTransaction() error

func (*RegisterZnsExecutor) GeneratePubData

func (e *RegisterZnsExecutor) GeneratePubData() error

func (*RegisterZnsExecutor) GenerateTxDetails

func (e *RegisterZnsExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*RegisterZnsExecutor) GetExecutedTx

func (e *RegisterZnsExecutor) GetExecutedTx() (*tx.Tx, error)

func (*RegisterZnsExecutor) Prepare

func (e *RegisterZnsExecutor) Prepare() error

func (*RegisterZnsExecutor) VerifyInputs

func (e *RegisterZnsExecutor) VerifyInputs(skipGasAmtChk bool) error

type TransferExecutor

type TransferExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*TransferExecutor) ApplyTransaction

func (e *TransferExecutor) ApplyTransaction() error

func (*TransferExecutor) GeneratePubData

func (e *TransferExecutor) GeneratePubData() error

func (*TransferExecutor) GenerateTxDetails

func (e *TransferExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*TransferExecutor) GetExecutedTx

func (e *TransferExecutor) GetExecutedTx() (*tx.Tx, error)

func (*TransferExecutor) Prepare

func (e *TransferExecutor) Prepare() error

func (*TransferExecutor) VerifyInputs

func (e *TransferExecutor) VerifyInputs(skipGasAmtChk bool) error

type TransferNftExecutor

type TransferNftExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*TransferNftExecutor) ApplyTransaction

func (e *TransferNftExecutor) ApplyTransaction() error

func (*TransferNftExecutor) GeneratePubData

func (e *TransferNftExecutor) GeneratePubData() error

func (*TransferNftExecutor) GenerateTxDetails

func (e *TransferNftExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*TransferNftExecutor) GetExecutedTx

func (e *TransferNftExecutor) GetExecutedTx() (*tx.Tx, error)

func (*TransferNftExecutor) Prepare

func (e *TransferNftExecutor) Prepare() error

func (*TransferNftExecutor) VerifyInputs

func (e *TransferNftExecutor) VerifyInputs(skipGasAmtChk bool) error

type TxExecutor

type TxExecutor interface {
	Prepare() error
	VerifyInputs(skipGasAmtChk bool) error
	ApplyTransaction() error
	GeneratePubData() error
	GetExecutedTx() (*tx.Tx, error)
	GenerateTxDetails() ([]*tx.TxDetail, error)
}

func NewAtomicMatchExecutor

func NewAtomicMatchExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewCancelOfferExecutor

func NewCancelOfferExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewCreateCollectionExecutor

func NewCreateCollectionExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewDepositExecutor

func NewDepositExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewDepositNftExecutor

func NewDepositNftExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewFullExitExecutor

func NewFullExitExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewFullExitNftExecutor

func NewFullExitNftExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewMintNftExecutor

func NewMintNftExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewRegisterZnsExecutor

func NewRegisterZnsExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewTransferExecutor

func NewTransferExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewTransferNftExecutor

func NewTransferNftExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewTxExecutor

func NewTxExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewWithdrawExecutor

func NewWithdrawExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

func NewWithdrawNftExecutor

func NewWithdrawNftExecutor(bc IBlockchain, tx *tx.Tx) (TxExecutor, error)

type WithdrawExecutor

type WithdrawExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*WithdrawExecutor) ApplyTransaction

func (e *WithdrawExecutor) ApplyTransaction() error

func (*WithdrawExecutor) GeneratePubData

func (e *WithdrawExecutor) GeneratePubData() error

func (*WithdrawExecutor) GenerateTxDetails

func (e *WithdrawExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*WithdrawExecutor) GetExecutedTx

func (e *WithdrawExecutor) GetExecutedTx() (*tx.Tx, error)

func (*WithdrawExecutor) Prepare

func (e *WithdrawExecutor) Prepare() error

func (*WithdrawExecutor) VerifyInputs

func (e *WithdrawExecutor) VerifyInputs(skipGasAmtChk bool) error

type WithdrawNftExecutor

type WithdrawNftExecutor struct {
	BaseExecutor
	// contains filtered or unexported fields
}

func (*WithdrawNftExecutor) ApplyTransaction

func (e *WithdrawNftExecutor) ApplyTransaction() error

func (*WithdrawNftExecutor) GeneratePubData

func (e *WithdrawNftExecutor) GeneratePubData() error

func (*WithdrawNftExecutor) GenerateTxDetails

func (e *WithdrawNftExecutor) GenerateTxDetails() ([]*tx.TxDetail, error)

func (*WithdrawNftExecutor) GetExecutedTx

func (e *WithdrawNftExecutor) GetExecutedTx() (*tx.Tx, error)

func (*WithdrawNftExecutor) Prepare

func (e *WithdrawNftExecutor) Prepare() error

func (*WithdrawNftExecutor) VerifyInputs

func (e *WithdrawNftExecutor) VerifyInputs(skipGasAmtChk bool) error

Jump to

Keyboard shortcuts

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