-
Notifications
You must be signed in to change notification settings - Fork 45
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
Support for NFT transfers #16
Comments
See here for an example cryptokitty However, looking at ENS domains, there is no plain old |
We should probably follow the ERC721 token standard if we want to support this: https://ethereum.org/en/developers/docs/standards/tokens/erc-721/ |
This would be awesome. Currently looking for a solution to send multiple NFTs to multiple addresses using a gnosis safe. If someone could walk me through the code on how to support it, I could maybe implement it myself. |
Great to hear your enthusiasm @arberx, this will likely be a quite involved task UI-wise but is actually quite simple from a backend standpoint. I will gather a few points in the code, where we batch together the erc20 transfers for guidance, but essentially we parse the CSV with rows containing (NFT address, recipient) columns and encode each row as an NFT transfer, then throw it all into a gnosis safe "multi send" transaction and voila. We would also have to import or hard code the ERC721 contract artifacts to be able to encode the transfer method, but probably only the interface contract is needed. Of course we should implement validations that the safe itself actually owns the tokens it seeks to transfer and give a fair warning beforehand. From the UI side, we were thinking that NFT transfers should actually be a separate tab so to distinguish between the different CSV types, but now that I think of it, since we assume ETH transfer when the token address field is null, we could also assume NFT transfer whenever the amount field is null. This way we could actually batch together all three types of airdrops (erc20, native token and NFT)into a single transfer! |
This is the code block which builds transfers from a list of Lines 7 to 28 in 084abdc
Note that once the CSV is uploaded, during parsing, we convert each row into a "Payment" object. You can see here that we are simply setting the values for a standard ethereum transaction.
So step 3 is is essentially all that is needed to build the support that turns Forget about separating it into another tab, but some thought about how to display a collection of NFT transfers in the UI might be required. |
Thanks for the quick response and detailed explanation! The contract work seems straightforward, but don't think I can commit to the front-end at the moment. Also, it seems the transaction builder app in gnosis supports erc721's although there isn't a good example... |
This is something that @schmanu might be interested in helping out with. Feel free to implement the backend anyway and let just see what happens by default without all the UI stuff. |
Yes sir! I would like to implement this in one! I'm just a bit busy at the moment. So I don't know for sure yet when I can get it done. |
No worries, it will likely be here for you. This issue has been open since early March anyway. I doubt that I'll ever get around to it unless I really need to send a bunch of NFTs. |
NEW UI: * Tab-Navigation to fill out a CSV for Asset-Transfers or Collectible-Transfers * transfer-tables are now always displayed under the CSV-Form. * there are now two tables: For asset transfers and for collectible transfers * submit button is at the bottom of these tables issue #16
* First working version of nft transfers * UI changes for multisending nfts and erc20 tokens in one transaction NEW UI: * Tab-Navigation to fill out a CSV for Asset-Transfers or Collectible-Transfers * transfer-tables are now always displayed under the CSV-Form. * there are now two tables: For asset transfers and for collectible transfers * submit button is at the bottom of these tables issue #16 * small ui cleanup * Cache for erc721 token info provider * rework of nft sending ui * one combined CSV file for nft / asset transfers * tables are wrapped in accordions * erc1155 support, some redesigns * small refactoring of modal * fixes existing unittests * small refactoring, parser tests * finishes up nft transfers * Updates help text * Validates, that the value is a integer for erc1155 transfers * unittests for the transfer of collectibles * unittest for decimal (invalid) erc1155 * fixes sample file * remove unused global styles * simplifies token_types erc1155 and erc721 to nft * instead of providing erc1155/erc721 the token_type now is simply nft * fixes performance problem of editor. For no reason the csvContent was held by the App and passed down to the editor * tests for nft transfers * updated faq * Update src/components/FAQModal.tsx Co-authored-by: schmanu <[email protected]> Co-authored-by: Benjamin Smith <[email protected]>
The newest version has ERC721 and ERC1155 transfer support! It's release to the gnosis app list is currently under review but its already merged into main branch. |
Given that NFTs have now hit the scene, it shouldn't be too difficult to support NFT airdrops.
The text was updated successfully, but these errors were encountered: