DAN
Website
  • 🚀Accelerating Digital Ownership Adoption
  • Digital Assets Network
    • ❌Challenges in Adoption
    • ✅DAN Stack
    • 📜Modular Protocol
    • 🎯DAN Labs Impact
    • 🔐®️ ERC-7066 Author
      • Overview
  • DAN PROTOCOLS
    • 📌Modular Solutions for Digital Ownership
    • 💡Asset Creation
    • 🤝Marketplace
    • 🔓Rent Protocol
    • 💰Loan Protocol
      • How does a loan work?
    • 💰Utility Protocol
      • How does it work?
  • For Developers
    • 🚀Launchpad
      • APIs
        • User's Collections
        • Collection Details
      • SDK
        • Create Collection
        • Mint NFT
        • Mint NFT (Batch)
    • 🛒Market
      • APIs
      • SDK
        • Create Listing
        • Buy Listed NFT
        • Cancel Listing
    • ⚙️Utility
      • APIs
        • 👥Client
          • Register
          • Verify
          • Redeem Code
          • Get All Claimed Utility User
        • 👨‍💻Developer
          • Get All Benefits By Collection
      • SDK
    • 💰Loans
      • APIs
        • User Loans
        • Raw Transactions (Advanced)
      • SDK
        • EVM
        • Solana
      • Wallet Integration
        • EVM
        • Solana
    • 🗞️Rentals
      • APIs
        • NFTs (Owned and Rented)
        • NFTs (Rented)
        • Raw Transactions (Advanced)
      • On-Chain
      • SDK
        • EVM
        • Solana
      • Wallet Integration
        • EVM
        • Solana
    • ⛓️Supported Chains
  • UseCases : Case Studies
    • 🤝NFT Rentals
    • 💎Ephemeral / Consumable NFTs
    • 📝NFT Mandates
    • 🎆Post-Mint Utility
    • 💼Partial Payment at Mint
  • Community
    • 🔑Terms of Service
    • 🔏Privacy Policy
    • 🌐Website
    • 👽Discord
    • 🐦Twitter
Powered by GitBook
On this page
  1. For Developers
  2. Rentals

On-Chain

EVM

If your project uses on-chain calls for token owner, replace them with streamNFT contract calls using the streamNFT ABI

StreamNFT ABI for NFT State calls
[
  {
    "inputs": [
      {
        "internalType": "uint256",
        "name": "tokenId",
        "type": "uint256"
      }
    ],
    "name": "ownerOf",
    "outputs": [
      {
        "internalType": "address",
        "name": "",
        "type": "address"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "tokenAddress",
        "type": "address"
      },
      {
        "internalType": "uint256",
        "name": "tokenId",
        "type": "uint256"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  },
  {
    "inputs": [
      {
        "internalType": "address",
        "name": "tokenAddress",
        "type": "address"
      },
      {
        "internalType": "address",
        "name": "user",
        "type": "address"
      }
    ],
    "name": "balanceOf",
    "outputs": [
      {
        "internalType": "uint256",
        "name": "",
        "type": "uint256"
      }
    ],
    "stateMutability": "view",
    "type": "function"
  }
]
  1. For ERC721 token, you need to update on-chain call with \

    (ERC721) ownerOf(tokenId) -> (streamNFT) ownerOf(tokenAddress,tokenId)
    (ERC721) balanceOf(user) -> (streamNFT) balanceOf(tokenAddress,user)
  2. For ERC1155 token, you need to update on-chain call with

    (ERC1155) balanceOf(tokenId,user) -> (streamNFT) balanceOf(tokenAddress,tokenId,user)
PreviousRaw Transactions (Advanced)NextSDK

Last updated 3 months ago

🗞️