Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator interface {
CalculateFee(tx txs.UnsignedTx) (uint64, error)
}
Calculator is the interfaces that any fee Calculator must implement
func NewStaticCalculator ¶
func NewStaticCalculator( config StaticConfig, upgradeTimes upgrade.Config, chainTime time.Time, ) Calculator
type StaticConfig ¶
type StaticConfig struct { // Fee that is burned by every non-state creating transaction TxFee uint64 `json:"txFee"` // Fee that must be burned by every state creating transaction before AP3 CreateAssetTxFee uint64 `json:"createAssetTxFee"` // Fee that must be burned by every subnet creating transaction after AP3 CreateSubnetTxFee uint64 `json:"createSubnetTxFee"` // Fee that must be burned by every transform subnet transaction TransformSubnetTxFee uint64 `json:"transformSubnetTxFee"` // Fee that must be burned by every blockchain creating transaction after AP3 CreateBlockchainTxFee uint64 `json:"createBlockchainTxFee"` // Transaction fee for adding a primary network validator AddPrimaryNetworkValidatorFee uint64 `json:"addPrimaryNetworkValidatorFee"` // Transaction fee for adding a primary network delegator AddPrimaryNetworkDelegatorFee uint64 `json:"addPrimaryNetworkDelegatorFee"` // Transaction fee for adding a subnet validator AddSubnetValidatorFee uint64 `json:"addSubnetValidatorFee"` // Transaction fee for adding a subnet delegator AddSubnetDelegatorFee uint64 `json:"addSubnetDelegatorFee"` }
Click to show internal directories.
Click to hide internal directories.