diff --git a/docs/recipes/DevelopingOnFork.md b/docs/recipes/DevelopingOnFork.md new file mode 100644 index 0000000..09490ed --- /dev/null +++ b/docs/recipes/DevelopingOnFork.md @@ -0,0 +1,49 @@ +# Developing on Fork + +This guide shows how to run and interact with a local fork of Starknet mainnet. + +## Setup + +1. Start the fork: +```bash +yarn chain --fork-network https://starknet-mainnet.public.blastapi.io/rpc/v0_7 +``` + +2. Update `scaffoldConfig` in scaffold.config.ts as: +```typescript +const scaffoldConfig = { + targetNetworks: [chains.mainnetFork], + isFork: true, // handles forked network validation + // ... other config options +}; +``` + +3. Create a `.env` file from the `.env.example` template and configure it accordingly +``` +NEXT_PUBLIC_PROVIDER_URL=http://127.0.0.1:5050 +``` + +## Wallet Configuration + +### Using Argent/Braavos +1. Open your wallet +2. Add Custom Network: + - RPC URL: http://127.0.0.1:5050/rpc + - Chain ID: 0x534e5f4d41494e + - Name: Starknet Fork + +![image](https://github.com/user-attachments/assets/511b84a1-e232-46b3-a4a4-82c44ad03969) + + +similiarly for braavos. +if you correctly connected with the devnet correctly, it should show +![image](https://github.com/user-attachments/assets/a684c853-35ed-4042-a415-86744efb36d2) + + +## Interaction +Navigate to `/debug-ui` to interact with your contracts + +## Notes +- Make sure your contract deployment is complete before testing +- The burner wallet is automatically configured with test ETH +- External wallets need to be configured with the correct network settings \ No newline at end of file