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:clean
If 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 browser
Anvil is used because hardhat is incapable of filtering logs using the fromBlock
/toBlock
.
Read more about this issue here and here.