Build Your Own Rollup - A simple rollup implementation for educational purposes.
If you want to read the code and understand how it works you should start with the following files:
For more details about the architecture, see here.
Install the following:
The recommended way of setting the postgres database is through docker using the commands below.
docker run -d --name=byor -p 5432:5432 -e POSTGRES_PASSWORD=password postgres:14
docker exec -it byor psql -U postgres -c 'CREATE DATABASE byor_local'
docker exec -it byor psql -U postgres -c 'CREATE DATABASE byor_test'
If you restart your system running docker start byor will bring the database back online.
To build the application, follow these steps:
- From the root of the project run
yarn && yarn build:dependencies
To run the application, follow these steps:
anvil
# open new terminal window
cd packages/contracts
yarn deploy --network localhost
# open new terminal window
cd packages/node
yarn seeder 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
yarn start:cleanIf you want to run the wallet application, follow these additional steps:
# open new terminal window
cd packages/wallet
yarn dev --port 8080
# open localhost:8080 in your web browserAnvil is used because hardhat is incapable of filtering logs using the fromBlock/toBlock.
Read more about this issue here and here.
Demo deployment was available under byor.l2beat.com but it's no longer maintained. Please follow the README to deploy your own application if you want to use it.