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",
|
||||
)
|
||||
|
||||
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>
|
||||
|
||||
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",
|
||||
|
||||
@@ -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"]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user