Skip to content

Commit 05e04c9

Browse files
Add troubleshooting section to smart contract deployment guide
This commit adds a comprehensive troubleshooting section to the deploy-smart-contracts.mdx guide to help developers resolve common issues they may encounter during deployment. Changes: - Added troubleshooting section with 5 common deployment issues - Included solutions for insufficient funds, private key errors, RPC connection issues, compilation errors, and timeout issues - Used Mintlify Warning component for better visibility - Followed Base documentation style guidelines for clear, actionable content This improvement addresses a gap in the deployment documentation and provides immediate value to developers getting started with Base. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 482065c commit 05e04c9

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

docs/get-started/deploy-smart-contracts.mdx

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,49 @@ This will return the initial value of the Counter contract's `number` storage va
137137

138138
**Congratulations! You've deployed your smart contracts to Base Sepolia!**
139139

140+
## Troubleshooting
141+
142+
### Common Issues and Solutions
143+
144+
<Warning>
145+
If you encounter issues during deployment, check the solutions below before seeking additional help.
146+
</Warning>
147+
148+
**Insufficient funds for gas**
149+
150+
If you see an error about insufficient funds:
151+
- Verify your wallet has enough Base Sepolia ETH for gas fees
152+
- Get free test ETH from the [Base Sepolia faucets](/base-chain/tools/network-faucets)
153+
- Check your balance with: `cast balance <YOUR_ADDRESS> --rpc-url $BASE_SEPOLIA_RPC_URL`
154+
155+
**Private key not found**
156+
157+
If the deployment fails with a keystore error:
158+
- Confirm you imported the key correctly: `cast wallet list`
159+
- Re-import your private key: `cast wallet import deployer --interactive`
160+
- Ensure you're using the correct account name in the deployment command
161+
162+
**RPC connection errors**
163+
164+
If you cannot connect to the Base network:
165+
- Verify your `.env` file contains the correct RPC URL
166+
- Check that you loaded the environment variables: `echo $BASE_SEPOLIA_RPC_URL`
167+
- Try an alternative RPC endpoint if the default is unavailable
168+
169+
**Contract compilation errors**
170+
171+
If Forge cannot compile your contracts:
172+
- Run `forge build` to see detailed compilation errors
173+
- Ensure your Solidity version matches the pragma in your contract
174+
- Update Foundry to the latest version: `foundryup`
175+
176+
**Deployment hangs or times out**
177+
178+
If deployment appears stuck:
179+
- Check network status at [status.base.org](https://status.base.org)
180+
- Increase the gas limit if your contract is complex
181+
- Wait a few minutes and retry - the network may be congested
182+
140183
## Next Steps
141184

142185
- Use [Onchainkit](https://onchainkit.com) to connect your frontend to your contracts! Onchainkit is a library of ready-to-use React components and Typescript utilities.

0 commit comments

Comments
 (0)