| | 1 | | using System; |
| | 2 | | using System.Collections.Generic; |
| | 3 | | using UnityEngine; |
| | 4 | |
|
| | 5 | | namespace MainScripts.DCL.ServiceProviders.OpenSea.Interfaces |
| | 6 | | { |
| | 7 | | public struct OwnNFTInfo |
| | 8 | | { |
| | 9 | | public string ethAddress; |
| | 10 | | public List<NFTInfo> assets; |
| | 11 | |
|
| | 12 | | public static OwnNFTInfo Default |
| | 13 | | { |
| | 14 | | get |
| | 15 | | { |
| | 16 | | var ret = new OwnNFTInfo(); |
| | 17 | | ret.ethAddress = "0x0000000000000000000000000000000000000000"; |
| | 18 | | ret.assets = new List<NFTInfo>(); |
| | 19 | | return ret; |
| | 20 | | } |
| | 21 | | } |
| | 22 | | } |
| | 23 | |
|
| | 24 | | [Serializable] |
| | 25 | | public struct NFTOwner |
| | 26 | | { |
| | 27 | | public string address; |
| | 28 | | public int quantity; |
| | 29 | | } |
| | 30 | |
|
| | 31 | | public struct NFTInfo |
| | 32 | | { |
| | 33 | | public string name; |
| | 34 | | public string tokenId; |
| | 35 | | public string description; |
| | 36 | | public string owner; |
| | 37 | | public long numSales; |
| | 38 | | public string imageUrl; |
| | 39 | | public string thumbnailUrl; |
| | 40 | | public string previewImageUrl; |
| | 41 | | public string originalImageUrl; |
| | 42 | | public string assetLink; |
| | 43 | | public string marketLink; |
| | 44 | | public string lastSaleDate; |
| | 45 | | public string lastSaleAmount; |
| | 46 | | public PaymentTokenInfo? lastSaleToken; |
| | 47 | | public Color? backgroundColor; |
| | 48 | | public MarketInfo? marketInfo; |
| | 49 | | public string currentPrice; |
| | 50 | | public PaymentTokenInfo? currentPriceToken; |
| | 51 | | public AssetContract assetContract; |
| | 52 | | public NFTOwner[] owners; |
| | 53 | |
|
| | 54 | | public static NFTInfo Default |
| | 55 | | { |
| | 56 | | get |
| | 57 | | { |
| 42 | 58 | | NFTInfo ret = new NFTInfo(); |
| 42 | 59 | | ret.owner = "0x0000000000000000000000000000000000000000"; |
| 42 | 60 | | ret.numSales = 0; |
| 42 | 61 | | ret.assetContract = new AssetContract(); |
| 42 | 62 | | return ret; |
| | 63 | | } |
| | 64 | | } |
| | 65 | |
|
| | 66 | | public bool Equals(string assetContract, string tokenId) => |
| 0 | 67 | | this.assetContract.address.ToLower() == assetContract.ToLower() |
| | 68 | | && this.tokenId == tokenId; |
| | 69 | | } |
| | 70 | |
|
| | 71 | | [Serializable] |
| | 72 | | public struct PaymentTokenInfo |
| | 73 | | { |
| | 74 | | public string symbol; |
| | 75 | | } |
| | 76 | |
|
| | 77 | | [Serializable] |
| | 78 | | public struct MarketInfo |
| | 79 | | { |
| | 80 | | public string name; |
| | 81 | | } |
| | 82 | |
|
| | 83 | | [Serializable] |
| | 84 | | public struct AssetContract |
| | 85 | | { |
| | 86 | | public string address; |
| | 87 | | public string name; |
| | 88 | | } |
| | 89 | | } |