Skip to content

Commit

Permalink
feat: Adds new metadata properties in NFT class including cached_anim…
Browse files Browse the repository at this point in the history
…ation_url and royalty etc,/ for transaction feature set.
  • Loading branch information
saszer committed Jun 7, 2022
1 parent 15004df commit f66aab8
Show file tree
Hide file tree
Showing 6 changed files with 256 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Editor/Resources/c_tx.psd
Git LFS file not shown
134 changes: 134 additions & 0 deletions Editor/Resources/c_tx.psd.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions Runtime/Internal/models/NFTs_model.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Internal;
using UnityEngine.Video;
using Object = UnityEngine.Object;

Expand Down Expand Up @@ -79,21 +78,25 @@ public class Nft
{
public string name;
public string chain;
public string contract_address;
public string token_id;
public Metadata metadata;
public string metadata_url;
public string description;
public string creator_address;
public string file_url;
public string cached_file_url;
public string animation_url;
public string cached_animation_url;
public DateTime mint_date;
public FileInformation file_information;
public DateTime updated_date;
public string description;
public string creator_address;
public string metadata_url;
public string token_id;
public string contract_address;
public string contract_type;
public List<Creator> creators;
public List<Royalty> royalties;
public List<string> signatures;
public int total;
public Assets assets;

}

[Serializable]
Expand Down
94 changes: 94 additions & 0 deletions Runtime/Internal/models/Txn_model.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
using System;

namespace NFTPort
{
[Serializable]
public class Txn_model
{
public string response ;
public Statistics statistics ;
public Transactions transactions ;
public string continuation ;
}

[Serializable]
public class Statistics
{
public double one_day_volume ;
public double one_day_change ;
public int one_day_sales ;
public double one_day_average_price ;
public double seven_day_volume ;
public double seven_day_change ;
public int seven_day_sales ;
public double seven_day_average_price ;
public double thirty_day_volume ;
public double thirty_day_change ;
public int thirty_day_sales ;
public double thirty_day_average_price ;
public double total_volume ;
public int total_sales ;
public int total_supply ;
public int total_minted ;
public int num_owners ;
public double average_price ;
public double market_cap ;
public double floor_price ;
public DateTime updated_date ;
}

[Serializable]
public class Transactions
{
public string type ;
public string transfer_from ;
public string transfer_to ;
public string contract_address ;
public string token_id ;
public int quantity ;
public string transaction_hash ;
public string block_hash ;
public int block_number ;
public DateTime transaction_date ;
public string lister_address ;
public Nft nft ;
public ListingDetails listing_details ;
public string marketplace ;
public string buyer_address ;
public string seller_address ;
public PriceDetails price_details ;
}

[Serializable]
public class Creator
{
public string account_address ;
public string creator_share ;
}

[Serializable]
public class ListingDetails
{
public string asset_type ;
public string contract_address ;
public string price ;
public double price_usd ;
}

[Serializable]
public class Royalty
{
public string account_address ;
public string royalty_share ;
}

[Serializable]
public class PriceDetails
{
public string asset_type ;
public string contract_address ;
public string price ;
public double price_usd ;
}

}
11 changes: 11 additions & 0 deletions Runtime/Internal/models/Txn_model.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,8 @@
"description": "Showcases game sample to mint custom NFT's , connect wallet and more",
"path": "Samples~/NFTPort Playground"
}
]
],
"dependencies": {
"com.unity.nuget.newtonsoft-json": "3.0.2"
}
}

0 comments on commit f66aab8

Please sign in to comment.