-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated readme with instruction to run L1-L2 testing
- Loading branch information
Showing
1 changed file
with
52 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,57 @@ | ||
# WIP of Fossil to Cairo 1 | ||
|
||
## References | ||
- Fossil cairo 0: https://github.com/OilerNetwork/fossil | ||
- Fossil cairo 0: https://github.com/OilerNetwork/fossil_cairo0/tree/master | ||
- Some utils libraries that can be reused after refacto to latest cairo updates: https://github.com/HerodotusDev/cairo-lib | ||
|
||
### The repo structure and files organisation will be reviewed once all the components will be implemented | ||
### The repo structure and files organisation will be reviewed once all the components will be implemented | ||
|
||
### Testing | ||
1. Start Anvil in a new terminal with the command `anvil`. | ||
|
||
2. Install dependencies: | ||
```bash | ||
cd ethereum | ||
forge install | ||
``` | ||
|
||
3. Build the project and set up environment variables: | ||
```bash | ||
cd starknet | ||
scarb build | ||
source katana/katana.env | ||
``` | ||
|
||
4. I a New Terminal Start the Katana StarkNet node: | ||
```bash | ||
katana --messaging anvil.messaging.json --disable-fee | ||
``` | ||
|
||
5. In a New Terminal Declare the Cairo contracts: | ||
```bash | ||
cd starknet | ||
katana/declare.sh | ||
``` | ||
|
||
6. Deploy the Cairo contracts: | ||
```bash | ||
katana/deploy.sh | ||
``` | ||
|
||
7. Initialize the deployed contracts: | ||
```bash | ||
source katana/initialize_contracts.sh | ||
``` | ||
|
||
8. 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} | ||
``` | ||
|
||
9. Send a message: | ||
```bash | ||
forge script script/SendMessage.s.sol:Value --broadcast --rpc-url ${ETH_RPC_URL} | ||
``` |