add base network

This commit is contained in:
a10zn8
2023-07-19 13:35:32 +04:00
parent 966fa9957d
commit 0e07278a4c
7 changed files with 26 additions and 3 deletions

View File

@@ -147,6 +147,8 @@ Currently, dshackle supports next chains (should be used as chain names in confi
- rinkeby (rinkeby-testnet)
- ropsten (ropsten-testnet)
- bitcoin (bitcoin-testnet)
- base
- base-goerli
=== Roles and Fallback upstream

View File

@@ -21,7 +21,9 @@ enum class BlockchainType {
chain == Chain.POLYGON_ZKEVM__TESTNET ||
chain == Chain.ZKSYNC__MAINNET ||
chain == Chain.ZKSYNC__TESTNET ||
chain == Chain.POLYGON_POS__MUMBAI
chain == Chain.POLYGON_POS__MUMBAI ||
chain == Chain.BASE__MAINNET ||
chain == Chain.BASE__GOERLI
) {
return EVM_POS
}

View File

@@ -47,6 +47,7 @@ enum class Chain(val id: Int, val chainCode: String, val chainName: String) {
"Arbitrum Nova"
),
ZKSYNC__MAINNET(1009, "ZKSYNC", "ZkSync Era"),
BASE__MAINNET(1010, "BASE", "Base"),
// Testnets
ETHEREUM__MORDEN(10001, "MORDEN", "Morden Testnet"),
@@ -84,7 +85,8 @@ enum class Chain(val id: Int, val chainCode: String, val chainName: String) {
10013,
"POLYGON_POS_MUMBAI",
"Polygon POS Mumbai Testnet"
);
),
BASE__GOERLI(10014, "BASE_GOERLI", "Base Goerli Testnet");
companion object {
fun byId(id: Int): Chain {

View File

@@ -77,6 +77,8 @@ class Global {
"zksync" to Chain.ZKSYNC__MAINNET,
"zksync-testnet" to Chain.ZKSYNC__TESTNET,
"polygon-mumbai" to Chain.POLYGON_POS__MUMBAI,
"base" to Chain.BASE__MAINNET,
"base-goerli" to Chain.BASE__GOERLI,
)
fun chainById(id: String?): Chain {

View File

@@ -271,6 +271,9 @@ class DefaultEthereumMethods(
Chain.ZKSYNC__TESTNET to HardcodedData("\"280\"", "\"0x118\""),
Chain.BSC__MAINNET to HardcodedData("\"56\"", "\"0x38\""),
Chain.BASE__MAINNET to HardcodedData("\"8453\"", "\"0x2105\""),
Chain.BASE__GOERLI to HardcodedData("\"84531\"", "\"0x14a33\""),
)
override fun executeHardcoded(method: String): ByteArray {

View File

@@ -78,3 +78,15 @@ chain-settings:
lags:
syncing: 40
lagging: 20
- id: base
options:
validate-peers: false
lags:
syncing: 40
lagging: 20
- id: base-goerli
options:
validate-peers: false
lags:
syncing: 40
lagging: 20