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 ed1a3c98..86f37a54 100644 --- a/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt +++ b/src/main/kotlin/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethods.kt @@ -611,6 +611,18 @@ class DefaultEthereumMethods( "zks_sendRawTransactionWithDetailedOutput", ) + private val borMethods = listOf( + "bor_getAuthor", + "bor_getCurrentValidators", + "bor_getCurrentProposer", + "bor_getRootHash", + "bor_getSigners", + "bor_getSignersAtHash", + "bor_getSnapshot", + "bor_getSnapshotAtHash", + "eth_getRootHash", + ) + private val allowedMethods: List init { @@ -664,14 +676,8 @@ class DefaultEthereumMethods( "rollup_gasPrices", "eth_getBlockRange", ) - Chain.POLYGON__MAINNET -> listOf( - "bor_getAuthor", - "bor_getCurrentValidators", - "bor_getCurrentProposer", - "bor_getRootHash", - "bor_getSignersAtHash", - "eth_getRootHash", - ) + Chain.POLYGON__MAINNET, Chain.POLYGON__AMOY -> borMethods + Chain.SHIBARIUM__MAINNET -> borMethods + listOf("eth_getTransactionReceiptsByBlock") Chain.POLYGON_ZKEVM__MAINNET, Chain.POLYGON_ZKEVM__CARDONA -> listOf( "zkevm_consolidatedBlockNumber", diff --git a/src/test/groovy/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethodsSpec.groovy b/src/test/groovy/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethodsSpec.groovy index b672cac2..7ffa434a 100644 --- a/src/test/groovy/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethodsSpec.groovy +++ b/src/test/groovy/io/emeraldpay/dshackle/upstream/calls/DefaultEthereumMethodsSpec.groovy @@ -58,11 +58,24 @@ class DefaultEthereumMethodsSpec extends Specification { where: chain | methods Chain.POLYGON__MAINNET | ["bor_getAuthor", - "bor_getCurrentValidators", - "bor_getCurrentProposer", - "bor_getRootHash", - "bor_getSignersAtHash", - "eth_getRootHash"] + "bor_getCurrentValidators", + "bor_getCurrentProposer", + "bor_getRootHash", + "bor_getSigners", + "bor_getSignersAtHash", + "bor_getSnapshot", + "bor_getSnapshotAtHash", + "eth_getRootHash"] + Chain.SHIBARIUM__MAINNET | ["bor_getAuthor", + "bor_getCurrentValidators", + "bor_getCurrentProposer", + "bor_getRootHash", + "bor_getSigners", + "bor_getSignersAtHash", + "bor_getSnapshot", + "bor_getSnapshotAtHash", + "eth_getRootHash", + "eth_getTransactionReceiptsByBlock"] Chain.OPTIMISM__MAINNET | ["rollup_gasPrices"] }