economicsmocks

package
v1.7.11 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EconomicsHandlerMock

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)
	SetStatusHandlerCalled                              func(statusHandler core.AppStatusHandler) error
	ComputeTxFeeInEpochCalled                           func(tx data.TransactionWithFeeHandler, epoch uint32) *big.Int
	ComputeGasLimitInEpochCalled                        func(tx data.TransactionWithFeeHandler, epoch uint32) uint64
	ComputeGasUsedAndFeeBasedOnRefundValueInEpochCalled func(tx data.TransactionWithFeeHandler, refundValue *big.Int, epoch uint32) (uint64, *big.Int)
	ComputeTxFeeBasedOnGasUsedInEpochCalled             func(tx data.TransactionWithFeeHandler, gasUsed uint64, epoch uint32) *big.Int
}

EconomicsHandlerMock -

func (*EconomicsHandlerMock) CheckValidityTxValues

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

CheckValidityTxValues -

func (*EconomicsHandlerMock) ComputeFee

ComputeFee -

func (*EconomicsHandlerMock) ComputeFeeForProcessing

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

ComputeFeeForProcessing -

func (*EconomicsHandlerMock) ComputeGasLimit

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

ComputeGasLimit -

func (*EconomicsHandlerMock) ComputeGasLimitBasedOnBalance

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

ComputeGasLimitBasedOnBalance -

func (*EconomicsHandlerMock) ComputeGasLimitInEpoch added in v1.7.0

func (ehm *EconomicsHandlerMock) ComputeGasLimitInEpoch(tx data.TransactionWithFeeHandler, epoch uint32) uint64

ComputeGasLimitInEpoch -

func (*EconomicsHandlerMock) ComputeGasUsedAndFeeBasedOnRefundValue

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

ComputeGasUsedAndFeeBasedOnRefundValue -

func (*EconomicsHandlerMock) ComputeGasUsedAndFeeBasedOnRefundValueInEpoch added in v1.7.0

func (ehm *EconomicsHandlerMock) ComputeGasUsedAndFeeBasedOnRefundValueInEpoch(tx data.TransactionWithFeeHandler, refundValue *big.Int, epoch uint32) (uint64, *big.Int)

ComputeGasUsedAndFeeBasedOnRefundValueInEpoch -

func (*EconomicsHandlerMock) ComputeMoveBalanceFee

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

ComputeMoveBalanceFee -

func (*EconomicsHandlerMock) ComputeTxFee

ComputeTxFee -

func (*EconomicsHandlerMock) ComputeTxFeeBasedOnGasUsed

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

ComputeTxFeeBasedOnGasUsed -

func (*EconomicsHandlerMock) ComputeTxFeeBasedOnGasUsedInEpoch added in v1.7.0

func (ehm *EconomicsHandlerMock) ComputeTxFeeBasedOnGasUsedInEpoch(tx data.TransactionWithFeeHandler, gasUsed uint64, epoch uint32) *big.Int

ComputeTxFeeBasedOnGasUsedInEpoch -

func (*EconomicsHandlerMock) ComputeTxFeeInEpoch added in v1.7.0

func (ehm *EconomicsHandlerMock) ComputeTxFeeInEpoch(tx data.TransactionWithFeeHandler, epoch uint32) *big.Int

ComputeTxFeeInEpoch -

func (*EconomicsHandlerMock) DeveloperPercentage

func (ehm *EconomicsHandlerMock) DeveloperPercentage() float64

DeveloperPercentage -

func (*EconomicsHandlerMock) ExtraGasLimitGuardedTx added in v1.5.0

func (ehm *EconomicsHandlerMock) ExtraGasLimitGuardedTx() uint64

ExtraGasLimitGuardedTx -

func (*EconomicsHandlerMock) GasPerDataByte

func (ehm *EconomicsHandlerMock) GasPerDataByte() uint64

GasPerDataByte -

func (*EconomicsHandlerMock) GasPriceForMove

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

GasPriceForMove -

func (*EconomicsHandlerMock) GasPriceForProcessing

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

GasPriceForProcessing -

func (*EconomicsHandlerMock) GasPriceModifier

func (ehm *EconomicsHandlerMock) GasPriceModifier() float64

GasPriceModifier -

func (*EconomicsHandlerMock) GenesisTotalSupply

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

GenesisTotalSupply -

func (*EconomicsHandlerMock) IsInterfaceNil

func (ehm *EconomicsHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*EconomicsHandlerMock) LeaderPercentage

func (ehm *EconomicsHandlerMock) LeaderPercentage() float64

LeaderPercentage -

func (*EconomicsHandlerMock) MaxGasLimitPerBlock

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

MaxGasLimitPerBlock -

func (*EconomicsHandlerMock) MaxGasLimitPerBlockForSafeCrossShard

func (ehm *EconomicsHandlerMock) MaxGasLimitPerBlockForSafeCrossShard() uint64

MaxGasLimitPerBlockForSafeCrossShard -

func (*EconomicsHandlerMock) MaxGasLimitPerMiniBlock

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

MaxGasLimitPerMiniBlock -

func (*EconomicsHandlerMock) MaxGasLimitPerMiniBlockForSafeCrossShard

func (ehm *EconomicsHandlerMock) MaxGasLimitPerMiniBlockForSafeCrossShard() uint64

MaxGasLimitPerMiniBlockForSafeCrossShard -

func (*EconomicsHandlerMock) MaxGasLimitPerTx

func (ehm *EconomicsHandlerMock) MaxGasLimitPerTx() uint64

MaxGasLimitPerTx -

func (*EconomicsHandlerMock) MaxGasPriceSetGuardian added in v1.5.0

func (ehm *EconomicsHandlerMock) MaxGasPriceSetGuardian() uint64

MaxGasPriceSetGuardian -

func (*EconomicsHandlerMock) MaxInflationRate

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

MaxInflationRate -

func (*EconomicsHandlerMock) MinGasLimit

func (ehm *EconomicsHandlerMock) MinGasLimit() uint64

MinGasLimit will return min gas limit

func (*EconomicsHandlerMock) MinGasPrice

func (ehm *EconomicsHandlerMock) MinGasPrice() uint64

MinGasPrice -

func (*EconomicsHandlerMock) MinGasPriceForProcessing

func (ehm *EconomicsHandlerMock) MinGasPriceForProcessing() uint64

MinGasPriceForProcessing -

func (*EconomicsHandlerMock) MinInflationRate

func (ehm *EconomicsHandlerMock) MinInflationRate() float64

MinInflationRate -

func (*EconomicsHandlerMock) ProtocolSustainabilityAddress

func (ehm *EconomicsHandlerMock) ProtocolSustainabilityAddress() string

ProtocolSustainabilityAddress will return the protocol sustainability address

func (*EconomicsHandlerMock) ProtocolSustainabilityPercentage

func (ehm *EconomicsHandlerMock) ProtocolSustainabilityPercentage() float64

ProtocolSustainabilityPercentage will return the protocol sustainability percentage value

func (*EconomicsHandlerMock) RewardsTopUpFactor

func (ehm *EconomicsHandlerMock) RewardsTopUpFactor() float64

RewardsTopUpFactor -

func (*EconomicsHandlerMock) RewardsTopUpGradientPoint

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

RewardsTopUpGradientPoint -

func (*EconomicsHandlerMock) SetMaxGasLimitPerBlock

func (ehm *EconomicsHandlerMock) SetMaxGasLimitPerBlock(maxGasLimitPerBlock uint64)

SetMaxGasLimitPerBlock -

func (*EconomicsHandlerMock) SetMinGasLimit

func (ehm *EconomicsHandlerMock) SetMinGasLimit(minGasLimit uint64)

SetMinGasLimit -

func (*EconomicsHandlerMock) SetMinGasPrice

func (ehm *EconomicsHandlerMock) SetMinGasPrice(minGasPrice uint64)

SetMinGasPrice -

func (*EconomicsHandlerMock) SetStatusHandler

func (ehm *EconomicsHandlerMock) SetStatusHandler(statusHandler core.AppStatusHandler) error

SetStatusHandler -

func (*EconomicsHandlerMock) SplitTxGasInCategories

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
	ExtraGasLimitGuardedTxCalled                        func() uint64
	MaxGasPriceSetGuardianCalled                        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)
	SetStatusHandlerCalled                              func(statusHandler core.AppStatusHandler) error
	ComputeTxFeeInEpochCalled                           func(tx data.TransactionWithFeeHandler, epoch uint32) *big.Int
	ComputeGasLimitInEpochCalled                        func(tx data.TransactionWithFeeHandler, epoch uint32) uint64
	ComputeGasUsedAndFeeBasedOnRefundValueInEpochCalled func(tx data.TransactionWithFeeHandler, refundValue *big.Int, epoch uint32) (uint64, *big.Int)
	ComputeTxFeeBasedOnGasUsedInEpochCalled             func(tx data.TransactionWithFeeHandler, gasUsed uint64, epoch uint32) *big.Int
}

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

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

ComputeGasLimitBasedOnBalance -

func (*EconomicsHandlerStub) ComputeGasLimitInEpoch added in v1.7.0

func (e *EconomicsHandlerStub) ComputeGasLimitInEpoch(tx data.TransactionWithFeeHandler, epoch uint32) uint64

ComputeGasLimitInEpoch -

func (*EconomicsHandlerStub) ComputeGasUsedAndFeeBasedOnRefundValue

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

ComputeGasUsedAndFeeBasedOnRefundValue -

func (*EconomicsHandlerStub) ComputeGasUsedAndFeeBasedOnRefundValueInEpoch added in v1.7.0

func (e *EconomicsHandlerStub) ComputeGasUsedAndFeeBasedOnRefundValueInEpoch(tx data.TransactionWithFeeHandler, refundValue *big.Int, epoch uint32) (uint64, *big.Int)

ComputeGasUsedAndFeeBasedOnRefundValueInEpoch -

func (*EconomicsHandlerStub) ComputeMoveBalanceFee

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

ComputeMoveBalanceFee -

func (*EconomicsHandlerStub) ComputeTxFee

ComputeTxFee -

func (*EconomicsHandlerStub) ComputeTxFeeBasedOnGasUsed

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

ComputeTxFeeBasedOnGasUsed -

func (*EconomicsHandlerStub) ComputeTxFeeBasedOnGasUsedInEpoch added in v1.7.0

func (e *EconomicsHandlerStub) ComputeTxFeeBasedOnGasUsedInEpoch(tx data.TransactionWithFeeHandler, gasUsed uint64, epoch uint32) *big.Int

ComputeTxFeeBasedOnGasUsedInEpoch -

func (*EconomicsHandlerStub) ComputeTxFeeInEpoch added in v1.7.0

func (e *EconomicsHandlerStub) ComputeTxFeeInEpoch(tx data.TransactionWithFeeHandler, epoch uint32) *big.Int

ComputeTxFeeInEpoch -

func (*EconomicsHandlerStub) DeveloperPercentage

func (e *EconomicsHandlerStub) DeveloperPercentage() float64

DeveloperPercentage -

func (*EconomicsHandlerStub) ExtraGasLimitGuardedTx added in v1.5.0

func (e *EconomicsHandlerStub) ExtraGasLimitGuardedTx() uint64

ExtraGasLimitGuardedTx -

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

func (e *EconomicsHandlerStub) MaxGasLimitPerBlockForSafeCrossShard() uint64

MaxGasLimitPerBlockForSafeCrossShard -

func (*EconomicsHandlerStub) MaxGasLimitPerMiniBlock

func (e *EconomicsHandlerStub) MaxGasLimitPerMiniBlock(uint32) uint64

MaxGasLimitPerMiniBlock -

func (*EconomicsHandlerStub) MaxGasLimitPerMiniBlockForSafeCrossShard

func (e *EconomicsHandlerStub) MaxGasLimitPerMiniBlockForSafeCrossShard() uint64

MaxGasLimitPerMiniBlockForSafeCrossShard -

func (*EconomicsHandlerStub) MaxGasLimitPerTx

func (e *EconomicsHandlerStub) MaxGasLimitPerTx() uint64

MaxGasLimitPerTx -

func (*EconomicsHandlerStub) MaxGasPriceSetGuardian added in v1.5.0

func (e *EconomicsHandlerStub) MaxGasPriceSetGuardian() uint64

MaxGasPriceSetGuardian -

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) SetStatusHandler

func (e *EconomicsHandlerStub) SetStatusHandler(statusHandler core.AppStatusHandler) error

SetStatusHandler -

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