economicsmocks

package
v1.3.17-indexerv1.2.20 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EconomicsHandlerMock added in v1.2.0

type EconomicsHandlerMock struct {
	MaxInflationRateCalled                         func(year uint32) float64
	MinInflationRateCalled                         func() float64
	LeaderPercentageCalled                         func() float64
	ProtocolSustainabilityPercentageCalled         func() float64
	ProtocolSustainabilityAddressCalled            func() string
	SetMaxGasLimitPerBlockCalled                   func(maxGasLimitPerBlock uint64)
	SetMinGasPriceCalled                           func(minGasPrice uint64)
	SetMinGasLimitCalled                           func(minGasLimit uint64)
	MaxGasLimitPerBlockCalled                      func(shardID uint32) uint64
	MaxGasLimitPerMiniBlockCalled                  func(shardID uint32) uint64
	MaxGasLimitPerBlockForSafeCrossShardCalled     func() uint64
	MaxGasLimitPerMiniBlockForSafeCrossShardCalled func() uint64
	MaxGasLimitPerTxCalled                         func() uint64
	ComputeGasLimitCalled                          func(tx data.TransactionWithFeeHandler) uint64
	ComputeFeeCalled                               func(tx data.TransactionWithFeeHandler) *big.Int
	CheckValidityTxValuesCalled                    func(tx data.TransactionWithFeeHandler) error
	ComputeMoveBalanceFeeCalled                    func(tx data.TransactionWithFeeHandler) *big.Int
	ComputeTxFeeCalled                             func(tx data.TransactionWithFeeHandler) *big.Int
	DeveloperPercentageCalled                      func() float64
	MinGasPriceCalled                              func() uint64
	GasPerDataByteCalled                           func() uint64
	RewardsTopUpGradientPointCalled                func() *big.Int
	RewardsTopUpFactorCalled                       func() float64
	ComputeFeeForProcessingCalled                  func(tx data.TransactionWithFeeHandler, gasToUse uint64) *big.Int
	GasPriceModifierCalled                         func() float64
	SplitTxGasInCategoriesCalled                   func(tx data.TransactionWithFeeHandler) (uint64, uint64)
	GasPriceForProcessingCalled                    func(tx data.TransactionWithFeeHandler) uint64
	GasPriceForMoveCalled                          func(tx data.TransactionWithFeeHandler) uint64
	MinGasPriceForProcessingCalled                 func() uint64
	ComputeGasUsedAndFeeBasedOnRefundValueCalled   func(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)
	ComputeTxFeeBasedOnGasUsedCalled               func(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int
	ComputeGasLimitBasedOnBalanceCalled            func(tx data.TransactionWithFeeHandler, balance *big.Int) (uint64, error)
}

EconomicsHandlerMock -

func (*EconomicsHandlerMock) CheckValidityTxValues added in v1.2.0

func (ehm *EconomicsHandlerMock) CheckValidityTxValues(tx data.TransactionWithFeeHandler) error

CheckValidityTxValues -

func (*EconomicsHandlerMock) ComputeFee added in v1.2.0

ComputeFee -

func (*EconomicsHandlerMock) ComputeFeeForProcessing added in v1.2.0

func (ehm *EconomicsHandlerMock) ComputeFeeForProcessing(tx data.TransactionWithFeeHandler, gasToUse uint64) *big.Int

ComputeFeeForProcessing -

func (*EconomicsHandlerMock) ComputeGasLimit added in v1.2.0

func (ehm *EconomicsHandlerMock) ComputeGasLimit(tx data.TransactionWithFeeHandler) uint64

ComputeGasLimit -

func (*EconomicsHandlerMock) ComputeGasLimitBasedOnBalance added in v1.2.4

func (ehm *EconomicsHandlerMock) ComputeGasLimitBasedOnBalance(tx data.TransactionWithFeeHandler, balance *big.Int) (uint64, error)

ComputeGasLimitBasedOnBalance -

func (*EconomicsHandlerMock) ComputeGasUsedAndFeeBasedOnRefundValue added in v1.2.0

func (ehm *EconomicsHandlerMock) ComputeGasUsedAndFeeBasedOnRefundValue(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)

ComputeGasUsedAndFeeBasedOnRefundValue -

func (*EconomicsHandlerMock) ComputeMoveBalanceFee added in v1.2.0

func (ehm *EconomicsHandlerMock) ComputeMoveBalanceFee(tx data.TransactionWithFeeHandler) *big.Int

ComputeMoveBalanceFee -

func (*EconomicsHandlerMock) ComputeTxFee added in v1.2.0

ComputeTxFee -

func (*EconomicsHandlerMock) ComputeTxFeeBasedOnGasUsed added in v1.2.0

func (ehm *EconomicsHandlerMock) ComputeTxFeeBasedOnGasUsed(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int

ComputeTxFeeBasedOnGasUsed -

func (*EconomicsHandlerMock) DeveloperPercentage added in v1.2.0

func (ehm *EconomicsHandlerMock) DeveloperPercentage() float64

DeveloperPercentage -

func (*EconomicsHandlerMock) GasPerDataByte added in v1.2.0

func (ehm *EconomicsHandlerMock) GasPerDataByte() uint64

GasPerDataByte -

func (*EconomicsHandlerMock) GasPriceForMove added in v1.2.0

func (ehm *EconomicsHandlerMock) GasPriceForMove(tx data.TransactionWithFeeHandler) uint64

GasPriceForMove -

func (*EconomicsHandlerMock) GasPriceForProcessing added in v1.2.0

func (ehm *EconomicsHandlerMock) GasPriceForProcessing(tx data.TransactionWithFeeHandler) uint64

GasPriceForProcessing -

func (*EconomicsHandlerMock) GasPriceModifier added in v1.2.0

func (ehm *EconomicsHandlerMock) GasPriceModifier() float64

GasPriceModifier -

func (*EconomicsHandlerMock) GenesisTotalSupply added in v1.2.0

func (ehm *EconomicsHandlerMock) GenesisTotalSupply() *big.Int

GenesisTotalSupply -

func (*EconomicsHandlerMock) IsInterfaceNil added in v1.2.0

func (ehm *EconomicsHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*EconomicsHandlerMock) LeaderPercentage added in v1.2.0

func (ehm *EconomicsHandlerMock) LeaderPercentage() float64

LeaderPercentage -

func (*EconomicsHandlerMock) MaxGasLimitPerBlock added in v1.2.0

func (ehm *EconomicsHandlerMock) MaxGasLimitPerBlock(shardID uint32) uint64

MaxGasLimitPerBlock -

func (*EconomicsHandlerMock) MaxGasLimitPerBlockForSafeCrossShard added in v1.2.23

func (ehm *EconomicsHandlerMock) MaxGasLimitPerBlockForSafeCrossShard() uint64

MaxGasLimitPerBlockForSafeCrossShard -

func (*EconomicsHandlerMock) MaxGasLimitPerMiniBlock added in v1.2.23

func (ehm *EconomicsHandlerMock) MaxGasLimitPerMiniBlock(shardID uint32) uint64

MaxGasLimitPerMiniBlock -

func (*EconomicsHandlerMock) MaxGasLimitPerMiniBlockForSafeCrossShard added in v1.2.23

func (ehm *EconomicsHandlerMock) MaxGasLimitPerMiniBlockForSafeCrossShard() uint64

MaxGasLimitPerMiniBlockForSafeCrossShard -

func (*EconomicsHandlerMock) MaxGasLimitPerTx added in v1.3.0

func (ehm *EconomicsHandlerMock) MaxGasLimitPerTx() uint64

MaxGasLimitPerTx -

func (*EconomicsHandlerMock) MaxInflationRate added in v1.2.0

func (ehm *EconomicsHandlerMock) MaxInflationRate(year uint32) float64

MaxInflationRate -

func (*EconomicsHandlerMock) MinGasLimit added in v1.2.0

func (ehm *EconomicsHandlerMock) MinGasLimit() uint64

MinGasLimit will return min gas limit

func (*EconomicsHandlerMock) MinGasPrice added in v1.2.0

func (ehm *EconomicsHandlerMock) MinGasPrice() uint64

MinGasPrice -

func (*EconomicsHandlerMock) MinGasPriceForProcessing added in v1.2.0

func (ehm *EconomicsHandlerMock) MinGasPriceForProcessing() uint64

MinGasPriceForProcessing -

func (*EconomicsHandlerMock) MinInflationRate added in v1.2.0

func (ehm *EconomicsHandlerMock) MinInflationRate() float64

MinInflationRate -

func (*EconomicsHandlerMock) ProtocolSustainabilityAddress added in v1.2.0

func (ehm *EconomicsHandlerMock) ProtocolSustainabilityAddress() string

ProtocolSustainabilityAddress will return the protocol sustainability address

func (*EconomicsHandlerMock) ProtocolSustainabilityPercentage added in v1.2.0

func (ehm *EconomicsHandlerMock) ProtocolSustainabilityPercentage() float64

ProtocolSustainabilityPercentage will return the protocol sustainability percentage value

func (*EconomicsHandlerMock) RewardsTopUpFactor added in v1.2.0

func (ehm *EconomicsHandlerMock) RewardsTopUpFactor() float64

RewardsTopUpFactor -

func (*EconomicsHandlerMock) RewardsTopUpGradientPoint added in v1.2.0

func (ehm *EconomicsHandlerMock) RewardsTopUpGradientPoint() *big.Int

RewardsTopUpGradientPoint -

func (*EconomicsHandlerMock) SetMaxGasLimitPerBlock added in v1.2.0

func (ehm *EconomicsHandlerMock) SetMaxGasLimitPerBlock(maxGasLimitPerBlock uint64)

SetMaxGasLimitPerBlock -

func (*EconomicsHandlerMock) SetMinGasLimit added in v1.2.0

func (ehm *EconomicsHandlerMock) SetMinGasLimit(minGasLimit uint64)

SetMinGasLimit -

func (*EconomicsHandlerMock) SetMinGasPrice added in v1.2.0

func (ehm *EconomicsHandlerMock) SetMinGasPrice(minGasPrice uint64)

SetMinGasPrice -

func (*EconomicsHandlerMock) SplitTxGasInCategories added in v1.2.0

func (ehm *EconomicsHandlerMock) SplitTxGasInCategories(tx data.TransactionWithFeeHandler) (uint64, uint64)

SplitTxGasInCategories -

type EconomicsHandlerStub

type EconomicsHandlerStub struct {
	MaxGasLimitPerBlockCalled                      func(shardID uint32) uint64
	MaxGasLimitPerMiniBlockCalled                  func() uint64
	MaxGasLimitPerBlockForSafeCrossShardCalled     func() uint64
	MaxGasLimitPerMiniBlockForSafeCrossShardCalled func() uint64
	MaxGasLimitPerTxCalled                         func() uint64
	ComputeGasLimitCalled                          func(tx data.TransactionWithFeeHandler) uint64
	ComputeMoveBalanceFeeCalled                    func(tx data.TransactionWithFeeHandler) *big.Int
	ComputeTxFeeCalled                             func(tx data.TransactionWithFeeHandler) *big.Int
	CheckValidityTxValuesCalled                    func(tx data.TransactionWithFeeHandler) error
	DeveloperPercentageCalled                      func() float64
	MinGasPriceCalled                              func() uint64
	GasPriceModifierCalled                         func() float64
	LeaderPercentageCalled                         func() float64
	ProtocolSustainabilityPercentageCalled         func() float64
	ProtocolSustainabilityAddressCalled            func() string
	MinInflationRateCalled                         func() float64
	MaxInflationRateCalled                         func(year uint32) float64
	GasPerDataByteCalled                           func() uint64
	MinGasLimitCalled                              func() uint64
	GenesisTotalSupplyCalled                       func() *big.Int
	ComputeFeeForProcessingCalled                  func(tx data.TransactionWithFeeHandler, gasToUse uint64) *big.Int
	RewardsTopUpGradientPointCalled                func() *big.Int
	RewardsTopUpFactorCalled                       func() float64
	SplitTxGasInCategoriesCalled                   func(tx data.TransactionWithFeeHandler) (uint64, uint64)
	GasPriceForProcessingCalled                    func(tx data.TransactionWithFeeHandler) uint64
	GasPriceForMoveCalled                          func(tx data.TransactionWithFeeHandler) uint64
	MinGasPriceProcessingCalled                    func() uint64
	ComputeGasUsedAndFeeBasedOnRefundValueCalled   func(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)
	ComputeTxFeeBasedOnGasUsedCalled               func(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int
	ComputeGasLimitBasedOnBalanceCalled            func(tx data.TransactionWithFeeHandler, balance *big.Int) (uint64, error)
}

EconomicsHandlerStub -

func (*EconomicsHandlerStub) CheckValidityTxValues

func (e *EconomicsHandlerStub) CheckValidityTxValues(tx data.TransactionWithFeeHandler) error

CheckValidityTxValues -

func (*EconomicsHandlerStub) ComputeFeeForProcessing

func (e *EconomicsHandlerStub) ComputeFeeForProcessing(tx data.TransactionWithFeeHandler, gasToUse uint64) *big.Int

ComputeFeeForProcessing -

func (*EconomicsHandlerStub) ComputeGasLimit

ComputeGasLimit -

func (*EconomicsHandlerStub) ComputeGasLimitBasedOnBalance added in v1.2.4

func (e *EconomicsHandlerStub) ComputeGasLimitBasedOnBalance(tx data.TransactionWithFeeHandler, balance *big.Int) (uint64, error)

ComputeGasLimitBasedOnBalance -

func (*EconomicsHandlerStub) ComputeGasUsedAndFeeBasedOnRefundValue added in v1.1.18

func (e *EconomicsHandlerStub) ComputeGasUsedAndFeeBasedOnRefundValue(tx data.TransactionWithFeeHandler, refundValue *big.Int) (uint64, *big.Int)

ComputeGasUsedAndFeeBasedOnRefundValue -

func (*EconomicsHandlerStub) ComputeMoveBalanceFee

func (e *EconomicsHandlerStub) ComputeMoveBalanceFee(tx data.TransactionWithFeeHandler) *big.Int

ComputeMoveBalanceFee -

func (*EconomicsHandlerStub) ComputeTxFee

ComputeTxFee -

func (*EconomicsHandlerStub) ComputeTxFeeBasedOnGasUsed added in v1.1.18

func (e *EconomicsHandlerStub) ComputeTxFeeBasedOnGasUsed(tx data.TransactionWithFeeHandler, gasUsed uint64) *big.Int

ComputeTxFeeBasedOnGasUsed -

func (*EconomicsHandlerStub) DeveloperPercentage

func (e *EconomicsHandlerStub) DeveloperPercentage() float64

DeveloperPercentage -

func (*EconomicsHandlerStub) GasPerDataByte

func (e *EconomicsHandlerStub) GasPerDataByte() uint64

GasPerDataByte -

func (*EconomicsHandlerStub) GasPriceForMove

GasPriceForMove -

func (*EconomicsHandlerStub) GasPriceForProcessing

func (e *EconomicsHandlerStub) GasPriceForProcessing(tx data.TransactionWithFeeHandler) uint64

GasPriceForProcessing -

func (*EconomicsHandlerStub) GasPriceModifier

func (e *EconomicsHandlerStub) GasPriceModifier() float64

GasPriceModifier -

func (*EconomicsHandlerStub) GenesisTotalSupply

func (e *EconomicsHandlerStub) GenesisTotalSupply() *big.Int

GenesisTotalSupply -

func (*EconomicsHandlerStub) IsInterfaceNil

func (e *EconomicsHandlerStub) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*EconomicsHandlerStub) LeaderPercentage

func (e *EconomicsHandlerStub) LeaderPercentage() float64

LeaderPercentage -

func (*EconomicsHandlerStub) MaxGasLimitPerBlock

func (e *EconomicsHandlerStub) MaxGasLimitPerBlock(shardID uint32) uint64

MaxGasLimitPerBlock -

func (*EconomicsHandlerStub) MaxGasLimitPerBlockForSafeCrossShard added in v1.2.23

func (e *EconomicsHandlerStub) MaxGasLimitPerBlockForSafeCrossShard() uint64

MaxGasLimitPerBlockForSafeCrossShard -

func (*EconomicsHandlerStub) MaxGasLimitPerMiniBlock added in v1.2.23

func (e *EconomicsHandlerStub) MaxGasLimitPerMiniBlock(uint32) uint64

MaxGasLimitPerMiniBlock -

func (*EconomicsHandlerStub) MaxGasLimitPerMiniBlockForSafeCrossShard added in v1.2.23

func (e *EconomicsHandlerStub) MaxGasLimitPerMiniBlockForSafeCrossShard() uint64

MaxGasLimitPerMiniBlockForSafeCrossShard -

func (*EconomicsHandlerStub) MaxGasLimitPerTx added in v1.3.0

func (e *EconomicsHandlerStub) MaxGasLimitPerTx() uint64

MaxGasLimitPerTx -

func (*EconomicsHandlerStub) MaxInflationRate

func (e *EconomicsHandlerStub) MaxInflationRate(year uint32) float64

MaxInflationRate -

func (*EconomicsHandlerStub) MinGasLimit

func (e *EconomicsHandlerStub) MinGasLimit() uint64

MinGasLimit -

func (*EconomicsHandlerStub) MinGasPrice

func (e *EconomicsHandlerStub) MinGasPrice() uint64

MinGasPrice -

func (*EconomicsHandlerStub) MinGasPriceForProcessing

func (e *EconomicsHandlerStub) MinGasPriceForProcessing() uint64

MinGasPriceForProcessing -

func (*EconomicsHandlerStub) MinInflationRate

func (e *EconomicsHandlerStub) MinInflationRate() float64

MinInflationRate -

func (*EconomicsHandlerStub) ProtocolSustainabilityAddress

func (e *EconomicsHandlerStub) ProtocolSustainabilityAddress() string

ProtocolSustainabilityAddress -

func (*EconomicsHandlerStub) ProtocolSustainabilityPercentage

func (e *EconomicsHandlerStub) ProtocolSustainabilityPercentage() float64

ProtocolSustainabilityPercentage -

func (*EconomicsHandlerStub) RewardsTopUpFactor

func (e *EconomicsHandlerStub) RewardsTopUpFactor() float64

RewardsTopUpFactor -

func (*EconomicsHandlerStub) RewardsTopUpGradientPoint

func (e *EconomicsHandlerStub) RewardsTopUpGradientPoint() *big.Int

RewardsTopUpGradientPoint -

func (*EconomicsHandlerStub) SplitTxGasInCategories

func (e *EconomicsHandlerStub) SplitTxGasInCategories(tx data.TransactionWithFeeHandler) (uint64, uint64)

SplitTxGasInCategories -

Jump to

Keyboard shortcuts

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