A Web3 application - composed with [N]skills
my-dapp/
├── apps/
│ └── web/ # Next.js frontend
│ ├── src/
│ ├── package.json
│ └── ...
├── contracts/ # Rust/Stylus smart contracts
│ ├── mycontract/ # Original contract (no caching)
│ │ └── src/lib.rs
│ └── cached-contract/ # Contract with is_cacheable helper
│ └── src/lib.rs
├── docs/ # Documentation
├── scripts/ # Deploy scripts
├── .gitignore
└── README.md
- Node.js 18+
- npm, yarn, or pnpm
-
Clone the repository:
git clone <your-repo-url> cd my-dapp
-
Install dependencies:
npm install # or pnpm install -
Set up environment variables:
cp .env.example .env
Edit
.envand configure:STYLUS_RPC_URL: Arbitrum RPC URL for deploymentDEPLOYER_PRIVATE_KEY: Private key for deploymentPRIVATE_KEY: Private key for deployment and transactionsNEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: WalletConnect Cloud project ID for wallet connectionsCHAINLINK_FEED_ADDRESS: Chainlink Data Feed contract address (AggregatorV3Interface)CHAINLINK_CHAIN: Chain for Chainlink feed (e.g. ARBITRUM or ARBITRUM_SEPOLIA)NEXT_PUBLIC_ALCHEMY_API_KEY: Alchemy API key for RPC accessDUNE_API_KEY: Dune Analytics API key for blockchain data queries
-
Deploy contracts (from repo root):
pnpm deploy:sepoliaorpnpm deploy:mainnet -
Scripts (Windows): Run
pnpm fix-scriptsordos2unix scripts/*.shif you see line-ending errors.
The contracts/ folder contains Rust/Stylus smart contract source code. See docs/ for deployment and integration guides.
| Command | Description |
|---|---|
pnpm deploy:sepolia |
Deploy to Arbitrum Sepolia |
pnpm deploy:mainnet |
Deploy to Arbitrum One |
pnpm fix-scripts |
Fix CRLF line endings (Windows) |
- Arbitrum Sepolia (Testnet)
- Arbitrum One (Mainnet)
- Superposition
- Superposition Testnet
- Framework: Next.js 14 (App Router)
- Styling: Tailwind CSS
- Web3: wagmi + viem
- Wallet Connection: RainbowKit
See the docs/ folder for:
- Contract interaction guide
- Deployment instructions
- API reference
MIT
Generated with ❤️ by [N]skills