Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Transaction decoding: ERC-721 Non-fungible tokens #33

Open
2 of 4 tasks
raulk opened this issue Jun 22, 2018 · 4 comments
Open
2 of 4 tasks

Transaction decoding: ERC-721 Non-fungible tokens #33

raulk opened this issue Jun 22, 2018 · 4 comments
Assignees
Labels
Type: Feature New feature or request

Comments

@raulk
Copy link
Contributor

raulk commented Jun 22, 2018

Add support for decoding ERC-721 transactions.

  • Import the ABI into the abi directory. Make sure the JSON is formatted.
  • That ABI does not come from an official source, so check it against the expected interface.
  • Identify decodable transaction types, and start a discussion in this ticket. For each TX type, indicate the proposed fields and data types. Let's reach team consensus around our understanding.
  • Implement the decoding of each transaction type, as well as associated queries (e.g. symbol, token supply, etc.)
@raulk raulk changed the title ERC-721 transaction decoding Transaction decoding: ERC-721 transaction decoding Jun 22, 2018
@raulk raulk added the Type: Feature New feature or request label Jun 22, 2018
@raulk raulk changed the title Transaction decoding: ERC-721 transaction decoding Transaction decoding: ERC-721 Non-fungible tokens Jun 22, 2018
@jonathan-buhler jonathan-buhler self-assigned this Jul 13, 2018
@jonathan-buhler
Copy link
Contributor

From the expected interface of ERC-721:

  • safeTransferFrom: sender(address), from (address), to (address), tokenID (Int) and perhaps data (bytes, but not sure how GraphQL handles those)
  • transferFrom: sender (address), from (address), to (address), tokenID (Int)
  • approve: sender (address), approved (address), tokenID (Int)
  • setApprovalForAll: sender (address) operator (address), approved (Boolean)

@raulk
Copy link
Contributor Author

raulk commented Jul 16, 2018

LGTM. bytes can be returned as hex strings.

@raulk
Copy link
Contributor Author

raulk commented Jul 23, 2018

@jonathanBuhler Could you update this ticket with your findings and the blockers you're facing?

@jonathan-buhler
Copy link
Contributor

Due to similarities in the ERC721 and ERC20 token, our current decoding system marks both as ERC20. Raul suggested using ERC165 to identify which interface the token implements, but I was not able to make much headway in that regard. This is the pull request in my own fork of the code as it currently stands.

For the most part my attempts to decode ERC721 mirrored the current implementation for ERC20, but with added fields for where 721 had functionality that 20 did not (setApprovalForAll, safeTransferFrom).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants