ONINO Docs
  • Introduction to ONINO
    • Welcome to ONINO
    • The Tokenization Opportunity
    • ONINO Blockchain
  • ONINO Tokenization Platform
  • ONINO Developer Platform
  • Tokenomics
    • Incentive and Mechanism Design
    • Token Distribution & Emission Schedules
  • For Developers
    • Building on ONINO
    • Mainnet Configuration
    • Testnet Configuration
    • Solidity Compiler Versions
    • Nodes & Validators
      • For Validators & Node Operators
      • Validator Ramp-Up Phases
    • Developer Platform Overview
      • Quickstart Guide
      • Overview
      • Templates
      • Brainstorming AI
      • Code Generator AI
      • Contract Import
      • Development Studio
      • Deployment Suite
      • Smart Contract API
      • Integration AI
      • Contract Manager
      • How-To: Using AWS KMS wallets with the ONINO Smart Contract API
      • Smart Contract Templates
        • Template Overview
        • Creating Tokens
          • Token with Fixed Supply
          • Token with Mintable Supply
        • Creating NFTs
          • Standard NFT
          • NFT with fixed Supply
        • Create your Custom Project
  • For Users
    • Welcome to ONINO
    • Staking Guide
    • Token Upgrade Process
    • Getting Started with ONINO
      • How to add the ONINO Network to your Wallet
      • How to create a Wallet
    • The ONINO Tokenization Platform
      • Walkthrough & Guide
  • FAQs
    • General Blockchain FAQs
    • What is tokenization?
    • ONINO General FAQs
    • Learn more about blockchain
      • How to use different blockchain networks?
      • What is the Ethereum Virtual Machine (EVM)?
      • What is a Smart Contract?
    • What are Crypto Tokens & Coins
Powered by GitBook
On this page

Was this helpful?

  1. For Developers
  2. Developer Platform Overview
  3. Smart Contract Templates
  4. Creating NFTs

Standard NFT

The ERC721 smart contract standard is the basic standard for NFTs on EVM compatible chains.

The ERC721 is a smart contract standard which is specialised in single-copy Non Fungible Tokens (NFT) and out-of-the-box compatible with Opensea. In an ERC721, every NFT is unique which means you have to reference the content for each NFT.


Variables

_name: The name of your NFT collection

_symbol: The symbol of your NFT collection

_owner: The owner of the NFT collection. Can be transferred and is initially set to the deployer wallet.

_currentTokenID: The Index of NFTs minted in this collection. Initially set to 1.


Function
Input Parameters
Description
Output

constructor

None

Initializes the contract by setting the NFT's name and symbol, and assigns the contract deployer as the initial owner.

None

name

None

Returns the name of the NFT.

string memory

symbol

None

Returns the symbol of the NFT.

string memory

balanceOf

address owner

Returns the number of NFT tokens owned by a specific address.

uint256

ownerOf

uint256 tokenId

Returns the owner address of the specified token ID.

address

tokenImage

uint256 tokenId

Retrieves the image URL linked to a specific token ID.

string memory

transferFrom

address from, address to, uint256 tokenId

Transfers a token from one address to another, if the sender is approved or the owner.

None

approve

address to, uint256 tokenId

Approves another address to transfer a specific token ID.

None

setApprovalForAll

address operator, bool approved

Sets or unsets approval for an operator to manage all of the sender's tokens.

None

isApprovedForAll

address owner, address operator

Checks if an operator is approved to manage all tokens of a given owner.

bool

getApproved

uint256 tokenId

Returns the approved address for a specific token ID.

address

mint

address to, string memory imageUrl

Mints a new token to a specified address with an associated image URL, only callable by the owner.

None

_exists

uint256 tokenId

Internal function to check if a token exists.

bool

_isApprovedOrOwner

address spender, uint256 tokenId

Internal function to check if an address is an approved spender or the owner of a specific token ID.

bool

_transfer

address from, address to, uint256 tokenId

Internal function to handle the token transfer mechanics.

None

_approve

address to, uint256 tokenId

Internal function to set the approval of a given address to manage a specific token ID.

None

PreviousCreating NFTsNextNFT with fixed Supply

Last updated 1 year ago

Was this helpful?