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

@@ -1177,4 +1177,95 @@ chain-settings:
code: ZETA_CHAIN_MAINNET
grpcId: 1045
short-names: [ zeta-chain ]
chain-id: 0x1b58
chain-id: 0x1b58
- id: bittorrent
label: BitTorrent
type: eth
settings:
fork-choice: quorum
expected-block-time: 2s
lags:
syncing: 40
lagging: 20
chains:
- id: Mainnet
priority: 100
code: BITTORRENT_MAINNET
grpcId: 1046
short-names: [ bittorrent ]
chain-id: 0xc7
- id: Testnet
priority: 1
code: BITTORRENT_TESTNET
grpcId: 10060
short-names: [ bittorrent-testnet ]
chain-id: 0x404
- id: thundercore
label: Thundercore
type: eth
settings:
fork-choice: quorum
expected-block-time: 1s
lags:
syncing: 40
lagging: 20
chains:
- id: Mainnet
priority: 100
code: THUNDERCORE_MAINNET
grpcId: 1047
short-names: [ thundercore ]
chain-id: 0x6c
- id: Testnet
priority: 1
code: THUNDERCORE_TESTNET
grpcId: 10061
short-names: [ thundercore-testnet ]
chain-id: 0x12
- id: core
label: Core
type: eth
settings:
fork-choice: quorum
expected-block-time: 3s
lags:
syncing: 40
lagging: 20
chains:
- id: Mainnet
priority: 100
code: CORE_MAINNET
grpcId: 1048
short-names: [ core ]
chain-id: 0x45c
- id: Testnet
priority: 1
code: CORE_TESTNET
grpcId: 10062
short-names: [ core-testnet ]
chain-id: 0x45b
- id: telos
label: Telos
type: eth
settings:
options:
validate-peers: false
validate-syncing: false
fork-choice: quorum
expected-block-time: 300ms
lags:
syncing: 40
lagging: 20
chains:
- id: Mainnet
priority: 100
code: TELOS_MAINNET
grpcId: 1049
short-names: [ telos ]
chain-id: 0x28
- id: Testnet
priority: 1
code: TELOS_TESTNET
grpcId: 10063
short-names: [ telos-testnet ]
chain-id: 0x29

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())
}
}
}