New networks (#425)

This commit is contained in:
KirillPamPam
2024-02-21 19:18:39 +04:00
committed by GitHub
parent 8f0700a6b4
commit 560eb6c215
3 changed files with 97 additions and 12 deletions

View File

@@ -333,6 +333,10 @@ class DefaultEthereumMethods(
Chain.OPTIMISM__MAINNET -> setOf("eth_getAccounts")
Chain.ZKSYNC__MAINNET, Chain.ZKSYNC__TESTNET, Chain.POLYGON_ZKEVM__TESTNET, Chain.POLYGON_ZKEVM__MAINNET ->
setOf("eth_maxPriorityFeePerGas")
Chain.TELOS__MAINNET, Chain.TELOS__TESTNET -> setOf(
"eth_syncing",
"net_peerCount",
)
else -> emptySet()
}
}
@@ -405,14 +409,4 @@ class DefaultEthereumMethods(
override fun getSupportedMethods(): Set<String> {
return allowedMethods.plus(hardcodedMethods).toSortedSet()
}
data class HardcodedData private constructor(
val netVersion: String,
val chainId: String,
) {
companion object {
fun createHardcodedData(netVersion: String, chainId: String): HardcodedData =
HardcodedData(netVersion.lowercase(), chainId.lowercase())
}
}
}