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.

28 lines
756 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 Ethereum token that is supported in Hermez network
  7. type Token struct {
  8. TokenID TokenID
  9. EthAddr eth.Address
  10. Name string
  11. Symbol string
  12. Decimals uint64
  13. EthTxHash eth.Hash // Ethereum TxHash in which this token was registered
  14. EthBlockNum uint64 // Ethereum block number in which this token was registered
  15. }
  16. // TokenInfo provides the price of the token in USD
  17. type TokenInfo struct {
  18. TokenID uint32
  19. Value float64
  20. LastUpdated time.Time
  21. }
  22. // TokenID is the unique identifier of the token, as set in the smart contract
  23. type TokenID uint32 // current implementation supports up to 2^32 tokens