Skip to content

Commit

Permalink
Update readme installation & running instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
piwonskp committed Oct 18, 2024
1 parent 093f24a commit 9a486ea
Showing 1 changed file with 27 additions and 16 deletions.
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,54 +6,65 @@

### The repo structure and files organisation will be reviewed once all the components will be implemented

### Testing
Start Anvil in a new terminal with the command `anvil`.
### Dependencies

Install dependencies:
```bash
dojoup -v v1.0.0-alpha.1
```
1. Download:
```bash
curl -L https://foundry.paradigm.xyz | bash;
curl -L https://install.dojoengine.org | bash
```
2. New terminal:
```bash
dojoup -v v1.0.0-alpha.16
asdf plugin add starknet-foundry
asdf plugin add scarb
asdf plugin add starkli
cd starknet; asdf install
cd ../ethereum; forge soldeer install
```

### Testing
1. Start Anvil in a new terminal with the command:
```bash
cd ethereum
forge soldeer install forge-std~1.8.2
anvil
```
I a New Terminal Start the Katana StarkNet node:

2. I a New Terminal Start the Katana StarkNet node:
```bash
katana --messaging anvil.messaging.json --disable-fee
```

In a New Terminal Build the project and set up environment variables:
3. In a New Terminal Build the project and set up environment variables:
```bash
cd starknet
scarb build
source katana/katana.env
```

Declare the Cairo contracts:
4. Declare the Cairo contracts:
```bash
katana/declare.sh
```

Deploy the Cairo contracts:
5. Deploy the Cairo contracts:
```bash
katana/deploy.sh
```

In a New Terminal Set up local Ethereum testing:
6. In a New Terminal Set up local Ethereum testing:
```bash
cd ethereum
cp anvil.env .env
source .env
forge script script/LocalTesting.s.sol:LocalSetup --broadcast --rpc-url ${ETH_RPC_URL}
```

Generate the proof for the mock account and storage:
7. Generate the proof for the mock account and storage:
```
cast proof 0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9 0 --block 3
```

The script `starknet/katana/prove_sto.sh` is a wrapper to store the state root and verify account first and then storage proof for the slot 0x0 in `MockStorage.sol`.
8. The script `starknet/katana/prove_sto.sh` is a wrapper to store the state root and verify account first and then storage proof for the slot 0x0 in `MockStorage.sol`.
```
starknet/katana/verify_proofs.sh
katana/verify_proofs.sh
```

0 comments on commit 9a486ea

Please sign in to comment.