contract.watch is an in-development continuous monitoring tool for the open source contracts submitted to Etherscan. It facilitates the tracking of the
verified source contracts beyond the latest 500 that are made available and also functions as a pipeline to run modularized scripts on them. Those contracts (and the output generated by the modules) are accessible through a REST API.
Important: An Etherscan account is required to generate the API Key Token, Etherscan offers a free plan with 5 calls per second; when initializing a consumer a timeout can be configured with the
--timeoutflag in order to prevent being rate-limited.
Modules are self-contained functions that can be executed on the contracts published to the work queue a consumer is subscribed to. The consumer’s module can specified with the
- solhint: fetches the source code of each newly tracked contract and runs it through solhint (a solidity linter), with security rules applied to it.
Please refer to solhint’s security rules and configure the
/consumer/.solhint.json config file based on your requirements.
- Run rabbitmq:
docker run -it --rm --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3.10-management
- Install/run Postgres:
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
- Install the
node.jsdependencies for the contract.watch tool and the consumer:
- Create the necessary tables found on
- Put your Postgres, Rabbitmq & Etherscan credentials on the
.envfiles of the contract.watch tool and the consumer