Niftory Docs
  • What is Niftory?
  • Get your API Keys
  • 👩‍💻API
    • Niftory Web3 API
    • SDK QuickStart
      • Using the SDK in React
      • Using the SDK from the Server
    • API Quickstart
      • Create your first Wallet
      • API calls with Sample Content
      • Mint your first NFT
    • API Cheat Sheet
    • Niftory Sample App
      • Explore the Sample App
      • Anatomy of a Niftory App
        • Getting Authenticated
        • GraphQL Client Setup
        • API Usage
        • Transfer an NFT
    • 💡Core Concepts
      • Niftory Data Model
      • Authentication
        • Using Your API Key
        • Configuring Your App
        • Privileged Authentication
      • App and AppUser
      • NFTs
        • Creating NFTs
        • Querying NFTs
        • Transferring NFTs
        • Minting NFTs
      • Wallets
        • Create a Niftory Wallet
        • Register External Wallets
        • Query Wallets
      • Contract
      • User Auth (Client-Side)
    • Your Niftory Account
  • 🧑‍💼Admin Portal
    • Niftory Admin Portal
    • 🚀Guides
      • Setting Up Your Org
      • Create Your First NFT
    • 🗺️Explore
      • Org and Apps
      • NFT Collection
        • Sets
        • Collectibles
        • NFTs
    • 💼Use Cases
      • For Engineers
      • For Designers
      • For Business Users
  • 📖Reference
    • GraphQL & Auth Endpoints
    • API Reference
    • SDK API Reference
Powered by GitBook
On this page
  1. 👩‍💻API
  2. 💡Core Concepts

Contract

PreviousQuery WalletsNextUser Auth (Client-Side)

Last updated 2 years ago

Was this helpful?

CtrlK
  • Contract Deployment
  • Contract API

Was this helpful?

Contract represents a smart contract on the blockchain.

Contract Deployment

When you sign up in the Niftory Admin Portal, we help you automatically deploy a contract for your application. All NFTs minted for your application are based on this contract, and user wallets have to be initialized for this contract.

For details on how to deploy a smart contract, follow this guide.

Contract API

There are several ways to query for your Contract.

contract - returns the Contract for the current App context (determined by API Key)

query ContractQuery {
  contract {
    id
    address
    blockchain
    name
  }
}
Sample Response
{
  "data": {
    "contract": {
      "id": "56",
      "address": "0xf8d6e0586b0a20c7",
      "blockchain": "FLOW",
      "name": "MyApp Contract",
    }
  }
}

app query (and include the Contract fragment)

query AppWithContractQuery {
  app {
    id
    contract
  }
}