Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs recipe #60 #67

Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions docs/recipes/DevelopingOnFork.md
suhas-sensei marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
```markdown
# 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 scaffold.config.ts:
```typescript
const mainnetFork = {
id: BigInt("0x534e5f4d41494e"),
network: "devnet",
name: "Starknet Fork",
nativeCurrency: {
address: "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
name: "Ether",
symbol: "ETH",
decimals: 18,
},
testnet: true,
rpcUrls: {
default: {
http: ["http://127.0.0.1:5050/rpc"],
},
public: {
http: ["http://127.0.0.1:5050/rpc"],
},
},
} as Chain;

const scaffoldConfig = {
targetNetworks: [mainnetFork],
// ... other config options remain the same
};
suhas-sensei marked this conversation as resolved.
Show resolved Hide resolved
```

## 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
Loading