It's unclear how you mint two different singular NFTs on the same contract with different metadata, which is usually the case for NFT contracts. The token_metadata endpoint is also a little arcane, as it asks for a lambda as the first parameter and I'm not sure what sort of function it expects.
Everything is catered toward a range of NFT IDs with the same metadata.
(* range of nft tokens *)
type token_def =
[@layout:comb]
{
from_ : nat;
to_ : nat;
}
The test cases only show one case where you want to mint two NFTs with the same metadata:
https://github.com/oxheadalpha/smart-contracts/blob/master/nft_assets/tezos_fa2_nft_tests/test_fa2.py#L132-L153
So my question is how do I do two?
Is this how I would do two separate ones?
self.fa2.mint_tokens(
{
"metadata": token_metadata1,
"token_def": {
"from_": 0,
"to_": 1,
},
"owners": [owner1_address],
}
self.fa2.mint_tokens(
{
"metadata": token_metadata2,
"token_def": {
"from_": 1,
"to_": 2,
},
"owners": [owner1_address],
}
Furthermore, how do I check the metadata for a single token with token_metadata?
(**
Implementation of the FA2 interface for the NFT contract supporting multiple
types of NFTs. Each NFT type is represented by the range of token IDs - `token_def`.
*)
What does "type" mean? It's unclear. A non-fungible token is 1-1 and therefore it's always a unique type.