From 8b35bed0ec3a0092a30de0324fbed8f65cb0b6e0 Mon Sep 17 00:00:00 2001 From: Michalina Date: Wed, 25 Oct 2023 17:38:03 +0200 Subject: [PATCH] Add Sepolia to the list of supported networks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Görli testnet currently used by Threshold/Keep for development purposes is planned to become deprecated with the end of year 2023. The testnet that was created to replace it is called [Holešky](https://github.com/eth-clients/holesky), however it will take some time until it gets integrated with by some of the projects we rely on. As a solution, we decided to switch first to another testnet that is currently live - Sepolia. This testnet's EOL is planned for 2026, which gives us plenty of time to move to Holešky before Sepolia gets deprecated. Until Görli is not dead we want to support both testnets. --- pkg/chain/ethereum/network.go | 5 ++++- pkg/chain/ethereum/network_test.go | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkg/chain/ethereum/network.go b/pkg/chain/ethereum/network.go index ac536fd..d39b982 100644 --- a/pkg/chain/ethereum/network.go +++ b/pkg/chain/ethereum/network.go @@ -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. @@ -22,6 +23,8 @@ func (n Network) ChainID() int64 { return 1 case Goerli: return 5 + case Sepolia: + return 11155111 } return 0 } diff --git a/pkg/chain/ethereum/network_test.go b/pkg/chain/ethereum/network_test.go index 6c86d8f..92195e7 100644 --- a/pkg/chain/ethereum/network_test.go +++ b/pkg/chain/ethereum/network_test.go @@ -21,6 +21,10 @@ func TestNetworkString(t *testing.T) { network: Goerli, expectedString: "goerli", }, + "Sepolia": { + network: Sepolia, + expectedString: "sepolia", + }, "Developer": { network: Developer, expectedString: "developer",