airswap / airswap-nft-marketplace

Reference AirSwap Marketplace Client
12 stars 3 forks source link

Add fallback for getCollectionTokenInfo in @airswap/metadata #194

Open ghost opened 10 months ago

ghost commented 10 months ago

Did a test of getCollectionTokenInfo on most popular nft's on mainnet. ERC-721 all works, but ERC-1155 has like 50% success rate.

Here's ERC-1155:

  1. Proceed w/ Caution WORKS https://etherscan.io/token/0xe77ad290adab2989a81ae62ab2467c01b45feeff
  2. OpenSea Shared Storefront Works but no description, image or attributes https://etherscan.io/token/0x495f947276749ce646f68ac8c248420045cb7b5e
  3. 0x67B630...77605dF5 Works but no description, image or attributes https://etherscan.io/token/0x67b630e70e793d48f1329c00cad9d60977605df5
  4. UA3 Paddy's Pass WORKS https://etherscan.io/token/0x53894ec021245adb6a7c556bb0f0ad83544c0e33
  5. Town Star FAIL, see error below https://etherscan.io/token/0xc36cf0cfcb5d905b8b513860db0cfe63f6cf9f5c
  6. The Memes by 6529 WORKS https://etherscan.io/token/0x33fd426905f149f8376e227d0c9d3340aad17af1
  7. SatoshiBitkoinov Works but no description, image or attributes https://etherscan.io/token/0xeba6e1d1ef66c3e8b3344dfbb294c5459bdbd7fc
  8. SXTCommunityNFT WORKS https://etherscan.io/token/0x1873323e539d264a1a7712932b7ff8ab2f744d71
  9. 0x18780C...84EBEc86 WORKS https://etherscan.io/token/0x18780cee3781a298fc28df29890c9f4384ebec86
Unable to fetch token metadata: missing revert data in call exception; Transaction reverted without a reason string [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (data="0x", transaction={"to":"0xc36cF0cFcb5d905B8B513860dB0CFE63F6Cf9F5c","data":"0x0e89341c0000000000000000000000000000000000000000000000000000000000000005","accessList":null}, error={"code":-32000,"message":"execution reverted"}, code=CALL_EXCEPTION, version=providers/5.7.2)

So a fallback is needed in case it fails.