From a5687fa68d6b6353875af1c303e944005be1a5f5 Mon Sep 17 00:00:00 2001 From: avichalp Date: Fri, 21 Jun 2024 20:26:02 +0800 Subject: [PATCH] Add base config Signed-off-by: avichalp --- .../mainnet/api/.env_validator.example | 1 + docker/deployed/mainnet/api/config.json | 19 +++++++++++++++++++ pkg/client/chains.go | 9 +++++++++ 3 files changed, 29 insertions(+) diff --git a/docker/deployed/mainnet/api/.env_validator.example b/docker/deployed/mainnet/api/.env_validator.example index ed68aa41..ee5f30ff 100644 --- a/docker/deployed/mainnet/api/.env_validator.example +++ b/docker/deployed/mainnet/api/.env_validator.example @@ -2,6 +2,7 @@ VALIDATOR_ALCHEMY_ARBITRUM_MAINNET_API_KEY= VALIDATOR_ALCHEMY_ETHEREUM_MAINNET_API_KEY= VALIDATOR_ALCHEMY_POLYGON_MAINNET_API_KEY= VALIDATOR_ALCHEMY_OPTIMISM_MAINNET_API_KEY= +VALIDATOR_ALCHEMY_BASE_MAINNET_API_KEY= VALIDATOR_GLIF_FILECOIN_MAINNET_API_KEY= VALIDATOR_QUICKNODE_ARBITRUM_NOVA_MAINNET_API_KEY= METRICS_HUB_API_KEY= diff --git a/docker/deployed/mainnet/api/config.json b/docker/deployed/mainnet/api/config.json index 0af2ba27..bdb76fc0 100644 --- a/docker/deployed/mainnet/api/config.json +++ b/docker/deployed/mainnet/api/config.json @@ -172,6 +172,25 @@ "WebhookURL": "https://discord.com/api/webhooks/${VALIDATOR_DISCORD_WEBHOOK_ID}/${VALIDATOR_DISCORD_WEBHOOK_TOKEN}" }, "HashCalculationStep": 60 + }, + { + "Name": "Base", + "ChainID": 8453, + "Registry": { + "EthEndpoint": "wss://base-mainnet.g.alchemy.com/v2/${VALIDATOR_ALCHEMY_BASE_MAINNET_API_KEY}", + "ContractAddress": "0x8268F7Aba0E152B3A853e8CB4Ab9795Ec66c2b6B" + }, + "EventFeed": { + "ChainAPIBackoff": "15s", + "NewBlockPollFreq": "5s", + "MinBlockDepth": 0, + "PersistEvents": true + }, + "EventProcessor": { + "BlockFailedExecutionBackoff": "10s", + "DedupExecutedTxns": true + }, + "HashCalculationStep": 1800 } ] } \ No newline at end of file diff --git a/pkg/client/chains.go b/pkg/client/chains.go index c44109ff..7e9bbbb5 100644 --- a/pkg/client/chains.go +++ b/pkg/client/chains.go @@ -21,6 +21,7 @@ var ChainIDs = struct { Arbitrum ChainID ArbitrumNova ChainID Filecoin ChainID + Base ChainID EthereumSepolia ChainID OptimismSepolia ChainID ArbitrumSepolia ChainID @@ -39,6 +40,7 @@ var ChainIDs = struct { OptimismSepolia: 11155420, ArbitrumSepolia: 421614, BaseSepolia: 84532, + Base: 8453, FilecoinCalibration: 314159, PolygonAmoy: 80002, Local: 31337, @@ -90,6 +92,12 @@ var Chains = map[ChainID]Chain{ Name: "Filecoin", ContractAddr: common.HexToAddress("0x59EF8Bf2d6c102B4c42AEf9189e1a9F0ABfD652d"), }, + ChainIDs.Base: { + Endpoint: testnetURL, + ID: ChainIDs.Base, + Name: "Base", + ContractAddr: common.HexToAddress("0x8268F7Aba0E152B3A853e8CB4Ab9795Ec66c2b6B"), + }, ChainIDs.EthereumSepolia: { Endpoint: testnetURL, ID: ChainIDs.EthereumSepolia, @@ -151,6 +159,7 @@ var AlchemyURLs = map[ChainID]string{ ChainIDs.ArbitrumSepolia: "https://arb-sepolia.g.alchemy.com/v2/%s", ChainIDs.Arbitrum: "https://arb-mainnet.g.alchemy.com/v2/%s", ChainIDs.BaseSepolia: "https://base-sepolia.g.alchemy.com/v2/%s", + ChainIDs.Base: "https://base-mainnet.g.alchemy.com/v2/%s", ChainIDs.PolygonAmoy: "https://polygon-amoy.g.alchemy.com/v2/%s", ChainIDs.Polygon: "https://polygon-mainnet.g.alchemy.com/v2/%s", }