-
Notifications
You must be signed in to change notification settings - Fork 43
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
Nft transfers #311
Nft transfers #311
Conversation
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
* one combined CSV file for nft / asset transfers * tables are wrapped in accordions
* 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
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.
Awesome. I still need to try it out, but it looks swell. Some nits, comments and suggestions inline.
<code> | ||
<b>token_address</b> | ||
</code> | ||
: Ethereum address of ERC20 token to be transferred. This has to be left blank for native (ETH) |
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.
Nit
: Ethereum address of ERC20 token to be transferred. This has to be left blank for native (ETH) | |
: Ethereum address of ERC20 token to be transferred. This must be left blank for native (ETH) |
</Title> | ||
<Text size="lg"> | ||
Since native tokens do not have a token address, you must leave the <code>token_address</code> column | ||
blank for native transfers. |
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.
blank for native transfers. | |
blank for native transfers. See the sample transfer file for an example of this. |
src/parser/transformation.ts
Outdated
export const transform = ( | ||
row: CSVRow, | ||
tokenInfoProvider: TokenInfoProvider, | ||
erc721InfoProvider: ERC721InfoProvider, |
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.
NFT info provider?
case "erc1155": | ||
case "erc721": | ||
validateCollectibleRow(row, callback); |
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.
I am new to TS switches, but I'm guessing this means both cases are validated and not that one is skipped.
* 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
We should deploy a new version of this, get the ipfs hash and share it with the people interested in this feature. |
transfer.from, | ||
transfer.receiver, | ||
transfer.tokenId.toFixed(), | ||
transfer.value?.toFixed() ?? "0", |
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.
I think the default here should be "1" and not "0". Because ERC1155 tokens have a balanceOf for a single ID.
After some work on this, the first version is done.
It includes:
Here is a transaction I submitted including erc20, erc1155 and native tokens:
https://rinkeby.etherscan.io/tx/0x158e3794c672ad550726477d5c12fa6cfc90c0fbddf0cffeb2062b07ee0b7f89
Screenshot:
I didn't try it on mainnet yet, because I don't have a safe there.