Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Calculator ¶
type Calculator struct {
// contains filtered or unexported fields
}
func NewStaticCalculator ¶ added in v1.1.11
func NewStaticCalculator(config StaticConfig, upgradeTimes upgrade.Config) *Calculator
func (*Calculator) CalculateFee ¶
func (c *Calculator) CalculateFee(tx txs.UnsignedTx, time time.Time) uint64
[CalculateFee] returns the minimal fee needed to accept [tx], at chain time time
type StaticConfig ¶ added in v1.1.11
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.