Skip to content

Interactive smart contract generator based on OpenZeppelin Contracts.

License

Notifications You must be signed in to change notification settings

OpenZeppelin/contracts-wizard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

09049ef · Feb 13, 2025
Feb 5, 2025
Feb 13, 2025
Aug 24, 2022
Nov 30, 2023
Mar 1, 2024
Dec 17, 2024
Jan 14, 2025
Feb 13, 2025
Nov 26, 2024
Feb 5, 2025
Apr 13, 2023
Nov 30, 2023
Jan 17, 2025
Jan 20, 2025

Repository files navigation

Solidity NPM Package Cairo NPM Package Netlify Status

Contracts Wizard is a web application to interactively build a contract out of components from OpenZeppelin Contracts. Select the kind of contract that you want, set your parameters and desired features, and the Wizard will generate all of the code necessary. The resulting code is ready to be compiled and deployed, or it can serve as a starting point and customized further with application specific logic.

Development

Install dependencies with yarn install.

packages/core contains the code generation logic for each language under separately named subfolders.

packages/ui is the interface built in Svelte. From the packages/ui directory, run yarn dev to spin up a local server to develop the UI.

You'll need to supply your own environment variables if you want to enable Wizard AI Assistant (OPENAI_API_KEY) and/or logging (REDIS_URL, REDIS_TOKEN).

Embedding

To embed Contracts Wizard on your site, first include the script tag:

<script async src="https://wizard.openzeppelin.com/build/embed.js"></script>

Then place <oz-wizard></oz-wizard> in the body where you want Contracts Wizard to load.

Optionally focus on specific tab with the data-tab attribute as in <oz-wizard data-tab="ERC721"></oz-wizard>.

For languages other than Solidity, use the data-lang attribute, for example: <oz-wizard data-lang="cairo"></oz-wizard>.

API

The following describes how to use the Contracts Wizard programmatic API in your own applications.