add mumbai

This commit is contained in:
a10zn8
2023-06-28 23:32:02 +04:00
parent d70907dcfa
commit 2607758197
6 changed files with 22 additions and 2 deletions

View File

@@ -130,6 +130,7 @@ Currently, dshackle supports next chains (should be used as chain names in confi
- ethereum (eth)
- ethereum-classic (etc)
- polygon (matic)
- polygon-mumbai
- arbitrum (arb)
- arbitrum-testnet
- arbitrum-nova

View File

@@ -20,7 +20,8 @@ enum class BlockchainType {
chain == Chain.POLYGON_ZKEVM ||
chain == Chain.TESTNET_POLYGON_ZKEVM ||
chain == Chain.ZKSYNC ||
chain == Chain.TESTNET_ZKSYNC
chain == Chain.TESTNET_ZKSYNC ||
chain == Chain.TESTNET_POYGON_POS_MUMBAI
) {
return EVM_POS
}

View File

@@ -79,6 +79,11 @@ enum class Chain(val id: Int, val chainCode: String, val chainName: String) {
10012,
"ZKS_TESTNET",
"ZkSync Testnet"
),
TESTNET_POYGON_POS_MUMBAI(
10013,
"POLYGON_POS_MUMBAI",
"Polygon POS Mumbai Testnet"
);
companion object {

View File

@@ -76,6 +76,7 @@ class Global {
"polygon-zkevm-testnet" to Chain.TESTNET_POLYGON_ZKEVM,
"zksync" to Chain.ZKSYNC,
"zksync-testnet" to Chain.TESTNET_ZKSYNC,
"polygon-mumbai" to Chain.TESTNET_POYGON_POS_MUMBAI,
)
fun chainById(id: String?): Chain {

View File

@@ -175,7 +175,7 @@ class DefaultEthereumMethods(
Chain.OPTIMISM, Chain.TESTNET_OPTIMISM -> listOf(
"rollup_gasPrices"
)
Chain.POLYGON -> listOf(
Chain.POLYGON, Chain.TESTNET_POYGON_POS_MUMBAI -> listOf(
"bor_getAuthor",
"bor_getCurrentValidators",
"bor_getCurrentProposer",
@@ -311,6 +311,10 @@ class DefaultEthereumMethods(
"\"280\""
}
Chain.TESTNET_POYGON_POS_MUMBAI == chain -> {
"\"80001\""
}
else -> throw RpcException(-32602, "Invalid chain")
}
}
@@ -389,6 +393,10 @@ class DefaultEthereumMethods(
"\"0x118\""
}
Chain.TESTNET_POYGON_POS_MUMBAI == chain -> {
"\"0x13881\""
}
else -> throw RpcException(-32602, "Invalid chain")
}
}

View File

@@ -14,6 +14,10 @@ chain-settings:
lags:
syncing: 20
lagging: 10
- id: polygon-mumbai
lags:
syncing: 20
lagging: 10
- id: arbitrum
options:
validate-peers: false