Skip to content

Commit

Permalink
feat: migrate goerli to sepolia
Browse files Browse the repository at this point in the history
  • Loading branch information
islishude committed Jan 17, 2024
1 parent 598eee2 commit 05e463f
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 28 deletions.
8 changes: 8 additions & 0 deletions internal/chains/explorer_api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,14 @@ func TestExplorer(t *testing.T) {
"arbitrum": "0x1a3b50Bd09594f96dDC192396CE41256EBe0726e",
// https://goerli.arbiscan.io/contractsVerified
"arbitrum-goerli": "0x1d6032b5e4044d1F870D65f56C067d3D79CbE35d",
// https://sepolia.arbiscan.io/contractsVerified
"arbitrum-sepolia": "0x93625761A4F4aEee36B06053989095E6EBb1aE08",
// https://optimistic.etherscan.io/contractsVerified
"op": "0xb54b6262407DB03Be70B6e697DE8F880c94a1461",
// https://goerli-optimism.etherscan.io/contractsVerified
"op-goerli": "0x98108048528e45f621ad024a1a36f572fcbc64cb",
// https://sepolia-optimism.etherscan.io/contractsVerified
"op-sepolia": "0xa44040fe7dc1ef251955e922bce6e90277167723",
// https://bscscan.com/contractsVerified
"bsc": "0xFf179bea631ef161aACe1E0764e7587c0541a566",
// https://testnet.bscscan.com/contractsVerified
Expand All @@ -54,10 +58,14 @@ func TestExplorer(t *testing.T) {
"base": "0x7485d64788a1e8609199ff1d06f7075c56f9f22d",
// https://goerli.basescan.org/contractsVerified
"base-goerli": "0x87f0E0922207C3F1b88df4a78b8e3bd83C7C7A1F",
// https://sepolia.basescan.org/contractsVerified
"base-sepoli": "0xe953c66ff9e959063af055332dbc4720c615150d",
// https://explorer.metis.io/contractsverified
"metis": "0xEA32A96608495e54156Ae48931A7c20f0dcc1a21",
// https://goerli.explorer.metisdevops.link/verified-contracts
"metis-goerli": "0xfAf6E5c9463334D154f39596764493576187a5d2",
// https://sepolia.explorer.metisdevops.link/verified-contracts
"metis-sepolia": "0x0BA17BD532f84Ecf7896Bd4FE7c1de21c62660B9",
}

var validIt = func(item *Chain) error {
Expand Down
56 changes: 28 additions & 28 deletions internal/chains/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ package chains
var Buintin = []*Chain{
local,
eth,
ethGoerli,
ethSepolia,
ethHolesky,
arbitrum,
arbitrumGoerli,
arbitrumSepolia,
opMainnet,
opGoerli,
opSepolia,
bscMainnet,
bscTestnet,
polygon,
polygonMubai,
base,
baseGoerli,
baseSepolia,
metis,
metisSepolia,
}

var local = &Chain{
Expand All @@ -33,14 +33,6 @@ var eth = &Chain{
Alias: []string{"eth-mainnet", "mainnet"},
}

var ethGoerli = &Chain{
Name: "goerli",
Id: 5,
Endpoint: "https://ethereum-goerli.publicnode.com",
Explorer: "https://api-goerli.etherscan.io/api",
Alias: []string{"eth-goerli"},
}

var ethSepolia = &Chain{
Name: "sepolia",
Id: 11155111,
Expand All @@ -65,14 +57,14 @@ var arbitrum = &Chain{
Alias: []string{"arbi", "arbitrum-one"},
}

var arbitrumGoerli = &Chain{
Name: "arbitrum-goerli",
Id: 421613,
Endpoint: "https://goerli-rollup.arbitrum.io/rpc",
Explorer: "https://api-goerli.arbiscan.io/api",
Alias: []string{"arbi-goerli"},
var arbitrumSepolia = &Chain{
Name: "arbitrum-sepolia",
Id: 421614,
Endpoint: "https://sepolia-rollup.arbitrum.io/rpc",
Explorer: "https://api-sepolia.arbiscan.io/api",
}

// https://docs.optimism.io/chain/networks
var opMainnet = &Chain{
Name: "op",
Id: 10,
Expand All @@ -81,11 +73,11 @@ var opMainnet = &Chain{
Alias: []string{"optimistic"},
}

var opGoerli = &Chain{
Name: "op-goerli",
Id: 420,
Endpoint: "https://goerli.optimism.io",
Explorer: "https://api-goerli-optimism.etherscan.io/api",
var opSepolia = &Chain{
Name: "op-sepolia",
Id: 11155420,
Endpoint: "https://sepolia.optimism.io",
Explorer: "https://api-sepolia-optimism.etherscan.io/api",
}

var bscMainnet = &Chain{
Expand Down Expand Up @@ -117,18 +109,19 @@ var polygonMubai = &Chain{
Explorer: "https://api-testnet.polygonscan.com/api",
}

// https://docs.base.org/network-information/
var base = &Chain{
Name: "base",
Id: 8453,
Endpoint: "https://mainnet.base.org",
Explorer: "https://api.basescan.org/api",
}

var baseGoerli = &Chain{
Name: "base-goerli",
Id: 84531,
Endpoint: "https://goerli.base.org",
Explorer: "https://api-goerli.basescan.org/api",
var baseSepolia = &Chain{
Name: "base-sepolia",
Id: 84532,
Endpoint: "https://sepolia.base.org",
Explorer: "https://api-sepolia.basescan.org/api",
}

var metis = &Chain{
Expand All @@ -138,3 +131,10 @@ var metis = &Chain{
Explorer: "https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/api",
Alias: []string{"andromeda"},
}

var metisSepolia = &Chain{
Name: "metis-sepolia",
Id: 59901,
Endpoint: "https://sepolia.rpc.metisdevops.link",
Explorer: "https://sepolia.explorer.metisdevops.link/api",
}

0 comments on commit 05e463f

Please sign in to comment.