func TestTrartNFTDeployContracts(t *testing.T) {
	b := flowutils.NewBlockchain()

	//deploy our contract
	nftAddress, trartNFTAddr, trartNFTSigner := trartnft.DeployContracts(t, b, trartContractName)

	t.Run("Should be able to mint NFTs", func(t *testing.T) {

		//mint NFTs
		trartnft.BatchMintNFT(t, b, nftAddress, trartNFTAddr, trartNFTSigner, trartContractName, mintNFTs)

		//query NFTs
		nfts := flowutils.ExecuteScriptAndCheck(
			t, b,
			trartnft.QueryAccountNFTScript(nftAddress.String(), trartNFTAddr.String(), trartContractName),
			[][]byte{jsoncdc.MustEncode(cadence.NewAddress(trartNFTAddr))},
		)
		userNfts, _ := nfts.ToGoValue().([]interface{})
		assert.EqualValues(t, len(mintNFTs), len(userNfts))

		//query a NFT's metadata
		metadata := flowutils.ExecuteScriptAndCheck(
			t, b,
			trartnft.QueryNFTScript(nftAddress.String(), trartNFTAddr.String(), trartContractName),
			[][]byte{jsoncdc.MustEncode(cadence.NewUInt64(1))},
		)
		nftMetadata, _ := metadata.ToGoValue().(map[interface{}]interface{})
		assert.EqualValues(t, "NFT1", nftMetadata["CARD ID"].(string))
	})
}
//deploy our contract, and mint nfts later
deploy our contract, and mint nfts later
// deploy our contract and mint nfts later
func TestTrartNFTDeployContracts(t *testing.T) {
	b := flowutils.NewBlockchain()
	nftAddress, trartNFTAddr, trartNFTSigner := trartnft.DeployContracts(t, b, trartContractName)
	t.Run("Should be able to mint NFTs", func(t *testing.T) {
		trartnft.BatchMintNFT(t, b, nftAddress, trartNFTAddr, trartNFTSigner, trartContractName, mintNFTs)
		nfts := flowutils.ExecuteScriptAndCheck(
			t, b,
			trartnft.QueryAccountNFTScript(nftAddress.String(), trartNFTAddr.String(), trartContractName),
			[][]byte{jsoncdc.MustEncode(cadence.NewAddress(trartNFTAddr))},
		)
		userNfts, _ := nfts.ToGoValue().([]interface{})
		assert.EqualValues(t, len(mintNFTs), len(userNfts))
		metadata := flowutils.ExecuteScriptAndCheck(
			t, b,
			trartnft.QueryNFTScript(nftAddress.String(), trartNFTAddr.String(), trartContractName),
			[][]byte{jsoncdc.MustEncode(cadence.NewUInt64(1))},
		)
		nftMetadata, _ := metadata.ToGoValue().(map[interface{}]interface{})
		assert.EqualValues(t, "NFT1", nftMetadata["CARD ID"].(string))
	})
}
func TestTrartNFTDeployContracts ( t * testing . T ) { b := flowutils . NewBlockchain ( ) nftAddress , trartNFTAddr , trartNFTSigner := trartnft . DeployContracts ( t , b , trartContractName ) t . Run ( " " , func ( t * testing . T ) { trartnft . BatchMintNFT ( t , b , nftAddress , trartNFTAddr , trartNFTSigner , trartContractName , mintNFTs ) nfts := flowutils . ExecuteScriptAndCheck ( t , b , trartnft . QueryAccountNFTScript ( nftAddress . String ( ) , trartNFTAddr . String ( ) , trartContractName ) , [ ] [ ] byte { jsoncdc . MustEncode ( cadence . NewAddress ( trartNFTAddr ) ) } , ) userNfts , _ := nfts . ToGoValue ( ) . ( [ ] interface { } ) assert . EqualValues ( t , len ( mintNFTs ) , len ( userNfts ) ) metadata := flowutils . ExecuteScriptAndCheck ( t , b , trartnft . QueryNFTScript ( nftAddress . String ( ) , trartNFTAddr . String ( ) , trartContractName ) , [ ] [ ] byte { jsoncdc . MustEncode ( cadence . NewUInt64 ( 1 ) ) } , ) nftMetadata , _ := metadata . ToGoValue ( ) . ( map [ interface { } ] interface { } ) assert . EqualValues ( t , " " , nftMetadata [ " " ] . ( string ) ) } ) }
deploy our contract, and mint nfts later
deploy our contract and mint nfts later
//deploy our contract //mint NFTs //query NFTs //query a NFT's metadata