From 9d43e366ce7e591c45493e644787d927c94311d2 Mon Sep 17 00:00:00 2001 From: avichalp Date: Tue, 21 May 2024 21:13:16 +0800 Subject: [PATCH 1/2] Add base config Signed-off-by: avichalp --- .../testnet/api/.env_validator.example | 1 + docker/deployed/testnet/api/config.json | 19 +++++++++++++++++++ pkg/client/chains.go | 9 +++++++++ 3 files changed, 29 insertions(+) diff --git a/docker/deployed/testnet/api/.env_validator.example b/docker/deployed/testnet/api/.env_validator.example index 3db2d265..e64734c7 100644 --- a/docker/deployed/testnet/api/.env_validator.example +++ b/docker/deployed/testnet/api/.env_validator.example @@ -3,4 +3,5 @@ VALIDATOR_GLIF_FILECOIN_CALIBRATION_API_KEY= VALIDATOR_ALCHEMY_POLYGON_AMOY_API_KEY= VALIDATOR_ALCHEMY_ARBITRUM_SEPOLIA_API_KEY= VALIDATOR_ALCHEMY_OPTIMISM_SEPOLIA_API_KEY= +VALIDATOR_ALCHEMY_BASE_SEPOLIA_API_KEY= METRICS_HUB_API_KEY= diff --git a/docker/deployed/testnet/api/config.json b/docker/deployed/testnet/api/config.json index cde855dd..876a6929 100644 --- a/docker/deployed/testnet/api/config.json +++ b/docker/deployed/testnet/api/config.json @@ -128,6 +128,25 @@ }, "HashCalculationStep": 1800 }, + { + "Name": "Base Sepolia", + "ChainID": 84532, + "Registry": { + "EthEndpoint": "wss://base-sepolia.g.alchemy.com/v2/{VALIDATOR_ALCHEMY_BASE_SEPOLIA_API_KEY}", + "ContractAddress": "TODO" + }, + "EventFeed": { + "ChainAPIBackoff": "15s", + "NewBlockPollFreq": "5s", + "MinBlockDepth": 0, + "PersistEvents": true + }, + "EventProcessor": { + "BlockFailedExecutionBackoff": "10s", + "DedupExecutedTxns": true + }, + "HashCalculationStep": 1800 + }, { "Name": "Filecoin Calibration", "ChainID": 314159, diff --git a/pkg/client/chains.go b/pkg/client/chains.go index 4cf0abd7..cd8abd7a 100644 --- a/pkg/client/chains.go +++ b/pkg/client/chains.go @@ -24,6 +24,7 @@ var ChainIDs = struct { EthereumSepolia ChainID OptimismSepolia ChainID ArbitrumSepolia ChainID + BaseSepolia ChainID FilecoinCalibration ChainID PolygonAmoy ChainID Local ChainID @@ -37,6 +38,7 @@ var ChainIDs = struct { EthereumSepolia: 11155111, OptimismSepolia: 11155420, ArbitrumSepolia: 421614, + BaseSepolia: 84532, FilecoinCalibration: 314159, PolygonAmoy: 80002, Local: 31337, @@ -106,6 +108,12 @@ var Chains = map[ChainID]Chain{ Name: "Arbitrum Sepolia", ContractAddr: common.HexToAddress("0x223A74B8323914afDC3ff1e5005564dC17231d6e"), }, + ChainIDs.BaseSepolia: { + Endpoint: testnetURL, + ID: ChainIDs.BaseSepolia, + Name: "Base Sepolia", + ContractAddr: common.HexToAddress("TODO"), + }, ChainIDs.FilecoinCalibration: { Endpoint: testnetURL, ID: ChainIDs.FilecoinCalibration, @@ -142,6 +150,7 @@ var AlchemyURLs = map[ChainID]string{ ChainIDs.Optimism: "https://opt-mainnet.g.alchemy.com/v2/%s", 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.PolygonAmoy: "https://polygon-amoy.g.alchemy.com/v2/%s", ChainIDs.Polygon: "https://polygon-mainnet.g.alchemy.com/v2/%s", } From 0c6dc6660a0f95548dbab1b9d7f7c9e03674ec13 Mon Sep 17 00:00:00 2001 From: avichalp Date: Thu, 23 May 2024 22:46:51 +0800 Subject: [PATCH 2/2] Add contract address Signed-off-by: avichalp --- docker/deployed/testnet/api/config.json | 4 ++-- pkg/client/chains.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker/deployed/testnet/api/config.json b/docker/deployed/testnet/api/config.json index 876a6929..f2d46e7a 100644 --- a/docker/deployed/testnet/api/config.json +++ b/docker/deployed/testnet/api/config.json @@ -132,8 +132,8 @@ "Name": "Base Sepolia", "ChainID": 84532, "Registry": { - "EthEndpoint": "wss://base-sepolia.g.alchemy.com/v2/{VALIDATOR_ALCHEMY_BASE_SEPOLIA_API_KEY}", - "ContractAddress": "TODO" + "EthEndpoint": "wss://base-sepolia.g.alchemy.com/v2/${VALIDATOR_ALCHEMY_BASE_SEPOLIA_API_KEY}", + "ContractAddress": "0xA85aAE9f0Aec5F5638E5F13840797303Ab29c9f9" }, "EventFeed": { "ChainAPIBackoff": "15s", diff --git a/pkg/client/chains.go b/pkg/client/chains.go index cd8abd7a..c44109ff 100644 --- a/pkg/client/chains.go +++ b/pkg/client/chains.go @@ -112,7 +112,7 @@ var Chains = map[ChainID]Chain{ Endpoint: testnetURL, ID: ChainIDs.BaseSepolia, Name: "Base Sepolia", - ContractAddr: common.HexToAddress("TODO"), + ContractAddr: common.HexToAddress("0xA85aAE9f0Aec5F5638E5F13840797303Ab29c9f9"), }, ChainIDs.FilecoinCalibration: { Endpoint: testnetURL,