Creating a new NFT series requires function call to the paras token contract. The media and reference must be an IPFS hash OR an absolute URL.
typeTokenMetadata= { title:string|null,// ex. "Arch Nemesis: Mail Carrier" or "Parcel #5055" description:string|null,// free-form description media:string|null,// URL to associated media, preferably to decentralized, content-addressed storage media_hash:string|null,// Base64-encoded sha256 hash of content referenced by the `media` field. Required if `media` is included. copies:number|null,// number of copies of this set of metadata in existence when token was minted. issued_at:number|null,// When token was issued or minted, Unix epoch in milliseconds expires_at:number|null,// When token expires, Unix epoch in milliseconds starts_at:number|null,// When token starts being valid, Unix epoch in milliseconds updated_at:number|null,// When token was last updated, Unix epoch in milliseconds extra:string|null,// anything extra the NFT wants to store on-chain. Can be stringified JSON. reference:string|null,// URL to an off-chain JSON file with more info. reference_hash:string|null// Base64-encoded sha256 hash of JSON from reference field. Required if `reference` is included.}// Create new series// Arguments// * `token_metadata`: approved account to transfer// * `price`: initial price, null for "not for sale"// * `royalty`: map of accountId with royalty percentagefunctionnft_create_series( token_metadata:TokenMetadata, price:string|null, royalty:HashMap<AccountId,U128>,):TokenSeriesJson
Important metadata
Metadata
Explanation
title
Example: "Key to Paras", the first minted NFT will have "Key to Paras #1" as the title
media
IPFS hash of an image or GIF
reference
IPFS hash of JSON document
copies
This will determined how many NFTs can be minted
Royalty
Royalty will be divided by 10000, so for 10% royalty, you have to write 1000.
(1000 / 10000 = 0.1)
Using near-cli
near call --accountId projectp.testnet paras-token-v1.testnet nft_create_series '{"creator_id":"projectp.testnet","token_metadata":{"title":"Dark","media":"bafybeifdbvb6yzajogbe4dbn3bgxoli3sp7ol7upfmu2givpvbwufydthu","reference":"bafybeifvzitvju4ftwnkf7w7yakz7i5colcey223uk2ui4t5z3ss7l2od4","copies":100},"price":"1000000000000000000000000","royalty":{"projectp.testnet":100}}' --depositYocto 8540000000000000000000