MidnightMidnight Contracts Wizard
Usage
Learn how to use the Midnight Contracts Wizard CLI tool
Basic Usage
Run the wizard using npx (no installation required):
npx @meshsdk/midnight-contracts-wizardInteractive Mode
When you run the wizard, it will guide you through an interactive setup:
- Project Name - Enter a name for your new project
- Select Contracts - Choose which contract templates to include:
- Tokenization Contract
- Staking Contract
- Identity Contracts
- Oracle Contract
- Lending & Borrowing Contract
- Confirmation - Review your selections and confirm
Example Session
$ npx @meshsdk/midnight-contracts-wizard
Welcome to Midnight Contracts Wizard!
? Enter your project name: my-midnight-contracts
? Select contracts to include: (Use arrow keys and space to select)
◉ Tokenization Contract (7 ZK circuits)
◯ Staking Contract (8 ZK circuits)
◉ Identity Contracts (1 ZK circuit)
◯ Oracle Contract (7 ZK circuits)
◯ Lending & Borrowing Contract (7 ZK circuits)
✓ Project created successfully!
✓ Tokenization contract added
✓ Identity contracts added
📋 Next steps:
1) Navigate to the project folder:
cd ./my-midnight-contracts
2) Compile your smart contracts:
compact compile contracts/tokenization/tokenization.compact ./src/managed/tokenization
compact compile contracts/identity/identity.compact ./src/managed/identity
💡 Your contracts will be compiled to `src/managed/`
💡 Check the `README.md` for detailed instructionsCommand Options
Help
Display help information:
npx @meshsdk/midnight-contracts-wizard --helpVersion
Check the installed version:
npx @meshsdk/midnight-contracts-wizard --versionNext Steps
- Explore Available Contracts to understand each contract type
- Review Project Structure to learn about generated files