-
Notifications
You must be signed in to change notification settings - Fork 171
LL 7340 & LL-6671 - Sync ERC721 & ERC1155 NFT #1405
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/ledgerhq/ledger-live-common/GZUKt9rdKr8BAoW5DAFBtMMWvveT |
6406e8d
to
3cfe758
Compare
3cfe758
to
15f7c8a
Compare
0e08676
to
aa67adc
Compare
aa67adc
to
ac476d5
Compare
ac476d5
to
878bda8
Compare
This PR is a proposal, and it needs some insights for the architecture and need some help to have a more coherent testing since right now I'm only comparing our results with what OpenSea's API is responding (which doesn't contain the amount of ERC 1155 for example). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some stuff you could do to improve, it looks fine by me just different from what should be done i think 👍
My understanding was that the review wasn't so much about code specifics like but more about the architectural approach and how it fits in the schema of our codebase. NFTs are by definition a token and if we follow the convention we have in live-common they actually would fit in the Keeping them as We would need to build a list of The This fits 100% the UI we saw on figma, and it would require minimal code changes (asset distribution would need to filter by tokenType to not show NFTs on the table for example) but I might be missing something. As for how to handle the sync and the sending we already talked about it but I think it should be a module inside the families/ethereum/modules folder, the same way we do for erc20 and compound with any peculiarities we might have for them handled there. |
as far as I remember @gre was opposed to the idea of reusing "TokenAccount" which are used everywhere in the app (and it would break everywhere). |
I actually initially wrote having another type of account, NonFungibleTokenAccount or whatever, that can residen alongside the other types of subaccounts, but I guess I changed my mind midway. If TokenAccount breaks things, then for sure, another type. Just not fields on Account 🤷 |
I would prefer not to touch Also, I feel "Currency" type don't match a lot the idea of an NFT. it is not a currency (look at all the fields of currency, not a lot of them makes sense, like what's the ticker of a NFT? are you going to try to get a countervalues from countervalues api? because with our current logic it's going to try this if you make it such an account =D anyway, just to say that I believe it will be more work to hack that way rather than just making a new type for "NFTs" ). |
For me, the general architecture is good to go |
878bda8
to
0862cb5
Compare
0862cb5
to
4f2cd97
Compare
4f2cd97
to
a9897f5
Compare
608c951
to
f1bcbaf
Compare
Context (issues, jira)
LL-6671
LL-7340
Context (issues, jira)
This PR is a proposal for the implementation of NFTs and synchronization of ERC721 & ERC1155 tokens in live-common.
This PR is done using the staging server for the
/transactions
call and a mock for the NFTs' metadataSource for the metadata mock: https://github.com/klambert-ledger/mock-nft-metadata-api
Description / Usage
Account should now have a NFT property filled with owned NFTs:
Expectations