Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenEntity #31

Merged
merged 7 commits into from
Jul 8, 2023
Merged

TokenEntity #31

merged 7 commits into from
Jul 8, 2023

Conversation

daiagi
Copy link
Contributor

@daiagi daiagi commented Jul 7, 2023

implement TokenEntity schema for nft and unique pallet

looks like it is working well on local machine:

query MyQuery {
  tokenEntities(limit: 10) {
    name
    image
    count
    nfts(limit: 2) {
      name
      image
    }
    collection {
      id
      name
    }
  }
}
{
  "data": {
    "tokenEntities": [
      {
        "name": "Mamacita",
        "image": "ipfs://ipfs/QmeCxi2DMWxX3AnEZwwAzf23BN9XLonXC2h2HzvoVKAR9L",
        "count": 1,
        "nfts": [
          {
            "name": "Mamacita",
            "image": "ipfs://ipfs/QmeCxi2DMWxX3AnEZwwAzf23BN9XLonXC2h2HzvoVKAR9L"
          }
        ],
        "collection": {
          "id": "u-69",
          "name": "Gav's NFTs"
        }
      },
      {
        "name": "Have a fucking extraordi-canary Valentine’s Day",
        "image": "ipfs://ipfs/QmRaFdBApDx5CSDzdodSrqYsU96zabfG2613kTgmsq4YLq",
        "count": 164,
        "nfts": [
          {
            "name": "Have a fucking extraordi-canary Valentine’s Day",
            "image": "ipfs://ipfs/QmRaFdBApDx5CSDzdodSrqYsU96zabfG2613kTgmsq4YLq"
          },
          {
            "name": "Have a fucking extraordi-canary Valentine’s Day",
            "image": "ipfs://ipfs/QmRaFdBApDx5CSDzdodSrqYsU96zabfG2613kTgmsq4YLq"
          }
        ],
        "collection": {
          "id": "u-143",
          "name": "Expect Love"
        }
      },
      {
        "name": "Test",
        "image": "ipfs://bafkreihdbldpak6a6zkeltve4axocqghb65mmiauea6jnmm5nmxxjvv3hu",
        "count": 2,
        "nfts": [
          {
            "name": "Test",
            "image": "ipfs://bafkreihdbldpak6a6zkeltve4axocqghb65mmiauea6jnmm5nmxxjvv3hu"
          },
          {
            "name": "Test",
            "image": "ipfs://bafkreihdbldpak6a6zkeltve4axocqghb65mmiauea6jnmm5nmxxjvv3hu"
          }
        ],
        "collection": {
          "id": "u-54",
          "name": null
        }
      },
      {
        "name": "Polkadot Decoded 2022 POAPs Tier 1",
        "image": "ipfs://ipfs/QmQHpErLyyvyJhoumHLq7meUuVgkRVFkrbKhcEbhTxKS4t",
        "count": 1,
        "nfts": [
          {
            "name": "Polkadot Decoded 2022 POAPs Tier 1",
            "image": "ipfs://ipfs/QmQHpErLyyvyJhoumHLq7meUuVgkRVFkrbKhcEbhTxKS4t"
          }
        ],
        "collection": {
          "id": "u-2022",
          "name": "Polkadot Decoded 2022 POAPs"
        }
      },
      {
        "name": "NFTs for Ukrainian Refugees #01",
        "image": "ipfs://bafybeiahndnwfnbijtpnaiuo5o3vpz72l4wnrew33vrluqzlho4uh6wuka",
        "count": 4,
        "nfts": [
          {
            "name": "NFTs for Ukrainian Refugees #01",
            "image": "ipfs://bafybeiahndnwfnbijtpnaiuo5o3vpz72l4wnrew33vrluqzlho4uh6wuka"
          },
          {
            "name": "NFTs for Ukrainian Refugees #01",
            "image": "ipfs://bafybeiahndnwfnbijtpnaiuo5o3vpz72l4wnrew33vrluqzlho4uh6wuka"
          }
        ],
        "collection": {
          "id": "u-54",
          "name": null
        }
      },
      {
        "name": "NFTs for Ukrainian Refugees #02",
        "image": "ipfs://bafybeiecqrlnxhazblr7l5epefl3hdjxrms7kif3qns3hf4yjliqzkrudi",
        "count": 2,
        "nfts": [
          {
            "name": "NFTs for Ukrainian Refugees #02",
            "image": "ipfs://bafybeiecqrlnxhazblr7l5epefl3hdjxrms7kif3qns3hf4yjliqzkrudi"
          },
          {
            "name": "NFTs for Ukrainian Refugees #02",
            "image": "ipfs://bafybeiecqrlnxhazblr7l5epefl3hdjxrms7kif3qns3hf4yjliqzkrudi"
          }
        ],
        "collection": {
          "id": "u-54",
          "name": null
        }
      },
      {
        "name": "PoppleHead #0003 - Danni Monroe",
        "image": "ipfs://bafybeicw7x3c7coxmd2ls2d3rhknskhyndrbjsusyuuyggxiwpyknnht7a",
        "count": 6,
        "nfts": [
          {
            "name": "PoppleHead #0003 - Danni Monroe",
            "image": "ipfs://bafybeicw7x3c7coxmd2ls2d3rhknskhyndrbjsusyuuyggxiwpyknnht7a"
          },
          {
            "name": "PoppleHead #0003 - Danni Monroe",
            "image": "ipfs://bafybeicw7x3c7coxmd2ls2d3rhknskhyndrbjsusyuuyggxiwpyknnht7a"
          }
        ],
        "collection": {
          "id": "u-54",
          "name": null
        }
      },
      {
        "name": "285hz - Energy Field Frequencies - Purple",
        "image": "ipfs://bafybeihk2uor3bowkiksumkq4dcgio56mvrtj2taaeloezzwryi7njm724",
        "count": 1,
        "nfts": [
          {
            "name": "285hz - Energy Field Frequencies - Purple",
            "image": "ipfs://bafybeihk2uor3bowkiksumkq4dcgio56mvrtj2taaeloezzwryi7njm724"
          }
        ],
        "collection": {
          "id": "u-54",
          "name": null
        }
      },
      {
        "name": "NFTs for Ukrainian Refugees #03",
        "image": "ipfs://bafybeigcs2wwzk3vmm4jfi4ez45l5mc4hgnirgu6rf7tyatz4wje3jr7g4",
        "count": 1,
        "nfts": [
          {
            "name": "NFTs for Ukrainian Refugees #03",
            "image": "ipfs://bafybeigcs2wwzk3vmm4jfi4ez45l5mc4hgnirgu6rf7tyatz4wje3jr7g4"
          }
        ],
        "collection": {
          "id": "u-54",
          "name": null
        }
      },
      {
        "name": "PoppleHead #0013 - Tiggi Hawke",
        "image": "ipfs://bafkreiaqhy5e3t7scvkyvycrxwdd4duylbhgfol74hpxsztlxu6cu4xrzi",
        "count": 5,
        "nfts": [
          {
            "name": "PoppleHead #0013 - Tiggi Hawke",
            "image": "ipfs://bafkreiaqhy5e3t7scvkyvycrxwdd4duylbhgfol74hpxsztlxu6cu4xrzi"
          },
          {
            "name": "PoppleHead #0013 - Tiggi Hawke",
            "image": "ipfs://bafkreiaqhy5e3t7scvkyvycrxwdd4duylbhgfol74hpxsztlxu6cu4xrzi"
          }
        ],
        "collection": {
          "id": "u-54",
          "name": null
        }
      }
    ]
  }
}

@vikiival

@daiagi daiagi mentioned this pull request Jul 7, 2023
Copy link
Member

@vikiival vikiival left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smol

src/mappings/shared/handleTokenEntity.ts Outdated Show resolved Hide resolved
src/mappings/shared/handleTokenEntity.ts Outdated Show resolved Hide resolved
src/mappings/uniques/setMetadata.ts Outdated Show resolved Hide resolved
@vikiival vikiival merged commit 1a6c8a6 into kodadot:main Jul 8, 2023
1 check passed
@vikiival
Copy link
Member

vikiival commented Jul 8, 2023

Lets test it

@JustLuuuu
Copy link
Member

what is the status of this?

@vikiival
Copy link
Member

vikiival commented Aug 3, 2023

Merged and deployed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants