11package networks
22
33import (
4- "strconv"
5-
64 "github.com/0xsequence/ethkit/ethproviders"
75)
86
9- type Networks map [ChainID ]* Network
10-
11- type ChainID string
12-
13- func (c ChainID ) Uint64 () uint64 {
14- u , _ := strconv .ParseUint (c .String (), 10 , 64 )
15- return u
16- }
17-
18- func (c ChainID ) String () string {
19- return string (c )
20- }
7+ type Networks map [string ]* Network
218
229type Network struct {
2310 ChainID uint64 `toml:"chain_id" json:"chainId,omitempty"`
@@ -33,7 +20,6 @@ type Network struct {
3320 WSURL string `toml:"ws_url" json:"wsUrl,omitempty"`
3421
3522 BlockExplorer * BlockExplorerConfig `toml:"block_explorer" json:"blockExplorer,omitempty"`
36- NodeGateway * NodeGatewayNetwork `toml:"node_gateway" json:"nodeGateway,omitempty"`
3723
3824 NodeURL string `toml:"node_url" json:"nodeUrl,omitempty"`
3925 IndexerURL string `toml:"indexer_url" json:"indexerUrl,omitempty"`
@@ -53,26 +39,6 @@ type BlockExplorerConfig struct {
5339 TxnHashURL string `toml:"txn_hash_url" json:"txnHashUrl,omitempty"`
5440}
5541
56- type NodeGatewayNetwork struct {
57- Endpoints []* NodeGatewayEndpoint `toml:"endpoints" json:"endpoints,omitempty"`
58- Finality uint64 `toml:"finality" json:"finality,omitempty"`
59- MonitorDisabled bool `toml:"monitor_disabled" json:"monitorDisabled,omitempty"`
60- MonitorPollInterval string `toml:"monitor_poll_interval" json:"monitorPollInterval,omitempty"`
61- MonitorBlockRetention uint64 `toml:"monitor_block_retention" json:"monitorBlockRetention,omitempty"`
62- AlertsOff bool `toml:"alerts_off" json:"alertsOff,omitempty"`
63- Important bool `toml:"important" json:"important,omitempty"`
64- }
65-
66- type NodeGatewayEndpoint struct {
67- Label string `toml:"label" json:"label,omitempty"`
68- Priority int `toml:"priority" json:"priority,omitempty"`
69- URL string `toml:"url" json:"url,omitempty"`
70- WSURL string `toml:"ws_url" json:"wsUrl,omitempty"`
71- SkipMethods []string `toml:"skip_methods" json:"skipMethods,omitempty"`
72- AuxMethodNs []string `toml:"aux_method_ns" json:"auxMethodNs,omitempty"`
73- Disabled bool `toml:"disabled" json:"disabled,omitempty"`
74- }
75-
7642type Currency struct {
7743 ContractAddress * string `toml:"contract_address" json:"contractAddress,omitempty"`
7844 Name string `toml:"name" json:"name,omitempty"`
0 commit comments