Skip to content

Commit

Permalink
Add more examples: Aito, JOYWORLD (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
bpierre authored May 20, 2021
1 parent f7e5428 commit 5cb240e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 39 deletions.
55 changes: 28 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
38 changes: 26 additions & 12 deletions examples/nfts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -113,19 +113,33 @@ 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",
"52832",
"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<T = unknown>(arr: T[]): T[] {
Expand Down

0 comments on commit 5cb240e

Please sign in to comment.