https://github.com/kleros/etherscan-tags
Posts curate contract tags to blockscan
https://github.com/kleros/etherscan-tags
backend curated-list generalized-curated-list
Last synced: 11 months ago
JSON representation
Posts curate contract tags to blockscan
- Host: GitHub
- URL: https://github.com/kleros/etherscan-tags
- Owner: kleros
- License: mit
- Archived: true
- Created: 2021-12-03T15:07:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-06T20:44:32.000Z (over 3 years ago)
- Last Synced: 2024-12-17T01:16:09.866Z (over 1 year ago)
- Topics: backend, curated-list, generalized-curated-list
- Language: TypeScript
- Homepage:
- Size: 471 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Blockscan Tags
Checks Curate for contract tags and posts them to an endpoint. Works nicely with cron.
> Note: At the time of publication, there is no endpoint that lets us check if a given tag was already posted, so we keep a local DB to avoid posting the same tag again. Losing this database means the tool will submit everything again.
## Volta
This project uses `volta.sh` for node version management. See `package.json` for the version.
## Running
Duplicate `.env.example` and fill the env variables. You can use network specific files such as `.env.kovan` and then `yarn start:kovan`.
## Cron Job
This script plays well with cron. Here is a suggetsion on how to use it with `volta.sh`.
1- In the project folder, `vim script-mainnet.sh` paste the following and save.
2- Paste the following:
```
#!/bin/bash
cd /home/ubuntu/blockscan-tags
PATH=/home/ubuntu/.volta/bin:$PATH
echo "Using volta version $(volta --version)"
echo "Using node version $(node --version)"
yarn start:mainnet
```
3- Give script execution rights `chmod +x script-mainnet.sh`.
4- Setup the cron job: `crontab -e` and add `0 * * * * cd ~/blockscan-tags && ./script-mainnet.sh >> output-mainnet.log 2>&1`
## Debugging
If using vscode, use the following to debug.
.vscode/launch.json:
```
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Typescript Server",
"protocol": "inspector",
"port": 9229,
"restart": true,
"localRoot": "${workspaceFolder}",
"remoteRoot": "."
}
]
}
```