Contract Details
Tech Stack
Solidity ^0.8.24 OpenZeppelin v5 Foundry
Chains
Ethereum Arbitrum Base Optimism Polygon
Description
Smart contract for bronze/silver/gold tier access with upgrade paths. Each tier has configurable features, pricing, and duration. Users can upgrade by paying the difference. Downgrades refund pro-rata.
Features
- ✓ Three default tiers: Bronze, Silver, Gold (extensible)
- ✓ Configurable features per tier (bitmask pattern)
- ✓ Upgrade by paying price difference
- ✓ Pro-rata downgrade refunds
- ✓ Tier duration with auto-expiry
- ✓ On-chain feature flag checking
- ✓ Ownable2Step governance
- ✓ Full Foundry test suite with upgrade/downgrade scenarios
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; /// @title Tiered Access Contract /// @notice Smart contract for bronze/silver/gold tier access with upgrades. contract TieredAccessContract { 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 }