Sub Protocol — CryptoForge

Access Gate Middleware

Express/Next.js middleware checking NFT ownership for access.
Contract Details
Categorymiddleware
Files12
Price$9.99
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
access-gate-middleware.sol
// 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
}
$9.99
Buy Now — $9.99