Skip to content

Commit 6aef8df

Browse files
committed
Add EVM Contract wizard
1 parent 4410678 commit 6aef8df

File tree

3 files changed

+111
-10
lines changed

3 files changed

+111
-10
lines changed

content/evm/_meta.js

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ export default {
2525
'evm-general': 'EVM (General)',
2626
'evm-hardhat': 'EVM with Hardhat',
2727
'evm-foundry': 'EVM with Foundry',
28+
'evm-wizard': 'EVM Contract Wizard',
2829
'solidity-resources': 'Solidity Resources',
2930
'nft-contract-tutorial': 'ERC721 (NFT) Contracts',
3031

content/evm/evm-wizard.mdx

+109
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Using the OpenZeppelin Wizard
2+
3+
## What is the OpenZeppelin Wizard?
4+
5+
The OpenZeppelin Wizard is a powerful interactive tool that simplifies the creation of secure, standard-compliant smart contracts for Sei EVM. It provides a user-friendly interface for generating production-ready contract code based on OpenZeppelin's battle-tested libraries.
6+
7+
## Benefits of Using the Wizard
8+
9+
- **Security First**: All generated contracts use audited, industry-standard implementations
10+
- **Time-Saving**: Eliminate boilerplate code and common setup configurations
11+
- **Customizable**: Tailor contracts to your specific requirements through an intuitive UI
12+
- **Educational**: Learn best practices by examining professionally structured contract code
13+
- **Up-to-Date**: Always generates code compatible with the latest Solidity versions and standards
14+
15+
## Available Contract Types
16+
17+
<div className="overflow-x-auto max-w-full">
18+
<table className="w-full divide-y divide-neutral-200 dark:divide-neutral-800">
19+
<thead>
20+
<tr>
21+
<th className="px-4 py-3 text-left text-sm font-medium text-neutral-500 dark:text-neutral-400">Contract Type</th>
22+
<th className="px-4 py-3 text-left text-sm font-medium text-neutral-500 dark:text-neutral-400">Description</th>
23+
<th className="px-4 py-3 text-left text-sm font-medium text-neutral-500 dark:text-neutral-400">Common Use Cases</th>
24+
</tr>
25+
</thead>
26+
<tbody className="divide-y divide-neutral-200 dark:divide-neutral-800">
27+
<tr>
28+
<td className="px-4 py-3 text-sm text-neutral-900 dark:text-neutral-100 whitespace-nowrap font-medium">ERC20</td>
29+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400 whitespace-nowrap">Standard fungible token</td>
30+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400">Cryptocurrencies, utility tokens, governance tokens</td>
31+
</tr>
32+
<tr>
33+
<td className="px-4 py-3 text-sm text-neutral-900 dark:text-neutral-100 whitespace-nowrap font-medium">ERC721</td>
34+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400 whitespace-nowrap">Non-fungible token (NFT)</td>
35+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400">Digital collectibles, art, real estate, certifications</td>
36+
</tr>
37+
<tr>
38+
<td className="px-4 py-3 text-sm text-neutral-900 dark:text-neutral-100 whitespace-nowrap font-medium">ERC1155</td>
39+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400 whitespace-nowrap">Multi-token standard</td>
40+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400">Gaming assets, mixed fungible/non-fungible collections</td>
41+
</tr>
42+
<tr>
43+
<td className="px-4 py-3 text-sm text-neutral-900 dark:text-neutral-100 whitespace-nowrap font-medium">Governor</td>
44+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400 whitespace-nowrap">On-chain governance</td>
45+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400">DAO voting systems, protocol management</td>
46+
</tr>
47+
<tr>
48+
<td className="px-4 py-3 text-sm text-neutral-900 dark:text-neutral-100 whitespace-nowrap font-medium">Custom</td>
49+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400 whitespace-nowrap">Specialized contracts</td>
50+
<td className="px-4 py-3 text-sm text-neutral-600 dark:text-neutral-400">Access control, payment systems, timelock functions</td>
51+
</tr>
52+
</tbody>
53+
</table>
54+
</div>
55+
56+
## Step-by-Step Guide
57+
58+
1. **Access the Wizard**: Use the embedded widget (from OpenZeppelin) below or visit [wizard.openzeppelin.com](https://wizard.openzeppelin.com/)
59+
2. **Select Contract Type**: Choose the standard that matches your project needs (ERC20, ERC721, etc.)
60+
3. **Configure Basic Settings**:
61+
- Set token name and symbol
62+
- Choose Solidity version
63+
- Select access control mechanism (Ownable, Roles, etc.)
64+
4. **Add Security Features**:
65+
- Pausable functionality
66+
- Permit extensions
67+
- Flash minting capabilities
68+
- Voting mechanisms
69+
5. **Customize Token Behavior**:
70+
- Premint options
71+
- Burning capabilities
72+
- Token transfer rules
73+
- Supply management
74+
6. **Review Generated Code**: The code updates in real-time as you make selections
75+
7. **Copy and Implement**: Use the "Copy to clipboard" button to export your contract code
76+
8. **Deploy**: The generated code is ready for compilation and deployment
77+
78+
## Interactive OpenZeppelin Wizard
79+
80+
Explore and create your custom smart contracts using the embedded wizard below:
81+
82+
<div className="my-5 p-5 border-0 !border-0 bg-gray-50">
83+
<iframe src="https://wizard.openzeppelin.com/embed" className="w-full h-[700px] border-0 !border-0 bg-black" title="OpenZeppelin Contract Wizard" />
84+
</div>
85+
86+
## Tips for Effective Use
87+
88+
- **Start Simple**: Begin with minimal features and add complexity incrementally
89+
- **Understand Each Option**: Hover over the information icons (ℹ️) for detailed explanations
90+
- **Review Dependencies**: Note which OpenZeppelin libraries your contract imports
91+
- **Consider Gas Costs**: More features generally mean higher deployment and operation costs
92+
- **Customize Post-Generation**: The wizard provides a starting point—most projects will require additional customization
93+
94+
## Beyond the Wizard
95+
96+
While the wizard is excellent for starting development, consider these next steps:
97+
98+
1. **Test Thoroughly**: Create comprehensive test suites for your generated contracts
99+
2. **Security Audit**: Consider professional audits for high-value contracts
100+
3. **Documentation**: Add detailed comments and generate documentation
101+
4. **Optimization**: Review for gas optimization opportunities
102+
5. **Upgradability**: Consider implementing upgrade patterns for long-lived contracts
103+
104+
## Learn More
105+
106+
- [OpenZeppelin Contracts Documentation](https://docs.openzeppelin.com/contracts/)
107+
- [Smart Contract Security Best Practices](https://docs.openzeppelin.com/contracts/4.x/security-considerations)
108+
- [OpenZeppelin GitHub Repository](https://github.com/OpenZeppelin/openzeppelin-contracts)
109+
- [OpenZeppelin Community Forum](https://forum.openzeppelin.com/)

content/evm/solidity-resources.mdx

+1-10
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ This page suggests a minimal set of resources for getting started with building
9090

9191
## Using the OpenZeppelin Wizard
9292

93-
OpenZeppelin provides a convenient web-based wizard to create standard contracts. Visit [https://wizard.openzeppelin.com/](https://wizard.openzeppelin.com/) to access it.
93+
OpenZeppelin provides a convenient web-based wizard to create standard contracts. Visit the docs section for it [here](/evm-wizard) or [https://wizard.openzeppelin.com/](https://wizard.openzeppelin.com/) to access it.
9494

9595
The wizard allows you to:
9696

@@ -106,15 +106,6 @@ The wizard is perfect for:
106106
- Exploring different configuration options
107107
- Understanding best practices in contract development
108108

109-
Here's how to use it:
110-
111-
1. Visit [https://wizard.openzeppelin.com/](https://wizard.openzeppelin.com/)
112-
2. Select the type of contract you want to create
113-
3. Configure the settings (name, symbol, features)
114-
4. Add any additional functionality you need
115-
5. Copy the generated code and paste it into your project
116-
6. Customize as needed
117-
118109
## Best Practices & Security Considerations
119110

120111
When developing on Sei V2 EVM with OpenZeppelin contracts, follow these best practices:

0 commit comments

Comments
 (0)