problem: invalid eth_chainId for Ethereum Mainnet

This commit is contained in:
Chase Wright
2020-09-11 09:47:55 -05:00
committed by GitHub
parent 4e16a8c270
commit 46d90ce932
2 changed files with 3 additions and 3 deletions

View File

@@ -134,7 +134,7 @@ class DefaultEthereumMethods(
"eth_chainId" -> {
when {
Chain.ETHEREUM == chain -> {
"\"0x0\""
"\"0x1\""
}
Chain.ETHEREUM_CLASSIC == chain -> {
"\"0x3d\""
@@ -186,4 +186,4 @@ class DefaultEthereumMethods(
override fun getSupportedMethods(): Set<String> {
return allowedMethods.plus(hardcodedMethods).toSortedSet()
}
}
}

View File

@@ -19,7 +19,7 @@ class DefaultEthereumMethodsSpec extends Specification {
new String(new DefaultEthereumMethods(chain).executeHardcoded("eth_chainId")) == id
where:
chain | id
Chain.ETHEREUM | '"0x0"'
Chain.ETHEREUM | '"0x1"'
Chain.ETHEREUM_CLASSIC | '"0x3d"'
Chain.TESTNET_KOVAN | '"0x2a"'
Chain.TESTNET_GOERLI | '"0x5"'