-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1024 from moonstream-to/add-ethereum-state-service
Add ethereum tasks.
- Loading branch information
Showing
8 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[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 ethereum | ||
CPUWeight=60 | ||
SyslogIdentifier=ethereum-metadata |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Execute Ethereum metadata crawler each 10m | ||
|
||
[Timer] | ||
OnBootSec=20s | ||
OnUnitActiveSec=60m | ||
|
||
[Install] | ||
WantedBy=timers.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[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 --access-id "${NB_CONTROLLER_ACCESS_ID}" clean-state-labels --blockchain ethereum -N 10000 | ||
CPUWeight=60 | ||
SyslogIdentifier=ethereum-state-clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Execute Ethereum state clean labels crawler each 25m | ||
|
||
[Timer] | ||
OnBootSec=50s | ||
OnUnitActiveSec=25m | ||
|
||
[Install] | ||
WantedBy=timers.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[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 --access-id "${NB_CONTROLLER_ACCESS_ID}" crawl-jobs --moonstream-token "${MOONSTREAM_PUBLIC_QUERIES_DATA_ACCESS_TOKEN}" --blockchain ethereum --jobs-file /home/ubuntu/moonstream/crawlers/mooncrawl/mooncrawl/state_crawler/jobs/ethereum-jobs.json | ||
CPUWeight=60 | ||
SyslogIdentifier=ethereum-state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Execute Ethereum state crawler each 10m | ||
|
||
[Timer] | ||
OnBootSec=15s | ||
OnUnitActiveSec=10m | ||
|
||
[Install] | ||
WantedBy=timers.target |
35 changes: 35 additions & 0 deletions
35
crawlers/mooncrawl/mooncrawl/state_crawler/jobs/ethereum-jobs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
[ | ||
{ | ||
"type": "function", | ||
"stateMutability": "view", | ||
"inputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "tokenId", | ||
"type": "uint256", | ||
"value": { | ||
"type": "function", | ||
"name": "totalSupply", | ||
"outputs": [ | ||
{ | ||
"internalType": "uint256", | ||
"name": "", | ||
"type": "uint256" | ||
} | ||
], | ||
"address": "0xe1dC516B1486Aba548eecD2947A11273518434a4", | ||
"inputs": [] | ||
} | ||
} | ||
], | ||
"name": "tokenURI", | ||
"outputs": [ | ||
{ | ||
"internalType": "string", | ||
"name": "", | ||
"type": "string" | ||
} | ||
], | ||
"address": "0xe1dC516B1486Aba548eecD2947A11273518434a4" | ||
} | ||
] |