Contract Details
Tech Stack
Solidity ^0.8.24 OpenZeppelin v5 Foundry
Chains
Ethereum Arbitrum Base Optimism Polygon
Description
NFT-based subscription contract following the Unlock Protocol pattern. Mint membership NFTs with configurable tiers (Bronze, Silver, Gold), expiration timestamps, and automatic grace periods. ERC-721 compliant with on-chain metadata and batch minting support.
Features
- ✓ ERC-721 membership NFTs with on-chain metadata
- ✓ Configurable tiers: Bronze, Silver, Gold (extensible)
- ✓ Expiration timestamps with auto-grace periods
- ✓ Batch minting for airdrops and partner onboarding
- ✓ Ownable2Step governance with timelocked tier changes
- ✓ ReentrancyGuard on all payment functions
- ✓ Revenue withdrawal with split support
- ✓ Full Foundry test suite with fuzz tests
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Membership NFT Factory /// @notice NFT-based subscription contract with tiers and expiration. contract MembershipNftFactory { address public immutable owner; uint256 public constant VERSION = 1; event Initialized(address indexed deployer); constructor() { owner = msg.sender; emit Initialized(msg.sender); } // ... full implementation in purchased package }