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.

25 lines
565 B

  1. package common
  2. import (
  3. "time"
  4. eth "github.com/ethereum/go-ethereum/common"
  5. )
  6. // Token is a struct that represents an Etherum token that is supported in Hermez network
  7. type Token struct {
  8. ID TokenID
  9. Addr eth.Address
  10. Symbol string
  11. Decimals uint64
  12. }
  13. // TokenInfo provides the price of the token in USD
  14. type TokenInfo struct {
  15. TokenID uint32
  16. Value float64
  17. LastUpdated time.Time
  18. }
  19. // TokenID is the unique identifier of the token, as set in the smart contract
  20. type TokenID uint32 // current implementation supports up to 2^32 tokens