NFT Subscription SDK

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-Chain

Main contract for managing subscriptions and payments (deployed on all mainnet chains)

Contract Address

0x99ad42b29a7a99Ee4552cf6dc36dc4d44d8b0A2c

Main Functions

subscribe(merchantId, token)
registerMerchant(wallet, duration, gracePeriod)
setPaymentToken(token, price)
checkSubscription(user, merchantId)

SubscriptionNFT (Mainnet)

Multi-Chain

ERC-1155 NFT representing active subscriptions (deployed on all mainnet chains)

Contract Address

0x6D4b8BC4613dDCB98450a97b297294BacBd2DDD8

Main Functions

mintSubscription(user, merchantId)
updateExpiry(user, merchantId, newExpiry)
isSubscriptionActive(user, merchantId)
getSubscriptionExpiry(user, merchantId)

SubscriptionReactive (Mainnet)

Reactive Network

Cross-chain reactive contract for automated processing

Contract Address

0x99ad42b29a7a99Ee4552cf6dc36dc4d44d8b0A2c

Main Functions

processPaymentEvent(event)
checkExpiredSubscriptions()
sendCallback(targetChain, data)
updateSubscriptionStatus(user, merchantId)

SubscriptionManager (Testnet)

Sepolia

Main contract for managing subscriptions and payments

Contract Address

0x82b069578ae3dA9ea740D24934334208b83E530E

Main Functions

subscribe(merchantId, token)
registerMerchant(wallet, duration, gracePeriod)
setPaymentToken(token, price)
checkSubscription(user, merchantId)

SubscriptionNFT (Testnet)

Sepolia

ERC-1155 NFT representing active subscriptions

Contract Address

0x404cb817FA393D3689D1405DB0B76a20eDE72d43

Main Functions

mintSubscription(user, merchantId)
updateExpiry(user, merchantId, newExpiry)
isSubscriptionActive(user, merchantId)
getSubscriptionExpiry(user, merchantId)

SubscriptionReactive (Testnet)

Reactive Network

Cross-chain reactive contract for automated processing

Contract Address

0xa55B7A74D05b5D5C48E431e44Fea83a1047A7582

Main Functions

processPaymentEvent(event)
checkExpiredSubscriptions()
sendCallback(targetChain, data)
updateSubscriptionStatus(user, merchantId)

Test Token (SUBTEST)

Sepolia

ERC-20 token for testing subscription payments

Contract Address

0x10586EBF2Ce1F3e851a8F15659cBa15b03Eb8B8A

Main Functions

mint(amount)
approve(spender, amount)
transfer(to, amount)
balanceOf(account)

Integration Guide

1. Connect to Contracts

integration.js
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:

terminal
# 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.