Etherscan is a really useful website but fairly recently I discovered they also have a pretty handy Developer API. I used it to analyse gas a contract was using over a period of time and thought it might be useful to record how I did it.

Getting Started

First of all an API key is required and this can be created for free by logging in and going to:

I’m going to paste my code with comments which should be easy enough to follow. The API covers a whole lot of other end point such as Logs, Tokens, etc that I didn’t use but the docs are good and worth a scan.


Photo by Markus Spiske on Unsplash

Lately at Balancer we’ve moved from the Truffle development environment to using Buidler, Waffle and Ethers. The main benefit is being able to use console.log in Solidity during debugging — it’s amazing how much of a difference this makes and for this alone the change over is worth it. …

Photo by Bernard Hermant on Unsplash

Erasure is a decentralized data marketplace that allows users to post and sell their data.

The protocol relies on Ethereum timestamps and data hashing to prove with certainty that the specific data was owned by the poster at that specific time. …

Photo by David Travis on Unsplash

This is quite random but I had to learn a few things so worth taking note.

I was recently working on a Truffle Dapp. I had to deploy one of my contracts in a roundabout way — basically one account signing it but another paying the gas (Metatransactions are basically…

Photo by Franki Chamaki on Unsplash


3Box is a secure and decentralized user data storage system. Simple APIs allow developers to easily use 3Box for identity, auth, profiles, storage, and messaging. As well as allowing for fast development 3Box offers other benefits:

  • Build apps with less backend infrastructure
  • Reliable decentralized storage on IPFS and OrbitDB
  • Improve…

Photo by Joshua Sortino on Unsplash

In April I entered (and won!) the NuCypher+CoinList hackathon. I didn’t actually know much about the NuCypher tech before I got started but once I had built my DApp it was clear this is really interesting stuff and it’s stuck with me ever since as something interesting to build on.

Proxy Re-encryption

Photo by Roman Mager on Unsplash

Lately I’ve been helping out on the open source burner-wallet app created by Austin Thomas Griffith. The idea behind it was to try and create an app that could exchange value using a mobile web browser. …

Warp Speed! Photo by chuttersnap on Unsplash

The reality is that State Channels are here now, and work great, today. We can ship commercial quality dapps that use them NOW — JezSan FunFair

The quote above was from a Reddit post highlighted in the November issue of Week In Ethereum. It confirmed something that I didn’t really…

The Quick & Not So Nasty Summary

It’s going to happen. Ethereum is going to scale, PoS is going to come, UI/UX is going to improve and more people will use DApps. Amazing minds are working on all these things. The researchers are super inspiring. The community is strong, dedicated and buidling away. The ship is being…

Why Vyper?

Vyper is a contract-oriented, pythonic programming language that targets the Ethereum Virtual Machine (EVM)

Vyper is a relatively new language that has been written with a focus on security, simplicity and audibility. It’s written in a Pythonic way which appeals to me and as a more secure alternative to Solidity…

John Grant

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store