You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
871 B

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