Skip to content

Commit 593cd8b

Browse files
committed
Add Goerli to Networks
1 parent ee7f652 commit 593cd8b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/Core/Structure/Event+Protocol.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public protocol EventParserProtocol {
4747

4848
/// Enum for the most-used Ethereum networks. Network ID is crucial for EIP155 support
4949
public enum Networks {
50+
case Goerli
5051
case Rinkeby
5152
case Mainnet
5253
case Ropsten
@@ -55,6 +56,7 @@ public enum Networks {
5556

5657
public var name: String {
5758
switch self {
59+
case .Goerli: return "goerli"
5860
case .Rinkeby: return "rinkeby"
5961
case .Ropsten: return "ropsten"
6062
case .Mainnet: return "mainnet"
@@ -69,6 +71,7 @@ public enum Networks {
6971
case .Mainnet: return BigUInt(1)
7072
case .Ropsten: return BigUInt(3)
7173
case .Rinkeby: return BigUInt(4)
74+
case .Goerli: return BigUInt(5)
7275
case .Kovan: return BigUInt(42)
7376
}
7477
}
@@ -83,6 +86,8 @@ public enum Networks {
8386
return Networks.Ropsten
8487
case 4:
8588
return Networks.Rinkeby
89+
case 5:
90+
return Networks.Goerli
8691
case 42:
8792
return Networks.Kovan
8893
default:

0 commit comments

Comments
 (0)