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

ERC721 (non-fungible tokens), ERC165 (introspection) and CryptoKitties #109

Description

@raulk

Motivation

EthQL can currently decode ERC20 transactions, and can support any ABI through its decoder service. We now want to extend the breadth the transaction decoding in EthQL by adding support for ERC721 (NFT) and ERC165 (supportsInterface). The latter is a fundamental step towards supporting more contract types in the near-future.

We also want to introduce the notion of application-specific queries with CryptoKitties as an example.

Requirements

  • Create erc165 plugin that adds a supportsInterface field in account to query whether that contract supports the interface provided as an argument.

    • Additionally, this plugin should add a service to make it possible for other plugins to query if a contract supports an interface.
  • Create erc721 plugin, adding a decoder configuration for the ERC721 log events and transactions.

    • Add a top-level query nftContract(address: "0x...") that exposes the ABI's view operations and public fields, including any relevant field edges (e.g. accounts mainly).
    • ERC721* transaction/log types (in the same spirit as ERC20* transaction/log types) so they can be used from decoded fields.
    • This plugin should use the service exposed by the erc165 plugin to query if a contract is an NFT.
  • Create a cryptokitties plugin.

    • Analyse and propose which operations from the CryptoKitties contract should be exposed as EthQL queries.
    • Decide together with the EthQL team the query/field design.
    • Implement all agreed fields according to the definition of done below.

Definition of done

  • Test cases with full coverage.
  • PR accepted and merged, introducing a new top-level directory for each of the plugins generating an NPM module each (Lerna build #107).
  • Code commented, documented and linted.
  • README and wiki updated listing and showcasing this functionality.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions