Skip to content

Commit

Permalink
New networks (#425)
Browse files Browse the repository at this point in the history
  • Loading branch information
KirillPamPam authored Feb 21, 2024
1 parent 8f0700a commit 560eb6c
Show file tree
Hide file tree
Showing 3 changed files with 97 additions and 12 deletions.
2 changes: 1 addition & 1 deletion emerald-grpc
93 changes: 92 additions & 1 deletion foundation/src/main/resources/chains.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
Expand Down Expand Up @@ -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())
}
}
}

0 comments on commit 560eb6c

Please sign in to comment.