An example repository to demonstrate how to build on Kakarot.
- Docker
- Yarn
- Foundry
- Scarb and Starkli if you want to deploy Cairo contracts. Make sure to install starkli version
0.2.9
withstarkliup -v v0.2.9
Run the following command to setup the git submodules.
make setup
Copy example.env into .env and add relevant variables
cp .env.example .env
To get started, you will need to run the local nodes. You can do this by running:
make start
This will start an Anvil Node (that runs the L1 contracts for L1 <> L2 messaging) at address http://127.0.0.1:8545
and a Kakarot Node at address http://127.0.0.1:3030
Kakarot is deployed along with commonly used contracts, such as Multicall3, CreateX and the Arachnid Proxy.
To deploy the L1 contracts, you can run:
make deploy-l1
This will deploy the L1 messaging contracts on the Anvil node. As well as the L1 bridge contract, and L1 ERC20 contract.
The L2 contracts will de deployed with forge.
- Deploy L2 bridge contract.
make deploy-bridge-l2-forge
- Run script to update UI with deployed contract.
node scripts/update_bridge_l2_data.js <DEPLOYED CONTRACT ADDRESS>
- Deploy L2 ERC20 contract.
make deploy-erc20-l2-forge
- Run script to update UI with deployed contract.
node scripts/update_erc20_l2_data.js <DEPLOYED CONTRACT ADDRESS>
- navigate to "ui" directory and install dependencies
cd ui && yarn
- Run development server
yarn dev
To run the hardhat test suite, you can run:
make test