This project is a starter kit for Forma NFT projects featuring an ERC721 smart contract and a Next.js frontend.
- ERC721 smart contract
- Onchain metadata
- Built-in royalty support (EIP-2981)
- Owner-only minting
- Hardhat for contract development and deployment
- Next.js frontend with Web3 integration (wagmi + viem)
- Node.js (v18 or later)
- pnpm
- A wallet with testnet TIA (for contract deployment)
├── app/ # Next.js frontend application
├── contracts/ # Smart contract source code
└── scripts/ # Deployment and verification scripts
# Install root project dependencies
pnpm i
# Install frontend dependencies
cd app && pnpm i
Create a .env.local
file in the root directory:
cp .env.example .env.local
Set PRIVATE_KEY_SKETCHPAD
to the private key of the deployer wallet.
Create a .env.local
file in the app
directory:
cd app
cp .env.example .env.local
The contract configuration is located in scripts/myerc721.ts
. You can customize contract metadata and constructor arguments, including:
- Contract name
- Symbol
- Description
- Default royalty fee (in basis points)
- Contract metadata image
export const myErc721Config = {
contractMetadata: {
name: "ExampleERC721",
description: "Your contract description",
image: "ipfs://your_image_uri",
},
symbol: "EXAMPLE",
defaultRoyaltyFeeNumerator: 500, // 5%
};
pnpm contracts:build
pnpm myerc721:deploy
After deployment, update the contract address in:
scripts/myerc721.ts
app/.env.local
(NEXT_PUBLIC_CONTRACT_ADDRESS)
pnpm myerc721:verify
pnpm app:dev
The application will be available at http://localhost:3000
The main contract is MyERC721.sol
in the contracts
directory. It includes:
- ERC721 standard implementation
- On-chain metadata support
- Updatable metadata
- Cementable metadata
- Royalty support (EIP-2981)
- Owner-only minting
The frontend is built with:
- Next.js 15
- TailwindCSS for styling
- wagmi + viem for Web3 interactions
- RainbowKit for wallet integration
This project is licensed under the MIT License - see the LICENSE file for details.