Subgraph For Wrapped Ether

I had a project a bit back where I wanted to query Wrapped Ether so, of course, I built a subgraph for that.

I imagine it should be useful since nearly everyone user WETH in one way or another in DeFi but for the most part folks connect directly to the contract and read with Web3.

Also as you might imagine, it’s taking incredibly long to sync this subgraph, it’s been 8 days and it’s up to 93.4% and 27 Million entities!

Ironically, I found a small bug (really silly one too), but because it’s taking so long to sync I’m going to wait till it finishes syncing and then push up a new version. That way the first version remains available while it goes through another epic sync.

Have a look!

5 Likes

Well Fam, it’s finally synced!

It took TWENTY days, and has over 62 MILLION entities, but it’s there. The whole of the WETH Ecosystem!

Want to see all the transaction with WETH where the users paid over 1000000 GAS?

transactions(
  where: {
    gasUsed_gt: 1000000
  } orderBy:value orderDirection:desc
){
  gasUsed
  gasPrice
  from {
    id
  }
  to {
    id
  }
}
}
2 Likes

Or maybe you want to see all the transactions where people sent ZERO Tokens, yet paid gas:

{
  tokenTransfers(
    where:{
      amount_lt: 1
    }
  ){
    amount
    transaction{
      id
      gasUsed
      gasPrice
    }
  }
}
2 Likes

Hah, this is pretty cool :sunglasses: