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

ERC721/ERC1155 support adding for EVM protocols #900

Open
tonymorony opened this issue Apr 12, 2021 · 8 comments
Open

ERC721/ERC1155 support adding for EVM protocols #900

tonymorony opened this issue Apr 12, 2021 · 8 comments
Assignees
Labels

Comments

@tonymorony
Copy link

NFT tokens adding should increase protocol usage possibilities. Let's research/brainstorm on these assets wallet/trading features integration @artemii235

@tonymorony tonymorony added the enhancement New feature or request label Apr 12, 2021
@artemii235
Copy link
Member

artemii235 commented Apr 12, 2021

Thanks for creating the issue!

I had a bit of an overview of various NFT marketplaces on ETH and BSC recently and they are completely different from exchanges 🙂 Our current UI with order books won't match it for sure, so I propose to consider starting with some UI mockups first taking existing products into account. This will also help us realize what endpoints we need from API.

The marketplaces I had a brief overview of:
https://opensea.io/
https://www.bakeryswap.org/#/exchange/new-artworks
https://juggerworld.com/

@artemii235
Copy link
Member

artemii235 commented Nov 15, 2022

@artemii235
Copy link
Member

So, after some research, I have discovered the following problems of implementing the support in a way described in the private doc:

  1. To get ownership data, we need to know all NFT smart contract addresses in advance. They should be specified in the coins file and/or it should be possible for the user to add them manually.
  2. Even if we know NFT addresses, it might be impossible to get token IDs of specific owner. It's possible with optional enumeration extension. And some contracts do not implement it. Even with this extension, scanning process can be time and traffic extensive.
  3. As mentioned in the call, we can try using custom https://www.quicknode.com/docs/ethereum/qn_fetchNFTs RPC. But this way, we will become strongly dependent on QuickNode. Also, this RPC is not supported on Binance Smart chain.
  4. We can also try https://docs.etherscan.io/api-endpoints/tokens#get-address-erc721-token-holding and maybe other explorer APIs, yet we will depend on 3rd party too.
  5. Getting NFTs transfers history is also non-trivial - we will have to scan events of each smart contract, which is also time and data consuming.

So, for this task, we will likely need our own service/API for smooth experience. I guess depending on 3rd parties is undesirable, and doing everything client-side might be very suboptimal.

@tonymorony @ca333

@tonymorony
Copy link
Author

tonymorony commented Nov 21, 2022

To me it looks like we'll need to use 3rd party service for this feature anyway: running cloud/dedicated server archive Ethereum node is estimating for almost 100k$/year (crazy hardware is needed atm, especially storage) + we'll need to maintain it and so on

https://moralis.io/nft-api/ - this solution seems to has widest blockchains coverage (covering all the blockchains we might need) and stating Metamask/1inch and so on (and just closed 40M funding so seems to be pretty alive for now). I do propose to base our implementation on this API

Also here is a (just as backup plan):
https://www.nftport.xyz/data-api this solution covers NFT on Ethereum, Polygon and Solana

It's the best way for sure to build stuff agnostic way without relying on 3rd parties but it looks like it might be suboptimal for this particular feature

@laruh laruh self-assigned this Jan 27, 2023
@laruh
Copy link
Member

laruh commented Feb 15, 2023

todo for NFT Wallet support:

  • impl withdraw_nft
    • impl erc1155 withdrawing
    • impl erc721 withdrawing
  • cover all EVM based protocols that we already support
  • combine withdraw erc721 and erc1155 functions
  • moralis request tests
  • impl db support
    • sqlite support
    • filters for get_nft_transfers
    • indexedDB support
    • database tests
  • add proxy service support, so user wont need to use their own api-key
  • protect_from_spam mod

Future refactors:

Future enhancements:

  • add gui-auth
  • allow user to use their own moralis api-key (feature for those who dont want to create their own proxy)
  • NFT activation using NFT conf in coin config file

@tonymorony tonymorony changed the title ERC721/ERC1155 adding on ETH/BSC ERC721/ERC1155 adding on ETH/BSC/Polygon Feb 22, 2023
@tonymorony tonymorony changed the title ERC721/ERC1155 adding on ETH/BSC/Polygon ERC721/ERC1155 support adding for EVM protocols Feb 22, 2023
@tonymorony
Copy link
Author

Bizdev research pointed on the fact that people also use NFTs on Polygon, it shouldn't change this feature design I guess since it's just EVM copypaste blockchains. Moralis NFT API support Polygon NFTs and also supports Avalanche and Fantom which are EVM clones as well so we can just support them all (I guess) as just NFT on EVM chain (so updated issue name accrodingly)

@laruh
Copy link
Member

laruh commented May 5, 2023

RnD for swaps:

  • one of the optional ways of solving problem of swaps and ordermatching is to add enable nft methods/add nft config/use enable_eth_with_tokens comment
  • it worth adding url for proxy in enable method/nft config comment

@laruh
Copy link
Member

laruh commented Apr 5, 2024

Necessary enhancements and todos for NFT SWAP part

shamardy pushed a commit that referenced this issue Jul 18, 2024
This commit introduces the following key changes related to issue #900:

- Implement standalone NFT maker swap contract (EtomicSwapMakerNftV2)
- Add komodefi-proxy support for NFT feature, enabling HTTP GET requests

Additional changes include:
- Implement Multi Standalone Etomic Swap contracts approach
- Add support for EtomicSwapTakerV2 contract
- Enhance security with checks for malicious token_uri links
- Make clear_all parameter optional in clear_nft_db RPC (default: false)
- Implement Sepolia testnet support for testing

This change adopts the new Etomic swap implementation approach as discussed in KomodoPlatform/etomic-swap#7 (comment)
Alrighttt pushed a commit that referenced this issue Jul 25, 2024
This commit introduces the following key changes related to issue #900:

- Implement standalone NFT maker swap contract (EtomicSwapMakerNftV2)
- Add komodefi-proxy support for NFT feature, enabling HTTP GET requests

Additional changes include:
- Implement Multi Standalone Etomic Swap contracts approach
- Add support for EtomicSwapTakerV2 contract
- Enhance security with checks for malicious token_uri links
- Make clear_all parameter optional in clear_nft_db RPC (default: false)
- Implement Sepolia testnet support for testing

This change adopts the new Etomic swap implementation approach as discussed in KomodoPlatform/etomic-swap#7 (comment)
Alrighttt pushed a commit that referenced this issue Aug 9, 2024
This commit introduces the following key changes related to issue #900:

- Implement standalone NFT maker swap contract (EtomicSwapMakerNftV2)
- Add komodefi-proxy support for NFT feature, enabling HTTP GET requests

Additional changes include:
- Implement Multi Standalone Etomic Swap contracts approach
- Add support for EtomicSwapTakerV2 contract
- Enhance security with checks for malicious token_uri links
- Make clear_all parameter optional in clear_nft_db RPC (default: false)
- Implement Sepolia testnet support for testing

This change adopts the new Etomic swap implementation approach as discussed in KomodoPlatform/etomic-swap#7 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants