fee

package
v1.11.8-rc.5 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: BSD-3-Clause Imports: 4 Imported by: 11

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

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

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"`
}

Jump to

Keyboard shortcuts

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