Author: heyjonbray Modified from solidity-hardhat-cursorrules by brolag
- Secure DeFi Protocols: Create lending platforms, decentralized exchanges, or yield optimization tools with security best practices.
- NFT & Token Systems: Develop ERC-20, ERC-721, or ERC-1155 implementations with advanced features.
- DAO Governance: Build voting systems, proposal mechanisms, and treasury management for decentralized organizations.
- Marketplace Infrastructures: Create escrow systems, auction platforms, and decentralized commerce solutions.
- Oracle Implementations: Develop secure data feeds and VRF implementations for on-chain applications.
- Security Tools: Create audit helpers, vulnerability scanners, and contract verification tools.
- Layer 2 Solutions: Build sidechains, rollups, or cross-chain bridges with security in mind.
- Identity Systems: Develop on-chain reputation, verification, and authentication protocols.
Improved testing capabilities with Foundry's powerful fuzzing, fork testing, and cheatcodes Enhanced development workflow with specialized tools like forge, cast, and anvil Better gas optimization through Foundry's built-in gas reporting and snapshot features More efficient debugging with Foundry's tracing tools
Smart contract developers focused on Solidity security can leverage this prompt to create secure, efficient, and well-documented blockchain applications using best practices and tools like Foundry, slashing vulnerabilities while optimizing performance.
The .cursorrules file establishes a set of guidelines for developing and securing Solidity smart contracts using the Foundry development framework. It emphasizes concise and accurate code implementations, encourages embracing new technologies, and outlines a variety of best practices for Solidity development. These include using specific coding patterns and tools to enhance the security, readability, and maintainability of smart contracts, such as using explicit function visibility modifiers, implementing events for state changes, and following the Checks-Effects-Interactions pattern. The file highlights Foundry-specific testing capabilities like fuzzing, invariant testing, and cheatcodes for comprehensive test coverage. It addresses performance optimization for gas efficiency using Foundry's gas snapshots and reporting tools, and provides a development workflow incorporating Foundry's specialized tools like forge, cast, and anvil. Documentation best practices are advocated, focusing on maintaining clear and current documentation for smart contracts and test scenarios.