Contract Details
Tech Stack
TypeScript Express Next.js ethers.js Redis
Chains
Ethereum Arbitrum Base Optimism Polygon
Description
Express and Next.js middleware that checks NFT ownership or subscription status on-chain before granting API/page access. Supports ERC-721, ERC-1155, and custom subscription contract verification with caching.
Features
- ✓ Express middleware for REST API gating
- ✓ Next.js middleware for page/route gating
- ✓ ERC-721 and ERC-1155 ownership verification
- ✓ Custom subscription contract support
- ✓ Redis-compatible caching layer (optional)
- ✓ Rate limiting per wallet address
- ✓ Configurable grace period for expired subs
- ✓ TypeScript with full type definitions
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Access Gate Middleware /// @notice Express/Next.js middleware checking NFT ownership for access. contract AccessGateMiddleware { 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 }