ethereum-burn-stats icon indicating copy to clipboard operation
ethereum-burn-stats copied to clipboard

Generate Image for ETH Burned as Endpoint

Open mohamedmansour opened this issue 4 years ago • 3 comments

For sharing on Social Media, it would be nice if we have a HTTP GET endpoint that generates an image with some stats on it.

  • Icon
  • Website name
  • Total Burned / etc

Then we can include it in the meta tags:

<meta property="og:title" content="WatchTheBurn.com">
<meta property="og:image" content="https://watchtheburn.com/api/social.png">
<meta property="og:description" content="Some description">
<meta name="twitter:title" content="WatchTheBurn.com">
<meta name="twitter:description" content="Some description">">
<meta name="twitter:image" content="https://watchtheburn.com/api/social.png">
<meta name="twitter:card" content="summary_large_image">

The image could be 924x461 dimensions to fit Twitter nicely.

mohamedmansour avatar Aug 13 '21 09:08 mohamedmansour

It would be handy to include the full distribution rather than just a few stats. Recently worked a hackathon project to do something related to that idea (standard spec for sharing probability distributions). It could be a fun and useful colab although my go skills are beginner at best. If we can get the data into something like this http://hdrhistogram.org/ histogram every hour(?) for base fees, etc it would be pretty easy to share those distributions in packets that are actually useful for dapps, bots etc to use in their own simulations. Just an idea. I like your project. Keep Going!

i001962 avatar Oct 16 '21 18:10 i001962

We have that data in the historical api, we can include it and just cache the image every block (and host it in some CDN). I am new to Golang as well, this is my first go project :)

mohamedmansour avatar Oct 18 '21 08:10 mohamedmansour

Nicely done. First project??

I like what https://shields.io/ has done here and think there's something inspiration that might be more aligned with your initial 'issue' title. If there's already a historical endpoint with the stat you want in the badge... it's pretty much done.

That said, making the gas usage data distributions usable seems like a worthy task as it would provide a picture of the range of possibilities and probabilities people/dapps/bots could act on. Anyway, just thinking out loud here..

i001962 avatar Oct 18 '21 16:10 i001962