transactionsfee

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNilMarshaller = errors.New("nil Marshaller")

ErrNilMarshaller signals that a nil marshaller has been provided

View Source
var ErrNilShardCoordinator = errors.New("nil shard coordinator")

ErrNilShardCoordinator signals that a nil shard coordinator has been provided

View Source
var ErrNilStorage = errors.New("nil storage")

ErrNilStorage signals that a nil storage has been provided

View Source
var ErrNilTransactionFeeCalculator = errors.New("nil transaction fee calculator")

ErrNilTransactionFeeCalculator signals that a nil transaction fee calculator has been provided

Functions

func NewTransactionsFeeProcessor

func NewTransactionsFeeProcessor(arg ArgTransactionsFeeProcessor) (*transactionsFeeProcessor, error)

NewTransactionsFeeProcessor will create a new instance of transactionsFeeProcessor

Types

type ArgTransactionsFeeProcessor

type ArgTransactionsFeeProcessor struct {
	Marshaller         marshal.Marshalizer
	TransactionsStorer storage.Storer
	ShardCoordinator   sharding.Coordinator
	TxFeeCalculator    FeesProcessorHandler
}

ArgTransactionsFeeProcessor holds the arguments needed for creating a new instance of transactionsFeeProcessor

type FeesProcessorHandler

type FeesProcessorHandler interface {
	ComputeGasUsedAndFeeBasedOnRefundValue(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)
	ComputeTxFeeBasedOnGasUsed(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int
	ComputeGasLimit(tx data.TransactionWithFeeHandler) uint64
	IsInterfaceNil() bool
}

FeesProcessorHandler defines the interface for the transaction fees processor

Jump to

Keyboard shortcuts

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