Skip to main content
rule

solidity-react-blockchain-apps-cursorrules-prompt- — Cursor rule

This Cursor rule guides Solidity contracts and React apps that connect to blockchain services. Use it when reviewing contract safety or Web3 frontend code.

Install into Cursor · Manually: put the files in place All methods and platforms ↓
.cursor/rules/solidity-react-blockchain-apps-cursorrules-prompt-.mdc
Open on GitHub

What solidity-react-blockchain-apps-cursorrules-prompt- does

The rule gives Cursor a set of practices for Solidity contracts and React code that handles wallets, providers, and transactions. It asks for explicit function visibility, access control, and NatSpec documentation. Common building blocks such as ownership, multisig, and timelocks should use OpenZeppelin contracts.

For critical contract behavior, it recommends Slither, Mythril, and property-based tests. Gas work focuses on storage layout, function visibility, and unnecessary writes. The guidance also covers pull payments, event logs, defensive error handling, and typed Web3 frontend interactions.

The rule targets **/*, while alwaysApply is false, so it is not forced into every request. In Cursor, place the file at .cursor/rules/solidity-react-blockchain-apps-cursorrules-prompt-.mdc. Critical contract paths should have the listed security checks before relying on this guidance.

What it helps with

  • review a Solidity contract for access-control issues
  • inspect storage writes that raise gas usage
  • document contract functions with NatSpec
  • type wallet and transaction calls in a React frontend
  • test critical contract behavior with Slither and Mythril

Example prompts for the agent

  • Review this Solidity contract for function visibility, access control, and defensive error handling.
  • Find unnecessary storage writes in this contract and suggest gas-focused changes.
  • Check the React code that handles wallets and transactions for explicit types and unsafe calls.

How to install solidity-react-blockchain-apps-cursorrules-prompt-

Manually: put the files in place

.cursor/rules/solidity-react-blockchain-apps-cursorrules-prompt-.mdc

Frontmatter: description, globs, alwaysApply

Step by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules

Questions about solidity-react-blockchain-apps-cursorrules-prompt-

How do I install solidity-react-blockchain-apps-cursorrules-prompt- in Cursor?

Create the rule file at .cursor/rules/solidity-react-blockchain-apps-cursorrules-prompt-.mdc and add the rule content to it.

What does solidity-react-blockchain-apps-cursorrules-prompt- do?

It guides Cursor while building Solidity contracts and React Blockchain apps. The guidance covers contract security, OpenZeppelin primitives, gas review, and typed Web3 interactions.

How is this rule applied across a project?

Its file pattern is **/*, but alwaysApply is false. That means the rule matches the project files without being forced into every request.

Source text

solidity-react-blockchain-apps-cursorrules-prompt-.mdc · CC0-1.0
---
description: "Cursor rules for Solidity development with React Blockchain apps integration."
globs: **/*
alwaysApply: false
---
Solidity React Blockchain Apps Guidelines

- Prioritize secure Solidity smart contracts with explicit visibility, access control, and clear NatSpec documentation.
- Use established security tooling such as Slither, Mythril, and property-based tests for critical contract behavior.
- Prefer OpenZeppelin contracts for common primitives such as ownership, access control, multisig, and timelocks.
- Optimize gas deliberately by reviewing storage layout, function visibility, and unnecessary writes.
- Use pull-payment patterns, event logging, and defensive error handling for production-grade contracts.
- Keep Web3 frontend code type-safe and explicit when interacting with wallets, providers, and transactions.

© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules

Similar IDE rules

All IDE rules for Programming languages →

From the same set210

svelte A Cursor rule that steers the agent toward Svelte conventions: component structure, reactivity, stores, SvelteKit routing and tests. Useful when the agent writes or edits Svelte code. ★ 41,024repo stars svelte-5-vs-svelte-4-cursorrules-prompt-file Guides Cursor to write Svelte 5 code instead of Svelte 4, adopting runes like $state and $derived, native event attributes, and snippets. ★ 41,024repo stars solidjs-typescript-cursorrules-prompt-file This rule guides Cursor through Solid.js and TypeScript conventions, from typed reactive state to component props. Use it when you want those practices reflected in code suggestions. ★ 41,024repo stars solidjs-tailwind-cursorrules-prompt-file A Cursor rule that tells the agent how to write Solid.js code with Tailwind CSS: signals, utility classes, folder layout. ★ 41,024repo stars solidity-hardhat-cursorrules-prompt-file A Cursor rule that turns the AI assistant into a Solidity and smart contract security expert, with Hardhat-based testing and gas work. ★ 41,024repo stars solana-wallet-aware This Cursor rule adds wallet and transaction safeguards to Solana code, from isolated signing to tests required before live transactions. ★ 41,024repo stars snowflake-snowpark-dbt-cursorrules-prompt-file A Cursor rule that gives the agent context for Snowpark Python and dbt with the Snowflake adapter. Useful when you write transformation pipelines in either tool. ★ 41,024repo stars snowflake-data-engineering-cursorrules-prompt-file Snowflake data engineering rules for Cursor: SQL standards, semi-structured VARIANT handling, declarative Dynamic Tables, and warehouse cost control. ★ 41,024repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor