Stateless bot monitors GraphQL endpoint for new events MessageSent
that occurs on Polygon network. And then transfers proof to Ethereum root contract.
We use Ape as the testing and deployment framework of this project.
To install pre-commit locally:
pre-commit install
export WEB3_INFURA_PROJECT_ID=<Infura project ID>
export APE_ACCOUNTS_BOT_PASSPHRASE=<Passphrase for account with alias BOT>
export ETHERSCAN_API_KEY=<API Key for Etherscan>
ape run proof_bot --fx-root-tunnel 0x51825d6e893c51836dC9C0EdF3867c57CD0cACB3--graphql-endpoint https://subgraph.satsuma-prod.com/735cd3ac7b23/nucypher-ops/PolygonChild/api --proof-generator https://proof-generator.polygon.technology/api/v1/matic/exit-payload/ --network ethereum:mainnet:infura --account BOT
docker build -f deploy/Dockerfile -t nucypher/train45:latest .
First, create the log file:
touch /var/log/cron.log
Then run the bot:
docker run \
--name train45 \
--detach \
--env-file .env \
-f deploy/Dockerfile \
-v /var/log/cron.log:/var/log/cron.log \
-v /var/log/:/var/log/ \
-v ~/.ape/:/root/.ape \
nucypher/train45:latest
Enjoy the logs:
tail -f /var/log/cron.log
docker stop train45 && docker rm train45
docker-compose build
First, create the log file:
touch /var/log/cron.log
Then run the bot with docker-compose (including log server and autoupdate service):
docker-compose up -d
docker-compose down