10000 GitHub - manumonti/train45: Polygon state transfer bot 🚂
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

manumonti/train45

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

State Transfer Bot Polygon → Ethereum

Stateless bot monitors GraphQL endpoint for new events MessageSent that occurs on Polygon network. And then transfers proof to Ethereum root contract.

Installation

We use Ape as the testing and deployment framework of this project.

Configuring Pre-commit

To install pre-commit locally:

pre-commit install

Example of usage

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
docker build -f deploy/Dockerfile -t nucypher/train45:latest .
Run

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
Stop
docker stop train45 && docker rm train45

Docker-compose

Build
docker-compose build
Start (all services)

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
Stop (all services)
docker-compose down

About

Polygon state transfer bot 🚂

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 80.4%
  • Dockerfile 10.1%
  • Shell 7.6%
  • Solidity 1.9%
0