kopia lustrzana https://github.com/bugout-dev/moonstream
Porównaj commity
94 Commity
moonstream
...
main
Autor | SHA1 | Data |
---|---|---|
Andrey Dolgolev | 7962bc1f90 | |
Andrey | 3a2c01f47b | |
Andrey Dolgolev | 62adb3becd | |
Andrey | 436ce38640 | |
Andrey Dolgolev | 6f29d15d07 | |
kompotkot | 87985fd51e | |
Andrey | 37c5b6e4cf | |
Andrey | fa0b626683 | |
kompotkot | ead383414f | |
Sergei Sumarokov | 3634763d81 | |
kompotkot | a741ad720d | |
kompotkot | 6695a3b353 | |
Sergei Sumarokov | e27476ac53 | |
kompotkot | 12dc59ee9b | |
kompotkot | 7faa533046 | |
Andrey | d45333dc0e | |
Andrey | 776a97a8f2 | |
Andrey | abcdc9f7ed | |
Andrey | 19944c124f | |
kompotkot | 7e346cc2ce | |
Andrey Dolgolev | c35b88d25d | |
Andrey | 95aec6bece | |
Andrey | 568250396d | |
Andrey | 54c83a371a | |
Andrey Dolgolev | 1d4ef733c8 | |
Andrey | 348d115819 | |
Sergei Sumarokov | 7db8b88a2f | |
Andrey Dolgolev | da2da94b55 | |
Andrey | 18e650d233 | |
kompotkot | 27e9a2242f | |
Sergei Sumarokov | e2fb5b10e5 | |
Andrey Dolgolev | 3e813a21bc | |
Andrey | 2c71082895 | |
kompotkot | daf47028a4 | |
kompotkot | 15567735c9 | |
kompotkot | 516e507123 | |
Andrey | af1ad369a9 | |
Andrey | 819e0b18b2 | |
Andrey | 63383a40e2 | |
kompotkot | 9a31d145e0 | |
kompotkot | f6e541edab | |
kompotkot | e1c62d9932 | |
kompotkot | 12345e42a3 | |
kompotkot | e700efff5b | |
Andrey Dolgolev | 135af1765c | |
Andrey | 6874ff62f4 | |
Andrey | 8506995513 | |
Sergei Sumarokov | 2caaa82953 | |
Sergei Sumarokov | 3299380916 | |
kompotkot | 03a6601ded | |
kompotkot | 1bb23eeda4 | |
Sergei Sumarokov | 262ea4c792 | |
kompotkot | a6ba053f10 | |
Andrey Dolgolev | f3a3601a88 | |
kompotkot | f6bc86f082 | |
Andrey | 3eb0301304 | |
Andrey | a74d5ce76c | |
Andrey | a31ce2c588 | |
Andrey | 0854656a6e | |
Andrey | 3721ec9f6f | |
Andrey | 3bd8a68bd7 | |
Andrey | c42d8ccd10 | |
Andrey | a15b2f94ed | |
Andrey | ce628b6e0b | |
Andrey | 44764abdaa | |
Andrey | c64eec10f6 | |
Andrey | 911f7e7ebe | |
Sergei Sumarokov | 3cab309c42 | |
kompotkot | 8d1f5f4b4c | |
Sergei Sumarokov | f5ff9427fe | |
kompotkot | 9a5bc824c4 | |
Sergei Sumarokov | 41787fafaa | |
kompotkot | e5f324b841 | |
Sergei Sumarokov | 1d0fcda13c | |
kompotkot | bf653b3202 | |
kompotkot | 8a556b0b1f | |
kompotkot | 6a773965b2 | |
kompotkot | 525abb8a5f | |
kompotkot | 3d81cb79fc | |
Sergei Sumarokov | 50d7c826be | |
kompotkot | ece119afdd | |
Sergei Sumarokov | 13054433da | |
kompotkot | 9bb392dc0b | |
kompotkot | df3365167a | |
Sergei Sumarokov | becb5b8843 | |
kompotkot | c4e313e15c | |
kompotkot | 2221b45bc9 | |
Sergei Sumarokov | 163049b9b6 | |
Sergei Sumarokov | 7994da519b | |
kompotkot | f84788a6c1 | |
kompotkot | 784ff2a740 | |
kompotkot | 49b49153ac | |
Sergei Sumarokov | 25fc91569d | |
kompotkot | c06d9df61b |
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Mumbai historical crawler events
|
Description=Amoy historical crawler events
|
||||||
After=network.target
|
After=network.target
|
||||||
StartLimitIntervalSec=300
|
StartLimitIntervalSec=300
|
||||||
StartLimitBurst=3
|
StartLimitBurst=3
|
||||||
|
@ -9,9 +9,9 @@ WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=15s
|
RestartSec=15s
|
||||||
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type mumbai --find-deployed-blocks --end 0 --tasks-journal --only-events
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type amoy --find-deployed-blocks --end 0 --tasks-journal --only-events
|
||||||
CPUWeight=70
|
CPUWeight=70
|
||||||
SyslogIdentifier=mumbai-historical-crawl-events
|
SyslogIdentifier=amoy-historical-crawl-events
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Runs events historical crawler on mumbai
|
Description=Runs events historical crawler on Amoy
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnBootSec=60s
|
OnBootSec=60s
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Mumbai historical crawler transactions
|
Description=Amoy historical crawler transactions
|
||||||
After=network.target
|
After=network.target
|
||||||
StartLimitIntervalSec=300
|
StartLimitIntervalSec=300
|
||||||
StartLimitBurst=3
|
StartLimitBurst=3
|
||||||
|
@ -9,9 +9,9 @@ WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=15s
|
RestartSec=15s
|
||||||
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type mumbai --find-deployed-blocks --end 0 --tasks-journal --only-functions
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type amoy --find-deployed-blocks --end 0 --tasks-journal --only-functions
|
||||||
CPUWeight=70
|
CPUWeight=70
|
||||||
SyslogIdentifier=mumbai-historical-crawl-transactions
|
SyslogIdentifier=amoy-historical-crawl-transactions
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Runs transactions historical crawler on mumbai
|
Description=Runs transactions historical crawler on Amoy
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnBootSec=60s
|
OnBootSec=60s
|
|
@ -1,11 +1,11 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Fill missing blocks at Mumbai database
|
Description=Fill missing blocks at Amoy database
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks missing --blockchain mumbai -n
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks missing --blockchain amoy -n
|
||||||
CPUWeight=50
|
CPUWeight=50
|
||||||
SyslogIdentifier=mumbai-missing
|
SyslogIdentifier=amoy-missing
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Fill missing blocks at Mumbai database
|
Description=Fill missing blocks at Amoy database
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnBootSec=120s
|
OnBootSec=120s
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Mumbai moonworm crawler
|
Description=Amoy moonworm crawler
|
||||||
After=network.target
|
After=network.target
|
||||||
StartLimitIntervalSec=300
|
StartLimitIntervalSec=300
|
||||||
StartLimitBurst=3
|
StartLimitBurst=3
|
||||||
|
@ -9,9 +9,9 @@ WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=15s
|
RestartSec=15s
|
||||||
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli crawl -b mumbai --confirmations 40
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli crawl -b amoy --confirmations 10 --min-blocks-batch 20
|
||||||
CPUWeight=70
|
CPUWeight=70
|
||||||
SyslogIdentifier=mumbai-moonworm-crawler
|
SyslogIdentifier=amoy-moonworm-crawler
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Mumbai block with transactions synchronizer
|
Description=Amoy block with transactions synchronizer
|
||||||
StartLimitIntervalSec=300
|
StartLimitIntervalSec=300
|
||||||
StartLimitBurst=3
|
StartLimitBurst=3
|
||||||
After=network.target
|
After=network.target
|
||||||
|
@ -9,9 +9,9 @@ Restart=on-failure
|
||||||
RestartSec=15s
|
RestartSec=15s
|
||||||
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks synchronize --blockchain mumbai -c 20 -j 2
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks synchronize --blockchain amoy -c 10 -j 2
|
||||||
CPUWeight=90
|
CPUWeight=90
|
||||||
SyslogIdentifier=mumbai-synchronize
|
SyslogIdentifier=amoy-synchronize
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Arbitrum One historical crawler events
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type arbitrum_one --find-deployed-blocks --end 0 --tasks-journal --only-events
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=arbitrum-one-historical-crawl-events
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runs events historical crawler on arbitrum one
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=60s
|
||||||
|
OnUnitActiveSec=10m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Arbitrum One historical crawler transactions
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type arbitrum_one --find-deployed-blocks --end 0 --tasks-journal --only-functions
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=arbitrum-one-historical-crawl-transactions
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runs transactions historical crawler on proofofplay apex
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=60s
|
||||||
|
OnUnitActiveSec=10m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fill missing blocks at Arbitrum One database
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks missing --blockchain arbitrum_one -n
|
||||||
|
CPUWeight=50
|
||||||
|
SyslogIdentifier=arbitrum-one-missing
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fill missing blocks at Arbitrum One database
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=120s
|
||||||
|
OnUnitActiveSec=15m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Arbitrum One moonworm crawler
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli crawl -b arbitrum_one --confirmations 10 --min-blocks-batch 20
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=arbitrum-one-moonworm-crawler
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Arbitrum One block with transactions synchronizer
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks synchronize --blockchain arbitrum_one -c 10 -j 2
|
||||||
|
CPUWeight=90
|
||||||
|
SyslogIdentifier=arbitrum-one-synchronize
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fill missing blocks at Blast database
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks missing --blockchain blast -n
|
||||||
|
CPUWeight=50
|
||||||
|
SyslogIdentifier=blast-missing
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fill missing blocks at Blast database
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=120s
|
||||||
|
OnUnitActiveSec=15m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Blast moonworm crawler
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli crawl -b blast --confirmations 10 --min-blocks-batch 20
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=blast-moonworm-crawler
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fill missing blocks at Blast Sepolia database
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks missing --blockchain blast_sepolia -n
|
||||||
|
CPUWeight=50
|
||||||
|
SyslogIdentifier=blast-sepolia-missing
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fill missing blocks at Blast Sepolia database
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=120s
|
||||||
|
OnUnitActiveSec=15m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Blast Sepolia moonworm crawler
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli crawl -b blast_sepolia --confirmations 10 --min-blocks-batch 20
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=blast-sepolia-moonworm-crawler
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Blast Sepolia block with transactions synchronizer
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks synchronize --blockchain blast_sepolia -c 10 -j 2
|
||||||
|
CPUWeight=90
|
||||||
|
SyslogIdentifier=blast-sepolia-synchronize
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Blast block with transactions synchronizer
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks synchronize --blockchain blast -c 10 -j 2
|
||||||
|
CPUWeight=90
|
||||||
|
SyslogIdentifier=blast-synchronize
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -43,10 +43,10 @@ POLYGON_MISSING_TIMER_FILE="polygon-missing.timer"
|
||||||
POLYGON_CU_NFT_DASHBOARD_SERVICE_FILE="polygon-cu-nft-dashboard.service"
|
POLYGON_CU_NFT_DASHBOARD_SERVICE_FILE="polygon-cu-nft-dashboard.service"
|
||||||
POLYGON_CU_NFT_DASHBOARD_TIMER_FILE="polygon-cu-nft-dashboard.timer"
|
POLYGON_CU_NFT_DASHBOARD_TIMER_FILE="polygon-cu-nft-dashboard.timer"
|
||||||
|
|
||||||
# Mumbai service files
|
# Amoy
|
||||||
MUMBAI_SYNCHRONIZE_SERVICE="mumbai-synchronize.service"
|
AMOY_MISSING_SERVICE_FILE="amoy-missing.service"
|
||||||
MUMBAI_MISSING_SERVICE_FILE="mumbai-missing.service"
|
AMOY_MISSING_TIMER_FILE="amoy-missing.timer"
|
||||||
MUMBAI_MISSING_TIMER_FILE="mumbai-missing.timer"
|
AMOY_SYNCHRONIZE_SERVICE="amoy-synchronize.service"
|
||||||
|
|
||||||
# XDai service files
|
# XDai service files
|
||||||
XDAI_SYNCHRONIZE_SERVICE="xdai-synchronize.service"
|
XDAI_SYNCHRONIZE_SERVICE="xdai-synchronize.service"
|
||||||
|
@ -63,6 +63,11 @@ ZKSYNC_ERA_SEPOLIA_SYNCHRONIZE_SERVICE="zksync-era-sepolia-synchronize.service"
|
||||||
ZKSYNC_ERA_SEPOLIA_MISSING_SERVICE_FILE="zksync-era-sepolia-missing.service"
|
ZKSYNC_ERA_SEPOLIA_MISSING_SERVICE_FILE="zksync-era-sepolia-missing.service"
|
||||||
ZKSYNC_ERA_SEPOLIA_MISSING_TIMER_FILE="zksync-era-sepolia-missing.timer"
|
ZKSYNC_ERA_SEPOLIA_MISSING_TIMER_FILE="zksync-era-sepolia-missing.timer"
|
||||||
|
|
||||||
|
# Arbitrum one
|
||||||
|
ARBITRUM_ONE_SYNCHRONIZE_SERVICE="arbitrum-one-synchronize.service"
|
||||||
|
ARBITRUM_ONE_MISSING_SERVICE_FILE="arbitrum-one-missing.service"
|
||||||
|
ARBITRUM_ONE_MISSING_TIMER_FILE="arbitrum-one-missing.timer"
|
||||||
|
|
||||||
# Arbitrum Nova
|
# Arbitrum Nova
|
||||||
ARBITRUM_NOVA_SYNCHRONIZE_SERVICE="arbitrum-nova-synchronize.service"
|
ARBITRUM_NOVA_SYNCHRONIZE_SERVICE="arbitrum-nova-synchronize.service"
|
||||||
ARBITRUM_NOVA_MISSING_SERVICE_FILE="arbitrum-nova-missing.service"
|
ARBITRUM_NOVA_MISSING_SERVICE_FILE="arbitrum-nova-missing.service"
|
||||||
|
@ -93,6 +98,21 @@ AVALANCHE_FUJI_SYNCHRONIZE_SERVICE="avalanche-fuji-synchronize.service"
|
||||||
AVALANCHE_FUJI_MISSING_SERVICE_FILE="avalanche-fuji-missing.service"
|
AVALANCHE_FUJI_MISSING_SERVICE_FILE="avalanche-fuji-missing.service"
|
||||||
AVALANCHE_FUJI_MISSING_TIMER_FILE="avalanche-fuji-missing.timer"
|
AVALANCHE_FUJI_MISSING_TIMER_FILE="avalanche-fuji-missing.timer"
|
||||||
|
|
||||||
|
# Blast
|
||||||
|
BLAST_MISSING_SERVICE_FILE="blast-missing.service"
|
||||||
|
BLAST_MISSING_TIMER_FILE="blast-missing.timer"
|
||||||
|
BLAST_SYNCHRONIZE_SERVICE="blast-synchronize.service"
|
||||||
|
|
||||||
|
# Blast sepolia
|
||||||
|
BLAST_SEPOLIA_MISSING_SERVICE_FILE="blast-sepolia-missing.service"
|
||||||
|
BLAST_SEPOLIA_MISSING_TIMER_FILE="blast-sepolia-missing.timer"
|
||||||
|
BLAST_SEPOLIA_SYNCHRONIZE_SERVICE="blast-sepolia-synchronize.service"
|
||||||
|
|
||||||
|
# ProofofPlay APEX
|
||||||
|
PROOFOFPLAY_APEX_MISSING_SERVICE_FILE="proofofplay-apex-missing.service"
|
||||||
|
PROOFOFPLAY_APEX_MISSING_TIMER_FILE="proofofplay-apex-missing.timer"
|
||||||
|
PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE="proofofplay-apex-synchronize.service"
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -117,7 +137,7 @@ if [ ! -d "${SECRETS_DIR}" ]; then
|
||||||
mkdir -p "${SECRETS_DIR}"
|
mkdir -p "${SECRETS_DIR}"
|
||||||
echo -e "${PREFIX_WARN} Created new secrets directory"
|
echo -e "${PREFIX_WARN} Created new secrets directory"
|
||||||
fi
|
fi
|
||||||
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" CHECKENV_AWS_FETCH_LOOP_LIMIT=20 /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
||||||
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -201,23 +221,25 @@ cp "${SCRIPT_DIR}/${POLYGON_CU_NFT_DASHBOARD_TIMER_FILE}" "/home/ubuntu/.config/
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${POLYGON_CU_NFT_DASHBOARD_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${POLYGON_CU_NFT_DASHBOARD_TIMER_FILE}"
|
||||||
|
|
||||||
|
# Amoy
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing Mumbai block with transactions syncronizer service definition with ${MUMBAI_SYNCHRONIZE_SERVICE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy block with transactions syncronizer service definition with ${AMOY_SYNCHRONIZE_SERVICE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_SYNCHRONIZE_SERVICE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_SYNCHRONIZE_SERVICE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_SYNCHRONIZE_SERVICE}"
|
cp "${SCRIPT_DIR}/${AMOY_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${AMOY_SYNCHRONIZE_SERVICE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_SYNCHRONIZE_SERVICE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing Mumbai missing service and timer with: ${MUMBAI_MISSING_SERVICE_FILE}, ${MUMBAI_MISSING_TIMER_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy missing service and timer with: ${AMOY_MISSING_SERVICE_FILE}, ${AMOY_MISSING_TIMER_FILE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_MISSING_TIMER_FILE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${AMOY_MISSING_TIMER_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_MISSING_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_MISSING_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_MISSING_TIMER_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_MISSING_TIMER_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_MISSING_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
# Xdai
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing XDai block with transactions syncronizer service definition with ${XDAI_SYNCHRONIZE_SERVICE}"
|
echo -e "${PREFIX_INFO} Replacing existing XDai block with transactions syncronizer service definition with ${XDAI_SYNCHRONIZE_SERVICE}"
|
||||||
|
@ -269,6 +291,25 @@ cp "${SCRIPT_DIR}/${ZKSYNC_ERA_SEPOLIA_MISSING_TIMER_FILE}" "/home/ubuntu/.confi
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ZKSYNC_ERA_SEPOLIA_MISSING_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ZKSYNC_ERA_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
# Arbitrum one
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum one block with transactions syncronizer service definition with ${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum one missing service and timer with: ${ARBITRUM_ONE_MISSING_SERVICE_FILE}, ${ARBITRUM_ONE_MISSING_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${ARBITRUM_ONE_MISSING_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_MISSING_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_MISSING_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing Arbitrum Nova block with transactions syncronizer service definition with ${ARBITRUM_NOVA_SYNCHRONIZE_SERVICE}"
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum Nova block with transactions syncronizer service definition with ${ARBITRUM_NOVA_SYNCHRONIZE_SERVICE}"
|
||||||
|
@ -370,3 +411,57 @@ cp "${SCRIPT_DIR}/${AVALANCHE_FUJI_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/
|
||||||
cp "${SCRIPT_DIR}/${AVALANCHE_FUJI_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${AVALANCHE_FUJI_MISSING_TIMER_FILE}"
|
cp "${SCRIPT_DIR}/${AVALANCHE_FUJI_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${AVALANCHE_FUJI_MISSING_TIMER_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AVALANCHE_FUJI_MISSING_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AVALANCHE_FUJI_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
# Blast
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast block with transactions syncronizer service definition with ${BLAST_SYNCHRONIZE_SERVICE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_SYNCHRONIZE_SERVICE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${BLAST_SYNCHRONIZE_SERVICE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast missing service and timer with: ${BLAST_MISSING_SERVICE_FILE}, ${BLAST_MISSING_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${BLAST_MISSING_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_MISSING_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_MISSING_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
# Blast sepolia
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast sepolia block with transactions syncronizer service definition with ${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast sepolia missing service and timer with: ${BLAST_SEPOLIA_MISSING_SERVICE_FILE}, ${BLAST_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_SEPOLIA_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${BLAST_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SEPOLIA_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_SEPOLIA_MISSING_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SEPOLIA_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
# Proofofplay Apex
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex block with transactions syncronizer service definition with ${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex missing service and timer with: ${PROOFOFPLAY_APEX_MISSING_SERVICE_FILE}, ${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_MISSING_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}"
|
||||||
|
|
|
@ -36,11 +36,11 @@ POLYGON_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="polygon-historical-crawl-trans
|
||||||
POLYGON_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="polygon-historical-crawl-events.service"
|
POLYGON_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="polygon-historical-crawl-events.service"
|
||||||
POLYGON_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="polygon-historical-crawl-events.timer"
|
POLYGON_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="polygon-historical-crawl-events.timer"
|
||||||
|
|
||||||
# Mumbai service files
|
# Amoy service files
|
||||||
MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="mumbai-historical-crawl-transactions.service"
|
AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="amoy-historical-crawl-transactions.service"
|
||||||
MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="mumbai-historical-crawl-transactions.timer"
|
AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="amoy-historical-crawl-transactions.timer"
|
||||||
MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="mumbai-historical-crawl-events.service"
|
AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="amoy-historical-crawl-events.service"
|
||||||
MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="mumbai-historical-crawl-events.timer"
|
AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="amoy-historical-crawl-events.timer"
|
||||||
|
|
||||||
# XDai service files
|
# XDai service files
|
||||||
XDai_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="xdai-historical-crawl-transactions.service"
|
XDai_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="xdai-historical-crawl-transactions.service"
|
||||||
|
@ -60,6 +60,31 @@ ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="zksync-era-sepolia-
|
||||||
ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="zksync-era-sepolia-historical-crawl-events.service"
|
ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="zksync-era-sepolia-historical-crawl-events.service"
|
||||||
ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="zksync-era-sepolia-historical-crawl-events.timer"
|
ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="zksync-era-sepolia-historical-crawl-events.timer"
|
||||||
|
|
||||||
|
# Arbitrum one
|
||||||
|
ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="arbitrum-one-historical-crawl-transactions.service"
|
||||||
|
ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="arbitrum-one-historical-crawl-transactions.timer"
|
||||||
|
ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="arbitrum-one-historical-crawl-events.service"
|
||||||
|
ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="arbitrum-one-historical-crawl-events.timer"
|
||||||
|
|
||||||
|
# ProofofPlay APEX
|
||||||
|
PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="proofofplay-apex-historical-crawl-transactions.service"
|
||||||
|
PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="proofofplay-apex-historical-crawl-transactions.timer"
|
||||||
|
PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="proofofplay-apex-historical-crawl-events.service"
|
||||||
|
PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="proofofplay-apex-historical-crawl-events.timer"
|
||||||
|
|
||||||
|
# XAI
|
||||||
|
XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="xai-historical-crawl-transactions.service"
|
||||||
|
XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="xai-historical-crawl-transactions.timer"
|
||||||
|
XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="xai-historical-crawl-events.service"
|
||||||
|
XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="xai-historical-crawl-events.timer"
|
||||||
|
|
||||||
|
# XAI Sepolia
|
||||||
|
XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="xai-sepolia-historical-crawl-transactions.service"
|
||||||
|
XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="xai-sepolia-historical-crawl-transactions.timer"
|
||||||
|
XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="xai-sepolia-historical-crawl-events.service"
|
||||||
|
XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="xai-sepolia-historical-crawl-events.timer"
|
||||||
|
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -84,7 +109,7 @@ if [ ! -d "${SECRETS_DIR}" ]; then
|
||||||
mkdir -p "${SECRETS_DIR}"
|
mkdir -p "${SECRETS_DIR}"
|
||||||
echo -e "${PREFIX_WARN} Created new secrets directory"
|
echo -e "${PREFIX_WARN} Created new secrets directory"
|
||||||
fi
|
fi
|
||||||
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" CHECKENV_AWS_FETCH_LOOP_LIMIT=20 /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
||||||
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -137,21 +162,21 @@ XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${POLYGON_
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI historical transactions crawler service and timer with: ${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy historical transactions crawler service and timer with: ${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI historical events crawler service and timer with: ${MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy historical events crawler service and timer with: ${AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
@ -206,3 +231,75 @@ cp "${SCRIPT_DIR}/${ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/
|
||||||
cp "${SCRIPT_DIR}/${ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
cp "${SCRIPT_DIR}/${ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ZKSYNC_ERA_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex historical transactions crawler service and timer with: ${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex historical events crawler service and timer with: ${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum one historical transactions crawler service and timer with: ${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum one historical events crawler service and timer with: ${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing XAI historical transactions crawler service and timer with: ${XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing XAI historical events crawler service and timer with: ${XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing XAI Sepolia historical transactions crawler service and timer with: ${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing XAI Sepolia historical events crawler service and timer with: ${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
|
@ -27,16 +27,20 @@ SCRIPT_DIR="$(realpath $(dirname $0))"
|
||||||
# Service files
|
# Service files
|
||||||
ETHEREUM_MOONWORM_CRAWLER_SERVICE_FILE="ethereum-moonworm-crawler.service"
|
ETHEREUM_MOONWORM_CRAWLER_SERVICE_FILE="ethereum-moonworm-crawler.service"
|
||||||
POLYGON_MOONWORM_CRAWLER_SERVICE_FILE="polygon-moonworm-crawler.service"
|
POLYGON_MOONWORM_CRAWLER_SERVICE_FILE="polygon-moonworm-crawler.service"
|
||||||
MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE="mumbai-moonworm-crawler.service"
|
AMOY_MOONWORM_CRAWLER_SERVICE_FILE="amoy-moonworm-crawler.service"
|
||||||
XDAI_MOONWORM_CRAWLER_SERVICE_FILE="xdai-moonworm-crawler.service"
|
XDAI_MOONWORM_CRAWLER_SERVICE_FILE="xdai-moonworm-crawler.service"
|
||||||
ZKSYNC_ERA_MOONWORM_CRAWLER_SERVICE_FILE="zksync-era-moonworm-crawler.service"
|
ZKSYNC_ERA_MOONWORM_CRAWLER_SERVICE_FILE="zksync-era-moonworm-crawler.service"
|
||||||
ZKSYNC_ERA_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="zksync-era-sepolia-moonworm-crawler.service"
|
ZKSYNC_ERA_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="zksync-era-sepolia-moonworm-crawler.service"
|
||||||
|
ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE="arbitrum-one-moonworm-crawler.service"
|
||||||
ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE="arbitrum-nova-moonworm-crawler.service"
|
ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE="arbitrum-nova-moonworm-crawler.service"
|
||||||
ARBITRUM_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="arbitrum-sepolia-moonworm-crawler.service"
|
ARBITRUM_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="arbitrum-sepolia-moonworm-crawler.service"
|
||||||
XAI_MOONWORM_CRAWLER_SERVICE_FILE="xai-moonworm-crawler.service"
|
XAI_MOONWORM_CRAWLER_SERVICE_FILE="xai-moonworm-crawler.service"
|
||||||
XAI_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="xai-sepolia-moonworm-crawler.service"
|
XAI_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="xai-sepolia-moonworm-crawler.service"
|
||||||
AVALANCHE_MOONWORM_CRAWLER_SERVICE_FILE="avalanche-moonworm-crawler.service"
|
AVALANCHE_MOONWORM_CRAWLER_SERVICE_FILE="avalanche-moonworm-crawler.service"
|
||||||
AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE="avalanche-fuji-moonworm-crawler.service"
|
AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE="avalanche-fuji-moonworm-crawler.service"
|
||||||
|
BLAST_MOONWORM_CRAWLER_SERVICE_FILE="blast-moonworm-crawler.service"
|
||||||
|
BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="blast-sepolia-moonworm-crawler.service"
|
||||||
|
PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE="proofofplay-apex-moonworm-crawler.service"
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
@ -62,7 +66,7 @@ if [ ! -d "${SECRETS_DIR}" ]; then
|
||||||
mkdir -p "${SECRETS_DIR}"
|
mkdir -p "${SECRETS_DIR}"
|
||||||
echo -e "${PREFIX_WARN} Created new secrets directory"
|
echo -e "${PREFIX_WARN} Created new secrets directory"
|
||||||
fi
|
fi
|
||||||
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" CHECKENV_AWS_FETCH_LOOP_LIMIT=20 /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
||||||
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -95,11 +99,11 @@ XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${POLYGON_
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing Mumbai moonworm crawler service definition with ${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy moonworm crawler service definition with ${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
@ -125,6 +129,15 @@ cp "${SCRIPT_DIR}/${ZKSYNC_ERA_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ub
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ZKSYNC_ERA_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ZKSYNC_ERA_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum One moonworm crawler service definition with ${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing Arbitrum Nova moonworm crawler service definition with ${ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum Nova moonworm crawler service definition with ${ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
@ -172,3 +185,27 @@ chmod 644 "${SCRIPT_DIR}/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast moonworm crawler service definition with ${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast sepolia moonworm crawler service definition with ${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex moonworm crawler service definition with ${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
|
@ -40,14 +40,6 @@ POLYGON_STATE_CLEAN_TIMER_FILE="polygon-state-clean.timer"
|
||||||
POLYGON_METADATA_SERVICE_FILE="polygon-metadata.service"
|
POLYGON_METADATA_SERVICE_FILE="polygon-metadata.service"
|
||||||
POLYGON_METADATA_TIMER_FILE="polygon-metadata.timer"
|
POLYGON_METADATA_TIMER_FILE="polygon-metadata.timer"
|
||||||
|
|
||||||
# Mumbai service files
|
|
||||||
MUMBAI_STATE_SERVICE_FILE="mumbai-state.service"
|
|
||||||
MUMBAI_STATE_TIMER_FILE="mumbai-state.timer"
|
|
||||||
MUMBAI_STATE_CLEAN_SERVICE_FILE="mumbai-state-clean.service"
|
|
||||||
MUMBAI_STATE_CLEAN_TIMER_FILE="mumbai-state-clean.timer"
|
|
||||||
MUMBAI_METADATA_SERVICE_FILE="mumbai-metadata.service"
|
|
||||||
MUMBAI_METADATA_TIMER_FILE="mumbai-metadata.timer"
|
|
||||||
|
|
||||||
# ZkSync Era
|
# ZkSync Era
|
||||||
ZKSYNC_ERA_STATE_SERVICE_FILE="zksync-era-state.service"
|
ZKSYNC_ERA_STATE_SERVICE_FILE="zksync-era-state.service"
|
||||||
ZKSYNC_ERA_STATE_TIMER_FILE="zksync-era-state.timer"
|
ZKSYNC_ERA_STATE_TIMER_FILE="zksync-era-state.timer"
|
||||||
|
@ -78,7 +70,7 @@ if [ ! -d "${SECRETS_DIR}" ]; then
|
||||||
mkdir -p "${SECRETS_DIR}"
|
mkdir -p "${SECRETS_DIR}"
|
||||||
echo -e "${PREFIX_WARN} Created new secrets directory"
|
echo -e "${PREFIX_WARN} Created new secrets directory"
|
||||||
fi
|
fi
|
||||||
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" CHECKENV_AWS_FETCH_LOOP_LIMIT=20 /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
||||||
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -147,33 +139,6 @@ cp "${SCRIPT_DIR}/${POLYGON_METADATA_TIMER_FILE}" "/home/ubuntu/.config/systemd/
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${POLYGON_METADATA_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${POLYGON_METADATA_TIMER_FILE}"
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI state service and timer with: ${MUMBAI_STATE_SERVICE_FILE}, ${MUMBAI_STATE_TIMER_FILE}"
|
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_STATE_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_STATE_TIMER_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_STATE_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_STATE_SERVICE_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_STATE_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_STATE_TIMER_FILE}"
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_STATE_TIMER_FILE}"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI metadata service and timer with: ${MUMBAI_METADATA_SERVICE_FILE}, ${MUMBAI_METADATA_TIMER_FILE}"
|
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_METADATA_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_METADATA_TIMER_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_METADATA_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_METADATA_SERVICE_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_METADATA_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_METADATA_TIMER_FILE}"
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_METADATA_TIMER_FILE}"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI state clean service and timer with: ${MUMBAI_STATE_CLEAN_SERVICE_FILE}, ${MUMBAI_STATE_CLEAN_TIMER_FILE}"
|
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_STATE_CLEAN_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_STATE_CLEAN_TIMER_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_STATE_CLEAN_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_STATE_CLEAN_SERVICE_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_STATE_CLEAN_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_STATE_CLEAN_TIMER_FILE}"
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_STATE_CLEAN_TIMER_FILE}"
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing ZkSync Era state service and timer with: ${ZKSYNC_ERA_STATE_SERVICE_FILE}, ${ZKSYNC_ERA_STATE_TIMER_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing ZkSync Era state service and timer with: ${ZKSYNC_ERA_STATE_SERVICE_FILE}, ${ZKSYNC_ERA_STATE_TIMER_FILE}"
|
||||||
|
|
|
@ -65,21 +65,15 @@ POLYGON_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="polygon-historical-crawl-trans
|
||||||
POLYGON_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="polygon-historical-crawl-events.service"
|
POLYGON_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="polygon-historical-crawl-events.service"
|
||||||
POLYGON_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="polygon-historical-crawl-events.timer"
|
POLYGON_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="polygon-historical-crawl-events.timer"
|
||||||
|
|
||||||
# Mumbai service files
|
# Amoy
|
||||||
MUMBAI_SYNCHRONIZE_SERVICE="mumbai-synchronize.service"
|
AMOY_MISSING_SERVICE_FILE="amoy-missing.service"
|
||||||
MUMBAI_MISSING_SERVICE_FILE="mumbai-missing.service"
|
AMOY_MISSING_TIMER_FILE="amoy-missing.timer"
|
||||||
MUMBAI_MISSING_TIMER_FILE="mumbai-missing.timer"
|
AMOY_MOONWORM_CRAWLER_SERVICE_FILE="amoy-moonworm-crawler.service"
|
||||||
MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE="mumbai-moonworm-crawler.service"
|
AMOY_SYNCHRONIZE_SERVICE="amoy-synchronize.service"
|
||||||
MUMBAI_STATE_SERVICE_FILE="mumbai-state.service"
|
AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="amoy-historical-crawl-transactions.service"
|
||||||
MUMBAI_STATE_TIMER_FILE="mumbai-state.timer"
|
AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="amoy-historical-crawl-transactions.timer"
|
||||||
MUMBAI_STATE_CLEAN_SERVICE_FILE="mumbai-state-clean.service"
|
AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="amoy-historical-crawl-events.service"
|
||||||
MUMBAI_STATE_CLEAN_TIMER_FILE="mumbai-state-clean.timer"
|
AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="amoy-historical-crawl-events.timer"
|
||||||
MUMBAI_METADATA_SERVICE_FILE="mumbai-metadata.service"
|
|
||||||
MUMBAI_METADATA_TIMER_FILE="mumbai-metadata.timer"
|
|
||||||
MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="mumbai-historical-crawl-transactions.service"
|
|
||||||
MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="mumbai-historical-crawl-transactions.timer"
|
|
||||||
MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="mumbai-historical-crawl-events.service"
|
|
||||||
MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="mumbai-historical-crawl-events.timer"
|
|
||||||
|
|
||||||
# XDai service files
|
# XDai service files
|
||||||
XDAI_SYNCHRONIZE_SERVICE="xdai-synchronize.service"
|
XDAI_SYNCHRONIZE_SERVICE="xdai-synchronize.service"
|
||||||
|
@ -121,6 +115,16 @@ ARBITRUM_NOVA_MISSING_TIMER_FILE="arbitrum-nova-missing.timer"
|
||||||
ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE="arbitrum-nova-moonworm-crawler.service"
|
ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE="arbitrum-nova-moonworm-crawler.service"
|
||||||
ARBITRUM_NOVA_SYNCHRONIZE_SERVICE="arbitrum-nova-synchronize.service"
|
ARBITRUM_NOVA_SYNCHRONIZE_SERVICE="arbitrum-nova-synchronize.service"
|
||||||
|
|
||||||
|
# Arbitrum one
|
||||||
|
ARBITRUM_ONE_SYNCHRONIZE_SERVICE="arbitrum-one-synchronize.service"
|
||||||
|
ARBITRUM_ONE_MISSING_SERVICE_FILE="arbitrum-one-missing.service"
|
||||||
|
ARBITRUM_ONE_MISSING_TIMER_FILE="arbitrum-one-missing.timer"
|
||||||
|
ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE="arbitrum-one-moonworm-crawler.service"
|
||||||
|
ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="arbitrum-one-historical-crawl-transactions.service"
|
||||||
|
ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="arbitrum-one-historical-crawl-transactions.timer"
|
||||||
|
ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="arbitrum-one-historical-crawl-events.service"
|
||||||
|
ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="arbitrum-one-historical-crawl-events.timer"
|
||||||
|
|
||||||
# Arbitrum Sepolia
|
# Arbitrum Sepolia
|
||||||
ARBITRUM_SEPOLIA_MISSING_SERVICE_FILE="arbitrum-sepolia-missing.service"
|
ARBITRUM_SEPOLIA_MISSING_SERVICE_FILE="arbitrum-sepolia-missing.service"
|
||||||
ARBITRUM_SEPOLIA_MISSING_TIMER_FILE="arbitrum-sepolia-missing.timer"
|
ARBITRUM_SEPOLIA_MISSING_TIMER_FILE="arbitrum-sepolia-missing.timer"
|
||||||
|
@ -132,25 +136,57 @@ XAI_MISSING_SERVICE_FILE="xai-missing.service"
|
||||||
XAI_MISSING_TIMER_FILE="xai-missing.timer"
|
XAI_MISSING_TIMER_FILE="xai-missing.timer"
|
||||||
XAI_MOONWORM_CRAWLER_SERVICE_FILE="xai-moonworm-crawler.service"
|
XAI_MOONWORM_CRAWLER_SERVICE_FILE="xai-moonworm-crawler.service"
|
||||||
XAI_SYNCHRONIZE_SERVICE="xai-synchronize.service"
|
XAI_SYNCHRONIZE_SERVICE="xai-synchronize.service"
|
||||||
|
XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="xai-historical-crawl-events.service"
|
||||||
|
XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="xai-historical-crawl-events.timer"
|
||||||
|
XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="xai-historical-crawl-transactions.service"
|
||||||
|
XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="xai-historical-crawl-transactions.timer"
|
||||||
|
|
||||||
|
|
||||||
# Xai sepolia
|
# Xai sepolia
|
||||||
XAI_SEPOLIA_MISSING_SERVICE_FILE="xai-sepolia-missing.service"
|
XAI_SEPOLIA_MISSING_SERVICE_FILE="xai-sepolia-missing.service"
|
||||||
XAI_SEPOLIA_MISSING_TIMER_FILE="xai-sepolia-missing.timer"
|
XAI_SEPOLIA_MISSING_TIMER_FILE="xai-sepolia-missing.timer"
|
||||||
XAI_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="xai-sepolia-moonworm-crawler.service"
|
XAI_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="xai-sepolia-moonworm-crawler.service"
|
||||||
XAI_SEPOLIA_SYNCHRONIZE_SERVICE="xai-sepolia-synchronize.service"
|
XAI_SEPOLIA_SYNCHRONIZE_SERVICE="xai-sepolia-synchronize.service"
|
||||||
|
XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="xai-sepolia-historical-crawl-events.service"
|
||||||
|
XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="xai-sepolia-historical-crawl-events.timer"
|
||||||
|
XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="xai-sepolia-historical-crawl-transactions.service"
|
||||||
|
XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="xai-sepolia-historical-crawl-transactions.timer"
|
||||||
|
|
||||||
# Avalanche sepolia
|
# Avalanche
|
||||||
AVALANCHE_SYNCHRONIZE_SERVICE="avalanche-synchronize.service"
|
AVALANCHE_SYNCHRONIZE_SERVICE="avalanche-synchronize.service"
|
||||||
AVALANCHE_MISSING_SERVICE_FILE="avalanche-missing.service"
|
AVALANCHE_MISSING_SERVICE_FILE="avalanche-missing.service"
|
||||||
AVALANCHE_MISSING_TIMER_FILE="avalanche-missing.timer"
|
AVALANCHE_MISSING_TIMER_FILE="avalanche-missing.timer"
|
||||||
AVALANCHE_MOONWORM_CRAWLER_SERVICE_FILE="avalanche-moonworm-crawler.service"
|
AVALANCHE_MOONWORM_CRAWLER_SERVICE_FILE="avalanche-moonworm-crawler.service"
|
||||||
|
|
||||||
# Avalanche Fuji sepolia
|
# Avalanche Fuji
|
||||||
AVALANCHE_FUJI_SYNCHRONIZE_SERVICE="avalanche-fuji-synchronize.service"
|
AVALANCHE_FUJI_SYNCHRONIZE_SERVICE="avalanche-fuji-synchronize.service"
|
||||||
AVALANCHE_FUJI_MISSING_SERVICE_FILE="avalanche-fuji-missing.service"
|
AVALANCHE_FUJI_MISSING_SERVICE_FILE="avalanche-fuji-missing.service"
|
||||||
AVALANCHE_FUJI_MISSING_TIMER_FILE="avalanche-fuji-missing.timer"
|
AVALANCHE_FUJI_MISSING_TIMER_FILE="avalanche-fuji-missing.timer"
|
||||||
AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE="avalanche-fuji-moonworm-crawler.service"
|
AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE="avalanche-fuji-moonworm-crawler.service"
|
||||||
|
|
||||||
|
# Blast
|
||||||
|
BLAST_MISSING_SERVICE_FILE="blast-missing.service"
|
||||||
|
BLAST_MISSING_TIMER_FILE="blast-missing.timer"
|
||||||
|
BLAST_MOONWORM_CRAWLER_SERVICE_FILE="blast-moonworm-crawler.service"
|
||||||
|
BLAST_SYNCHRONIZE_SERVICE="blast-synchronize.service"
|
||||||
|
|
||||||
|
# Blast sepolia
|
||||||
|
BLAST_SEPOLIA_MISSING_SERVICE_FILE="blast-sepolia-missing.service"
|
||||||
|
BLAST_SEPOLIA_MISSING_TIMER_FILE="blast-sepolia-missing.timer"
|
||||||
|
BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE="blast-sepolia-moonworm-crawler.service"
|
||||||
|
BLAST_SEPOLIA_SYNCHRONIZE_SERVICE="blast-sepolia-synchronize.service"
|
||||||
|
|
||||||
|
# ProofofPlay APEX
|
||||||
|
PROOFOFPLAY_APEX_MISSING_SERVICE_FILE="proofofplay-apex-missing.service"
|
||||||
|
PROOFOFPLAY_APEX_MISSING_TIMER_FILE="proofofplay-apex-missing.timer"
|
||||||
|
PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE="proofofplay-apex-moonworm-crawler.service"
|
||||||
|
PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE="proofofplay-apex-synchronize.service"
|
||||||
|
PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE="proofofplay-apex-historical-crawl-transactions.service"
|
||||||
|
PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE="proofofplay-apex-historical-crawl-transactions.timer"
|
||||||
|
PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE="proofofplay-apex-historical-crawl-events.service"
|
||||||
|
PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE="proofofplay-apex-historical-crawl-events.timer"
|
||||||
|
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -175,7 +211,7 @@ if [ ! -d "${SECRETS_DIR}" ]; then
|
||||||
mkdir -p "${SECRETS_DIR}"
|
mkdir -p "${SECRETS_DIR}"
|
||||||
echo -e "${PREFIX_WARN} Created new secrets directory"
|
echo -e "${PREFIX_WARN} Created new secrets directory"
|
||||||
fi
|
fi
|
||||||
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" CHECKENV_AWS_FETCH_LOOP_LIMIT=20 /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
||||||
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
chmod 0640 "${PARAMETERS_ENV_PATH}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
@ -359,76 +395,51 @@ cp "${SCRIPT_DIR}/${POLYGON_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${POLYGON_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${POLYGON_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
|
# Amoy
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing Mumbai block with transactions syncronizer service definition with ${MUMBAI_SYNCHRONIZE_SERVICE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy block with transactions syncronizer service definition with ${AMOY_SYNCHRONIZE_SERVICE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_SYNCHRONIZE_SERVICE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_SYNCHRONIZE_SERVICE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_SYNCHRONIZE_SERVICE}"
|
cp "${SCRIPT_DIR}/${AMOY_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${AMOY_SYNCHRONIZE_SERVICE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_SYNCHRONIZE_SERVICE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing Mumbai missing service and timer with: ${MUMBAI_MISSING_SERVICE_FILE}, ${MUMBAI_MISSING_TIMER_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy missing service and timer with: ${AMOY_MISSING_SERVICE_FILE}, ${AMOY_MISSING_TIMER_FILE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_MISSING_TIMER_FILE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${AMOY_MISSING_TIMER_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_MISSING_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_MISSING_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_MISSING_TIMER_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_MISSING_TIMER_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_MISSING_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing Mumbai moonworm crawler service definition with ${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy moonworm crawler service definition with ${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI state service and timer with: ${MUMBAI_STATE_SERVICE_FILE}, ${MUMBAI_STATE_TIMER_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy historical transactions crawler service and timer with: ${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_STATE_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_STATE_TIMER_FILE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_STATE_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_STATE_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_STATE_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_STATE_TIMER_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_STATE_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI state clean service and timer with: ${MUMBAI_STATE_CLEAN_SERVICE_FILE}, ${MUMBAI_STATE_CLEAN_TIMER_FILE}"
|
echo -e "${PREFIX_INFO} Replacing existing Amoy historical events crawler service and timer with: ${AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_STATE_CLEAN_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_STATE_CLEAN_TIMER_FILE}"
|
chmod 644 "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_STATE_CLEAN_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_STATE_CLEAN_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_STATE_CLEAN_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_STATE_CLEAN_TIMER_FILE}"
|
cp "${SCRIPT_DIR}/${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_STATE_CLEAN_TIMER_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AMOY_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI metadata service and timer with: ${MUMBAI_METADATA_SERVICE_FILE}, ${MUMBAI_METADATA_TIMER_FILE}"
|
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_METADATA_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_METADATA_TIMER_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_METADATA_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_METADATA_SERVICE_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_METADATA_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_METADATA_TIMER_FILE}"
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_METADATA_TIMER_FILE}"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI historical transactions crawler service and timer with: ${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
echo -e "${PREFIX_INFO} Replacing existing MUMBAI historical events crawler service and timer with: ${MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
|
||||||
chmod 644 "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
|
||||||
cp "${SCRIPT_DIR}/${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${MUMBAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
|
||||||
|
|
||||||
|
# Xdai
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Replacing existing XDai block with transactions syncronizer service definition with ${XDAI_SYNCHRONIZE_SERVICE}"
|
echo -e "${PREFIX_INFO} Replacing existing XDai block with transactions syncronizer service definition with ${XDAI_SYNCHRONIZE_SERVICE}"
|
||||||
|
@ -614,6 +625,50 @@ cp "${SCRIPT_DIR}/${ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_NOVA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
# Arbitrum one
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum one block with transactions syncronizer service definition with ${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum one missing service and timer with: ${ARBITRUM_ONE_MISSING_SERVICE_FILE}, ${ARBITRUM_ONE_MISSING_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${ARBITRUM_ONE_MISSING_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_MISSING_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_MISSING_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum One moonworm crawler service definition with ${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum one historical transactions crawler service and timer with: ${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Arbitrum one historical events crawler service and timer with: ${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_ONE_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
|
|
||||||
# Arbitrum Sepolia
|
# Arbitrum Sepolia
|
||||||
echo
|
echo
|
||||||
|
@ -641,8 +696,6 @@ cp "${SCRIPT_DIR}/${ARBITRUM_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubun
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${ARBITRUM_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Xai
|
# Xai
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
@ -669,6 +722,25 @@ cp "${SCRIPT_DIR}/${XAI_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/sy
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Xai historical transactions crawler service and timer with: ${XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Xai historical events crawler service and timer with: ${XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Xai sepolia
|
# Xai sepolia
|
||||||
echo
|
echo
|
||||||
|
@ -696,6 +768,24 @@ cp "${SCRIPT_DIR}/${XAI_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.c
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Xai sepolia historical transactions crawler service and timer with: ${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_SEPOLIA_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Xai sepolia historical events crawler service and timer with: ${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${XAI_SEPOLIA_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
||||||
# Avalanche
|
# Avalanche
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
@ -747,3 +837,101 @@ chmod 644 "${SCRIPT_DIR}/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
cp "${SCRIPT_DIR}/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
cp "${SCRIPT_DIR}/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${AVALANCHE_FUJI_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
# Blast
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast block with transactions syncronizer service definition with ${BLAST_SYNCHRONIZE_SERVICE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_SYNCHRONIZE_SERVICE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${BLAST_SYNCHRONIZE_SERVICE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast missing service and timer with: ${BLAST_MISSING_SERVICE_FILE}, ${BLAST_MISSING_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${BLAST_MISSING_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_MISSING_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_MISSING_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast moonworm crawler service definition with ${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
# Blast sepolia
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast sepolia block with transactions syncronizer service definition with ${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_SEPOLIA_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast sepolia missing service and timer with: ${BLAST_SEPOLIA_MISSING_SERVICE_FILE}, ${BLAST_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_SEPOLIA_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${BLAST_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SEPOLIA_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_SEPOLIA_MISSING_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SEPOLIA_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_SEPOLIA_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Blast sepolia moonworm crawler service definition with ${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${BLAST_SEPOLIA_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
|
||||||
|
# Proofofplay Apex
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex block with transactions syncronizer service definition with ${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_SYNCHRONIZE_SERVICE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex missing service and timer with: ${PROOFOFPLAY_APEX_MISSING_SERVICE_FILE}, ${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MISSING_SERVICE_FILE}" "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MISSING_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_MISSING_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_MISSING_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex moonworm crawler service definition with ${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_MOONWORM_CRAWLER_SERVICE_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex historical transactions crawler service and timer with: ${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}, ${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_TRANSACTIONS_TIMER_FILE}"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
echo -e "${PREFIX_INFO} Replacing existing Proofofplay Apex historical events crawler service and timer with: ${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}, ${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
chmod 644 "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_SERVICE_FILE}"
|
||||||
|
cp "${SCRIPT_DIR}/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}" "/home/ubuntu/.config/systemd/user/${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user daemon-reload
|
||||||
|
XDG_RUNTIME_DIR="/run/user/1000" systemctl --user restart --no-block "${PROOFOFPLAY_APEX_HISTORICAL_CRAWL_EVENTS_TIMER_FILE}"
|
||||||
|
|
|
@ -9,7 +9,7 @@ Restart=on-failure
|
||||||
RestartSec=15s
|
RestartSec=15s
|
||||||
WorkingDirectory=/home/ubuntu/
|
WorkingDirectory=/home/ubuntu/
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/monitoring.env
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/monitoring.env
|
||||||
ExecStart=/home/ubuntu/monitoring -plugin systemd -host "${AWS_LOCAL_IPV4}" -port 7171 -healthcheck -server -threshold 3 -config /home/ubuntu/.monitoring/monitoring-crawlers-config.json -service ethereum-moonworm-crawler.service -service mumbai-moonworm-crawler.service -service polygon-moonworm-crawler.service -service zksync-era-moonworm-crawler.service -service zksync-era-sepolia-moonworm-crawler.service -service arbitrum-nova-moonworm-crawler.service -service arbitrum-sepolia-moonworm-crawler.service -service xai-moonworm-crawler.service -service xai-sepolia-moonworm-crawler.service
|
ExecStart=/home/ubuntu/monitoring -plugin systemd -host "${AWS_LOCAL_IPV4}" -port 7171 -healthcheck -server -threshold 3 -config /home/ubuntu/.monitoring/monitoring-crawlers-config.json -service ethereum-moonworm-crawler.service -service amoy-moonworm-crawler.service -service polygon-moonworm-crawler.service -service zksync-era-moonworm-crawler.service -service zksync-era-sepolia-moonworm-crawler.service -service arbitrum-nova-moonworm-crawler.service -service arbitrum-sepolia-moonworm-crawler.service -service xai-moonworm-crawler.service -service xai-sepolia-moonworm-crawler.service -service avalanche-moonworm-crawler.service -service avalanche-fuji-moonworm-crawler.service -service blast-moonworm-crawler.service -service blast-sepolia-moonworm-crawler.service -service proofofplay-apex-moonworm-crawler.service -service arbitrum-one-moonworm-crawler.service
|
||||||
CPUWeight=90
|
CPUWeight=90
|
||||||
SyslogIdentifier=monitoring-crawlers
|
SyslogIdentifier=monitoring-crawlers
|
||||||
|
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Execute metadata crawler
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
|
||||||
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.metadata_crawler.cli crawl --blockchain mumbai
|
|
||||||
CPUWeight=60
|
|
||||||
SyslogIdentifier=mumbai-metadata
|
|
|
@ -1,9 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Execute Mumbai metadata crawler each 10m
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnBootSec=20s
|
|
||||||
OnUnitActiveSec=60m
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=timers.target
|
|
|
@ -1,11 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Execute state clean labels crawler
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
|
||||||
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.state_crawler.cli clean-state-labels --blockchain mumbai -N 10000
|
|
||||||
CPUWeight=60
|
|
||||||
SyslogIdentifier=mumbai-state-clean
|
|
|
@ -1,9 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Execute Mumbai state clean labels crawler each 25m
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnBootSec=50s
|
|
||||||
OnUnitActiveSec=25m
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=timers.target
|
|
|
@ -1,11 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Execute state crawler
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=oneshot
|
|
||||||
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
|
||||||
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
|
||||||
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.state_crawler.cli crawl-jobs --moonstream-token "${MOONSTREAM_PUBLIC_QUERIES_DATA_ACCESS_TOKEN}" --blockchain mumbai --infura --jobs-file /home/ubuntu/moonstream/crawlers/mooncrawl/mooncrawl/state_crawler/jobs/mumbai-jobs.json
|
|
||||||
CPUWeight=60
|
|
||||||
SyslogIdentifier=mumbai-state
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ProofOfPlay historical crawler events
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type proofofplay_apex --find-deployed-blocks --end 0 --tasks-journal --only-events
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=proofofplay-apex-historical-crawl-events
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runs events historical crawler on proofofplay apex
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=60s
|
||||||
|
OnUnitActiveSec=10m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ProofOfPlay historical crawler transactions
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type proofofplay_apex --find-deployed-blocks --end 0 --tasks-journal --only-functions
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=proofofplay-apex-historical-crawl-transactions
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runs transactions historical crawler on proofofplay apex
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=60s
|
||||||
|
OnUnitActiveSec=10m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,11 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fill missing blocks at ProofOfPlay database
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks missing --blockchain proofofplay_apex -n
|
||||||
|
CPUWeight=50
|
||||||
|
SyslogIdentifier=proofofplay-apex-missing
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Fill missing blocks at ProofOfPlay database
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=120s
|
||||||
|
OnUnitActiveSec=15m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ProofOfPlay Apex moonworm crawler
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli crawl -b proofofplay_apex --confirmations 50 --min-blocks-batch 20
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=proofofplay-apex-moonworm-crawler
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=ProofOfPlay Apex block with transactions synchronizer
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.crawler blocks synchronize --blockchain proofofplay_apex --confirmations 40 --jobs 2
|
||||||
|
CPUWeight=90
|
||||||
|
SyslogIdentifier=proofofplay-apex-synchronize
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Xai historical crawler events
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type xai --find-deployed-blocks --end 0 --tasks-journal --only-events
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=xai-historical-crawl-events
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -1,8 +1,8 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Execute Mumbai state crawler each 10m
|
Description=Runs events historical crawler on xai
|
||||||
|
|
||||||
[Timer]
|
[Timer]
|
||||||
OnBootSec=15s
|
OnBootSec=60s
|
||||||
OnUnitActiveSec=10m
|
OnUnitActiveSec=10m
|
||||||
|
|
||||||
[Install]
|
[Install]
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Xai historical crawler transactions
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type xai --find-deployed-blocks --end 0 --tasks-journal --only-functions
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=xai-historical-crawl-transactions
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runs transactions historical crawler on xai
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=60s
|
||||||
|
OnUnitActiveSec=10m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Xai sepolia historical crawler events
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type xai_sepolia --find-deployed-blocks --end 0 --tasks-journal --only-events
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=xai-sepolia-historical-crawl-events
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runs events historical crawler on xai sepolia
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=60s
|
||||||
|
OnUnitActiveSec=10m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -0,0 +1,17 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Xai sepolia historical crawler transactions
|
||||||
|
After=network.target
|
||||||
|
StartLimitIntervalSec=300
|
||||||
|
StartLimitBurst=3
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/home/ubuntu/moonstream/crawlers/mooncrawl
|
||||||
|
EnvironmentFile=/home/ubuntu/moonstream-secrets/app.env
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=15s
|
||||||
|
ExecStart=/home/ubuntu/moonstream-env/bin/python -m mooncrawl.moonworm_crawler.cli historical-crawl --blockchain-type xai_sepolia --find-deployed-blocks --end 0 --tasks-journal --only-functions
|
||||||
|
CPUWeight=70
|
||||||
|
SyslogIdentifier=xai-sepolia-historical-crawl-transactions
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Runs transactions historical crawler on xai sepolia
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnBootSec=60s
|
||||||
|
OnUnitActiveSec=10m
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -22,13 +22,18 @@ from .data import DateRange
|
||||||
from .db import yield_db_session, yield_db_session_ctx
|
from .db import yield_db_session, yield_db_session_ctx
|
||||||
from .settings import (
|
from .settings import (
|
||||||
MOONSTREAM_CRAWL_WORKERS,
|
MOONSTREAM_CRAWL_WORKERS,
|
||||||
|
MOONSTREAM_NODE_AMOY_A_EXTERNAL_URI,
|
||||||
|
MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_ARBITRUM_NOVA_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_ARBITRUM_NOVA_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_AVALANCHE_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_AVALANCHE_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI,
|
||||||
|
MOONSTREAM_NODE_BLAST_A_EXTERNAL_URI,
|
||||||
|
MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI,
|
||||||
|
MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_XAI_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_XAI_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI,
|
||||||
MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI,
|
MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI,
|
||||||
|
@ -64,12 +69,16 @@ def connect(
|
||||||
web3_uri = MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI
|
web3_uri = MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI
|
||||||
elif blockchain_type == AvailableBlockchainType.MUMBAI:
|
elif blockchain_type == AvailableBlockchainType.MUMBAI:
|
||||||
web3_uri = MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI
|
web3_uri = MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI
|
||||||
|
elif blockchain_type == AvailableBlockchainType.AMOY:
|
||||||
|
web3_uri = MOONSTREAM_NODE_AMOY_A_EXTERNAL_URI
|
||||||
elif blockchain_type == AvailableBlockchainType.XDAI:
|
elif blockchain_type == AvailableBlockchainType.XDAI:
|
||||||
web3_uri = MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI
|
web3_uri = MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA:
|
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA:
|
||||||
web3_uri = MOONSTREAM_NODE_ZKSYNC_ERA_A_EXTERNAL_URI
|
web3_uri = MOONSTREAM_NODE_ZKSYNC_ERA_A_EXTERNAL_URI
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA:
|
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA:
|
||||||
web3_uri = MOONSTREAM_NODE_ZKSYNC_ERA_SEPOLIA_A_EXTERNAL_URI
|
web3_uri = MOONSTREAM_NODE_ZKSYNC_ERA_SEPOLIA_A_EXTERNAL_URI
|
||||||
|
elif blockchain_type == AvailableBlockchainType.ARBITRUM_ONE:
|
||||||
|
web3_uri = MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_NOVA:
|
elif blockchain_type == AvailableBlockchainType.ARBITRUM_NOVA:
|
||||||
web3_uri = MOONSTREAM_NODE_ARBITRUM_NOVA_A_EXTERNAL_URI
|
web3_uri = MOONSTREAM_NODE_ARBITRUM_NOVA_A_EXTERNAL_URI
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA:
|
elif blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA:
|
||||||
|
@ -82,6 +91,12 @@ def connect(
|
||||||
web3_uri = MOONSTREAM_NODE_AVALANCHE_A_EXTERNAL_URI
|
web3_uri = MOONSTREAM_NODE_AVALANCHE_A_EXTERNAL_URI
|
||||||
elif blockchain_type == AvailableBlockchainType.AVALANCHE_FUJI:
|
elif blockchain_type == AvailableBlockchainType.AVALANCHE_FUJI:
|
||||||
web3_uri = MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI
|
web3_uri = MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI
|
||||||
|
elif blockchain_type == AvailableBlockchainType.BLAST:
|
||||||
|
web3_uri = MOONSTREAM_NODE_BLAST_A_EXTERNAL_URI
|
||||||
|
elif blockchain_type == AvailableBlockchainType.BLAST_SEPOLIA:
|
||||||
|
web3_uri = MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI
|
||||||
|
elif blockchain_type == AvailableBlockchainType.PROOFOFPLAY_APEX:
|
||||||
|
web3_uri = MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI
|
||||||
else:
|
else:
|
||||||
raise Exception("Wrong blockchain type provided for web3 URI")
|
raise Exception("Wrong blockchain type provided for web3 URI")
|
||||||
|
|
||||||
|
@ -146,7 +161,7 @@ def add_block(db_session, block: Any, blockchain_type: AvailableBlockchainType)
|
||||||
)
|
)
|
||||||
if blockchain_type == AvailableBlockchainType.XDAI:
|
if blockchain_type == AvailableBlockchainType.XDAI:
|
||||||
block_obj.author = block.author
|
block_obj.author = block.author
|
||||||
if (
|
elif (
|
||||||
blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET
|
blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET
|
||||||
or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA
|
or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA
|
||||||
or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA
|
or blockchain_type == AvailableBlockchainType.ZKSYNC_ERA
|
||||||
|
@ -163,17 +178,18 @@ def add_block(db_session, block: Any, blockchain_type: AvailableBlockchainType)
|
||||||
if block.get("l1BatchTimestamp") is not None
|
if block.get("l1BatchTimestamp") is not None
|
||||||
else None
|
else None
|
||||||
)
|
)
|
||||||
if (
|
elif (
|
||||||
blockchain_type == AvailableBlockchainType.ARBITRUM_NOVA
|
blockchain_type == AvailableBlockchainType.ARBITRUM_NOVA
|
||||||
or blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA
|
or blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA
|
||||||
|
or blockchain_type == AvailableBlockchainType.PROOFOFPLAY_APEX
|
||||||
|
or blockchain_type == AvailableBlockchainType.ARBITRUM_ONE
|
||||||
):
|
):
|
||||||
block_obj.sha3_uncles = block.get("sha3Uncles", "")
|
block_obj.sha3_uncles = block.get("sha3Uncles", "")
|
||||||
block_obj.l1_block_number = hex_to_int(block.get("l1BlockNumber"))
|
block_obj.l1_block_number = hex_to_int(block.get("l1BlockNumber"))
|
||||||
block_obj.send_count = hex_to_int(block.get("sendCount"))
|
block_obj.send_count = hex_to_int(block.get("sendCount"))
|
||||||
block_obj.send_root = block.get("sendRoot", "")
|
block_obj.send_root = block.get("sendRoot", "")
|
||||||
block_obj.mix_hash = block.get("mixHash", "")
|
block_obj.mix_hash = block.get("mixHash", "")
|
||||||
|
elif (
|
||||||
if (
|
|
||||||
blockchain_type == AvailableBlockchainType.XAI
|
blockchain_type == AvailableBlockchainType.XAI
|
||||||
or blockchain_type == AvailableBlockchainType.XAI_SEPOLIA
|
or blockchain_type == AvailableBlockchainType.XAI_SEPOLIA
|
||||||
):
|
):
|
||||||
|
@ -182,8 +198,7 @@ def add_block(db_session, block: Any, blockchain_type: AvailableBlockchainType)
|
||||||
block_obj.send_count = hex_to_int(block.get("sendCount"))
|
block_obj.send_count = hex_to_int(block.get("sendCount"))
|
||||||
block_obj.send_root = block.get("sendRoot", "")
|
block_obj.send_root = block.get("sendRoot", "")
|
||||||
block_obj.mix_hash = block.get("mixHash", "")
|
block_obj.mix_hash = block.get("mixHash", "")
|
||||||
|
elif (
|
||||||
if (
|
|
||||||
blockchain_type == AvailableBlockchainType.AVALANCHE
|
blockchain_type == AvailableBlockchainType.AVALANCHE
|
||||||
or blockchain_type == AvailableBlockchainType.AVALANCHE_FUJI
|
or blockchain_type == AvailableBlockchainType.AVALANCHE_FUJI
|
||||||
):
|
):
|
||||||
|
@ -192,6 +207,13 @@ def add_block(db_session, block: Any, blockchain_type: AvailableBlockchainType)
|
||||||
block_obj.block_gas_cost = block.get("blockGasCost")
|
block_obj.block_gas_cost = block.get("blockGasCost")
|
||||||
block_obj.ext_data_gas_used = block.get("extDataGasUsed", "")
|
block_obj.ext_data_gas_used = block.get("extDataGasUsed", "")
|
||||||
block_obj.ext_data_hash = block.get("extDataHash", "")
|
block_obj.ext_data_hash = block.get("extDataHash", "")
|
||||||
|
elif (
|
||||||
|
blockchain_type == AvailableBlockchainType.BLAST
|
||||||
|
or blockchain_type == AvailableBlockchainType.BLAST_SEPOLIA
|
||||||
|
):
|
||||||
|
block_obj.sha3_uncles = block.get("sha3Uncles", "")
|
||||||
|
block_obj.mix_hash = block.get("mixHash", "")
|
||||||
|
block_obj.withdrawals_root = block.get("withdrawalsRoot", "")
|
||||||
|
|
||||||
db_session.add(block_obj)
|
db_session.add(block_obj)
|
||||||
|
|
||||||
|
@ -241,6 +263,8 @@ def add_block_transactions(
|
||||||
or blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA
|
or blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA
|
||||||
or blockchain_type == AvailableBlockchainType.XAI
|
or blockchain_type == AvailableBlockchainType.XAI
|
||||||
or blockchain_type == AvailableBlockchainType.XAI_SEPOLIA
|
or blockchain_type == AvailableBlockchainType.XAI_SEPOLIA
|
||||||
|
or blockchain_type == AvailableBlockchainType.PROOFOFPLAY_APEX
|
||||||
|
or blockchain_type == AvailableBlockchainType.ARBITRUM_ONE
|
||||||
):
|
):
|
||||||
tx_obj.y_parity = hex_to_int(tx.get("yParity"))
|
tx_obj.y_parity = hex_to_int(tx.get("yParity"))
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,11 @@ def crawl_uri(metadata_uri: str) -> Any:
|
||||||
metadata_uri = metadata_uri.replace(
|
metadata_uri = metadata_uri.replace(
|
||||||
"ipfs://", "https://ipfs.io/ipfs/", 1
|
"ipfs://", "https://ipfs.io/ipfs/", 1
|
||||||
)
|
)
|
||||||
|
req = urllib.request.Request(
|
||||||
|
metadata_uri, headers={"User-Agent": "Mozilla/5.0"}
|
||||||
|
)
|
||||||
|
|
||||||
response = urllib.request.urlopen(metadata_uri, timeout=10)
|
response = urllib.request.urlopen(req, timeout=10)
|
||||||
|
|
||||||
if (
|
if (
|
||||||
metadata_uri.startswith("data:application/json")
|
metadata_uri.startswith("data:application/json")
|
||||||
|
|
|
@ -4,6 +4,7 @@ from typing import Optional
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||||
|
from moonstreamdb.subscriptions import blockchain_type_to_subscription_type
|
||||||
from web3 import Web3
|
from web3 import Web3
|
||||||
from web3.middleware import geth_poa_middleware
|
from web3.middleware import geth_poa_middleware
|
||||||
|
|
||||||
|
@ -15,8 +16,6 @@ from ..settings import (
|
||||||
)
|
)
|
||||||
from .continuous_crawler import _retry_connect_web3, continuous_crawler
|
from .continuous_crawler import _retry_connect_web3, continuous_crawler
|
||||||
from .crawler import (
|
from .crawler import (
|
||||||
SubscriptionTypes,
|
|
||||||
blockchain_type_to_subscription_type,
|
|
||||||
find_all_deployed_blocks,
|
find_all_deployed_blocks,
|
||||||
get_crawl_job_entries,
|
get_crawl_job_entries,
|
||||||
make_event_crawl_jobs,
|
make_event_crawl_jobs,
|
||||||
|
|
|
@ -6,7 +6,8 @@ from typing import Dict, List, Optional, Tuple
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||||
from moonstreamdb.networks import Network
|
from moonstreamdb.networks import blockchain_type_to_network_type
|
||||||
|
from moonstreamdb.subscriptions import blockchain_type_to_subscription_type
|
||||||
from moonworm.crawler.moonstream_ethereum_state_provider import ( # type: ignore
|
from moonworm.crawler.moonstream_ethereum_state_provider import ( # type: ignore
|
||||||
MoonstreamEthereumStateProvider,
|
MoonstreamEthereumStateProvider,
|
||||||
)
|
)
|
||||||
|
@ -21,7 +22,6 @@ from .crawler import (
|
||||||
EventCrawlJob,
|
EventCrawlJob,
|
||||||
FunctionCallCrawlJob,
|
FunctionCallCrawlJob,
|
||||||
_retry_connect_web3,
|
_retry_connect_web3,
|
||||||
blockchain_type_to_subscription_type,
|
|
||||||
get_crawl_job_entries,
|
get_crawl_job_entries,
|
||||||
heartbeat,
|
heartbeat,
|
||||||
make_event_crawl_jobs,
|
make_event_crawl_jobs,
|
||||||
|
@ -124,36 +124,10 @@ def continuous_crawler(
|
||||||
if web3 is None:
|
if web3 is None:
|
||||||
web3 = _retry_connect_web3(blockchain_type, web3_uri=web3_uri)
|
web3 = _retry_connect_web3(blockchain_type, web3_uri=web3_uri)
|
||||||
|
|
||||||
if blockchain_type == AvailableBlockchainType.ETHEREUM:
|
try:
|
||||||
network = Network.ethereum
|
network = blockchain_type_to_network_type(blockchain_type=blockchain_type)
|
||||||
elif blockchain_type == AvailableBlockchainType.POLYGON:
|
except Exception as e:
|
||||||
network = Network.polygon
|
raise Exception(e)
|
||||||
elif blockchain_type == AvailableBlockchainType.MUMBAI:
|
|
||||||
network = Network.mumbai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XDAI:
|
|
||||||
network = Network.xdai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.WYRM:
|
|
||||||
network = Network.wyrm
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET:
|
|
||||||
network = Network.zksync_era_testnet
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA:
|
|
||||||
network = Network.zksync_era
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA:
|
|
||||||
network = Network.zksync_era_sepolia
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_NOVA:
|
|
||||||
network = Network.arbitrum_nova
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA:
|
|
||||||
network = Network.arbitrum_sepolia
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XAI:
|
|
||||||
network = Network.xai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XAI_SEPOLIA:
|
|
||||||
network = Network.xai_sepolia
|
|
||||||
elif blockchain_type == AvailableBlockchainType.AVALANCHE:
|
|
||||||
network = Network.avalanche
|
|
||||||
elif blockchain_type == AvailableBlockchainType.AVALANCHE_FUJI:
|
|
||||||
network = Network.avalanche_fuji
|
|
||||||
else:
|
|
||||||
raise ValueError(f"Unknown blockchain type: {blockchain_type}")
|
|
||||||
|
|
||||||
ethereum_state_provider = MoonstreamEthereumStateProvider(
|
ethereum_state_provider = MoonstreamEthereumStateProvider(
|
||||||
web3,
|
web3,
|
||||||
|
|
|
@ -11,6 +11,7 @@ from uuid import UUID
|
||||||
from bugout.data import BugoutJournalEntries, BugoutSearchResult
|
from bugout.data import BugoutJournalEntries, BugoutSearchResult
|
||||||
from eth_typing.evm import ChecksumAddress
|
from eth_typing.evm import ChecksumAddress
|
||||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||||
|
from moonstreamdb.subscriptions import SubscriptionTypes
|
||||||
from moonworm.deployment import find_deployment_block # type: ignore
|
from moonworm.deployment import find_deployment_block # type: ignore
|
||||||
from web3.main import Web3
|
from web3.main import Web3
|
||||||
|
|
||||||
|
@ -29,23 +30,6 @@ logging.basicConfig(level=logging.INFO)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class SubscriptionTypes(Enum):
|
|
||||||
POLYGON_BLOCKCHAIN = "polygon_smartcontract"
|
|
||||||
ETHEREUM_BLOCKCHAIN = "ethereum_smartcontract"
|
|
||||||
MUMBAI_BLOCKCHAIN = "mumbai_smartcontract"
|
|
||||||
XDAI_BLOCKCHAIN = "xdai_smartcontract"
|
|
||||||
WYRM_BLOCKCHAIN = "wyrm_smartcontract"
|
|
||||||
ZKSYNC_ERA_TESTNET_BLOCKCHAIN = "zksync_era_testnet_smartcontract"
|
|
||||||
ZKSYNC_ERA_BLOCKCHAIN = "zksync_era_smartcontract"
|
|
||||||
ZKSYNC_ERA_SEPOLIA_BLOCKCHAIN = "zksync_era_sepolia_smartcontract"
|
|
||||||
ARBITRUM_NOVA_BLOCKCHAIN = "arbitrum_nova_smartcontract"
|
|
||||||
ARBITRUM_SEPOLIA_BLOCKCHAIN = "arbitrum_sepolia_smartcontract"
|
|
||||||
XAI_BLOCKCHAIN = "xai_smartcontract"
|
|
||||||
XAI_SEPOLIA_BLOCKCHAIN = "xai_sepolia_smartcontract"
|
|
||||||
AVALANCHE_BLOCKCHAIN = "avalanche_smartcontract"
|
|
||||||
AVALANCHE_FUJI_BLOCKCHAIN = "avalanche_fuji_smartcontract"
|
|
||||||
|
|
||||||
|
|
||||||
def abi_input_signature(input_abi: Dict[str, Any]) -> str:
|
def abi_input_signature(input_abi: Dict[str, Any]) -> str:
|
||||||
"""
|
"""
|
||||||
Stringifies a function ABI input object according to the ABI specification:
|
Stringifies a function ABI input object according to the ABI specification:
|
||||||
|
@ -135,41 +119,6 @@ def _retry_connect_web3(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def blockchain_type_to_subscription_type(
|
|
||||||
blockchain_type: AvailableBlockchainType,
|
|
||||||
) -> SubscriptionTypes:
|
|
||||||
if blockchain_type == AvailableBlockchainType.ETHEREUM:
|
|
||||||
return SubscriptionTypes.ETHEREUM_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.POLYGON:
|
|
||||||
return SubscriptionTypes.POLYGON_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.MUMBAI:
|
|
||||||
return SubscriptionTypes.MUMBAI_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XDAI:
|
|
||||||
return SubscriptionTypes.XDAI_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.WYRM:
|
|
||||||
return SubscriptionTypes.WYRM_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET:
|
|
||||||
return SubscriptionTypes.ZKSYNC_ERA_TESTNET_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA:
|
|
||||||
return SubscriptionTypes.ZKSYNC_ERA_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_SEPOLIA:
|
|
||||||
return SubscriptionTypes.ZKSYNC_ERA_SEPOLIA_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_NOVA:
|
|
||||||
return SubscriptionTypes.ARBITRUM_NOVA_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA:
|
|
||||||
return SubscriptionTypes.ARBITRUM_SEPOLIA_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XAI:
|
|
||||||
return SubscriptionTypes.XAI_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XAI_SEPOLIA:
|
|
||||||
return SubscriptionTypes.XAI_SEPOLIA_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.AVALANCHE:
|
|
||||||
return SubscriptionTypes.AVALANCHE_BLOCKCHAIN
|
|
||||||
elif blockchain_type == AvailableBlockchainType.AVALANCHE_FUJI:
|
|
||||||
return SubscriptionTypes.AVALANCHE_FUJI_BLOCKCHAIN
|
|
||||||
else:
|
|
||||||
raise ValueError(f"Unknown blockchain type: {blockchain_type}")
|
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class EventCrawlJob:
|
class EventCrawlJob:
|
||||||
event_abi_hash: str
|
event_abi_hash: str
|
||||||
|
|
|
@ -2,7 +2,7 @@ import logging
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||||
from moonstreamdb.networks import Network # type: ignore
|
from moonstreamdb.networks import blockchain_type_to_network_type # type: ignore
|
||||||
from moonworm.crawler.function_call_crawler import ( # type: ignore
|
from moonworm.crawler.function_call_crawler import ( # type: ignore
|
||||||
ContractFunctionCall,
|
ContractFunctionCall,
|
||||||
FunctionCallCrawler,
|
FunctionCallCrawler,
|
||||||
|
@ -58,30 +58,10 @@ def function_call_crawler(
|
||||||
end_block: int,
|
end_block: int,
|
||||||
batch_size: int,
|
batch_size: int,
|
||||||
):
|
):
|
||||||
if blockchain_type == AvailableBlockchainType.ETHEREUM:
|
try:
|
||||||
network = Network.ethereum
|
network = blockchain_type_to_network_type(blockchain_type=blockchain_type)
|
||||||
elif blockchain_type == AvailableBlockchainType.POLYGON:
|
except Exception as e:
|
||||||
network = Network.polygon
|
raise Exception(e)
|
||||||
elif blockchain_type == AvailableBlockchainType.MUMBAI:
|
|
||||||
network = Network.mumbai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XDAI:
|
|
||||||
network = Network.xdai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.WYRM:
|
|
||||||
network = Network.wyrm
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET:
|
|
||||||
network = Network.zksync_era_testnet
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA:
|
|
||||||
network = Network.zksync_era
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_NOVA:
|
|
||||||
network = Network.arbitrum_nova
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA:
|
|
||||||
network = Network.arbitrum_sepolia
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XAI:
|
|
||||||
network = Network.xai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XAI_SEPOLIA:
|
|
||||||
network = Network.xai_sepolia
|
|
||||||
else:
|
|
||||||
raise ValueError(f"Unknown blockchain type: {blockchain_type}")
|
|
||||||
|
|
||||||
ethereum_state_provider = MoonstreamEthereumStateProvider(
|
ethereum_state_provider = MoonstreamEthereumStateProvider(
|
||||||
web3,
|
web3,
|
||||||
|
|
|
@ -5,7 +5,7 @@ from uuid import UUID
|
||||||
|
|
||||||
from eth_typing.evm import ChecksumAddress
|
from eth_typing.evm import ChecksumAddress
|
||||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||||
from moonstreamdb.networks import Network # type: ignore
|
from moonstreamdb.networks import blockchain_type_to_network_type # type: ignore
|
||||||
from moonworm.crawler.moonstream_ethereum_state_provider import ( # type: ignore
|
from moonworm.crawler.moonstream_ethereum_state_provider import ( # type: ignore
|
||||||
MoonstreamEthereumStateProvider,
|
MoonstreamEthereumStateProvider,
|
||||||
)
|
)
|
||||||
|
@ -52,30 +52,10 @@ def historical_crawler(
|
||||||
web3.eth.block_number >= start_block
|
web3.eth.block_number >= start_block
|
||||||
), "start_block must be less than current block"
|
), "start_block must be less than current block"
|
||||||
|
|
||||||
if blockchain_type == AvailableBlockchainType.ETHEREUM:
|
try:
|
||||||
network = Network.ethereum
|
network = blockchain_type_to_network_type(blockchain_type=blockchain_type)
|
||||||
elif blockchain_type == AvailableBlockchainType.POLYGON:
|
except Exception as e:
|
||||||
network = Network.polygon
|
raise Exception(e)
|
||||||
elif blockchain_type == AvailableBlockchainType.MUMBAI:
|
|
||||||
network = Network.mumbai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XDAI:
|
|
||||||
network = Network.xdai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.WYRM:
|
|
||||||
network = Network.wyrm
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA_TESTNET:
|
|
||||||
network = Network.zksync_era_testnet
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ZKSYNC_ERA:
|
|
||||||
network = Network.zksync_era
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_NOVA:
|
|
||||||
network = Network.arbitrum_nova
|
|
||||||
elif blockchain_type == AvailableBlockchainType.ARBITRUM_SEPOLIA:
|
|
||||||
network = Network.arbitrum_sepolia
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XAI:
|
|
||||||
network = Network.xai
|
|
||||||
elif blockchain_type == AvailableBlockchainType.XAI_SEPOLIA:
|
|
||||||
network = Network.xai_sepolia
|
|
||||||
else:
|
|
||||||
raise Exception("Unsupported blockchain type provided")
|
|
||||||
|
|
||||||
ethereum_state_provider = MoonstreamEthereumStateProvider(
|
ethereum_state_provider = MoonstreamEthereumStateProvider(
|
||||||
web3,
|
web3,
|
||||||
|
|
|
@ -486,51 +486,60 @@ def generate_report_nft_dashboard_handler(args: argparse.Namespace):
|
||||||
"cu_land_nft_dashboard_data",
|
"cu_land_nft_dashboard_data",
|
||||||
"cu_seaport_feed_polygon",
|
"cu_seaport_feed_polygon",
|
||||||
"cu_breeding_feed",
|
"cu_breeding_feed",
|
||||||
|
"cu_shadowcorns_owners",
|
||||||
|
"cu_shadowcorns_feed",
|
||||||
|
"cu_previous_day_distributed_rewards",
|
||||||
]:
|
]:
|
||||||
continue
|
continue
|
||||||
|
try:
|
||||||
|
logger.info(f"Generating report for {query.name}")
|
||||||
|
data = recive_S3_data_from_query(
|
||||||
|
client=client,
|
||||||
|
token=args.moonstream_token,
|
||||||
|
query_name=query.name,
|
||||||
|
params=params,
|
||||||
|
time_await=4,
|
||||||
|
)
|
||||||
|
|
||||||
logger.info(f"Generating report for {query.name}")
|
logger.info(f"Data recived. Uploading report for {query.name} as json")
|
||||||
data = recive_S3_data_from_query(
|
|
||||||
client=client,
|
|
||||||
token=args.moonstream_token,
|
|
||||||
query_name=query.name,
|
|
||||||
params=params,
|
|
||||||
time_await=4,
|
|
||||||
)
|
|
||||||
|
|
||||||
logger.info(f"Data recived. Uploading report for {query.name} as json")
|
# send as json
|
||||||
|
ext = "json"
|
||||||
|
|
||||||
# send as json
|
url = client.upload_query_results(
|
||||||
ext = "json"
|
json.dumps(data),
|
||||||
|
key=f"queries/{query.name}/data.{ext}",
|
||||||
|
bucket=MOONSTREAM_S3_PUBLIC_DATA_BUCKET,
|
||||||
|
)
|
||||||
|
|
||||||
url = client.upload_query_results(
|
logger.info(f"Report uploaded to {url}")
|
||||||
json.dumps(data),
|
|
||||||
key=f"queries/{query.name}/data.{ext}",
|
|
||||||
bucket=MOONSTREAM_S3_PUBLIC_DATA_BUCKET,
|
|
||||||
)
|
|
||||||
|
|
||||||
logger.info(f"Report uploaded to {url}")
|
logger.info(f"Data recived. Uploading report for {query.name} as csv")
|
||||||
|
|
||||||
logger.info(f"Data recived. Uploading report for {query.name} as csv")
|
ext = "csv"
|
||||||
|
csv_buffer = StringIO()
|
||||||
|
|
||||||
ext = "csv"
|
dict_csv_writer = csv.DictWriter(
|
||||||
csv_buffer = StringIO()
|
csv_buffer, fieldnames=data["data"][0].keys(), delimiter=","
|
||||||
|
)
|
||||||
|
|
||||||
dict_csv_writer = csv.DictWriter(
|
# upload to s3 bucket as csv
|
||||||
csv_buffer, fieldnames=data["data"][0].keys(), delimiter=","
|
dict_csv_writer.writeheader()
|
||||||
)
|
dict_csv_writer.writerows(data["data"])
|
||||||
|
|
||||||
# upload to s3 bucket as csv
|
url = client.upload_query_results(
|
||||||
dict_csv_writer.writeheader()
|
data=csv_buffer.getvalue().encode("utf-8"),
|
||||||
dict_csv_writer.writerows(data["data"])
|
key=f"queries/{query.name}/data.{ext}",
|
||||||
|
bucket=MOONSTREAM_S3_PUBLIC_DATA_BUCKET,
|
||||||
|
)
|
||||||
|
|
||||||
url = client.upload_query_results(
|
logger.info(f"Report uploaded to {url}")
|
||||||
data=csv_buffer.getvalue().encode("utf-8"),
|
logger.info(
|
||||||
key=f"queries/{query.name}/data.{ext}",
|
f"s3://{MOONSTREAM_S3_PUBLIC_DATA_BUCKET}/queries/{query.name}/data.{ext}"
|
||||||
bucket=MOONSTREAM_S3_PUBLIC_DATA_BUCKET,
|
)
|
||||||
)
|
except Exception as err:
|
||||||
|
logger.error(f"Error while generating report for {query.name}. {err}")
|
||||||
logger.info(f"Report uploaded to {url}")
|
continue
|
||||||
|
|
||||||
|
|
||||||
def run_tokenomics_orange_dao_handler(args: argparse.Namespace):
|
def run_tokenomics_orange_dao_handler(args: argparse.Namespace):
|
||||||
|
|
|
@ -96,6 +96,12 @@ MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI = os.environ.get(
|
||||||
if MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI == "":
|
if MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI == "":
|
||||||
raise Exception("MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI env variable is not set")
|
raise Exception("MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI env variable is not set")
|
||||||
|
|
||||||
|
MOONSTREAM_NODE_AMOY_A_EXTERNAL_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_NODE_AMOY_A_EXTERNAL_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_NODE_AMOY_A_EXTERNAL_URI == "":
|
||||||
|
raise Exception("MOONSTREAM_NODE_AMOY_A_EXTERNAL_URI env variable is not set")
|
||||||
|
|
||||||
MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI = os.environ.get(
|
MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI = os.environ.get(
|
||||||
"MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI", ""
|
"MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI", ""
|
||||||
)
|
)
|
||||||
|
@ -160,6 +166,37 @@ if MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI == "":
|
||||||
"MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI env variable is not set"
|
"MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI env variable is not set"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
MOONSTREAM_NODE_BLAST_A_EXTERNAL_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_NODE_BLAST_A_EXTERNAL_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_NODE_BLAST_A_EXTERNAL_URI == "":
|
||||||
|
raise Exception("MOONSTREAM_NODE_BLAST_A_EXTERNAL_URI env variable is not set")
|
||||||
|
|
||||||
|
MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI == "":
|
||||||
|
raise Exception(
|
||||||
|
"MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI env variable is not set"
|
||||||
|
)
|
||||||
|
|
||||||
|
MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI == "":
|
||||||
|
raise Exception(
|
||||||
|
"MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI env variable is not set"
|
||||||
|
)
|
||||||
|
|
||||||
|
MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI == "":
|
||||||
|
raise Exception(
|
||||||
|
"MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI env variable is not set"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
MOONSTREAM_CRAWL_WORKERS = 4
|
MOONSTREAM_CRAWL_WORKERS = 4
|
||||||
MOONSTREAM_CRAWL_WORKERS_RAW = os.environ.get("MOONSTREAM_CRAWL_WORKERS")
|
MOONSTREAM_CRAWL_WORKERS_RAW = os.environ.get("MOONSTREAM_CRAWL_WORKERS")
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -62,5 +62,36 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
|
"address": "0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "function",
|
||||||
|
"stateMutability": "view",
|
||||||
|
"inputs": [
|
||||||
|
{
|
||||||
|
"internalType": "uint256",
|
||||||
|
"name": "tokenId",
|
||||||
|
"type": "uint256",
|
||||||
|
"value": {
|
||||||
|
"type": "queryAPI",
|
||||||
|
"query_url": "template_erc721_minting",
|
||||||
|
"blockchain": "ethereum",
|
||||||
|
"params": {
|
||||||
|
"address": "0xd9F092BdF2b6eaF303fc09cc952e94253AE32fae"
|
||||||
|
},
|
||||||
|
"keys": [
|
||||||
|
"token_id"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "tokenURI",
|
||||||
|
"outputs": [
|
||||||
|
{
|
||||||
|
"internalType": "string",
|
||||||
|
"name": "",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"address": "0xd9F092BdF2b6eaF303fc09cc952e94253AE32fae"
|
||||||
}
|
}
|
||||||
]
|
]
|
|
@ -24,6 +24,10 @@ from moonstreamdb.blockchain import (
|
||||||
get_label_model,
|
get_label_model,
|
||||||
get_transaction_model,
|
get_transaction_model,
|
||||||
)
|
)
|
||||||
|
from moonstreamdb.subscriptions import (
|
||||||
|
blockchain_by_subscription_id,
|
||||||
|
subscription_id_by_blockchain,
|
||||||
|
)
|
||||||
from sqlalchemy import and_
|
from sqlalchemy import and_
|
||||||
from sqlalchemy import cast as sqlalchemy_cast
|
from sqlalchemy import cast as sqlalchemy_cast
|
||||||
from sqlalchemy import distinct, extract, func, text
|
from sqlalchemy import distinct, extract, func, text
|
||||||
|
@ -47,55 +51,6 @@ logging.basicConfig(level=logging.INFO)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
subscription_id_by_blockchain = {
|
|
||||||
"ethereum": "ethereum_smartcontract",
|
|
||||||
"polygon": "polygon_smartcontract",
|
|
||||||
"mumbai": "mumbai_smartcontract",
|
|
||||||
"xdai": "xdai_smartcontract",
|
|
||||||
"wyrm": "wyrm_smartcontract",
|
|
||||||
"zksync_era_testnet": "zksync_era_testnet_smartcontract",
|
|
||||||
"zksync_era": "zksync_era_smartcontract",
|
|
||||||
"zksync_era_sepolia": "zksync_era_sepolia_smartcontract",
|
|
||||||
"arbitrum_nova": "arbitrum_nova_smartcontract",
|
|
||||||
"arbitrum_sepolia": "arbitrum_sepolia_smartcontract",
|
|
||||||
"xai": "xai_smartcontract",
|
|
||||||
"xai_sepolia": "xai_sepolia_smartcontract",
|
|
||||||
"avalanche": "avalanche_smartcontract",
|
|
||||||
"avalanche_fuji": "avalanche_fuji_smartcontract",
|
|
||||||
}
|
|
||||||
|
|
||||||
blockchain_by_subscription_id = {
|
|
||||||
"ethereum_blockchain": "ethereum",
|
|
||||||
"polygon_blockchain": "polygon",
|
|
||||||
"mumbai_blockchain": "mumbai",
|
|
||||||
"xdai_blockchain": "xdai",
|
|
||||||
"wyrm_blockchain": "wyrm",
|
|
||||||
"zksync_era_testnet_blockchain": "zksync_era_testnet",
|
|
||||||
"zksync_era_blockchain": "zksync_era",
|
|
||||||
"zksync_era_sepolia_blockchain": "zksync_era_sepolia",
|
|
||||||
"arbitrum_nova_blockchain": "arbitrum_nova",
|
|
||||||
"arbitrum_sepolia_blockchain": "arbitrum_sepolia",
|
|
||||||
"xai_blockchain": "xai",
|
|
||||||
"xai_sepolia_blockchain": "xai_sepolia",
|
|
||||||
"avalanche_blockchain": "avalanche",
|
|
||||||
"avalanche_fuji_blockchain": "avalanche_fuji",
|
|
||||||
"ethereum_smartcontract": "ethereum",
|
|
||||||
"polygon_smartcontract": "polygon",
|
|
||||||
"mumbai_smartcontract": "mumbai",
|
|
||||||
"xdai_smartcontract": "xdai",
|
|
||||||
"wyrm_smartcontract": "wyrm",
|
|
||||||
"zksync_era_testnet_smartcontract": "zksync_era_testnet",
|
|
||||||
"zksync_era_smartcontract": "zksync_era",
|
|
||||||
"zksync_era_sepolia_smartcontract": "zksync_era_sepolia",
|
|
||||||
"arbitrum_nova_smartcontract": "arbitrum_nova",
|
|
||||||
"arbitrum_sepolia_smartcontract": "arbitrum_sepolia",
|
|
||||||
"xai_smartcontract": "xai",
|
|
||||||
"xai_sepolia_smartcontract": "xai_sepolia",
|
|
||||||
"avalanche_smartcontract": "avalanche",
|
|
||||||
"avalanche_fuji_smartcontract": "avalanche_fuji",
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class TimeScale(Enum):
|
class TimeScale(Enum):
|
||||||
# TODO(Andrey) Unlock when we be sure about perfomanse of agregation on transactions table.
|
# TODO(Andrey) Unlock when we be sure about perfomanse of agregation on transactions table.
|
||||||
# Right now it can be hungs
|
# Right now it can be hungs
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
Moonstream crawlers version.
|
Moonstream crawlers version.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
MOONCRAWL_VERSION = "0.4.2"
|
MOONCRAWL_VERSION = "0.4.5"
|
||||||
|
|
|
@ -11,3 +11,6 @@ ignore_missing_imports = True
|
||||||
|
|
||||||
[mypy-tqdm.*]
|
[mypy-tqdm.*]
|
||||||
ignore_missing_imports = True
|
ignore_missing_imports = True
|
||||||
|
|
||||||
|
[mypy-moonworm.*]
|
||||||
|
ignore_missing_imports = True
|
||||||
|
|
|
@ -23,16 +23,21 @@ export NFT_HUMBUG_TOKEN="<Token_for_nft_crawler>"
|
||||||
# Blockchain nodes environment variables
|
# Blockchain nodes environment variables
|
||||||
export MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_ETHEREUM_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_POLYGON_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_NODE_PROOFOFPLAY_APEX_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_MUMBAI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_NODE_AMOY_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_XDAI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_ZKSYNC_ERA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_ZKSYNC_ERA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_ZKSYNC_ERA_SEPOLIA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_ZKSYNC_ERA_SEPOLIA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_NODE_ARBITRUM_ONE_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_ARBITRUM_NOVA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_ARBITRUM_NOVA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_ARBITRUM_SEPOLIA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_XAI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_XAI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_XAI_SEPOLIA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_AVALANCHE_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_AVALANCHE_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
export MOONSTREAM_NODE_AVALANCHE_FUJI_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_NODE_BLAST_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_NODE_BLAST_SEPOLIA_A_EXTERNAL_URI="https://<connection_path_uri_to_node>"
|
||||||
|
|
||||||
# AWS environment variables
|
# AWS environment variables
|
||||||
export MOONSTREAM_S3_SMARTCONTRACTS_BUCKET="<AWS_S3_bucket_for_smart_contracts>"
|
export MOONSTREAM_S3_SMARTCONTRACTS_BUCKET="<AWS_S3_bucket_for_smart_contracts>"
|
||||||
|
|
|
@ -37,7 +37,7 @@ setup(
|
||||||
"bugout>=0.2.13",
|
"bugout>=0.2.13",
|
||||||
"chardet",
|
"chardet",
|
||||||
"fastapi",
|
"fastapi",
|
||||||
"moonstreamdb>=0.3.11",
|
"moonstreamdb>=0.4.4",
|
||||||
"moonstream>=0.1.1",
|
"moonstream>=0.1.1",
|
||||||
"moonworm[moonstream]>=0.6.2",
|
"moonworm[moonstream]>=0.6.2",
|
||||||
"humbug",
|
"humbug",
|
||||||
|
|
|
@ -3,9 +3,9 @@ import json
|
||||||
import logging
|
import logging
|
||||||
import uuid
|
import uuid
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
from typing import Any, Dict, List, Optional, Tuple
|
from typing import Any, Dict, List, Optional, Set, Tuple
|
||||||
|
|
||||||
from sqlalchemy import func, or_, text
|
from sqlalchemy import func, or_, text, tuple_
|
||||||
from sqlalchemy.dialects.postgresql import insert
|
from sqlalchemy.dialects.postgresql import insert
|
||||||
from sqlalchemy.engine import Row
|
from sqlalchemy.engine import Row
|
||||||
from sqlalchemy.exc import IntegrityError, NoResultFound
|
from sqlalchemy.exc import IntegrityError, NoResultFound
|
||||||
|
@ -71,6 +71,12 @@ class CallRequestAlreadyRegistered(Exception):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
class CallRequestIdDuplicates(Exception):
|
||||||
|
"""
|
||||||
|
Raised when same call request IDs passed in one request.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
def parse_registered_contract_response(
|
def parse_registered_contract_response(
|
||||||
obj: Tuple[RegisteredContract, Blockchain]
|
obj: Tuple[RegisteredContract, Blockchain]
|
||||||
) -> data.RegisteredContractResponse:
|
) -> data.RegisteredContractResponse:
|
||||||
|
@ -431,6 +437,38 @@ def create_request_calls(
|
||||||
return len(call_specs)
|
return len(call_specs)
|
||||||
|
|
||||||
|
|
||||||
|
def get_call_request_from_tuple(
|
||||||
|
db_session: Session,
|
||||||
|
metatx_requester_id: uuid.UUID,
|
||||||
|
requests: Set[Tuple[str, str]],
|
||||||
|
contract_id: Optional[uuid.UUID] = None,
|
||||||
|
contract_address: Optional[str] = None,
|
||||||
|
) -> List[CallRequest]:
|
||||||
|
if contract_id is None and contract_address is None:
|
||||||
|
raise ValueError(
|
||||||
|
"At least one of contract_id or contract_address must be specified"
|
||||||
|
)
|
||||||
|
query = (
|
||||||
|
db_session.query(CallRequest)
|
||||||
|
.join(
|
||||||
|
RegisteredContract,
|
||||||
|
CallRequest.registered_contract_id == RegisteredContract.id,
|
||||||
|
)
|
||||||
|
.filter(RegisteredContract.metatx_requester_id == metatx_requester_id)
|
||||||
|
.filter(tuple_(CallRequest.caller, CallRequest.request_id).in_(requests))
|
||||||
|
)
|
||||||
|
if contract_id is not None:
|
||||||
|
query = query.filter(RegisteredContract.id == contract_id)
|
||||||
|
if contract_address is not None:
|
||||||
|
query = query.filter(
|
||||||
|
RegisteredContract.address == Web3.toChecksumAddress(contract_address)
|
||||||
|
)
|
||||||
|
|
||||||
|
existing_requests = query.all()
|
||||||
|
|
||||||
|
return existing_requests
|
||||||
|
|
||||||
|
|
||||||
def get_call_request(
|
def get_call_request(
|
||||||
db_session: Session,
|
db_session: Session,
|
||||||
request_id: uuid.UUID,
|
request_id: uuid.UUID,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
from typing import Any, Dict, List, Optional, Set
|
from typing import Any, Dict, List, Optional, Set, Tuple
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from bugout.data import BugoutResource
|
from bugout.data import BugoutResource
|
||||||
|
@ -329,6 +329,10 @@ class CallRequestResponse(BaseModel):
|
||||||
return Web3.toChecksumAddress(v)
|
return Web3.toChecksumAddress(v)
|
||||||
|
|
||||||
|
|
||||||
|
class CallRequestsCheck(BaseModel):
|
||||||
|
existing_requests: Set[Tuple[str, str]] = Field(default_factory=set)
|
||||||
|
|
||||||
|
|
||||||
class CompleteCallRequestsAPIRequest(BaseModel):
|
class CompleteCallRequestsAPIRequest(BaseModel):
|
||||||
tx_hash: str
|
tx_hash: str
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ async def leaderboard(
|
||||||
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
||||||
limit: int = Query(10),
|
limit: int = Query(10),
|
||||||
offset: int = Query(0),
|
offset: int = Query(0),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
version: Optional[str] = Query(None, description="Version of the leaderboard."),
|
version: Optional[str] = Query(None, description="Version of the leaderboard."),
|
||||||
points_data: Dict[str, str] = Depends(points_data_dependency),
|
points_data: Dict[str, str] = Depends(points_data_dependency),
|
||||||
) -> List[data.LeaderboardPosition]:
|
) -> List[data.LeaderboardPosition]:
|
||||||
|
@ -348,7 +348,7 @@ async def delete_leaderboard(
|
||||||
)
|
)
|
||||||
async def get_leaderboards(
|
async def get_leaderboards(
|
||||||
request: Request,
|
request: Request,
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
Authorization: str = AuthHeader,
|
Authorization: str = AuthHeader,
|
||||||
) -> List[data.Leaderboard]:
|
) -> List[data.Leaderboard]:
|
||||||
"""
|
"""
|
||||||
|
@ -394,7 +394,7 @@ async def get_leaderboards(
|
||||||
async def count_addresses(
|
async def count_addresses(
|
||||||
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
||||||
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
) -> data.CountAddressesResponse:
|
) -> data.CountAddressesResponse:
|
||||||
"""
|
"""
|
||||||
Returns the number of addresses in the leaderboard.
|
Returns the number of addresses in the leaderboard.
|
||||||
|
@ -422,7 +422,7 @@ async def count_addresses(
|
||||||
)
|
)
|
||||||
async def leadeboard_info(
|
async def leadeboard_info(
|
||||||
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
||||||
) -> data.LeaderboardInfoResponse:
|
) -> data.LeaderboardInfoResponse:
|
||||||
"""
|
"""
|
||||||
|
@ -455,7 +455,7 @@ async def leadeboard_info(
|
||||||
)
|
)
|
||||||
async def get_scores_changes(
|
async def get_scores_changes(
|
||||||
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
) -> List[data.LeaderboardScoresChangesResponse]:
|
) -> List[data.LeaderboardScoresChangesResponse]:
|
||||||
"""
|
"""
|
||||||
Returns the score history for the given address.
|
Returns the score history for the given address.
|
||||||
|
@ -482,7 +482,7 @@ async def get_scores_changes(
|
||||||
@app.get("/quartiles", response_model=data.QuartilesResponse, tags=["Public Endpoints"])
|
@app.get("/quartiles", response_model=data.QuartilesResponse, tags=["Public Endpoints"])
|
||||||
async def quartiles(
|
async def quartiles(
|
||||||
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
||||||
) -> data.QuartilesResponse:
|
) -> data.QuartilesResponse:
|
||||||
"""
|
"""
|
||||||
|
@ -533,7 +533,7 @@ async def position(
|
||||||
True, description="Normalize addresses to checksum."
|
True, description="Normalize addresses to checksum."
|
||||||
),
|
),
|
||||||
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
) -> List[data.LeaderboardPosition]:
|
) -> List[data.LeaderboardPosition]:
|
||||||
"""
|
"""
|
||||||
Returns the leaderboard posotion for the given address.
|
Returns the leaderboard posotion for the given address.
|
||||||
|
@ -589,7 +589,7 @@ async def rank(
|
||||||
limit: Optional[int] = Query(None),
|
limit: Optional[int] = Query(None),
|
||||||
offset: Optional[int] = Query(None),
|
offset: Optional[int] = Query(None),
|
||||||
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
) -> List[data.LeaderboardPosition]:
|
) -> List[data.LeaderboardPosition]:
|
||||||
"""
|
"""
|
||||||
Returns the leaderboard scores for the given rank.
|
Returns the leaderboard scores for the given rank.
|
||||||
|
@ -632,7 +632,7 @@ async def rank(
|
||||||
async def ranks(
|
async def ranks(
|
||||||
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Query(..., description="Leaderboard ID"),
|
||||||
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
version: Optional[int] = Query(None, description="Version of the leaderboard."),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
) -> List[data.RanksResponse]:
|
) -> List[data.RanksResponse]:
|
||||||
"""
|
"""
|
||||||
Returns the leaderboard rank buckets overview with score and size of bucket.
|
Returns the leaderboard rank buckets overview with score and size of bucket.
|
||||||
|
@ -674,7 +674,7 @@ async def leaderboard_score(
|
||||||
normalize_addresses: bool = Query(
|
normalize_addresses: bool = Query(
|
||||||
True, description="Normalize addresses to checksum."
|
True, description="Normalize addresses to checksum."
|
||||||
),
|
),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
) -> data.LeaderboardScore:
|
) -> data.LeaderboardScore:
|
||||||
"""
|
"""
|
||||||
Returns the leaderboard posotion for the given address.
|
Returns the leaderboard posotion for the given address.
|
||||||
|
@ -825,7 +825,7 @@ async def leaderboard_push_scores(
|
||||||
async def leaderboard_config(
|
async def leaderboard_config(
|
||||||
request: Request,
|
request: Request,
|
||||||
leaderboard_id: UUID = Path(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Path(..., description="Leaderboard ID"),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
Authorization: str = AuthHeader,
|
Authorization: str = AuthHeader,
|
||||||
) -> data.LeaderboardConfig:
|
) -> data.LeaderboardConfig:
|
||||||
"""
|
"""
|
||||||
|
@ -1037,7 +1037,7 @@ async def leaderboard_config_deactivate(
|
||||||
async def leaderboard_versions_list(
|
async def leaderboard_versions_list(
|
||||||
request: Request,
|
request: Request,
|
||||||
leaderboard_id: UUID = Path(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Path(..., description="Leaderboard ID"),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
Authorization: str = AuthHeader,
|
Authorization: str = AuthHeader,
|
||||||
) -> List[data.LeaderboardVersion]:
|
) -> List[data.LeaderboardVersion]:
|
||||||
"""
|
"""
|
||||||
|
@ -1093,7 +1093,7 @@ async def leaderboard_version_handler(
|
||||||
request: Request,
|
request: Request,
|
||||||
leaderboard_id: UUID = Path(..., description="Leaderboard ID"),
|
leaderboard_id: UUID = Path(..., description="Leaderboard ID"),
|
||||||
version: int = Path(..., description="Version of the leaderboard."),
|
version: int = Path(..., description="Version of the leaderboard."),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
Authorization: str = AuthHeader,
|
Authorization: str = AuthHeader,
|
||||||
) -> data.LeaderboardVersion:
|
) -> data.LeaderboardVersion:
|
||||||
"""
|
"""
|
||||||
|
@ -1319,7 +1319,7 @@ async def leaderboard_version_scores_handler(
|
||||||
version: int = Path(..., description="Version of the leaderboard."),
|
version: int = Path(..., description="Version of the leaderboard."),
|
||||||
limit: int = Query(10),
|
limit: int = Query(10),
|
||||||
offset: int = Query(0),
|
offset: int = Query(0),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_read_only_session),
|
||||||
Authorization: str = AuthHeader,
|
Authorization: str = AuthHeader,
|
||||||
) -> List[data.LeaderboardPosition]:
|
) -> List[data.LeaderboardPosition]:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -5,14 +5,16 @@ Moonstream users can register contracts on Moonstream Engine. This allows them t
|
||||||
as part of their chain-adjacent activities (like performing signature-based token distributions on the
|
as part of their chain-adjacent activities (like performing signature-based token distributions on the
|
||||||
Dropper contract).
|
Dropper contract).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Dict, List, Optional
|
from typing import Dict, List, Optional, Set, Tuple
|
||||||
from uuid import UUID
|
from uuid import UUID
|
||||||
|
|
||||||
from bugout.data import BugoutUser
|
from bugout.data import BugoutUser
|
||||||
from fastapi import Body, Depends, FastAPI, Form, Path, Query, Request
|
from fastapi import Body, Depends, FastAPI, Form, Path, Query, Request
|
||||||
from sqlalchemy.exc import NoResultFound
|
from sqlalchemy.exc import NoResultFound
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
from web3 import Web3
|
||||||
|
|
||||||
from .. import contracts_actions, data, db
|
from .. import contracts_actions, data, db
|
||||||
from ..middleware import (
|
from ..middleware import (
|
||||||
|
@ -316,6 +318,57 @@ async def list_requests_route(
|
||||||
return [contracts_actions.parse_call_request_response(r) for r in requests]
|
return [contracts_actions.parse_call_request_response(r) for r in requests]
|
||||||
|
|
||||||
|
|
||||||
|
@app.get(
|
||||||
|
"/requests/check",
|
||||||
|
response_model=data.CallRequestsCheck,
|
||||||
|
)
|
||||||
|
async def check_requests_route(
|
||||||
|
request_data: data.CreateCallRequestsAPIRequest = Body(...),
|
||||||
|
user: BugoutUser = Depends(request_user_auth),
|
||||||
|
db_session: Session = Depends(db.yield_db_session),
|
||||||
|
) -> data.CallRequestsCheck:
|
||||||
|
"""
|
||||||
|
Implemented for pre-check until list of requests to be pushed into database.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
incoming_requests: Set[Tuple[str, str]] = set()
|
||||||
|
incoming_request_ids: List[str] = []
|
||||||
|
for r in request_data.specifications:
|
||||||
|
caller_addr = Web3.toChecksumAddress(r.caller)
|
||||||
|
incoming_requests.add((caller_addr, r.request_id))
|
||||||
|
incoming_request_ids.append(r.request_id)
|
||||||
|
|
||||||
|
if len(incoming_requests) != len(incoming_request_ids):
|
||||||
|
raise contracts_actions.CallRequestIdDuplicates(
|
||||||
|
"There are same call_request_id's in one request"
|
||||||
|
)
|
||||||
|
|
||||||
|
existing_requests = contracts_actions.get_call_request_from_tuple(
|
||||||
|
db_session=db_session,
|
||||||
|
metatx_requester_id=user.id,
|
||||||
|
requests=incoming_requests,
|
||||||
|
contract_id=request_data.contract_id,
|
||||||
|
contract_address=request_data.contract_address,
|
||||||
|
)
|
||||||
|
except contracts_actions.CallRequestIdDuplicates:
|
||||||
|
raise EngineHTTPException(
|
||||||
|
status_code=400, detail="There are same call_request_id's in one request"
|
||||||
|
)
|
||||||
|
except Exception as err:
|
||||||
|
logger.error(repr(err))
|
||||||
|
raise EngineHTTPException(status_code=500)
|
||||||
|
|
||||||
|
existing_requests_set: Set[Tuple[str, str]] = set()
|
||||||
|
if len(existing_requests) != 0:
|
||||||
|
existing_requests_set = {
|
||||||
|
(er.caller, str(er.request_id)) for er in existing_requests
|
||||||
|
}
|
||||||
|
|
||||||
|
return data.CallRequestsCheck(
|
||||||
|
existing_requests=existing_requests_set,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@app.get(
|
@app.get(
|
||||||
"/requests/{request_id}", tags=["requests"], response_model=data.CallRequestResponse
|
"/requests/{request_id}", tags=["requests"], response_model=data.CallRequestResponse
|
||||||
)
|
)
|
||||||
|
@ -348,7 +401,7 @@ async def get_request(
|
||||||
|
|
||||||
@app.post("/requests", tags=["requests"], response_model=int)
|
@app.post("/requests", tags=["requests"], response_model=int)
|
||||||
async def create_requests(
|
async def create_requests(
|
||||||
data: data.CreateCallRequestsAPIRequest = Body(...),
|
request_data: data.CreateCallRequestsAPIRequest = Body(...),
|
||||||
user: BugoutUser = Depends(request_user_auth),
|
user: BugoutUser = Depends(request_user_auth),
|
||||||
db_session: Session = Depends(db.yield_db_session),
|
db_session: Session = Depends(db.yield_db_session),
|
||||||
) -> int:
|
) -> int:
|
||||||
|
@ -361,11 +414,11 @@ async def create_requests(
|
||||||
num_requests = contracts_actions.create_request_calls(
|
num_requests = contracts_actions.create_request_calls(
|
||||||
db_session=db_session,
|
db_session=db_session,
|
||||||
metatx_requester_id=user.id,
|
metatx_requester_id=user.id,
|
||||||
registered_contract_id=data.contract_id,
|
registered_contract_id=request_data.contract_id,
|
||||||
contract_address=data.contract_address,
|
contract_address=request_data.contract_address,
|
||||||
call_specs=data.specifications,
|
call_specs=request_data.specifications,
|
||||||
ttl_days=data.ttl_days,
|
ttl_days=request_data.ttl_days,
|
||||||
live_at=data.live_at,
|
live_at=request_data.live_at,
|
||||||
)
|
)
|
||||||
except contracts_actions.InvalidAddressFormat as err:
|
except contracts_actions.InvalidAddressFormat as err:
|
||||||
raise EngineHTTPException(
|
raise EngineHTTPException(
|
||||||
|
|
|
@ -87,46 +87,44 @@ MOONSTREAM_AWS_SIGNER_INSTANCE_PORT = 17181
|
||||||
|
|
||||||
# Blockchain configuration
|
# Blockchain configuration
|
||||||
|
|
||||||
MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI = os.environ.get(
|
|
||||||
"MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI"
|
|
||||||
)
|
|
||||||
MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI = os.environ.get(
|
|
||||||
"MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI"
|
|
||||||
)
|
|
||||||
MOONSTREAM_POLYGON_WEB3_PROVIDER_URI = os.environ.get(
|
|
||||||
"MOONSTREAM_POLYGON_WEB3_PROVIDER_URI"
|
|
||||||
)
|
|
||||||
MOONSTREAM_XDAI_WEB3_PROVIDER_URI = os.environ.get("MOONSTREAM_XDAI_WEB3_PROVIDER_URI")
|
|
||||||
|
|
||||||
# TODO(kompotkot): Leave a comment here explaining templated *_WEB3_PROVIDER_URI when we set
|
|
||||||
# NODEBALANCER_ACCESS_ID
|
|
||||||
ETHEREUM_PROVIDER_URI = MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI
|
|
||||||
MUMBAI_PROVIDER_URI = MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI
|
|
||||||
POLYGON_PROVIDER_URI = MOONSTREAM_POLYGON_WEB3_PROVIDER_URI
|
|
||||||
XDAI_PROVIDER_URI = MOONSTREAM_XDAI_WEB3_PROVIDER_URI
|
|
||||||
|
|
||||||
NODEBALANCER_ACCESS_ID = os.environ.get("ENGINE_NODEBALANCER_ACCESS_ID")
|
NODEBALANCER_ACCESS_ID = os.environ.get("ENGINE_NODEBALANCER_ACCESS_ID")
|
||||||
if NODEBALANCER_ACCESS_ID is not None:
|
|
||||||
NODEBALANCER_URI_TEMPLATE = "{}?access_id={}&data_source=blockchain"
|
|
||||||
ETHEREUM_PROVIDER_URI = NODEBALANCER_URI_TEMPLATE.format(
|
|
||||||
MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI, NODEBALANCER_ACCESS_ID
|
|
||||||
)
|
|
||||||
MUMBAI_PROVIDER_URI = NODEBALANCER_URI_TEMPLATE.format(
|
|
||||||
MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI, NODEBALANCER_ACCESS_ID
|
|
||||||
)
|
|
||||||
POLYGON_PROVIDER_URI = NODEBALANCER_URI_TEMPLATE.format(
|
|
||||||
MOONSTREAM_POLYGON_WEB3_PROVIDER_URI, NODEBALANCER_ACCESS_ID
|
|
||||||
)
|
|
||||||
XDAI_PROVIDER_URI = NODEBALANCER_URI_TEMPLATE.format(
|
|
||||||
MOONSTREAM_XDAI_WEB3_PROVIDER_URI, NODEBALANCER_ACCESS_ID
|
|
||||||
)
|
|
||||||
|
|
||||||
BLOCKCHAIN_PROVIDER_URIS = {
|
BLOCKCHAIN_PROVIDER_URIS = {}
|
||||||
"ethereum": ETHEREUM_PROVIDER_URI,
|
|
||||||
"mumbai": MUMBAI_PROVIDER_URI,
|
blockchain_names = [
|
||||||
"polygon": POLYGON_PROVIDER_URI,
|
"ethereum",
|
||||||
"xdai": XDAI_PROVIDER_URI,
|
"polygon",
|
||||||
}
|
"mumbai",
|
||||||
|
"amoy",
|
||||||
|
"xdai",
|
||||||
|
"zksync_era",
|
||||||
|
"zksync_era_sepolia",
|
||||||
|
"arbitrum_one",
|
||||||
|
"arbitrum_nova",
|
||||||
|
"arbitrum_sepolia",
|
||||||
|
"xai",
|
||||||
|
"xai_sepolia",
|
||||||
|
"avalanche",
|
||||||
|
"avalanche_fuji",
|
||||||
|
"blast",
|
||||||
|
"blast_sepolia",
|
||||||
|
"proofofplay_apex",
|
||||||
|
]
|
||||||
|
|
||||||
|
for b in blockchain_names:
|
||||||
|
provider_uri = os.environ.get(f"MOONSTREAM_{b.upper()}_WEB3_PROVIDER_URI")
|
||||||
|
if provider_uri is None:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if NODEBALANCER_ACCESS_ID is not None:
|
||||||
|
NODEBALANCER_URI_TEMPLATE = "{}?access_id={}&data_source=blockchain"
|
||||||
|
provider_uri = NODEBALANCER_URI_TEMPLATE.format(
|
||||||
|
provider_uri, NODEBALANCER_ACCESS_ID
|
||||||
|
)
|
||||||
|
|
||||||
|
BLOCKCHAIN_PROVIDER_URIS[b] = provider_uri
|
||||||
|
|
||||||
|
globals()[f"MOONSTREAM_{b.upper()}_WEB3_PROVIDER_URI"] = provider_uri
|
||||||
|
|
||||||
SUPPORTED_BLOCKCHAINS = ", ".join(BLOCKCHAIN_PROVIDER_URIS)
|
SUPPORTED_BLOCKCHAINS = ", ".join(BLOCKCHAIN_PROVIDER_URIS)
|
||||||
UNSUPPORTED_BLOCKCHAIN_ERROR_MESSAGE = f"That blockchain is not supported. The supported blockchains are: {SUPPORTED_BLOCKCHAINS}."
|
UNSUPPORTED_BLOCKCHAIN_ERROR_MESSAGE = f"That blockchain is not supported. The supported blockchains are: {SUPPORTED_BLOCKCHAINS}."
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.0.8
|
0.0.9
|
||||||
|
|
|
@ -14,10 +14,21 @@ export ENGINE_REDIS_PASSWORD="<redis_requirepass_password>"
|
||||||
export ENGINE_REDIS_URL="localhost:6380"
|
export ENGINE_REDIS_URL="localhost:6380"
|
||||||
|
|
||||||
# Web3 Provider URIs
|
# Web3 Provider URIs
|
||||||
export MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI="<JSON_RPC_API_URL>"
|
export MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI="<JSON_RPC_API_URL>"
|
export MOONSTREAM_POLYGON_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_POLYGON_WEB3_PROVIDER_URI="<JSON_RPC_API_URL>"
|
export MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
export MOONSTREAM_XDAI_WEB3_PROVIDER_URI="<JSON_RPC_API_URL>"
|
export MOONSTREAM_AMOY_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_XDAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ZKSYNC_ERA_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ARBITRUM_NOVA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ARBITRUM_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_XAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_XAI_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_AVALANCHE_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_AVALANCHE_FUJI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_BLAST_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
export ENGINE_NODEBALANCER_ACCESS_ID="<access_id_for_Moonstream_Node_Balancer-if_provided_it_is_interpolated_into_provider_URIs>"
|
export ENGINE_NODEBALANCER_ACCESS_ID="<access_id_for_Moonstream_Node_Balancer-if_provided_it_is_interpolated_into_provider_URIs>"
|
||||||
|
|
||||||
# leaderboard config
|
# leaderboard config
|
||||||
|
|
|
@ -15,9 +15,30 @@ export MOONSTREAM_CRAWLERS_SERVER_PORT="<Moonstream_crawlers_server_port>"
|
||||||
# Blockchain, txpool, whalewatch data depends variables
|
# Blockchain, txpool, whalewatch data depends variables
|
||||||
export MOONSTREAM_DATA_JOURNAL_ID="<bugout_journal_id_to_store_blockchain_data>"
|
export MOONSTREAM_DATA_JOURNAL_ID="<bugout_journal_id_to_store_blockchain_data>"
|
||||||
export HUMBUG_TXPOOL_CLIENT_ID="<Bugout_Humbug_client_id_for_txpool_transactions_in_journal>"
|
export HUMBUG_TXPOOL_CLIENT_ID="<Bugout_Humbug_client_id_for_txpool_transactions_in_journal>"
|
||||||
export MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI="https://<connection_path_uri_to_ethereum_node>"
|
export MOONSTREAM_ETHEREUM_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_POLYGON_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_AMOY_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_XDAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_WYRM_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ZKSYNC_ERA_TESTNET_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ZKSYNC_ERA_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ARBITRUM_ONE_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ARBITRUM_NOVA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_ARBITRUM_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_XAI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_XAI_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_AVALANCHE_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_AVALANCHE_FUJI_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_BLAST_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
export MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI="https://<connection_path_uri_to_node>"
|
||||||
|
|
||||||
export MOONSTREAM_QUERIES_JOURNAL_ID="<bugout_journal_id_where_store_queries_for_executing>"
|
export MOONSTREAM_QUERIES_JOURNAL_ID="<bugout_journal_id_where_store_queries_for_executing>"
|
||||||
export MOONSTREAM_USAGE_REPORTS_JOURNAL_ID="<bugout_journal_id_where_save_generated_reports>"
|
export MOONSTREAM_USAGE_REPORTS_JOURNAL_ID="<bugout_journal_id_where_save_generated_reports>"
|
||||||
|
export MOONSTREAM_PUBLIC_QUERIES_DATA_ACCESS_TOKEN="<access_token>"
|
||||||
|
export MOONSTREAM_LEADERBOARD_GENERATOR_JOURNAL_ID="<journal_id>"
|
||||||
|
|
||||||
# Set following parameters if AWS node instance and S3 smartcontracts configured
|
# Set following parameters if AWS node instance and S3 smartcontracts configured
|
||||||
export MOONSTREAM_S3_SMARTCONTRACTS_BUCKET="<AWS_S3_bucket_to_store_smart_contracts>"
|
export MOONSTREAM_S3_SMARTCONTRACTS_BUCKET="<AWS_S3_bucket_to_store_smart_contracts>"
|
||||||
|
|
|
@ -47,7 +47,7 @@ echo
|
||||||
echo
|
echo
|
||||||
echo -e "${PREFIX_INFO} Retrieving addition deployment parameters"
|
echo -e "${PREFIX_INFO} Retrieving addition deployment parameters"
|
||||||
mkdir -p "${SECRETS_DIR}"
|
mkdir -p "${SECRETS_DIR}"
|
||||||
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
AWS_DEFAULT_REGION="${AWS_DEFAULT_REGION}" CHECKENV_AWS_FETCH_LOOP_LIMIT=20 /home/ubuntu/go/bin/checkenv show aws_ssm+moonstream:true > "${PARAMETERS_ENV_PATH}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo
|
echo
|
||||||
|
|
|
@ -4,12 +4,11 @@ import sys
|
||||||
from typing import List, Optional, Type, Union, cast
|
from typing import List, Optional, Type, Union, cast
|
||||||
|
|
||||||
import pyevmasm
|
import pyevmasm
|
||||||
|
from moonstreamdb.db import yield_db_session
|
||||||
from moonstreamdb.models import ESDEventSignature, ESDFunctionSignature
|
from moonstreamdb.models import ESDEventSignature, ESDFunctionSignature
|
||||||
from sqlalchemy.orm.session import Session
|
from sqlalchemy.orm.session import Session
|
||||||
from sqlalchemy.sql.expression import text
|
from sqlalchemy.sql.expression import text
|
||||||
|
|
||||||
from moonstreamdb.db import yield_db_session
|
|
||||||
|
|
||||||
from .data import ContractABI, EVMEventSignature, EVMFunctionSignature
|
from .data import ContractABI, EVMEventSignature, EVMFunctionSignature
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,10 +12,10 @@ from bugout.data import (
|
||||||
BugoutJournal,
|
BugoutJournal,
|
||||||
BugoutJournals,
|
BugoutJournals,
|
||||||
BugoutResource,
|
BugoutResource,
|
||||||
|
BugoutResourceHolder,
|
||||||
BugoutResources,
|
BugoutResources,
|
||||||
BugoutSearchResult,
|
BugoutSearchResult,
|
||||||
BugoutSearchResults,
|
BugoutSearchResults,
|
||||||
BugoutResourceHolder,
|
|
||||||
HolderType,
|
HolderType,
|
||||||
ResourcePermissions,
|
ResourcePermissions,
|
||||||
)
|
)
|
||||||
|
@ -25,6 +25,7 @@ from ens.utils import is_valid_ens_name # type: ignore
|
||||||
from eth_utils.address import is_address # type: ignore
|
from eth_utils.address import is_address # type: ignore
|
||||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||||
from moonstreamdb.models import EthereumLabel
|
from moonstreamdb.models import EthereumLabel
|
||||||
|
from moonstreamdb.subscriptions import blockchain_by_subscription_id
|
||||||
from slugify import slugify # type: ignore
|
from slugify import slugify # type: ignore
|
||||||
from sqlalchemy import text
|
from sqlalchemy import text
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
|
@ -52,30 +53,6 @@ from .web3_provider import FunctionSignature, connect, multicall
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
blockchain_by_subscription_id = {
|
|
||||||
"ethereum_blockchain": "ethereum",
|
|
||||||
"polygon_blockchain": "polygon",
|
|
||||||
"mumbai_blockchain": "mumbai",
|
|
||||||
"xdai_blockchain": "xdai",
|
|
||||||
"wyrm_blockchain": "wyrm",
|
|
||||||
"arbitrum_nova_blockchain": "arbitrum_nova",
|
|
||||||
"arbitrum_sepolia_blockchain": "arbitrum_sepolia",
|
|
||||||
"xai_blockchain": "xai",
|
|
||||||
"zksync_era_testnet_blockchain": "zksync_era_testnet",
|
|
||||||
"zksync_era_blockchain": "zksync_era",
|
|
||||||
"ethereum_smartcontract": "ethereum",
|
|
||||||
"polygon_smartcontract": "polygon",
|
|
||||||
"mumbai_smartcontract": "mumbai",
|
|
||||||
"xdai_smartcontract": "xdai",
|
|
||||||
"wyrm_smartcontract": "wyrm",
|
|
||||||
"zksync_era_testnet_smartcontract": "zksync_era_testnet",
|
|
||||||
"zksync_era_smartcontract": "zksync_era",
|
|
||||||
"arbitrum_nova_smartcontract": "arbitrum_nova",
|
|
||||||
"arbitrum_sepolia_smartcontract": "arbitrum_sepolia",
|
|
||||||
"xai_smartcontract": "xai",
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
class StatusAPIException(Exception):
|
class StatusAPIException(Exception):
|
||||||
"""
|
"""
|
||||||
Raised during checking Moonstream API statuses.
|
Raised during checking Moonstream API statuses.
|
||||||
|
|
|
@ -7,11 +7,10 @@ import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from posix import listdir
|
from posix import listdir
|
||||||
from typing import Optional, List, Dict, Any, Union, Callable
|
from typing import Any, Callable, Dict, List, Optional, Union
|
||||||
|
|
||||||
from sqlalchemy.orm import with_expression
|
|
||||||
|
|
||||||
from moonstreamdb.db import SessionLocal
|
from moonstreamdb.db import SessionLocal
|
||||||
|
from sqlalchemy.orm import with_expression
|
||||||
|
|
||||||
from ..settings import (
|
from ..settings import (
|
||||||
BUGOUT_BROOD_URL,
|
BUGOUT_BROOD_URL,
|
||||||
|
@ -22,16 +21,14 @@ from ..settings import (
|
||||||
MOONSTREAM_USAGE_REPORTS_JOURNAL_ID,
|
MOONSTREAM_USAGE_REPORTS_JOURNAL_ID,
|
||||||
)
|
)
|
||||||
from ..web3_provider import yield_web3_provider
|
from ..web3_provider import yield_web3_provider
|
||||||
|
from . import moonworm_tasks, queries, subscription_types, subscriptions, usage
|
||||||
from . import subscription_types, subscriptions, moonworm_tasks, queries, usage
|
|
||||||
from .migrations import (
|
from .migrations import (
|
||||||
checksum_address,
|
|
||||||
update_dashboard_subscription_key,
|
|
||||||
generate_entity_subscriptions,
|
|
||||||
add_selectors,
|
add_selectors,
|
||||||
|
checksum_address,
|
||||||
|
generate_entity_subscriptions,
|
||||||
|
update_dashboard_subscription_key,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
logging.basicConfig(level=logging.INFO)
|
logging.basicConfig(level=logging.INFO)
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
"""
|
"""
|
||||||
Add selectors to all moonworm tasks.
|
Add selectors to all moonworm tasks.
|
||||||
"""
|
"""
|
||||||
import logging
|
|
||||||
import json
|
|
||||||
|
|
||||||
|
import json
|
||||||
|
import logging
|
||||||
|
|
||||||
from bugout.exceptions import BugoutResponseException
|
from bugout.exceptions import BugoutResponseException
|
||||||
from web3 import Web3
|
from web3 import Web3
|
||||||
|
|
||||||
|
from ...actions import get_all_entries_from_search
|
||||||
from ...settings import (
|
from ...settings import (
|
||||||
BUGOUT_REQUEST_TIMEOUT_SECONDS,
|
BUGOUT_REQUEST_TIMEOUT_SECONDS,
|
||||||
MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
||||||
MOONSTREAM_MOONWORM_TASKS_JOURNAL,
|
MOONSTREAM_MOONWORM_TASKS_JOURNAL,
|
||||||
)
|
)
|
||||||
from ...settings import bugout_client as bc
|
from ...settings import bugout_client as bc
|
||||||
from ...actions import get_all_entries_from_search
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
Convert all addresses in user subscriptions
|
Convert all addresses in user subscriptions
|
||||||
and ethereum_labels column to checksum address.
|
and ethereum_labels column to checksum address.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Generate entity subscriptions from existing brood resources subscriptions
|
Generate entity subscriptions from existing brood resources subscriptions
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
@ -691,9 +692,9 @@ def restore_dashboard_state():
|
||||||
f"Update dashboard {dashboard.id} with subscription {subscription_id} to old state"
|
f"Update dashboard {dashboard.id} with subscription {subscription_id} to old state"
|
||||||
)
|
)
|
||||||
|
|
||||||
dashboard_metadata[index][
|
dashboard_metadata[index]["subscription_id"] = (
|
||||||
"subscription_id"
|
user_entity_subscriptions[subscription_id]
|
||||||
] = user_entity_subscriptions[subscription_id]
|
)
|
||||||
|
|
||||||
bc.update_resource(
|
bc.update_resource(
|
||||||
token=MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
token=MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
Convert all addresses in user subscriptions
|
Convert all addresses in user subscriptions
|
||||||
and ethereum_labels column to checksum address.
|
and ethereum_labels column to checksum address.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
import logging
|
|
||||||
import json
|
import json
|
||||||
|
import logging
|
||||||
|
|
||||||
import boto3 # type: ignore
|
import boto3 # type: ignore
|
||||||
from bugout.data import BugoutResource, BugoutResources
|
from bugout.data import BugoutResource, BugoutResources
|
||||||
from bugout.exceptions import BugoutResponseException
|
from bugout.exceptions import BugoutResponseException
|
||||||
|
|
||||||
|
from ..actions import apply_moonworm_tasks, get_all_entries_from_search
|
||||||
from ..actions import get_all_entries_from_search, apply_moonworm_tasks
|
|
||||||
from ..settings import MOONSTREAM_ADMIN_ACCESS_TOKEN, MOONSTREAM_MOONWORM_TASKS_JOURNAL
|
from ..settings import MOONSTREAM_ADMIN_ACCESS_TOKEN, MOONSTREAM_MOONWORM_TASKS_JOURNAL
|
||||||
from ..settings import bugout_client as bc
|
from ..settings import bugout_client as bc
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="ethereum",
|
blockchain="ethereum",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of Ethereum blockchain",
|
description="Contracts events and tx_calls of contract of Ethereum blockchain",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/ethereum/eth-diamond-purple.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/ethereum/eth-diamond-purple.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -35,7 +35,18 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="polygon",
|
blockchain="polygon",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of Polygon blockchain",
|
description="Contracts events and tx_calls of contract of Polygon blockchain",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"proofofplay_apex_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="proofofplay_apex_smartcontract",
|
||||||
|
name="Proof of Play Apex smartcontracts",
|
||||||
|
blockchain="proofofplay_apex",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of Proof of Play Apex blockchain",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/ethereum/eth-diamond-purple.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -46,7 +57,18 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="mumbai",
|
blockchain="mumbai",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of Mumbai blockchain",
|
description="Contracts events and tx_calls of contract of Mumbai blockchain",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"amoy_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="amoy_smartcontract",
|
||||||
|
name="Amoy smartcontracts",
|
||||||
|
blockchain="amoy",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of Amoy blockchain",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -57,7 +79,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="xdai",
|
blockchain="xdai",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of XDai blockchain.",
|
description="Contracts events and tx_calls of contract of XDai blockchain.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/xdai-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/xdai-token-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -68,7 +90,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="wyrm",
|
blockchain="wyrm",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of Wyrm blockchain.",
|
description="Contracts events and tx_calls of contract of Wyrm blockchain.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/great-wyrm-network-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/great-wyrm-network-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -79,7 +101,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="zksync_era",
|
blockchain="zksync_era",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of zkSync Era blockchain.",
|
description="Contracts events and tx_calls of contract of zkSync Era blockchain.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/zksync-era-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/zksync-era-token-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -90,7 +112,29 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="zksync_era_testnet",
|
blockchain="zksync_era_testnet",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of zkSync Era testnet blockchain.",
|
description="Contracts events and tx_calls of contract of zkSync Era testnet blockchain.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/zksync-era-testnet-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/zksync-era-testnet-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"zksync_era_sepolia_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="zksync_era_sepolia_smartcontract",
|
||||||
|
name="zkSync Era Sepolia smartcontract",
|
||||||
|
blockchain="zksync_era_sepolia",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of zkSync Era Sepolia blockchain.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/zksync-era-testnet-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"arbitrum_one_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="arbitrum_one_smartcontract",
|
||||||
|
name="Arbitrum One smartcontract",
|
||||||
|
blockchain="arbitrum_one",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of Arbitrum One blockchain.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/arbitrum-one-token-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -101,7 +145,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="arbitrum_nova",
|
blockchain="arbitrum_nova",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of Arbitrum Nova blockchain.",
|
description="Contracts events and tx_calls of contract of Arbitrum Nova blockchain.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/arbitrum-nova-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/arbitrum-nova-token-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -112,7 +156,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="arbitrum_sepolia",
|
blockchain="arbitrum_sepolia",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of Arbitrum Sepolia blockchain.",
|
description="Contracts events and tx_calls of contract of Arbitrum Sepolia blockchain.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/arbitrum-sepolia-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/arbitrum-sepolia-token-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -123,7 +167,62 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="xai",
|
blockchain="xai",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Contracts events and tx_calls of contract of Xai blockchain.",
|
description="Contracts events and tx_calls of contract of Xai blockchain.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/xai-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/xai-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"xai_sepolia_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="xai_sepolia_smartcontract",
|
||||||
|
name="Xai Sepolia smartcontract",
|
||||||
|
blockchain="xai_sepolia",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of Xai Sepolia blockchain.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/xai-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"avalanche_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="avalanche_smartcontract",
|
||||||
|
name="Avalanche smartcontract",
|
||||||
|
blockchain="avalanche",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of Avalanche blockchain.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/avalanche-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"avalanche_fuji_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="avalanche_fuji_smartcontract",
|
||||||
|
name="Avalanche Fuji smartcontract",
|
||||||
|
blockchain="avalanche_fuji",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of Avalanche Fuji blockchain.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/avalanche-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"blast_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="blast_smartcontract",
|
||||||
|
name="Blast smartcontract",
|
||||||
|
blockchain="blast",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of Blast blockchain.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/blast-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=True,
|
||||||
|
),
|
||||||
|
"blast_sepolia_smartcontract": SubscriptionTypeResourceData(
|
||||||
|
id="blast_sepolia_smartcontract",
|
||||||
|
name="Blast Sepolia smartcontract",
|
||||||
|
blockchain="blast_sepolia",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Contracts events and tx_calls of contract of Blast Sepolia blockchain.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/blast-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
@ -134,7 +233,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="ethereum",
|
blockchain="ethereum",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Transactions that have been mined into the Ethereum blockchain",
|
description="Transactions that have been mined into the Ethereum blockchain",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/ethereum/eth-diamond-purple.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/ethereum/eth-diamond-purple.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -145,7 +244,18 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="polygon",
|
blockchain="polygon",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Transactions that have been mined into the Polygon blockchain",
|
description="Transactions that have been mined into the Polygon blockchain",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"proofofplay_apex_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="proofofplay_apex_blockchain",
|
||||||
|
name="Proof of Play Apex transactions",
|
||||||
|
blockchain="proofofplay_apex",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Transactions that have been mined into the Proof of Play Apex blockchain",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/ethereum/eth-diamond-purple.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -156,7 +266,18 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="mumbai",
|
blockchain="mumbai",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Transactions that have been mined into the Mumbai blockchain",
|
description="Transactions that have been mined into the Mumbai blockchain",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"amoy_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="amoy_blockchain",
|
||||||
|
name="Amoy transactions",
|
||||||
|
blockchain="amoy",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Transactions that have been mined into the Amoy blockchain",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/matic-token-inverted-icon.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -167,7 +288,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="xdai",
|
blockchain="xdai",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Gnosis chain transactions subscription.",
|
description="Gnosis chain transactions subscription.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/xdai-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/xdai-token-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -178,7 +299,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="wyrm",
|
blockchain="wyrm",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="Wyrm chain transactions subscription.",
|
description="Wyrm chain transactions subscription.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/great-wyrm-network-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/great-wyrm-network-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -189,7 +310,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="zksync_era",
|
blockchain="zksync_era",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="ZkSync Era chain transactions subscription.",
|
description="ZkSync Era chain transactions subscription.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/zksync-era-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/zksync-era-token-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -200,7 +321,117 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="zksync_era_testnet",
|
blockchain="zksync_era_testnet",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
description="ZkSync Era testnet chain transactions subscription.",
|
description="ZkSync Era testnet chain transactions subscription.",
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/zksync-era-testnet-token-logo.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/zksync-era-testnet-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"zksync_era_sepolia_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="zksync_era_sepolia_blockchain",
|
||||||
|
name="zkSync Era Sepolia transactions",
|
||||||
|
blockchain="zksync_era_sepolia",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="ZkSync Era Sepolia chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/zksync-era-testnet-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"arbitrum_one_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="arbitrum_one_blockchain",
|
||||||
|
name="Arbitrum One transactions",
|
||||||
|
blockchain="arbitrum_one",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Arbitrum One chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/arbitrum-one-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"arbitrum_nova_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="arbitrum_nova_blockchain",
|
||||||
|
name="Arbitrum Nova transactions",
|
||||||
|
blockchain="arbitrum_nova",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Arbitrum Nova chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/arbitrum-nova-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"arbitrum_sepolia_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="arbitrum_sepolia_blockchain",
|
||||||
|
name="Arbitrum Sepolia transactions",
|
||||||
|
blockchain="arbitrum_sepolia",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Arbitrum Sepolia chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/arbitrum-sepolia-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"xai_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="xai_blockchain",
|
||||||
|
name="Xai smartcontract",
|
||||||
|
blockchain="xai",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Xai chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/xai-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"xai_sepolia_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="xai_sepolia_blockchain",
|
||||||
|
name="Xai Sepolia transactions",
|
||||||
|
blockchain="xai_sepolia",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Xai Sepolia chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/xai-token-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"avalanche_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="avalanche_blockchain",
|
||||||
|
name="Avalanche transactions",
|
||||||
|
blockchain="avalanche",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Avalanche chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/avalanche-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"avalanche_fuji_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="avalanche_fuji_blockchain",
|
||||||
|
name="Avalanche Fuji transactions",
|
||||||
|
blockchain="avalanche_fuji",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Avalanche Fuji chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/avalanche-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"blast_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="blast_blockchain",
|
||||||
|
name="Blast transactions",
|
||||||
|
blockchain="blast",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Blast chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/blast-logo.png",
|
||||||
|
stripe_product_id=None,
|
||||||
|
stripe_price_id=None,
|
||||||
|
active=False,
|
||||||
|
),
|
||||||
|
"blast_sepolia_blockchain": SubscriptionTypeResourceData(
|
||||||
|
id="blast_sepolia_blockchain",
|
||||||
|
name="Blast Sepolia transactions",
|
||||||
|
blockchain="blast_sepolia",
|
||||||
|
choices=["input:address", "tag:erc721"],
|
||||||
|
description="Blast Sepolia chain transactions subscription.",
|
||||||
|
icon_url="https://static.simiotics.com/moonstream/assets/blast-logo.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -212,7 +443,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
description="Ethereum accounts that have experienced a lot of recent activity",
|
description="Ethereum accounts that have experienced a lot of recent activity",
|
||||||
choices=[],
|
choices=[],
|
||||||
# Icon taken from: https://www.maxpixel.net/Whale-Cetacean-Wildlife-Symbol-Ocean-Sea-Black-99310
|
# Icon taken from: https://www.maxpixel.net/Whale-Cetacean-Wildlife-Symbol-Ocean-Sea-Black-99310
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/whalewatch.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/whalewatch.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -223,7 +454,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="ethereum",
|
blockchain="ethereum",
|
||||||
description="Transactions that have been submitted into the Ethereum transaction pool but not necessarily mined yet",
|
description="Transactions that have been submitted into the Ethereum transaction pool but not necessarily mined yet",
|
||||||
choices=["input:address", "tag:erc721"],
|
choices=["input:address", "tag:erc721"],
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/ethereum/eth-diamond-rainbow.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/ethereum/eth-diamond-rainbow.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=False,
|
active=False,
|
||||||
|
@ -234,7 +465,7 @@ CANONICAL_SUBSCRIPTION_TYPES = {
|
||||||
blockchain="Any",
|
blockchain="Any",
|
||||||
description="Externally owned account",
|
description="Externally owned account",
|
||||||
choices=[],
|
choices=[],
|
||||||
icon_url="https://s3.amazonaws.com/static.simiotics.com/moonstream/assets/ethereum/eth-diamond-rainbow.png",
|
icon_url="https://static.simiotics.com/moonstream/assets/ethereum/eth-diamond-rainbow.png",
|
||||||
stripe_product_id=None,
|
stripe_product_id=None,
|
||||||
stripe_price_id=None,
|
stripe_price_id=None,
|
||||||
active=True,
|
active=True,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Utilities for managing subscription resources for a Moonstream application.
|
Utilities for managing subscription resources for a Moonstream application.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import json
|
import json
|
||||||
from typing import Dict, List, Optional, Union
|
from typing import Dict, List, Optional, Union
|
||||||
|
|
|
@ -1,32 +1,26 @@
|
||||||
from typing import Optional, Dict, Any, Union, List
|
|
||||||
from datetime import datetime
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import textwrap
|
||||||
import time
|
import time
|
||||||
import uuid
|
import uuid
|
||||||
|
from datetime import datetime
|
||||||
|
from typing import Any, Dict, List, Optional, Union
|
||||||
|
|
||||||
import requests # type: ignore
|
import requests # type: ignore
|
||||||
import textwrap
|
from bugout.data import BugoutResourceHolders, HolderType, ResourcePermissions
|
||||||
|
from moonstream.client import ENDPOINT_QUERIES, Moonstream, MoonstreamQueryResultUrl
|
||||||
|
from web3 import Web3
|
||||||
|
|
||||||
from ..actions import get_all_entries_from_search
|
from ..actions import get_all_entries_from_search
|
||||||
from ..settings import bugout_client as bc
|
from ..data import BUGOUT_RESOURCE_QUERY_RESOLVER
|
||||||
from ..settings import (
|
from ..settings import (
|
||||||
MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
|
||||||
BUGOUT_REQUEST_TIMEOUT_SECONDS,
|
BUGOUT_REQUEST_TIMEOUT_SECONDS,
|
||||||
MOONSTREAM_PUBLIC_QUERIES_DATA_ACCESS_TOKEN,
|
MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
||||||
MOONSTREAM_LEADERBOARD_GENERATOR_JOURNAL_ID,
|
MOONSTREAM_LEADERBOARD_GENERATOR_JOURNAL_ID,
|
||||||
|
MOONSTREAM_PUBLIC_QUERIES_DATA_ACCESS_TOKEN,
|
||||||
MOONSTREAM_USAGE_REPORTS_JOURNAL_ID,
|
MOONSTREAM_USAGE_REPORTS_JOURNAL_ID,
|
||||||
)
|
)
|
||||||
from ..data import BUGOUT_RESOURCE_QUERY_RESOLVER
|
from ..settings import bugout_client as bc
|
||||||
|
|
||||||
|
|
||||||
from bugout.data import BugoutResourceHolders, ResourcePermissions, HolderType
|
|
||||||
from web3 import Web3
|
|
||||||
from moonstream.client import (
|
|
||||||
Moonstream,
|
|
||||||
ENDPOINT_QUERIES,
|
|
||||||
MoonstreamQueryResultUrl,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
The Moonstream HTTP API
|
The Moonstream HTTP API
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import time
|
import time
|
||||||
from typing import Dict
|
from typing import Dict
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Pydantic schemas for the Moonstream HTTP API
|
Pydantic schemas for the Moonstream HTTP API
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
|
@ -49,22 +49,40 @@ class ReceivingEventsException(Exception):
|
||||||
event_providers: Dict[str, Any] = {
|
event_providers: Dict[str, Any] = {
|
||||||
moonworm_provider.EthereumMoonwormProvider.event_type: moonworm_provider.EthereumMoonwormProvider,
|
moonworm_provider.EthereumMoonwormProvider.event_type: moonworm_provider.EthereumMoonwormProvider,
|
||||||
moonworm_provider.PolygonMoonwormProvider.event_type: moonworm_provider.PolygonMoonwormProvider,
|
moonworm_provider.PolygonMoonwormProvider.event_type: moonworm_provider.PolygonMoonwormProvider,
|
||||||
|
moonworm_provider.ProofOfPlayApexMoonwormProvider.event_type: moonworm_provider.ProofOfPlayApexMoonwormProvider,
|
||||||
moonworm_provider.MumbaiMoonwormProvider.event_type: moonworm_provider.MumbaiMoonwormProvider,
|
moonworm_provider.MumbaiMoonwormProvider.event_type: moonworm_provider.MumbaiMoonwormProvider,
|
||||||
|
moonworm_provider.AmoyMoonwormProvider.event_type: moonworm_provider.AmoyMoonwormProvider,
|
||||||
moonworm_provider.XDaiMoonwormProvider.event_type: moonworm_provider.XDaiMoonwormProvider,
|
moonworm_provider.XDaiMoonwormProvider.event_type: moonworm_provider.XDaiMoonwormProvider,
|
||||||
moonworm_provider.ZkSyncEraTestnetMoonwormProvider.event_type: moonworm_provider.ZkSyncEraTestnetMoonwormProvider,
|
moonworm_provider.ZkSyncEraTestnetMoonwormProvider.event_type: moonworm_provider.ZkSyncEraTestnetMoonwormProvider,
|
||||||
moonworm_provider.ZkSyncEraMoonwormProvider.event_type: moonworm_provider.ZkSyncEraMoonwormProvider,
|
moonworm_provider.ZkSyncEraMoonwormProvider.event_type: moonworm_provider.ZkSyncEraMoonwormProvider,
|
||||||
|
moonworm_provider.ZkSyncEraSepoliaMoonwormProvider.event_type: moonworm_provider.ZkSyncEraSepoliaMoonwormProvider,
|
||||||
|
moonworm_provider.ArbitrumOneMoonwormProvider.event_type: moonworm_provider.ArbitrumOneMoonwormProvider,
|
||||||
moonworm_provider.ArbitrumNovaMoonwormProvider.event_type: moonworm_provider.ArbitrumNovaMoonwormProvider,
|
moonworm_provider.ArbitrumNovaMoonwormProvider.event_type: moonworm_provider.ArbitrumNovaMoonwormProvider,
|
||||||
moonworm_provider.ArbitrumSepoliaMoonwormProvider.event_type: moonworm_provider.ArbitrumSepoliaMoonwormProvider,
|
moonworm_provider.ArbitrumSepoliaMoonwormProvider.event_type: moonworm_provider.ArbitrumSepoliaMoonwormProvider,
|
||||||
moonworm_provider.XaiMoonwormProvider.event_type: moonworm_provider.XaiMoonwormProvider,
|
moonworm_provider.XaiMoonwormProvider.event_type: moonworm_provider.XaiMoonwormProvider,
|
||||||
|
moonworm_provider.XaiSepoliaMoonwormProvider.event_type: moonworm_provider.XaiSepoliaMoonwormProvider,
|
||||||
|
moonworm_provider.AvalancheMoonwormProvider.event_type: moonworm_provider.AvalancheMoonwormProvider,
|
||||||
|
moonworm_provider.AvalancheFujiMoonwormProvider.event_type: moonworm_provider.AvalancheFujiMoonwormProvider,
|
||||||
|
moonworm_provider.BlastMoonwormProvider.event_type: moonworm_provider.BlastMoonwormProvider,
|
||||||
|
moonworm_provider.BlastSepoliaMoonwormProvider.event_type: moonworm_provider.BlastSepoliaMoonwormProvider,
|
||||||
transactions.EthereumTransactions.event_type: transactions.EthereumTransactions,
|
transactions.EthereumTransactions.event_type: transactions.EthereumTransactions,
|
||||||
transactions.PolygonTransactions.event_type: transactions.PolygonTransactions,
|
transactions.PolygonTransactions.event_type: transactions.PolygonTransactions,
|
||||||
|
transactions.ProofOfPlayApexTransactions.event_type: transactions.ProofOfPlayApexTransactions,
|
||||||
transactions.MumbaiTransactions.event_type: transactions.MumbaiTransactions,
|
transactions.MumbaiTransactions.event_type: transactions.MumbaiTransactions,
|
||||||
|
transactions.AmoyTransactions.event_type: transactions.AmoyTransactions,
|
||||||
transactions.XDaiTransactions.event_type: transactions.XDaiTransactions,
|
transactions.XDaiTransactions.event_type: transactions.XDaiTransactions,
|
||||||
transactions.ZkSyncEraTestnetTransactions.event_type: transactions.ZkSyncEraTestnetTransactions,
|
transactions.ZkSyncEraTestnetTransactions.event_type: transactions.ZkSyncEraTestnetTransactions,
|
||||||
transactions.ZkSyncEraTransactions.event_type: transactions.ZkSyncEraTransactions,
|
transactions.ZkSyncEraTransactions.event_type: transactions.ZkSyncEraTransactions,
|
||||||
|
transactions.ZkSyncEraSepoliaTransactions.event_type: transactions.ZkSyncEraSepoliaTransactions,
|
||||||
|
transactions.ArbitrumOneTransactions.event_type: transactions.ArbitrumOneTransactions,
|
||||||
transactions.ArbitrumNovaTransactions.event_type: transactions.ArbitrumNovaTransactions,
|
transactions.ArbitrumNovaTransactions.event_type: transactions.ArbitrumNovaTransactions,
|
||||||
transactions.ArbitrumSepoliaTransactions.event_type: transactions.ArbitrumSepoliaTransactions,
|
transactions.ArbitrumSepoliaTransactions.event_type: transactions.ArbitrumSepoliaTransactions,
|
||||||
transactions.XaiTransactions.event_type: transactions.XaiTransactions,
|
transactions.XaiTransactions.event_type: transactions.XaiTransactions,
|
||||||
|
transactions.XaiSepoliaTransactions.event_type: transactions.XaiSepoliaTransactions,
|
||||||
|
transactions.AvalancheTransactions.event_type: transactions.AvalancheTransactions,
|
||||||
|
transactions.AvalancheFujiTransactions.event_type: transactions.AvalancheFujiTransactions,
|
||||||
|
transactions.BlastTransactions.event_type: transactions.BlastTransactions,
|
||||||
|
transactions.BlastSepoliaTransactions.event_type: transactions.BlastSepoliaTransactions,
|
||||||
bugout.polygon_whalewatch_provider.event_type: bugout.polygon_whalewatch_provider,
|
bugout.polygon_whalewatch_provider.event_type: bugout.polygon_whalewatch_provider,
|
||||||
bugout.ethereum_txpool_provider.event_type: bugout.ethereum_txpool_provider,
|
bugout.ethereum_txpool_provider.event_type: bugout.ethereum_txpool_provider,
|
||||||
bugout.ethereum_whalewatch_provider.event_type: bugout.ethereum_whalewatch_provider,
|
bugout.ethereum_whalewatch_provider.event_type: bugout.ethereum_whalewatch_provider,
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Event providers powered by Bugout journals.
|
Event providers powered by Bugout journals.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
@ -155,7 +156,7 @@ class BugoutEventProvider:
|
||||||
timeout=self.timeout,
|
timeout=self.timeout,
|
||||||
order=SearchOrder.DESCENDING,
|
order=SearchOrder.DESCENDING,
|
||||||
)
|
)
|
||||||
events.extend([self.entry_event(entry) for entry in search_results.results]) # type: ignore
|
events.extend([self.entry_event(entry) for entry in search_results.results]) # type: ignore
|
||||||
offset = search_results.next_offset
|
offset = search_results.next_offset
|
||||||
|
|
||||||
return stream_boundary, events
|
return stream_boundary, events
|
||||||
|
@ -192,7 +193,7 @@ class BugoutEventProvider:
|
||||||
timeout=self.timeout,
|
timeout=self.timeout,
|
||||||
order=SearchOrder.DESCENDING,
|
order=SearchOrder.DESCENDING,
|
||||||
)
|
)
|
||||||
return [self.entry_event(entry) for entry in search_results.results] # type: ignore
|
return [self.entry_event(entry) for entry in search_results.results] # type: ignore
|
||||||
|
|
||||||
def next_event(
|
def next_event(
|
||||||
self,
|
self,
|
||||||
|
@ -233,7 +234,7 @@ class BugoutEventProvider:
|
||||||
)
|
)
|
||||||
if not search_results.results:
|
if not search_results.results:
|
||||||
return None
|
return None
|
||||||
return self.entry_event(search_results.results[0]) # type: ignore
|
return self.entry_event(search_results.results[0]) # type: ignore
|
||||||
|
|
||||||
def previous_event(
|
def previous_event(
|
||||||
self,
|
self,
|
||||||
|
@ -274,7 +275,7 @@ class BugoutEventProvider:
|
||||||
)
|
)
|
||||||
if not search_results.results:
|
if not search_results.results:
|
||||||
return None
|
return None
|
||||||
return self.entry_event(search_results.results[0]) # type: ignore
|
return self.entry_event(search_results.results[0]) # type: ignore
|
||||||
|
|
||||||
|
|
||||||
class EthereumTXPoolProvider(BugoutEventProvider):
|
class EthereumTXPoolProvider(BugoutEventProvider):
|
||||||
|
|
|
@ -19,13 +19,23 @@ logger.setLevel(logging.WARN)
|
||||||
|
|
||||||
ethereum_event_type = "ethereum_blockchain"
|
ethereum_event_type = "ethereum_blockchain"
|
||||||
polygon_event_type = "polygon_blockchain"
|
polygon_event_type = "polygon_blockchain"
|
||||||
|
proofofplay_apex_event_type = "proofofplay_apex_blockchain"
|
||||||
mumbai_event_type = "mumbai_blockchain"
|
mumbai_event_type = "mumbai_blockchain"
|
||||||
|
amoy_event_type = "amoy_blockchain"
|
||||||
xdai_event_type = "xdai_blockchain"
|
xdai_event_type = "xdai_blockchain"
|
||||||
zksync_era_testnet_event_type = "zksync_era_testnet_blockchain"
|
zksync_era_testnet_event_type = "zksync_era_testnet_blockchain"
|
||||||
zksync_era_event_type = "zksync_era_blockchain"
|
zksync_era_event_type = "zksync_era_blockchain"
|
||||||
|
zksync_era_sepolia_event_type = "zksync_era_sepolia_blockchain"
|
||||||
|
arbitrum_one_event_type = "arbitrum_one_blockchain"
|
||||||
arbitrum_nova_event_type = "arbitrum_nova_blockchain"
|
arbitrum_nova_event_type = "arbitrum_nova_blockchain"
|
||||||
arbitrum_sepolia_event_type = "arbitrum_sepolia_blockchain"
|
arbitrum_sepolia_event_type = "arbitrum_sepolia_blockchain"
|
||||||
xai_event_type = "xai_blockchain"
|
xai_event_type = "xai_blockchain"
|
||||||
|
xai_sepolia_event_type = "xai_sepolia_blockchain"
|
||||||
|
avalanche_event_type = "avalanche_blockchain"
|
||||||
|
avalanche_fuji_sepolia_event_type = "avalanche_fuji_sepolia_blockchain"
|
||||||
|
blast_event_type = "blast_blockchain"
|
||||||
|
blast_sepolia_event_type = "blast_sepolia_blockchain"
|
||||||
|
|
||||||
allowed_tags = ["tag:erc721"]
|
allowed_tags = ["tag:erc721"]
|
||||||
|
|
||||||
description = f"""Event provider for transactions from the Ethereum blockchain.
|
description = f"""Event provider for transactions from the Ethereum blockchain.
|
||||||
|
@ -412,6 +422,13 @@ MumbaiMoonwormProvider = MoonwormProvider(
|
||||||
streamboaundary_range_limit=2 * 60 * 60,
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AmoyMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="amoy_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("amoy"),
|
||||||
|
description="Provider for reviving transactions from Amoy tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
XDaiMoonwormProvider = MoonwormProvider(
|
XDaiMoonwormProvider = MoonwormProvider(
|
||||||
event_type="xdai_smartcontract",
|
event_type="xdai_smartcontract",
|
||||||
blockchain=AvailableBlockchainType("xdai"),
|
blockchain=AvailableBlockchainType("xdai"),
|
||||||
|
@ -433,6 +450,20 @@ ZkSyncEraMoonwormProvider = MoonwormProvider(
|
||||||
streamboaundary_range_limit=2 * 60 * 60,
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ZkSyncEraSepoliaMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="zksync_era_sepolia_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("zksync_era_sepolia"),
|
||||||
|
description="Provider for reviving transactions from zkSync Era Sepolia tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
ArbitrumOneMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="arbitrum_one_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("arbitrum_one"),
|
||||||
|
description="Provider for reviving transactions from Arbitrum One tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
ArbitrumNovaMoonwormProvider = MoonwormProvider(
|
ArbitrumNovaMoonwormProvider = MoonwormProvider(
|
||||||
event_type="arbitrum_nova_smartcontract",
|
event_type="arbitrum_nova_smartcontract",
|
||||||
blockchain=AvailableBlockchainType("arbitrum_nova"),
|
blockchain=AvailableBlockchainType("arbitrum_nova"),
|
||||||
|
@ -453,3 +484,45 @@ XaiMoonwormProvider = MoonwormProvider(
|
||||||
description="Provider for reviving transactions from Xai tables.",
|
description="Provider for reviving transactions from Xai tables.",
|
||||||
streamboaundary_range_limit=2 * 60 * 60,
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
XaiSepoliaMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="xai_sepolia_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("xai_sepolia"),
|
||||||
|
description="Provider for reviving transactions from Xai Sepolia tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
AvalancheMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="avalanche_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("avalanche"),
|
||||||
|
description="Provider for reviving transactions from Avalanche tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
AvalancheFujiMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="avalanche_fuji_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("avalanche_fuji"),
|
||||||
|
description="Provider for reviving transactions from Avalanche Fuji tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
BlastMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="blast_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("blast"),
|
||||||
|
description="Provider for reviving transactions from Blast tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
BlastSepoliaMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="blast_sepolia_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("blast_sepolia"),
|
||||||
|
description="Provider for reviving transactions from Blast Sepolia tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
ProofOfPlayApexMoonwormProvider = MoonwormProvider(
|
||||||
|
event_type="proofofplay_apex_smartcontract",
|
||||||
|
blockchain=AvailableBlockchainType("proofofplay_apex"),
|
||||||
|
description="Provider for reviving transactions from Proof of Play Apex tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
|
@ -469,6 +469,13 @@ MumbaiTransactions = TransactionsProvider(
|
||||||
streamboaundary_range_limit=2 * 60 * 60,
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
AmoyTransactions = TransactionsProvider(
|
||||||
|
event_type="amoy_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("amoy"),
|
||||||
|
description="Provider for resiving transactions from Amoy tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
XDaiTransactions = TransactionsProvider(
|
XDaiTransactions = TransactionsProvider(
|
||||||
event_type="xdai_blockchain",
|
event_type="xdai_blockchain",
|
||||||
blockchain=AvailableBlockchainType("xdai"),
|
blockchain=AvailableBlockchainType("xdai"),
|
||||||
|
@ -490,6 +497,19 @@ ZkSyncEraTransactions = TransactionsProvider(
|
||||||
streamboaundary_range_limit=2 * 60 * 60,
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
ZkSyncEraSepoliaTransactions = TransactionsProvider(
|
||||||
|
event_type="zksync_era_sepolia_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("zksync_era_sepolia"),
|
||||||
|
description="Provider for resiving transactions from ZkSync Era Sepolia tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
ArbitrumOneTransactions = TransactionsProvider(
|
||||||
|
event_type="arbitrum_one_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("arbitrum_one"),
|
||||||
|
description="Provider for resiving transactions from Arbitrum One tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
ArbitrumNovaTransactions = TransactionsProvider(
|
ArbitrumNovaTransactions = TransactionsProvider(
|
||||||
event_type="arbitrum_nova_blockchain",
|
event_type="arbitrum_nova_blockchain",
|
||||||
|
@ -511,3 +531,45 @@ XaiTransactions = TransactionsProvider(
|
||||||
description="Provider for resiving transactions from Xai tables.",
|
description="Provider for resiving transactions from Xai tables.",
|
||||||
streamboaundary_range_limit=2 * 60 * 60,
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
XaiSepoliaTransactions = TransactionsProvider(
|
||||||
|
event_type="xai_sepolia_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("xai_sepolia"),
|
||||||
|
description="Provider for resiving transactions from Xai Sepolia tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
AvalancheTransactions = TransactionsProvider(
|
||||||
|
event_type="avalanche_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("avalanche"),
|
||||||
|
description="Provider for resiving transactions from Avalanche tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
AvalancheFujiTransactions = TransactionsProvider(
|
||||||
|
event_type="avalanche_fuji_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("avalanche_fuji"),
|
||||||
|
description="Provider for resiving transactions from Avalanche Fuji tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
BlastTransactions = TransactionsProvider(
|
||||||
|
event_type="blast_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("blast"),
|
||||||
|
description="Provider for resiving transactions from Blast tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
BlastSepoliaTransactions = TransactionsProvider(
|
||||||
|
event_type="blast_sepolia_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("blast_sepolia"),
|
||||||
|
description="Provider for resiving transactions from Blast Sepolia tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
||||||
|
ProofOfPlayApexTransactions = TransactionsProvider(
|
||||||
|
event_type="proofofplay_apex_blockchain",
|
||||||
|
blockchain=AvailableBlockchainType("proofofplay_apex"),
|
||||||
|
description="Provider for resiving transactions from Proof of Play Apex tables.",
|
||||||
|
streamboaundary_range_limit=2 * 60 * 60,
|
||||||
|
)
|
||||||
|
|
|
@ -2,11 +2,10 @@ import logging
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from fastapi import APIRouter, Depends, Query
|
from fastapi import APIRouter, Depends, Query
|
||||||
|
from moonstreamdb.db import yield_db_session
|
||||||
from sqlalchemy.orm import Session
|
from sqlalchemy.orm import Session
|
||||||
from web3 import Web3
|
from web3 import Web3
|
||||||
|
|
||||||
from moonstreamdb.db import yield_db_session
|
|
||||||
|
|
||||||
from .. import actions, data
|
from .. import actions, data
|
||||||
from ..middleware import MoonstreamHTTPException
|
from ..middleware import MoonstreamHTTPException
|
||||||
from ..web3_provider import yield_web3_provider
|
from ..web3_provider import yield_web3_provider
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
The Moonstream queries HTTP API
|
The Moonstream queries HTTP API
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from typing import Any, Dict, List, Optional, Tuple, Union, cast
|
from typing import Any, Dict, List, Optional, Tuple, Union, cast
|
||||||
|
@ -14,21 +15,22 @@ from bugout.data import (
|
||||||
BugoutSearchResult,
|
BugoutSearchResult,
|
||||||
)
|
)
|
||||||
from bugout.exceptions import BugoutResponseException
|
from bugout.exceptions import BugoutResponseException
|
||||||
from fastapi import APIRouter, Body, Path, Request, Query
|
from fastapi import APIRouter, Body, Path, Query, Request
|
||||||
from moonstreamdb.blockchain import AvailableBlockchainType
|
from moonstreamdb.blockchain import AvailableBlockchainType
|
||||||
from sqlalchemy import text
|
from sqlalchemy import text
|
||||||
|
|
||||||
from .. import data
|
from .. import data
|
||||||
from ..actions import (
|
from ..actions import (
|
||||||
NameNormalizationException,
|
NameNormalizationException,
|
||||||
|
create_resource_for_user,
|
||||||
generate_s3_access_links,
|
generate_s3_access_links,
|
||||||
get_query_by_name,
|
get_query_by_name,
|
||||||
name_normalization,
|
name_normalization,
|
||||||
query_parameter_hash,
|
query_parameter_hash,
|
||||||
create_resource_for_user,
|
|
||||||
)
|
)
|
||||||
from ..middleware import MoonstreamHTTPException
|
from ..middleware import MoonstreamHTTPException
|
||||||
from ..settings import (
|
from ..settings import (
|
||||||
|
BUGOUT_REQUEST_TIMEOUT_SECONDS,
|
||||||
MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
MOONSTREAM_ADMIN_ACCESS_TOKEN,
|
||||||
MOONSTREAM_CRAWLERS_SERVER_PORT,
|
MOONSTREAM_CRAWLERS_SERVER_PORT,
|
||||||
MOONSTREAM_CRAWLERS_SERVER_URL,
|
MOONSTREAM_CRAWLERS_SERVER_URL,
|
||||||
|
@ -37,7 +39,6 @@ from ..settings import (
|
||||||
MOONSTREAM_QUERY_TEMPLATE_CONTEXT_TYPE,
|
MOONSTREAM_QUERY_TEMPLATE_CONTEXT_TYPE,
|
||||||
MOONSTREAM_S3_QUERIES_BUCKET,
|
MOONSTREAM_S3_QUERIES_BUCKET,
|
||||||
MOONSTREAM_S3_QUERIES_BUCKET_PREFIX,
|
MOONSTREAM_S3_QUERIES_BUCKET_PREFIX,
|
||||||
BUGOUT_REQUEST_TIMEOUT_SECONDS,
|
|
||||||
)
|
)
|
||||||
from ..settings import bugout_client as bc
|
from ..settings import bugout_client as bc
|
||||||
|
|
||||||
|
@ -462,9 +463,9 @@ async def update_query_data_handler(
|
||||||
"query": content,
|
"query": content,
|
||||||
"params": request_update.params,
|
"params": request_update.params,
|
||||||
"file_type": file_type,
|
"file_type": file_type,
|
||||||
"blockchain": request_update.blockchain
|
"blockchain": (
|
||||||
if request_update.blockchain
|
request_update.blockchain if request_update.blockchain else None
|
||||||
else None,
|
),
|
||||||
},
|
},
|
||||||
timeout=MOONSTREAM_INTERNAL_REQUEST_TIMEOUT_SECONDS,
|
timeout=MOONSTREAM_INTERNAL_REQUEST_TIMEOUT_SECONDS,
|
||||||
)
|
)
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
"""
|
"""
|
||||||
The Moonstream subscriptions HTTP API
|
The Moonstream subscriptions HTTP API
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
from bugout.data import BugoutResource
|
from bugout.data import BugoutResource
|
||||||
from fastapi import APIRouter, Depends, Query, Request
|
from fastapi import APIRouter, Depends, Query, Request
|
||||||
from sqlalchemy.orm import Session
|
|
||||||
|
|
||||||
from moonstreamdb import db
|
from moonstreamdb import db
|
||||||
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from .. import data, stream_queries
|
from .. import data, stream_queries
|
||||||
from ..middleware import MoonstreamHTTPException
|
from ..middleware import MoonstreamHTTPException
|
||||||
|
|
|
@ -5,13 +5,13 @@ These endpoints enrich raw blockchain transactions (as well as pending transacti
|
||||||
transactions, etc.) with side information and return objects that are better suited for displaying to
|
transactions, etc.) with side information and return objects that are better suited for displaying to
|
||||||
end users.
|
end users.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from fastapi import APIRouter, Depends
|
from fastapi import APIRouter, Depends
|
||||||
from sqlalchemy.orm import Session
|
|
||||||
|
|
||||||
from moonstreamdb.db import yield_db_session
|
from moonstreamdb.db import yield_db_session
|
||||||
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from .. import actions, data
|
from .. import actions, data
|
||||||
from ..abi_decoder import decode_abi
|
from ..abi_decoder import decode_abi
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
The Moonstream users HTTP API
|
The Moonstream users HTTP API
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import uuid
|
import uuid
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
|
@ -3,13 +3,13 @@ Moonstream's /whales endpoints.
|
||||||
|
|
||||||
These endpoints provide public access to whale watch summaries. No authentication required.
|
These endpoints provide public access to whale watch summaries. No authentication required.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
from fastapi import APIRouter, Depends, Query
|
from fastapi import APIRouter, Depends, Query
|
||||||
from sqlalchemy.orm import Session
|
|
||||||
|
|
||||||
from moonstreamdb import db
|
from moonstreamdb import db
|
||||||
|
from sqlalchemy.orm import Session
|
||||||
|
|
||||||
from .. import data
|
from .. import data
|
||||||
from ..providers.bugout import ethereum_whalewatch_provider
|
from ..providers.bugout import ethereum_whalewatch_provider
|
||||||
|
|
|
@ -118,6 +118,12 @@ MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
if MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI == "":
|
if MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI == "":
|
||||||
raise Exception("MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI env variable is not set")
|
raise Exception("MOONSTREAM_MUMBAI_WEB3_PROVIDER_URI env variable is not set")
|
||||||
|
|
||||||
|
MOONSTREAM_AMOY_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_AMOY_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_AMOY_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception("MOONSTREAM_AMOY_WEB3_PROVIDER_URI env variable is not set")
|
||||||
|
|
||||||
MOONSTREAM_XDAI_WEB3_PROVIDER_URI = os.environ.get(
|
MOONSTREAM_XDAI_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
"MOONSTREAM_XDAI_WEB3_PROVIDER_URI", ""
|
"MOONSTREAM_XDAI_WEB3_PROVIDER_URI", ""
|
||||||
)
|
)
|
||||||
|
@ -144,6 +150,21 @@ MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
if MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI == "":
|
if MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI == "":
|
||||||
raise Exception("MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI env variable is not set")
|
raise Exception("MOONSTREAM_ZKSYNC_ERA_WEB3_PROVIDER_URI env variable is not set")
|
||||||
|
|
||||||
|
MOONSTREAM_ZKSYNC_ERA_SEPOLIA_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_ZKSYNC_ERA_SEPOLIA_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_ZKSYNC_ERA_SEPOLIA_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception(
|
||||||
|
"MOONSTREAM_ZKSYNC_ERA_SEPOLIA_WEB3_PROVIDER_URI env variable is not set"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
MOONSTREAM_ARBITRUM_ONE_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_ARBITRUM_ONE_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_ARBITRUM_ONE_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception("MOONSTREAM_ARBITRUM_ONE_WEB3_PROVIDER_URI env variable is not set")
|
||||||
|
|
||||||
MOONSTREAM_ARBITRUM_NOVA_WEB3_PROVIDER_URI = os.environ.get(
|
MOONSTREAM_ARBITRUM_NOVA_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
"MOONSTREAM_ARBITRUM_NOVA_WEB3_PROVIDER_URI", ""
|
"MOONSTREAM_ARBITRUM_NOVA_WEB3_PROVIDER_URI", ""
|
||||||
)
|
)
|
||||||
|
@ -166,6 +187,48 @@ MOONSTREAM_XAI_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
if MOONSTREAM_XAI_WEB3_PROVIDER_URI == "":
|
if MOONSTREAM_XAI_WEB3_PROVIDER_URI == "":
|
||||||
raise Exception("MOONSTREAM_XAI_WEB3_PROVIDER_URI env variable is not set")
|
raise Exception("MOONSTREAM_XAI_WEB3_PROVIDER_URI env variable is not set")
|
||||||
|
|
||||||
|
MOONSTREAM_XAI_SEPOLIA_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_XAI_SEPOLIA_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_XAI_SEPOLIA_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception("MOONSTREAM_XAI_SEPOLIA_WEB3_PROVIDER_URI env variable is not set")
|
||||||
|
|
||||||
|
MOONSTREAM_AVALANCHE_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_AVALANCHE_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_AVALANCHE_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception("MOONSTREAM_AVALANCHE_WEB3_PROVIDER_URI env variable is not set")
|
||||||
|
|
||||||
|
MOONSTREAM_AVALANCHE_FUJI_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_AVALANCHE_FUJI_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_AVALANCHE_FUJI_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception(
|
||||||
|
"MOONSTREAM_AVALANCHE_FUJI_WEB3_PROVIDER_URI env variable is not set"
|
||||||
|
)
|
||||||
|
|
||||||
|
MOONSTREAM_BLAST_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_BLAST_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_BLAST_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception("MOONSTREAM_BLAST_WEB3_PROVIDER_URI env variable is not set")
|
||||||
|
|
||||||
|
MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception(
|
||||||
|
"MOONSTREAM_BLAST_SEPOLIA_WEB3_PROVIDER_URI env variable is not set"
|
||||||
|
)
|
||||||
|
|
||||||
|
MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI = os.environ.get(
|
||||||
|
"MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI", ""
|
||||||
|
)
|
||||||
|
if MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI == "":
|
||||||
|
raise Exception(
|
||||||
|
"MOONSTREAM_PROOFOFPLAY_APEX_WEB3_PROVIDER_URI env variable is not set"
|
||||||
|
)
|
||||||
|
|
||||||
## QueryAPI
|
## QueryAPI
|
||||||
|
|
||||||
MOONSTREAM_S3_QUERIES_BUCKET = os.environ.get("MOONSTREAM_S3_QUERIES_BUCKET", "")
|
MOONSTREAM_S3_QUERIES_BUCKET = os.environ.get("MOONSTREAM_S3_QUERIES_BUCKET", "")
|
||||||
|
@ -216,7 +279,9 @@ THREAD_TIMEOUT_SECONDS = 10
|
||||||
multicall_contracts: Dict[AvailableBlockchainType, str] = {
|
multicall_contracts: Dict[AvailableBlockchainType, str] = {
|
||||||
AvailableBlockchainType.POLYGON: "0xc8E51042792d7405184DfCa245F2d27B94D013b6",
|
AvailableBlockchainType.POLYGON: "0xc8E51042792d7405184DfCa245F2d27B94D013b6",
|
||||||
AvailableBlockchainType.MUMBAI: "0xe9939e7Ea7D7fb619Ac57f648Da7B1D425832631",
|
AvailableBlockchainType.MUMBAI: "0xe9939e7Ea7D7fb619Ac57f648Da7B1D425832631",
|
||||||
|
AvailableBlockchainType.AMOY: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
||||||
AvailableBlockchainType.ETHEREUM: "0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",
|
AvailableBlockchainType.ETHEREUM: "0x5BA1e12693Dc8F9c48aAD8770482f4739bEeD696",
|
||||||
|
AvailableBlockchainType.ARBITRUM_ONE: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
||||||
AvailableBlockchainType.ARBITRUM_NOVA: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
AvailableBlockchainType.ARBITRUM_NOVA: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
||||||
AvailableBlockchainType.ARBITRUM_SEPOLIA: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
AvailableBlockchainType.ARBITRUM_SEPOLIA: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
||||||
AvailableBlockchainType.XAI: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
AvailableBlockchainType.XAI: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
"""
|
"""
|
||||||
Utilities to work with stream boundaries.
|
Utilities to work with stream boundaries.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import time
|
import time
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Ładowanie…
Reference in New Issue