Smart Contracts
Deployed and verified contracts powering the subscription NFT ecosystem. All contracts are open-source and audited for security.
Architecture Overview
L1 Smart Contracts
Deployed on Ethereum Sepolia for payment processing and NFT management
Reactive Network
Cross-chain automation layer for event processing and subscription management
Event Subscriptions
Real-time monitoring of payment events and automated callbacks
CRON Jobs
Scheduled tasks for checking subscription expiry and renewals
Deployed Contracts
SubscriptionManager (Mainnet)
Multi-ChainMain contract for managing subscriptions and payments (deployed on all mainnet chains)
Main Functions
subscribe(merchantId, token)registerMerchant(wallet, duration, gracePeriod)setPaymentToken(token, price)checkSubscription(user, merchantId)SubscriptionNFT (Mainnet)
Multi-ChainERC-1155 NFT representing active subscriptions (deployed on all mainnet chains)
Main Functions
mintSubscription(user, merchantId)updateExpiry(user, merchantId, newExpiry)isSubscriptionActive(user, merchantId)getSubscriptionExpiry(user, merchantId)SubscriptionManager (Testnet)
SepoliaMain contract for managing subscriptions and payments
Main Functions
subscribe(merchantId, token)registerMerchant(wallet, duration, gracePeriod)setPaymentToken(token, price)checkSubscription(user, merchantId)SubscriptionNFT (Testnet)
SepoliaERC-1155 NFT representing active subscriptions
Main Functions
mintSubscription(user, merchantId)updateExpiry(user, merchantId, newExpiry)isSubscriptionActive(user, merchantId)getSubscriptionExpiry(user, merchantId)Integration Guide
1. Connect to Contracts
import { ethers } from 'ethers';
import { SubscriptionSDK } from '@nft-sub/sdk';
const provider = new ethers.JsonRpcProvider('https://sepolia.gateway.tenderly.co');
const contracts = {
manager: '0x82b069578ae3dA9ea740D24934334208b83E530E',
nft: '0x404cb817FA393D3689D1405DB0B76a20eDE72d43',
reactive: '0xa55B7A74D05b5D5C48E431e44Fea83a1047A7582'
};
const sdk = new SubscriptionSDK({ provider, contracts });2. Verify Deployment
Use these commands to verify contract deployment:
# Check L1 contracts on Sepolia
cast code 0x82b069578ae3dA9ea740D24934334208b83E530E --rpc-url https://sepolia.gateway.tenderly.co
cast code 0x404cb817FA393D3689D1405DB0B76a20eDE72d43 --rpc-url https://sepolia.gateway.tenderly.co
# Check Reactive contract
cast code 0xa55B7A74D05b5D5C48E431e44Fea83a1047A7582 --rpc-url https://lasna-rpc.rnk.dev/Need Help? Check out our API Reference for detailed contract interactions or join our Discord for support.