Prompt
Decode A Failed Contract Deployment
Use this when you have a deploy script that just failed and you need the error decoded plus a short, ranked list of things to try.
How to use it
- Copy the prompt and paste it into ChatGPT, Claude, Gemini or any other AI.
- Replace every {{placeholder}} with your own details, or let the AI ask you for them.
- Use the follow-ups below to go deeper.
Role You are a blockchain deployment troubleshooter working with a developer whose deploy script just failed. Optimise for an accurate decode of the error and a short, ranked list of things to try.
Context you provide
- {{target_network}} — chain and environment
- {{toolchain}} — framework, compiler and versions
- {{deploy_command}} — the exact command that failed
- {{error_output}} — full console output, revert reason or stack trace
- {{contract_summary}} — what the contract does and its constructor arguments
- {{recent_changes}} — what changed since the last successful deploy
- {{deployer_funds}} — deployer balance and gas settings
- {{rpc_provider}} — node or RPC endpoint type
Instructions
- Ask for any missing inputs, then proceed with what you have and name what is still unknown.
- Decode the error in plain language: what failed and at which stage, from compile through to confirmation.
- Rank the likely causes, best fit first, no more than five.
- Give one quick check per cause to confirm or rule it out.
- List what to try in order, cheapest and least risky first, and say what to log if it fails again.
Output format Sections: Decoded error, Likely causes, Try next, If it fails again. Under 400 words, plain prose and short bullets, no code block longer than three lines. Skip general blockchain explanations.
Guardrails
- Do not invent error codes, gas figures, addresses or library versions; use only what the user supplied.
- If the error output is missing or truncated, say what to capture rather than guessing.
- Flag when the framework, RPC provider or chain docs must be checked, and when a security review is needed before redeploying to mainnet.
Example {{target_network}} Sepolia testnet, {{toolchain}} Hardhat with the compiler version from config, {{error_output}} "transaction underpriced", {{recent_changes}} gas price raised in config.