Live Preview
Template Structure
Smart Contract Specification Template — Define Before You Code
A smart contract specification document defines every function, state variable, access control rule, and event before development begins.
Format
Document
Sections
4
Format
Document
Status
Ready to customize
SMART CONTRACT SPECIFICATION TEMPLATE
Contract Name: [ContractName] Blockchain: [Ethereum / Arbitrum / Polygon / etc.] Solidity Version: 0.8.24 Development Date: [Date] Specification Version: 1.0
SECTION 1: OVERVIEW
Purpose: [1–2 sentence description of what this contract does] Actors: Admin: [Description — address, multisig, DAO] User: [Description — who interacts with main functions] Keeper: [Description — automated/bot actors if any] Oracle: [Description — trusted data provider if any]
SECTION 2: STATE VARIABLES
| Variable | Type | Visibility | Description | Initial Value | | owner | address | public | Contract admin | msg.sender | | totalSupply | uint256 | public | Total tokens minted | 0 | | paused | bool | public | Emergency pause | false |
SECTION 3: FUNCTIONS
Format for each function: Function: [name] Visibility: external / public / internal / private State mutability: view / pure / payable / nonpayable Modifiers: nonReentrant, onlyOwner, whenNotPaused, etc. Access control: Who can call this function? Example: Function: transfer Visibility: external State mutability: nonpayable Modifiers: whenNotPaused Access control: Any address with balance > 0
Template Guide
How to use this template
Template Overview
A smart contract specification document defines every function, state variable, access control rule, and event before development begins.
SMART CONTRACT SPECIFICATION TEMPLATE
Contract Name: [ContractName] Blockchain: [Ethereum / Arbitrum / Polygon / etc.] Solidity Version: 0.8.24 Development Date: [Date] Specification Version: 1.0
SECTION 1: OVERVIEW
Purpose: [1–2 sentence description of what this contract does]
Actors: Admin: [Description — address, multisig, DAO] User: [Description — who interacts with main functions] Keeper: [Description — automated/bot actors if any] Oracle: [Description — trusted data provider if any]
SECTION 2: STATE VARIABLES
| Variable | Type | Visibility | Description | Initial Value | | owner | address | public | Contract admin | msg.sender | | totalSupply | uint256 | public | Total tokens minted | 0 | | paused | bool | public | Emergency pause | false |
SECTION 3: FUNCTIONS
Format for each function: Function: [name] Visibility: external / public / internal / private State mutability: view / pure / payable / nonpayable Modifiers: nonReentrant, onlyOwner, whenNotPaused, etc. Access control: Who can call this function?
Example: Function: transfer Visibility: external State mutability: nonpayable Modifiers: whenNotPaused Access control: Any address with balance > 0