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