economics

package
v1.0.28 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EconomicsData

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

EconomicsData will store information about economics

func NewEconomicsData

func NewEconomicsData(economics *config.ConfigEconomics) (*EconomicsData, error)

NewEconomicsData will create and object with information about economics parameters

func (*EconomicsData) BurnAddress added in v1.0.20

func (ed *EconomicsData) BurnAddress() string

BurnAddress will return burn address

func (*EconomicsData) BurnPercentage added in v1.0.20

func (ed *EconomicsData) BurnPercentage() float64

BurnPercentage will return burn percentage

func (*EconomicsData) CheckValidityTxValues

func (ed *EconomicsData) CheckValidityTxValues(tx process.TransactionWithFeeHandler) error

CheckValidityTxValues checks if the provided transaction is economically correct

func (*EconomicsData) CommunityAddress added in v1.0.20

func (ed *EconomicsData) CommunityAddress() string

CommunityAddress will return community address

func (*EconomicsData) CommunityPercentage added in v1.0.20

func (ed *EconomicsData) CommunityPercentage() float64

CommunityPercentage will return community reward percentage

func (*EconomicsData) ComputeFee

ComputeFee computes the provided transaction's fee

func (*EconomicsData) ComputeGasLimit

func (ed *EconomicsData) ComputeGasLimit(tx process.TransactionWithFeeHandler) uint64

ComputeGasLimit returns the gas limit need by the provided transaction in order to be executed

func (*EconomicsData) IsInterfaceNil

func (ed *EconomicsData) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*EconomicsData) LeaderPercentage

func (ed *EconomicsData) LeaderPercentage() float64

LeaderPercentage will return leader reward percentage

func (*EconomicsData) RewardsValue added in v1.0.20

func (ed *EconomicsData) RewardsValue() *big.Int

RewardsValue will return rewards value

type TestEconomicsData

type TestEconomicsData struct {
	*EconomicsData
}

TestEconomicsData extends EconomicsData and is used in integration tests as it exposes some functions that are not supposed to be used in production code Exported functions simplify the reproduction of edge cases

func (*TestEconomicsData) SetMinGasLimit

func (ted *TestEconomicsData) SetMinGasLimit(minGasLimit uint64)

SetMinGasLimit sets the minimum gas limit for a transaction to be accepted

func (*TestEconomicsData) SetMinGasPrice

func (ted *TestEconomicsData) SetMinGasPrice(minGasPrice uint64)

SetMinGasPrice sets the minimum gas price for a transaction to be accepted

Jump to

Keyboard shortcuts

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