LogoLogo
ProductsCommunityGitHubShare Feedback
NFT Kit
NFT Kit
  • What is the NFT KIT?
    • Introduction
    • Non-Fungible Tokens (NFTs)
      • NFT | Basics
      • Technologies & Concepts
    • NFT Kit
      • NFT Kit | Basics
        • Overview
        • Functionality
      • NFT Flavors & Ecosystems
      • Architecture
        • Low-Level Service Abstraction
        • Ecosystem Abstraction
        • High-Level Interfaces / APIs
      • Use Cases
  • Getting started
    • Quick Start
  • Ecosystems
    • Ethereum | Polygon | Shimmer
      • Setup
      • NFT | Creation & Management
        • Smart Contract Deployment
        • Minting NFTs
        • Get NFT Metadata
        • Get Account Balance
        • Get Token Owner
        • Get Collection Info
        • Get NFTs by Account
      • NFT | Ownership Verification
        • Ownership Verification
        • Ownership Verification With Traits
      • Smart Contract | Extensions
        • Pausable
        • Burnable
      • Smart Contract | Access Control
        • Ownership
        • Role-Based Access Control
    • Ocean Protocol
      • Setup
      • NFT | Verification
      • NFT | Wallet
      • Architecture
    • Tezos
      • Architecture
      • NFT | Creation & Management
        • Smart Contract
        • Add Minter
        • NFT Minting
        • Fetch NFT metadata
        • Get account NFTs
        • Get contract metadata
      • NFT | Ownership Verification
        • NFT Ownership Verification
        • NFT Ownership Verification Within A Collection
        • NFT Ownership Verification With Traits
      • NFT | Wallet
      • Tutorials
        • Minting NFTs on Tezos
          • Setup
          • New Collection
          • First NFT
          • Verification
          • Wallet
    • Near Protocol
      • Architecture
        • Smart Contract
        • Blockchain NFTs operations
        • NFTs Queries
      • NFT | Creation & Management
        • NEAR Sub-Account
        • Deploy NFT Contract
        • NFT | Minting
      • Querying NFT information controller
        • Get NFTs for account
        • Get NFT By Token Id
        • Get NFT contract metadata
      • NFT | Wallet
      • Tutorials
        • Minting NFT on Near Protocol
          • Near Wallet Creation
          • Setup NFT-Kit
          • Create Sub-account
          • Smart Contract ( Collection )
          • Minting your first NFT
        • NFT Ownership Verification
        • Wallet
    • Polkadot
      • Architecture
      • Query NFTs
        • Unique network
          • Fetching Token id & Collection id
          • Fetching NFT metadata
        • Parachain Networks
          • Fetching Tokens by subscan
          • Fetching EVM ERC721 Collectibles by subscan
      • NFT | Ownership Verification
        • NFT ownership verification
        • NFT ownership verification within a collection
        • NFT ownership verification with traits
      • NFT | Wallet
        • Polkadot parachains
        • Polkadot EVM compatible parachains
    • Flow
      • Architecture
        • Cadence Scripts
        • NFT Operations (FCL)
      • Querying NFT information Controller
        • Get NFTs for an account
        • Get NFTs in Collection
        • Get NFT by Token Id
      • NFT | Ownership Verification
        • NFT ownership verification on Flow
        • NFT ownership verification in collection on Flow
      • NFT | Wallet
        • Flow Blockchain
    • Algorand
      • Architecture
        • Algorand Standard Assets (ASAs)
      • NFT | Creation & Management
        • Account Creation
        • NFT Creation (ARC3)
      • Querying Asset information
        • Get Assets for account
        • Get Asset Details
        • Get NFT Metadata by asset id
        • Get NFT by Asset id
      • NFT | Ownership Verification
        • NFT ownership verification
        • NFT ownership verification with traits
        • NFT ownership verification Based on Creator
        • NFT Metadata verification against a dynamic policy
      • NFT | Wallet
        • Algorand Blockchain
    • IPFS
  • Concepts
    • Soulbound Tokens (SBTs)
    • NFT verification with OPA
  • Configurations
    • Configuration Files
    • Gas Provider
  • Community
    • Discord
    • Twitter
    • Newsletter
    • GitHub Discussions
  • DEVELOPER RELATIONS
    • Roadmap
    • Contribute
    • Share Feedback
    • Contact
  • Product Editions
    • Open Source | Always Free
    • Enterprise | Self-Managed
    • Cloud Platform | Managed
Powered by GitBook
On this page
  • Smart contract deployment with default metadata
  • Smart contract deployment with custom metadata

Was this helpful?

Export as PDF
  1. Ecosystems
  2. Near Protocol
  3. NFT | Creation & Management

Deploy NFT Contract

PreviousNEAR Sub-AccountNextNFT | Minting

Last updated 2 years ago

Was this helpful?

On Near Protocol , NFTs are not stored in the user's wallet, instead, each NFT lives in a NFT contract. The NFT contract works as a bookkeeper, this is: it is in charge of handling the creation, storage and transfers of NFTs.

In order for a contract to be considered a NFT-contract it has to follow the . The NEP-171 & NEP-177 standards explain the minimum interface required to be implemented, as well as the expected functionality.

Smart contract deployment with default metadata

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/{chain}/contract/account/{account_id}/deploy/default"
-H  "Content-Type: application/json" 

Path parameters:

  • chain : [string] chain to work with. Either testnet or mainnet .

  • account_id :[string] your account.

Example:

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/testnet/contract/account/nft.waltid.testnet/deploy/default"
-H  "Content-Type: application/json" 
val accountId = "nft.waltid.testnet"
val chain = "testnet"
val result = NearNftService.deployContractDefault(accountId, chain)
println("operation result: $result")

Smart contract deployment with custom metadata

API Doc

Swagger Doc | ReDoc

Curl call example

curl -X POST "http://0.0.0.0:7000/v2/nftkit/nft/near/chain/{chain}/account/{account_id}/deploy"
-H  "Content-Type: application/json" 
-d "{"spec": "string","name": "string","symbol": "string","icon": "string","base_uri": "string","reference": "string","reference_hash": "string","owner_id": "string"}"

Path parameters:

  • chain : [string] chain to work with. Either testnet or mainnet .

  • account_id :[string] your account.

Body Details:

{
  "spec": "string",
  "name": "string",
  "symbol": "string",
  "icon": "string",
  "base_uri": "string",
  "reference": "string",
  "reference_hash": "string",
  "owner_id": "string"
}

Body parameters:

  • spec : a string that MUST be formatted nft-n.n.n where "n.n.n" is replaced with the implemented version of this Metadata spec.

  • name : the human-readable name of the contract.

  • symbol : the abbreviated symbol of the contract.

  • base_uri : Centralized gateway known to have reliable access to decentralized storage assets referenced by reference or media URLs. Can be used by other frontends for initial retrieval of assets, even if these frontends then replicate the data to their own decentralized nodes, which they are encouraged to do.

val accountId = "nft.waltid.testnet"
val ownerId = "waltid.testnet"
val chain = "testnet"

val result = NearNftService.deployContractWithCustomMetadata(
        account_id = accountId,
        owner_id = ownerId,
        spec = "nft-1.0.0",
        name = "My NFT",
        symbol = "NFT",
        icon = "",
        base_uri = "",
        reference = "",
        reference_hash = "",
        chain = chain,
    )
println("operation result: $result")

icon : a small image associated with this contract. Encouraged to be a .

NEP-171 and NEP-177 standards
data URL