Skip to content

Commit

Permalink
Merge pull request #118 from keep-network/support-sepolia
Browse files Browse the repository at this point in the history
Add Sepolia to the list of supported networks
  • Loading branch information
lukasz-zimnoch authored Nov 7, 2023
2 parents 5cc3757 + 8b35bed commit 559db3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/chain/ethereum/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ const (
Unknown Network = iota
Mainnet
Goerli
Sepolia
Developer
)

func (n Network) String() string {
return []string{"unknown", "mainnet", "goerli", "developer"}[n]
return []string{"unknown", "mainnet", "goerli", "sepolia", "developer"}[n]
}

// ChainID returns chain id associated with the network.
Expand All @@ -22,6 +23,8 @@ func (n Network) ChainID() int64 {
return 1
case Goerli:
return 5
case Sepolia:
return 11155111
}
return 0
}
4 changes: 4 additions & 0 deletions pkg/chain/ethereum/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ func TestNetworkString(t *testing.T) {
network: Goerli,
expectedString: "goerli",
},
"Sepolia": {
network: Sepolia,
expectedString: "sepolia",
},
"Developer": {
network: Developer,
expectedString: "developer",
Expand Down

0 comments on commit 559db3d

Please sign in to comment.