Add HistoryDB SQL triggers (#125)

This commit is contained in:
a_bennassar
2020-09-17 11:57:42 +02:00
committed by GitHub
parent 05d183d07b
commit 8a21cd1b5c
12 changed files with 927 additions and 177 deletions

View File

@@ -10,13 +10,14 @@ import (
// Token is a struct that represents an Ethereum token that is supported in Hermez network
type Token struct {
TokenID TokenID
EthAddr ethCommon.Address
Name string
Symbol string
Decimals uint64
EthTxHash ethCommon.Hash // Ethereum TxHash in which this token was registered
EthBlockNum uint64 // Ethereum block number in which this token was registered
TokenID TokenID `meddler:"token_id"`
EthBlockNum int64 `meddler:"eth_block_num"` // Ethereum block number in which this token was registered
EthAddr ethCommon.Address `meddler:"eth_addr"`
Name string `meddler:"name"`
Symbol string `meddler:"symbol"`
Decimals uint64 `meddler:"decimals"`
USD float32 `meddler:"usd,zeroisnull"`
USDUpdate time.Time `meddler:"usd_update,utctimez"`
}
// TokenInfo provides the price of the token in USD