forked from nanmu42/etherscan-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetwork.go
34 lines (29 loc) · 773 Bytes
/
network.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
/*
* Copyright (c) 2018 LI Zhennan
*
* Use of this work is governed by a MIT License.
* You may find a license copy in project root.
*/
package etherscan
const (
//// Ethereum public networks
// Mainnet Ethereum mainnet for production
Mainnet Network = "api"
// Ropsten Testnet(POW)
Ropsten Network = "api-ropsten"
// Kovan Testnet(POA)
Kovan Network = "api-kovan"
// Rinkby Testnet(CLIQUE)
Rinkby Network = "api-rinkeby"
// Goerli Testnet(CLIQUE)
Goerli Network = "api-goerli"
// Tobalaba Testnet
Tobalaba Network = "api-tobalaba"
)
// Network is ethereum network type (mainnet, ropsten, etc)
type Network string
// SubDomain returns the subdomain of etherscan API
// via n provided.
func (n Network) SubDomain() (sub string) {
return string(n)
}