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.

36 lines
886 B

  1. package common
  2. // Fee is a type that represents the percentage of tokens that will be payed 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 the coordinator
  6. // according to the tx type (if the tx requires to create an account and register, only register or he account already esists)
  7. type RecommendedFee struct {
  8. ExistingAccount float64
  9. CreatesAccount float64
  10. CreatesAccountAndRegister float64
  11. }
  12. // FeeSelector is used to select a percentage from the FeePlan. Max value is 16
  13. type FeeSelector uint8
  14. // FeePlan represents the fee model, a position in the array indicates the percentage of tokens paid in concept of fee for a transaction
  15. var FeePlan = [16]float64{
  16. 0,
  17. .001,
  18. .002,
  19. .005,
  20. .01,
  21. .02,
  22. .05,
  23. .1,
  24. .2,
  25. .5,
  26. 1,
  27. 2,
  28. 5,
  29. 10,
  30. 20,
  31. 50,
  32. }