-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.go
49 lines (40 loc) · 1.8 KB
/
types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package tokendirectory
import "time"
// TokenList structure based on https://raw.githubusercontent.com/Uniswap/token-lists/main/test/schema/example.tokenlist.json
type TokenList struct {
Name string `json:"name"`
ChainID uint64 `json:"chainId"`
TokenStandard string `json:"tokenStandard"`
LogoURI string `json:"logoURI"`
Keywords []string `json:"keywords"`
Timestamp *time.Time `json:"timestamp"`
Tokens []ContractInfo `json:"tokens"`
Version interface{} `json:"version"`
}
type ContractInfo struct {
ChainID uint64 `json:"chainId"`
Address string `json:"address"`
Name string `json:"name"`
// Standard string `json:"standard"`
Type string `json:"type"` // NOTE: a duplicate of standard to normalize with other Sequence payloads
Symbol string `json:"symbol,omitempty"`
Decimals uint64 `json:"decimals"`
LogoURI string `json:"logoURI,omitempty"`
Extensions ContractInfoExtension `json:"extensions"`
ContentHash uint64 `json:"-"`
}
type ContractInfoExtension struct {
Link string `json:"link,omitempty"`
Description string `json:"description,omitempty"`
OgName string `json:"ogName,omitempty"`
OgImage string `json:"ogImage,omitempty"`
OriginChainID uint64 `json:"originChainId,omitempty"`
OriginAddress string `json:"originAddress,omitempty"`
Blacklist bool `json:"blacklist,omitempty"`
ContractABIExtensions []string `json:"contractABIExtensions,omitempty"`
SupportsDecimals bool `json:"supportsDecimals,omitempty"`
Featured bool `json:"featured,omitempty"`
Mute bool `json:"mute,omitempty"`
Verified bool `json:"verified"`
VerifiedBy string `json:"verifiedBy,omitempty"`
}