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.

37 lines
1.5 KiB

  1. package api
  2. import (
  3. "math/big"
  4. "net/http"
  5. "github.com/gin-gonic/gin"
  6. "github.com/hermeznetwork/hermez-node/common"
  7. )
  8. type rollupConstants struct {
  9. PublicConstants common.RollupConstants `json:"publicConstants"`
  10. MaxFeeIdxCoordinator int `json:"maxFeeIdxCoordinator"`
  11. ReservedIdx int `json:"reservedIdx"`
  12. ExitIdx int `json:"exitIdx"`
  13. LimitLoadAmount *big.Int `json:"limitLoadAmount"`
  14. LimitL2TransferAmount *big.Int `json:"limitL2TransferAmount"`
  15. LimitTokens int `json:"limitTokens"`
  16. L1CoordinatorTotalBytes int `json:"l1CoordinatorTotalBytes"`
  17. L1UserTotalBytes int `json:"l1UserTotalBytes"`
  18. MaxL1UserTx int `json:"maxL1UserTx"`
  19. MaxL1Tx int `json:"maxL1Tx"`
  20. InputSHAConstantBytes int `json:"inputSHAConstantBytes"`
  21. NumBuckets int `json:"numBuckets"`
  22. MaxWithdrawalDelay int `json:"maxWithdrawalDelay"`
  23. ExchangeMultiplier int `json:"exchangeMultiplier"`
  24. }
  25. type configAPI struct {
  26. RollupConstants rollupConstants `json:"hermez"`
  27. AuctionConstants common.AuctionConstants `json:"auction"`
  28. WDelayerConstants common.WDelayerConstants `json:"withdrawalDelayer"`
  29. }
  30. func getConfig(c *gin.Context) {
  31. c.JSON(http.StatusOK, cg)
  32. }