Add Shibarium Bor bridge RPC methods to allowlist and selector (#749)
* Add Shibarium Bor bridge RPC methods to allowlist and selector * Limit Bor receipts-by-block to Shibarium only * revert EthereumCallSelector.kt --------- Co-authored-by: a10zn8 <a1.cyb3r@gmail.com>
This commit is contained in:
@@ -611,6 +611,18 @@ class DefaultEthereumMethods(
|
|||||||
"zks_sendRawTransactionWithDetailedOutput",
|
"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<String>
|
private val allowedMethods: List<String>
|
||||||
|
|
||||||
init {
|
init {
|
||||||
@@ -664,14 +676,8 @@ class DefaultEthereumMethods(
|
|||||||
"rollup_gasPrices",
|
"rollup_gasPrices",
|
||||||
"eth_getBlockRange",
|
"eth_getBlockRange",
|
||||||
)
|
)
|
||||||
Chain.POLYGON__MAINNET -> listOf(
|
Chain.POLYGON__MAINNET, Chain.POLYGON__AMOY -> borMethods
|
||||||
"bor_getAuthor",
|
Chain.SHIBARIUM__MAINNET -> borMethods + listOf("eth_getTransactionReceiptsByBlock")
|
||||||
"bor_getCurrentValidators",
|
|
||||||
"bor_getCurrentProposer",
|
|
||||||
"bor_getRootHash",
|
|
||||||
"bor_getSignersAtHash",
|
|
||||||
"eth_getRootHash",
|
|
||||||
)
|
|
||||||
|
|
||||||
Chain.POLYGON_ZKEVM__MAINNET, Chain.POLYGON_ZKEVM__CARDONA -> listOf(
|
Chain.POLYGON_ZKEVM__MAINNET, Chain.POLYGON_ZKEVM__CARDONA -> listOf(
|
||||||
"zkevm_consolidatedBlockNumber",
|
"zkevm_consolidatedBlockNumber",
|
||||||
|
|||||||
@@ -61,8 +61,21 @@ class DefaultEthereumMethodsSpec extends Specification {
|
|||||||
"bor_getCurrentValidators",
|
"bor_getCurrentValidators",
|
||||||
"bor_getCurrentProposer",
|
"bor_getCurrentProposer",
|
||||||
"bor_getRootHash",
|
"bor_getRootHash",
|
||||||
|
"bor_getSigners",
|
||||||
"bor_getSignersAtHash",
|
"bor_getSignersAtHash",
|
||||||
|
"bor_getSnapshot",
|
||||||
|
"bor_getSnapshotAtHash",
|
||||||
"eth_getRootHash"]
|
"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"]
|
Chain.OPTIMISM__MAINNET | ["rollup_gasPrices"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user