Skip to content

Commit

Permalink
Add Cronos zkEVM (#600)
Browse files Browse the repository at this point in the history
* Add Cronos zkEVM

* rm duplicate methods
  • Loading branch information
tonatoz authored Dec 4, 2024
1 parent 1691bdc commit 9ca0b58
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion emerald-grpc
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,27 @@ class DefaultEthereumMethods(
"hmyv2_getValidators",
)

private val zxkSyncMethods = listOf(
"zks_estimateFee",
"zks_estimateGasL1ToL2",
"zks_getAllAccountBalances",
"zks_getBlockDetails",
"zks_getBridgeContracts",
"zks_getBytecodeByHash",
"zks_getConfirmedTokens",
"zks_getL1BatchBlockRange",
"zks_getL1BatchDetails",
"zks_getL2ToL1LogProof",
"zks_getL2ToL1MsgProof",
"zks_getMainContract",
"zks_getRawBlockTransactions",
"zks_getTestnetPaymaster",
"zks_getTokenPrice",
"zks_getTransactionDetails",
"zks_L1BatchNumber",
"zks_L1ChainId",
)

private val allowedMethods: List<String>

init {
Expand Down Expand Up @@ -667,26 +688,7 @@ class DefaultEthereumMethods(
"zkevm_getBroadcastURI",
)

Chain.ZKSYNC__MAINNET, Chain.ZKSYNC__SEPOLIA -> listOf(
"zks_estimateFee",
"zks_estimateGasL1ToL2",
"zks_getAllAccountBalances",
"zks_getBlockDetails",
"zks_getBridgeContracts",
"zks_getBytecodeByHash",
"zks_getConfirmedTokens",
"zks_getL1BatchBlockRange",
"zks_getL1BatchDetails",
"zks_getL2ToL1LogProof",
"zks_getL2ToL1MsgProof",
"zks_getMainContract",
"zks_getRawBlockTransactions",
"zks_getTestnetPaymaster",
"zks_getTokenPrice",
"zks_getTransactionDetails",
"zks_L1BatchNumber",
"zks_L1ChainId",
)
Chain.ZKSYNC__MAINNET, Chain.ZKSYNC__SEPOLIA -> zxkSyncMethods

Chain.HARMONY__MAINNET_SHARD_0 ->
harmonyMethods
Expand Down Expand Up @@ -722,6 +724,8 @@ class DefaultEthereumMethods(

Chain.SEI__MAINNET, Chain.SEI__TESTNET, Chain.SEI__DEVNET -> seiMethods

Chain.CRONOS_ZKEVM__MAINNET, Chain.CRONOS_ZKEVM__TESTNET -> zxkSyncMethods + "zk_estimateFee"

else -> emptyList()
}
}
Expand Down

0 comments on commit 9ca0b58

Please sign in to comment.