Skip to content

Commit

Permalink
Missing configs for Sepolia networks (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara authored Dec 1, 2023
1 parent 02a9c46 commit aa69d15
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/scripts/common/arbitrum.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package common

const (
ArbitrumGoerliChainID int64 = 421613
ArbitrumOneChainID int64 = 42161
ArbitrumGoerliChainID int64 = 421613
ArbitrumSepoliaChainID int64 = 421614
ArbitrumOneChainID int64 = 42161
)

// IsArbitrumChainID returns true if and only if the given chain ID corresponds
// to an Arbitrum chain (testnet or mainnet).
func IsArbitrumChainID(chainID int64) bool {
return chainID == ArbitrumGoerliChainID || chainID == ArbitrumOneChainID
return chainID == ArbitrumGoerliChainID || chainID == ArbitrumSepoliaChainID || chainID == ArbitrumOneChainID
}
16 changes: 16 additions & 0 deletions core/scripts/common/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,15 @@ func explorerLinkPrefix(chainID int64) (prefix string) {

case 420: // Optimism Goerli
prefix = "https://goerli-optimism.etherscan.io"
case 11155420: // Optimism Sepolia
prefix = "https://optimism-sepolia.blockscout.com/"

case ArbitrumGoerliChainID: // Arbitrum Goerli
prefix = "https://goerli.arbiscan.io"
case ArbitrumOneChainID: // Arbitrum mainnet
prefix = "https://arbiscan.io"
case ArbitrumSepoliaChainID: // Arbitrum Sepolia
prefix = "https://sepolia.arbiscan.io/"

case 56: // BSC mainnet
prefix = "https://bscscan.com"
Expand All @@ -211,6 +215,16 @@ func explorerLinkPrefix(chainID int64) (prefix string) {
case 53935: // Defi Kingdoms mainnet
prefix = "https://subnets.avax.network/defi-kingdoms"

case 1111: // wemix mainnet
prefix = "https://explorer.wemix.com/"
case 1112: // wemix testnet
prefix = "https://explorer.test.wemix.com"

case 255: // Kroma mainnet
prefix = "https://kromascan.com/"
case 2358: // Kroma sepolia
prefix = "https://sepolia.kromascan.com/"

case 1666600000, 1666600001, 1666600002, 1666600003: // Harmony mainnet
prefix = "https://explorer.harmony.one"
case 1666700000, 1666700001, 1666700002, 1666700003: // Harmony testnet
Expand All @@ -220,6 +234,8 @@ func explorerLinkPrefix(chainID int64) (prefix string) {
prefix = "https://goerli.basescan.org"
case 8453:
prefix = "https://basescan.org"
case 84532:
return "https://base-sepolia.blockscout.com/"

default: // Unknown chain, return prefix as-is
prefix = ""
Expand Down
6 changes: 6 additions & 0 deletions core/services/ocr2/plugins/ccip/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,14 @@ func ChainName(chainID int64) string {
return "base-mainnet"
case 84531:
return "ethereum-testnet-goerli-base-1"
case 84532:
return "ethereum-testnet-sepolia-base-1"
case 42161:
return "ethereum-mainnet-arbitrum-1"
case 421613:
return "ethereum-testnet-goerli-arbitrum-1"
case 421614:
return "ethereum-testnet-sepolia-arbitrum-1"
case 43113:
return "avalanche-testnet-fuji"
case 43114:
Expand All @@ -139,6 +143,8 @@ func ChainName(chainID int64) string {
return "polygon-testnet-mumbai"
case 11155111:
return "ethereum-testnet-sepolia"
case 11155420:
return "ethereum-testnet-sepolia-optimism-1"
default: // Unknown chain, return chainID as string
return strconv.FormatInt(chainID, 10)
}
Expand Down

0 comments on commit aa69d15

Please sign in to comment.