economicsmocks

package
v1.11.2-patch-devnet Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 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, epoch uint32) 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
	ComputeMoveBalanceFeeInEpochCalled                  func(tx data.TransactionWithFeeHandler, epoch uint32) *big.Int
	ComputeTxFeeCalled                                  func(tx data.TransactionWithFeeHandler) *big.Int
	DeveloperPercentageCalled                           func() float64
	MinGasPriceCalled                                   func() uint64
	MinGasLimitCalled                                   func() uint64
	GasPerDataByteCalled                                func() uint64
	MaxGasHigherFactorAcceptedCalled                    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
	GenesisTotalSupplyCalled                            func() *big.Int
	MaxGasPriceSetGuardianCalled                        func() uint64
	LeaderPercentageInEpochCalled                       func(epoch uint32) float64
	DeveloperPercentageInEpochCalled                    func(epoch uint32) float64
	ProtocolSustainabilityPercentageInEpochCalled       func(epoch uint32) float64
	ProtocolSustainabilityAddressInEpochCalled          func(epoch uint32) string
	RewardsTopUpGradientPointInEpochCalled              func(epoch uint32) *big.Int
	RewardsTopUpFactorInEpochCalled                     func(epoch uint32) float64
	EcosystemGrowthPercentageInEpochCalled              func(epoch uint32) float64
	EcosystemGrowthAddressInEpochCalled                 func(epoch uint32) string
	GrowthDividendPercentageInEpochCalled               func(epoch uint32) float64
	GrowthDividendAddressInEpochCalled                  func(epoch uint32) string
	IsTailInflationEnabledCalled                        func(epoch uint32) bool
}

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) ComputeGasUnitsFromRefundValue added in v1.8.8

func (ehm *EconomicsHandlerMock) ComputeGasUnitsFromRefundValue(_ data.TransactionWithFeeHandler, _ *big.Int, _ uint32) uint64

ComputeGasUnitsFromRefundValue -

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) ComputeMoveBalanceFeeInEpoch added in v1.7.18

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

ComputeMoveBalanceFeeInEpoch -

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) DeveloperPercentageInEpoch added in v1.8.12

func (ehm *EconomicsHandlerMock) DeveloperPercentageInEpoch(epoch uint32) float64

DeveloperPercentageInEpoch -

func (*EconomicsHandlerMock) EcosystemGrowthAddressInEpoch added in v1.11.0

func (ehm *EconomicsHandlerMock) EcosystemGrowthAddressInEpoch(epoch uint32) string

EcosystemGrowthAddressInEpoch -

func (*EconomicsHandlerMock) EcosystemGrowthPercentageInEpoch added in v1.11.0

func (ehm *EconomicsHandlerMock) EcosystemGrowthPercentageInEpoch(epoch uint32) float64

EcosystemGrowthPercentageInEpoch -

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) GrowthDividendAddressInEpoch added in v1.11.0

func (ehm *EconomicsHandlerMock) GrowthDividendAddressInEpoch(epoch uint32) string

GrowthDividendAddressInEpoch -

func (*EconomicsHandlerMock) GrowthDividendPercentageInEpoch added in v1.11.0

func (ehm *EconomicsHandlerMock) GrowthDividendPercentageInEpoch(epoch uint32) float64

GrowthDividendPercentageInEpoch -

func (*EconomicsHandlerMock) IsInterfaceNil

func (ehm *EconomicsHandlerMock) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*EconomicsHandlerMock) IsTailInflationEnabled added in v1.11.0

func (ehm *EconomicsHandlerMock) IsTailInflationEnabled(epoch uint32) bool

IsTailInflationEnabled -

func (*EconomicsHandlerMock) LeaderPercentage

func (ehm *EconomicsHandlerMock) LeaderPercentage() float64

LeaderPercentage -

func (*EconomicsHandlerMock) LeaderPercentageInEpoch added in v1.8.12

func (ehm *EconomicsHandlerMock) LeaderPercentageInEpoch(epoch uint32) float64

LeaderPercentageInEpoch -

func (*EconomicsHandlerMock) MaxGasHigherFactorAccepted added in v1.10.0

func (ehm *EconomicsHandlerMock) MaxGasHigherFactorAccepted() uint64

MaxGasHigherFactorAccepted -

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, epoch 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) ProtocolSustainabilityAddress

func (ehm *EconomicsHandlerMock) ProtocolSustainabilityAddress() string

ProtocolSustainabilityAddress will return the protocol sustainability address

func (*EconomicsHandlerMock) ProtocolSustainabilityAddressInEpoch added in v1.8.12

func (ehm *EconomicsHandlerMock) ProtocolSustainabilityAddressInEpoch(epoch uint32) string

ProtocolSustainabilityAddressInEpoch -

func (*EconomicsHandlerMock) ProtocolSustainabilityPercentage

func (ehm *EconomicsHandlerMock) ProtocolSustainabilityPercentage() float64

ProtocolSustainabilityPercentage will return the protocol sustainability percentage value

func (*EconomicsHandlerMock) ProtocolSustainabilityPercentageInEpoch added in v1.8.12

func (ehm *EconomicsHandlerMock) ProtocolSustainabilityPercentageInEpoch(epoch uint32) float64

ProtocolSustainabilityPercentageInEpoch -

func (*EconomicsHandlerMock) RewardsTopUpFactor

func (ehm *EconomicsHandlerMock) RewardsTopUpFactor() float64

RewardsTopUpFactor -

func (*EconomicsHandlerMock) RewardsTopUpFactorInEpoch added in v1.8.12

func (ehm *EconomicsHandlerMock) RewardsTopUpFactorInEpoch(epoch uint32) float64

RewardsTopUpFactorInEpoch -

func (*EconomicsHandlerMock) RewardsTopUpGradientPoint

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

RewardsTopUpGradientPoint -

func (*EconomicsHandlerMock) RewardsTopUpGradientPointInEpoch added in v1.8.12

func (ehm *EconomicsHandlerMock) RewardsTopUpGradientPointInEpoch(epoch uint32) *big.Int

RewardsTopUpGradientPointInEpoch -

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 -

Jump to

Keyboard shortcuts

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