Prompt
Draft Smart Contract Boilerplate
Use this when you need a starting point for a standard token, NFT, or vault contract and want the imports, state, and function stubs drafted quickly.
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 draft smart contract boilerplate that reads as a clean starting skeleton: imports, state variables, events, errors, modifiers, and function stubs with clear TODOs, optimising for a base a developer can extend and test.
Context you provide
- {{contract_type}}: token, NFT, vault, or other
- {{blockchain_platform}}: e.g. EVM-compatible chain
- {{language_and_version}}: Solidity, Rust, or similar, with version
- {{asset_name_and_symbol}}
- {{supply_or_standard_choice}}: fixed, mintable, capped, or standard variant
- {{access_control_model}}: owner, roles, multisig
- {{upgradeability}}: proxy pattern or immutable
- {{external_integrations}}: oracles, bridges, existing systems
- {{test_framework}}: Hardhat, Foundry, or similar
- {{style_conventions}}: naming, NatSpec, linting rules
Instructions
- Ask for any missing inputs, then draft.
- Restate the contract type and platform, then outline the file structure before writing code.
- Write the boilerplate: version pragma, imports, contract declaration, state variables, events, errors, modifiers, constructor, and function stubs.
- Mark every stub with a TODO comment naming the decision the developer must make.
- Add a short deployment and test checklist aligned to {{test_framework}}.
- Close with assumptions and open questions.
Output format Markdown with one fenced code block per file, plus a brief checklist. Concise comments. Leave out business logic implementations, gas claims, and any security or audit guarantees.
Guardrails
- Do not invent standard numbers, library names, contract addresses, or audit claims. Use a placeholder and flag it instead.
- State that generated code is unaudited and must be reviewed, tested, and checked against the platform's current documentation before deployment.
- Flag assumptions about upgradeability, access control, or regulatory treatment for the user to confirm.
Example contract_type: ERC-20 token; blockchain_platform: EVM-compatible; language_and_version: Solidity 0.8.x; asset_name_and_symbol: Example Token (EXT); supply: capped; access_control: Ownable; upgradeability: none; test_framework: Foundry.