This is a Lambdanistan project for fun of programming.

About etcql

etcql is a tool that allows you to directly query account states (including the balance, nonce, code, code hashes, storage root, etc.) of the Ethereum blockchain using GraphQL, a querying language that allows clients to ask for exactly what they need. See below for an example of what this can do.

The service uses a pay-what-you-want subscription scheme. You can use this service for free, and I would also appreciate it if you can buy me some beers, or make some donations so I can upgrade my server. The database is usually updated once per day.

Currently it is only supporting the Classic blockchain. Ethereum blockchain might be added if there’s enough interest.

Example: Find All Parity Multisig Wallet Addresses

The Parity Multisig Hack does not affect Ethereum Classic blockchain because Parity deploys a different contract on ETC network. So the query below is safe to run.

etcql allows you to query via an account’s nonce, balance, codehash, code and storageroot. All Parity multisig wallets on ETC network has codehash of

0xa4b67e93913637de643e2763b797cf84e890e3a46a5c70ec73c00b45949287f0

So you can use the GraphQL interface and run the query below:

{
  accounts(codehash: "0xa4b67e93913637de643e2763b797cf84e890e3a46a5c70ec73c00b45949287f0") {
    address
  }
}

It will output all addresses with this codehash. Note that there are not a lot of multisig wallets in ETC network!

Get Started

Go to https://etcql.that.world/register and you will get a pair of publicToken and privateToken. Keep your privateToken safe.

Next, create a custom transaction on the ETC network. You will need to set the recipient to 0x00bBc4F428008CFa801BbB112717E3b110a7A1B5, and set the transaction data to your publicToken. (For Parity, that means to tick “advanced sending options” and paste your publicToken in the next page.) Just set the transaction value to 0 if you wish to use this service for free. The subscription will be valid for one day. If you want to buy me a beer, however, you’ll get longer subscription validity.

  • A transaction of 0.3 ETC and over would give you a subscription of one week.
  • A transaction of 1 ETC and over would give you a subscription of one month.

Just re-send a new transaction with the transaction data of the same publicToken when you old subscription expires.

To use the GraphQL interface, you normally interact with the https://etcql.that.world/graphql endpoint. It would ask you username and password in HTTP BasicAuth. Your username is the transaction hash of the transaction you’ve just made, and your password is your privateToken.

What’s Planned

Personally I’ve had some fun interacting with the database. So there’s definitely some new things coming up, including:

  • Aggregrators for query results.
  • Query balance of accounts above or below a value.
  • Code similarity check.
  • Interface for blocks and transactions (now we only have accounts).