From fcb3445733c04075ec7301c12620af64142405b9 Mon Sep 17 00:00:00 2001 From: Andrey Date: Tue, 13 Aug 2024 16:10:58 +0300 Subject: [PATCH 1/2] Add chains for HC. --- crawlers/mooncrawl/mooncrawl/blockchain.py | 6 ++++++ crawlers/mooncrawl/mooncrawl/settings.py | 24 ++++++++++++++++++++++ crawlers/mooncrawl/mooncrawl/version.py | 2 +- crawlers/mooncrawl/sample.env | 3 +++ crawlers/mooncrawl/setup.py | 4 ++-- 5 files changed, 36 insertions(+), 3 deletions(-) diff --git a/crawlers/mooncrawl/mooncrawl/blockchain.py b/crawlers/mooncrawl/mooncrawl/blockchain.py index 2504788b..be79f0a8 100644 --- a/crawlers/mooncrawl/mooncrawl/blockchain.py +++ b/crawlers/mooncrawl/mooncrawl/blockchain.py @@ -44,6 +44,9 @@ MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI, MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI, MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI, + MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI, + MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI, + MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI, WEB3_CLIENT_REQUEST_TIMEOUT_SECONDS, ) @@ -80,6 +83,9 @@ class BlockCrawlError(Exception): AvailableBlockchainType.MANTLE: MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI, AvailableBlockchainType.MANTLE_SEPOLIA: MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI, AvailableBlockchainType.GAME7_ORBIT_ARBITRUM_SEPOLIA: MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI, + AvailableBlockchainType.IMX_ZKEVM: MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI, + AvailableBlockchainType.GAME7_TESTNET: MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI, + AvailableBlockchainType.SEPOLIA: MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI, } diff --git a/crawlers/mooncrawl/mooncrawl/settings.py b/crawlers/mooncrawl/mooncrawl/settings.py index 4bcdaaed..d3d5cc21 100644 --- a/crawlers/mooncrawl/mooncrawl/settings.py +++ b/crawlers/mooncrawl/mooncrawl/settings.py @@ -233,6 +233,30 @@ "MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI env variable is not set" ) +MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI = os.environ.get( + "MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI", "" +) +if MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI == "": + raise Exception( + "MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI env variable is not set" + ) + + +MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI = os.environ.get( + "MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI", "" +) +if MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI == "": + raise Exception("MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI env variable is not set") + + +MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI = os.environ.get( + "MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI", "" +) +if MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI == "": + raise Exception( + "MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI env variable is not set" + ) + MOONSTREAM_CRAWL_WORKERS = 4 MOONSTREAM_CRAWL_WORKERS_RAW = os.environ.get("MOONSTREAM_CRAWL_WORKERS") diff --git a/crawlers/mooncrawl/mooncrawl/version.py b/crawlers/mooncrawl/mooncrawl/version.py index bade07d7..d5b0894c 100644 --- a/crawlers/mooncrawl/mooncrawl/version.py +++ b/crawlers/mooncrawl/mooncrawl/version.py @@ -2,4 +2,4 @@ Moonstream crawlers version. """ -MOONCRAWL_VERSION = "0.4.12" +MOONCRAWL_VERSION = "0.4.13" diff --git a/crawlers/mooncrawl/sample.env b/crawlers/mooncrawl/sample.env index 81057787..e3b71c38 100644 --- a/crawlers/mooncrawl/sample.env +++ b/crawlers/mooncrawl/sample.env @@ -44,6 +44,9 @@ export MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI="https://=0.4.5", - "moonstreamdb-v3>=0.0.13", - "moonstream-types>=0.0.4", + "moonstreamdb-v3>=0.0.16", + "moonstream-types>=0.0.6", "moonstream>=0.1.1", "moonworm[moonstream]>=0.9.3", "humbug", From 9e0e99ea0e66fe980d91ca23a16ada3b25a41d57 Mon Sep 17 00:00:00 2001 From: Andrey Date: Tue, 13 Aug 2024 16:22:41 +0300 Subject: [PATCH 2/2] Fix URI. --- crawlers/mooncrawl/mooncrawl/blockchain.py | 4 ++-- crawlers/mooncrawl/mooncrawl/settings.py | 10 ++++------ crawlers/mooncrawl/sample.env | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/crawlers/mooncrawl/mooncrawl/blockchain.py b/crawlers/mooncrawl/mooncrawl/blockchain.py index be79f0a8..f1d7c7ca 100644 --- a/crawlers/mooncrawl/mooncrawl/blockchain.py +++ b/crawlers/mooncrawl/mooncrawl/blockchain.py @@ -44,7 +44,7 @@ MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI, MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI, MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI, - MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI, + MOONSTREAM_NODE_IMX_ZKEVM_A_EXTERNAL_URI, MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI, MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI, WEB3_CLIENT_REQUEST_TIMEOUT_SECONDS, @@ -83,7 +83,7 @@ class BlockCrawlError(Exception): AvailableBlockchainType.MANTLE: MOONSTREAM_NODE_MANTLE_A_EXTERNAL_URI, AvailableBlockchainType.MANTLE_SEPOLIA: MOONSTREAM_NODE_MANTLE_SEPOLIA_A_EXTERNAL_URI, AvailableBlockchainType.GAME7_ORBIT_ARBITRUM_SEPOLIA: MOONSTREAM_NODE_GAME7_ORBIT_ARBITRUM_SEPOLIA_A_EXTERNAL_URI, - AvailableBlockchainType.IMX_ZKEVM: MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI, + AvailableBlockchainType.IMX_ZKEVM: MOONSTREAM_NODE_IMX_ZKEVM_A_EXTERNAL_URI, AvailableBlockchainType.GAME7_TESTNET: MOONSTREAM_NODE_GAME7_TESTNET_A_EXTERNAL_URI, AvailableBlockchainType.SEPOLIA: MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI, } diff --git a/crawlers/mooncrawl/mooncrawl/settings.py b/crawlers/mooncrawl/mooncrawl/settings.py index d3d5cc21..f9218296 100644 --- a/crawlers/mooncrawl/mooncrawl/settings.py +++ b/crawlers/mooncrawl/mooncrawl/settings.py @@ -249,13 +249,11 @@ raise Exception("MOONSTREAM_NODE_SEPOLIA_A_EXTERNAL_URI env variable is not set") -MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI = os.environ.get( - "MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI", "" +MOONSTREAM_NODE_IMX_ZKEVM_A_EXTERNAL_URI = os.environ.get( + "MOONSTREAM_NODE_IMX_ZKEVM_A_EXTERNAL_URI", "" ) -if MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI == "": - raise Exception( - "MOONSTREAM_NODE_IMX_ZKEVM_WEB3_A_EXTERNAL_URI env variable is not set" - ) +if MOONSTREAM_NODE_IMX_ZKEVM_A_EXTERNAL_URI == "": + raise Exception("MOONSTREAM_NODE_IMX_ZKEVM_A_EXTERNAL_URI env variable is not set") MOONSTREAM_CRAWL_WORKERS = 4 diff --git a/crawlers/mooncrawl/sample.env b/crawlers/mooncrawl/sample.env index e3b71c38..5215576b 100644 --- a/crawlers/mooncrawl/sample.env +++ b/crawlers/mooncrawl/sample.env @@ -46,7 +46,7 @@ export MOONSTREAM_NODE_STARKNET_SEPOLIA_A_EXTERNAL_URI="https://