arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
hermez-node/common/fee.go
common/fee.goRaw
 1package common
 2
 3// Fee is a type that represents the percentage of tokens that will be payed in a transaction
 4// to incentivaise the materialization of it
 5type Fee float64
 6
 7// RecommendedFee is the recommended fee to pay in USD per transaction set by the coordinator
 8// according to the tx type (if the tx requires to create an account and register, only register or he account already esists)
 9type RecommendedFee struct {
10	ExistingAccount           float64
11	CreatesAccount            float64
12	CreatesAccountAndRegister float64
13}
14
15// FeeSelector is used to select a percentage from the FeePlan.
16type FeeSelector uint8
17
18// FeePlan represents the fee model, a position in the array indicates the percentage of tokens paid in concept of fee for a transaction
19var FeePlan = [256]float64{}