From 5cb240eee590254694d18a1ea4578fb8f8dc5e43 Mon Sep 17 00:00:00 2001 From: Pierre Bertet Date: Thu, 20 May 2021 15:38:14 +0100 Subject: [PATCH] Add more examples: Aito, JOYWORLD (#83) --- README.md | 55 ++++++++++++++++++++++++------------------------ examples/nfts.ts | 38 ++++++++++++++++++++++----------- 2 files changed, 54 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index be61f36..4b011e9 100644 --- a/README.md +++ b/README.md @@ -62,33 +62,6 @@ function Nft() { } ``` -## Supported NFT formats - -Any standard NFT ([EIP 721](https://eips.ethereum.org/EIPS/eip-721) or [EIP 1155](https://eips.ethereum.org/EIPS/eip-1155)) is, in theory supported by useNft(). In practice, some adjustments are needed to support some NFT formats, either because their implementation doesn’t follow the specification or because some parts of the specifications can be interpreted in different ways. - -This table keeps track of the NFT minting services that have been tested with useNft() and the adaptations needed. - -| NFT minting service | Supported | Specific adaptations done by useNft() | -| ---------------------------------------------------- | --------- | -------------------------------------------------------------------------------------- | -| [AITO](https://www.thisisaito.xyz/) | Yes | | -| [Async Art](https://async.art/) | Yes | | -| [Clovers](https://clovers.network/) | Yes | | -| [CryptoKitties](https://www.cryptokitties.co/) | Yes | Non standard NFT, dedicated mechanism. | -| [CryptoPunks](https://www.larvalabs.com/cryptopunks) | Yes | Non standard NFT, dedicated mechanism. | -| [Cryptovoxels](https://www.cryptovoxels.com/) | Yes | | -| [Decentraland ](https://decentraland.org/) | Yes | Estate and parcels are fetched from The Graph. Wearables are fetched as standard NFTs. | -| [Foundation](https://foundation.app/) | Yes | | -| [KnownOrigin](https://knownorigin.io/) | Yes | | -| [MakersPlace](https://makersplace.com/) | Yes | Incorrect JSON format (uses `imageUrl` instead of `image`). | -| [MoonCats](https://mooncatrescue.com/) | Yes | Non standard NFT, dedicated mechanism. | -| [Nifty Gateway](https://niftygateway.com/) | Yes | Incorrect metadata URL. | -| [OpenSea](https://opensea.io/) | Yes | Incorrect metadata URL. | -| [Portion.io](https://app.portion.io/) | Yes | Non-standard JSON format. | -| [Rarible](https://rarible.com/) | Yes | | -| [SuperRare](https://superrare.co/) | Yes | | -| [Uniswap V3](https://uniswap.org/) | Yes | | -| [Zora](https://zora.co/) | Yes | | - ## API ### useNft(contract: string, tokenId: string): NftResult @@ -210,6 +183,34 @@ const result = await fetchWrapper.fetchNft( The `fetchNft()` function returns a promise which resolves to an `NftMetadata` object. +## Supported NFT formats + +Any standard NFT ([EIP 721](https://eips.ethereum.org/EIPS/eip-721) or [EIP 1155](https://eips.ethereum.org/EIPS/eip-1155)) is, in theory supported by useNft(). In practice, some adjustments are needed to support some NFT formats, either because their implementation doesn’t follow the specification or because some parts of the specifications can be interpreted in different ways. + +This table keeps track of the NFT minting services that have been tested with useNft() and the adaptations needed. + +| NFT minting service | Supported | Specific adaptations done by useNft() | +| ---------------------------------------------------- | --------- | -------------------------------------------------------------------------------------- | +| [AITO](https://www.thisisaito.xyz/) | Yes | | +| [Async Art](https://async.art/) | Yes | | +| [Clovers](https://clovers.network/) | Yes | | +| [CryptoKitties](https://www.cryptokitties.co/) | Yes | Non standard NFT, dedicated mechanism. | +| [CryptoPunks](https://www.larvalabs.com/cryptopunks) | Yes | Non standard NFT, dedicated mechanism. | +| [Cryptovoxels](https://www.cryptovoxels.com/) | Yes | | +| [Decentraland ](https://decentraland.org/) | Yes | Estate and parcels are fetched from The Graph. Wearables are fetched as standard NFTs. | +| [Foundation](https://foundation.app/) | Yes | | +| [JOYWORLD](https://www.joy.world/joys) | Yes | | +| [KnownOrigin](https://knownorigin.io/) | Yes | | +| [MakersPlace](https://makersplace.com/) | Yes | Incorrect JSON format (uses `imageUrl` instead of `image`). | +| [MoonCats](https://mooncatrescue.com/) | Yes | Non standard NFT, dedicated mechanism. | +| [Nifty Gateway](https://niftygateway.com/) | Yes | Incorrect metadata URL. | +| [OpenSea](https://opensea.io/) | Yes | Incorrect metadata URL. | +| [Portion.io](https://app.portion.io/) | Yes | Non-standard JSON format. | +| [Rarible](https://rarible.com/) | Yes | | +| [SuperRare](https://superrare.co/) | Yes | | +| [Uniswap V3](https://uniswap.org/) | Yes | | +| [Zora](https://zora.co/) | Yes | | + ## License [MIT](LICENSE) diff --git a/examples/nfts.ts b/examples/nfts.ts index 92d343b..6cd88ad 100644 --- a/examples/nfts.ts +++ b/examples/nfts.ts @@ -92,12 +92,12 @@ export default shuffle<[string, string, string, string]>([ "https://async.art/art/master/0xb6dae651468e9593e4581705a09c10a76ac1e0c8-1230", ], - // [ - // "0x79986af15539de2db9a5086382daeda917a9cf0c", - // "1162", - // "Cryptovoxels", - // "https://www.cryptovoxels.com/parcels/1162", - // ], + [ + "0x79986af15539de2db9a5086382daeda917a9cf0c", + "1162", + "Cryptovoxels", + "https://www.cryptovoxels.com/parcels/1162", + ], [ "0x7c40c393dc0f283f318791d746d894ddd3693572", @@ -113,12 +113,12 @@ export default shuffle<[string, string, string, string]>([ "https://knownorigin.io/gallery/307800-red-forest-fires", ], - // [ - // "0xb55c5cac5014c662fdbf21a2c59cd45403c482fd", - // "0x555559a5669969a96a656a995aa55555", - // "Clovers", - // "https://clovers.network/clovers/0xdfffdfffd557fd7ff55fdfdffff7ffff", - // ], + [ + "0xb55c5cac5014c662fdbf21a2c59cd45403c482fd", + "0x555559a5669969a96a656a995aa55555", + "Clovers", + "https://clovers.network/clovers/0xdfffdfffd557fd7ff55fdfdffff7ffff", + ], [ "0x2a46f2ffd99e19a89476e2f62270e0a35bbf0756", @@ -126,6 +126,20 @@ export default shuffle<[string, string, string, string]>([ "MakersPlace", "https://makersplace.com/jeffreylee1/garden-delights-1-of-1-60178/", ], + + [ + "0xd07dc4262bcdbf85190c01c996b4c06a461d2430", + "344495", + "Aito", + "https://thisisaito.xyz/n/0xd07dc4262bcdbf85190c01c996b4c06a461d2430/344495", + ], + + [ + "0x6c7B6cc55d4098400aC787C8793205D3E86C37C9", + "84", + "JOYWORLD", + "https://www.joy.world/joy/the-fry-cult", + ], ]) function shuffle(arr: T[]): T[] {