From 2893723fe04510f87e86b63047fad1ea8fdacb33 Mon Sep 17 00:00:00 2001 From: a10zn8 Date: Wed, 30 Aug 2023 19:44:48 +0400 Subject: [PATCH] added scroll sepolia (#295) --- docs/04-upstream-config.adoc | 1 + emerald-grpc | 2 +- src/main/kotlin/io/emeraldpay/dshackle/Chain.kt | 3 ++- src/main/kotlin/io/emeraldpay/dshackle/Global.kt | 1 + .../dshackle/upstream/calls/DefaultEthereumMethods.kt | 1 + src/main/resources/chains.yaml | 7 +++++++ 6 files changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/04-upstream-config.adoc b/docs/04-upstream-config.adoc index 712f6b8f5..8e53b196f 100644 --- a/docs/04-upstream-config.adoc +++ b/docs/04-upstream-config.adoc @@ -160,6 +160,7 @@ Currently, dshackle supports next chains (should be used as chain names in confi - aurora - aurora-testnet - scroll-alphanet +- scroll-sepolia - mantle - mantle-testnet - klaytn diff --git a/emerald-grpc b/emerald-grpc index e65b28ead..58aed19ed 160000 --- a/emerald-grpc +++ b/emerald-grpc @@ -1 +1 @@ -Subproject commit e65b28ead63ed770b72d7c143e0259cf3177b78c +Subproject commit 58aed19ed53fb9f0c849fcab488eff4eb2e19342 diff --git a/src/main/kotlin/io/emeraldpay/dshackle/Chain.kt b/src/main/kotlin/io/emeraldpay/dshackle/Chain.kt index e17606abe..71db908d8 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/Chain.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/Chain.kt @@ -104,7 +104,8 @@ enum class Chain(val id: Int, val chainCode: String, val chainName: String) { AURORA__TESTNET(10021, "AURORA_TESTNET", "Aurora Testnet"), SCROLL__ALPHANET(10022, "SCROLL_ALPHANET", "Scroll Alphanet"), MANTLE__TESTNET(10023, "MANTLE_TESTNET", "Mantle Testnet"), - KLAYTN__BAOBAB(10024, "KLAYTN_BAOBAB", "Klaytn Baobab"); + KLAYTN__BAOBAB(10024, "KLAYTN_BAOBAB", "Klaytn Baobab"), + SCROLL__SEPOLIA(10022, "SCROLL_SEPOLIA", "Scroll Sepolia"); companion object { fun byId(id: Int): Chain { diff --git a/src/main/kotlin/io/emeraldpay/dshackle/Global.kt b/src/main/kotlin/io/emeraldpay/dshackle/Global.kt index d189b3a8b..f07cffdf8 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/Global.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/Global.kt @@ -94,6 +94,7 @@ class Global { "aurora-testnet" to Chain.AURORA__TESTNET, // "scroll" to Chain.CHAIN_SCROLL__MAINNET, "scroll-alphanet" to Chain.SCROLL__ALPHANET, + "scroll-sepolia" to Chain.SCROLL__SEPOLIA, "mantle" to Chain.MANTLE__MAINNET, "mantle-testnet" to Chain.MANTLE__TESTNET, "klaytn" to Chain.KLAYTN__MAINNET, diff --git a/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt b/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt index e7990b8e7..fe85737ca 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt @@ -120,6 +120,7 @@ class DefaultEthereumMethods( Chain.AURORA__TESTNET to createHardcodedData("\"1313161555\"", "\"0x4e454153\""), // Chain.CHAIN_SCROLL__MAINNET to createHardcodedData(""43114"", ""0xa86a""), doesn't exist now for L2 Chain.SCROLL__ALPHANET to createHardcodedData("\"534353\"", "\"0x82751\""), + Chain.SCROLL__SEPOLIA to createHardcodedData("\"534351\"", "\"0x8274f\""), Chain.MANTLE__MAINNET to createHardcodedData("\"5000\"", "\"0x1388\""), Chain.MANTLE__TESTNET to createHardcodedData("\"5001\"", "\"0x1389\""), Chain.KLAYTN__MAINNET to createHardcodedData("\"8217\"", "\"0x2019\""), diff --git a/src/main/resources/chains.yaml b/src/main/resources/chains.yaml index bf22dde2e..9cb036ac6 100644 --- a/src/main/resources/chains.yaml +++ b/src/main/resources/chains.yaml @@ -173,6 +173,13 @@ chain-settings: lags: syncing: 10 lagging: 5 + - id: scroll-sepolia + expected-block-time: 4s + options: + validate-peers: false + lags: + syncing: 10 + lagging: 5 - id: mantle expected-block-time: 500ms options: