You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: docs/get-started/deploy-smart-contracts.mdx
+43Lines changed: 43 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -137,6 +137,49 @@ This will return the initial value of the Counter contract's `number` storage va
137
137
138
138
**Congratulations! You've deployed your smart contracts to Base Sepolia!**
139
139
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
+
140
183
## Next Steps
141
184
142
185
- 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