Giter Site home page Giter Site logo

topic0's Introduction

topic0

title

Introduction

This repository is:

  1. A public database of Ethereum event log signatures.
  2. A set of scripts to generate the database from a Sourcify repository backup. We were able to extract almost 9K event signatures from mainnet verified contracts 🎉🎉🎉

Event what?

When a transaction gets included in an Ethereum block, its execution generates a receipt. A receipt contains 0 or more event logs. Event logs are composed by an array of topics.

For a non-anonymous event log, the first topic, topic[0], is used to identify the event signature. It is made of the keccak256 hash of the event signature.

However, since topic[0] is a hash, it is not possible to revert it to the original signature.

This is analogous to how 4byte function decoding works. If you are familiar to that concept, you already got the point.

This database provides the event signature for known topic hashes. From the event signature it is possible to decode the log entry to human-readable elements.

DB format

This repo follows a similar format to the popular 4bytes repository (https://github.com/ethereum-lists/4bytes).

signatures directory

It contains one file for each signature. The file contains the event signature used to generate the topic hash.

The filename is the hexadecimal string (without the 0x prefix) of the topic hash. Calculating the keccak256 the file contents must result in the filename.

For example, the file signatures/ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef contains the popular ERC20 Transfer(address,address,uint256) event signature.

with_parameter_names directory

It contains one file for each signature. The file contains one or more complete event signatures (separated by ";") corresponding to the topic hash.

We must say it contains one or more signatures because there are multiple signature variations which result in the same topic hash.

Please take a look at the gotchas page for more details.

The filename is the hexadecimal string (without the 0x prefix) of the topic hash.

For example, the file with_parameter_names/ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef contains the popular ERC20 Transfer(address indexed from, address indexed to, uint256 value) and ERC721 Transfer(address indexed from, address indexed to, uint256 indexed tokenId) event signatures.

Rebuilding the repo

Here.

Gotchas

Long explanation here.

Kudos

Proper kudos should be given to Sourcify, the raw data comes from them.

The scripts in this repository just perform extraction, processing and massaging on their data.

topic0's People

Contributors

wmitsuda avatar

Stargazers

Chuk avatar Artem Kurianov avatar  avatar Skyler Curtis avatar Matt Ketmo avatar Yu Lun Hsu avatar 紫藤かもめ avatar Charles avatar Chelbi Breeden avatar Alexey Zhuchkov avatar Chunpeng(Ray) Shao avatar Toan Nhu avatar Lake Chan avatar  avatar gd avatar Manel R. Doménech avatar Dragan Milic avatar Deok0_0 avatar Damin Lee avatar Jiho Lee avatar  avatar Benjamin Hyo-keun Oh avatar 0ximmortal avatar  avatar  avatar  avatar stupidanon avatar Stella Cannefax avatar  avatar Status avatar  avatar Lei avatar Ahmed Ali avatar Alan Cohen avatar Jake Loo avatar Mariko Wakabayashi avatar Ramarti avatar  avatar sol avatar vimrus avatar dlock avatar wildmouse avatar Papa Sougou Wele avatar  avatar of avatar Luka avatar daoleno avatar Mark Milner avatar anysoft avatar Peter C. avatar Cyb3rN8 avatar Thanee Charattrakool avatar John Johnson avatar Alexander avatar Denver avatar giniro.eth avatar Denis avatar  avatar  avatar  avatar Rosco Kalis avatar Hilliam T. avatar Adedayo avatar Darryl Yeo avatar Yudi Kubota avatar Paul Pierre avatar  avatar Igor Barinov avatar John Abraham avatar Jonny Dubowsky avatar Will Pankiewicz avatar Javed Khan avatar MIKΞR avatar Tynan Daly avatar sam bacha avatar ELI JOSEPH BRADLEY avatar gasolin avatar Larry Hipp avatar Alessio Delmonti avatar Dan Scanlon avatar  avatar Michael Demarais avatar gaojin avatar Shane Fontaine avatar  avatar Tim Daubenschütz avatar Volky avatar Apoorv Lathey avatar Ezequiel Moreno avatar Alex Disney avatar Brendan McCaffrey avatar Luca Donno avatar isaac avatar jiangplus avatar Erwan Or avatar dungexn avatar Kian avatar Erik Bjäreholt avatar 0xcharchar avatar  avatar

Watchers

 avatar James Cloos avatar Michael Demarais avatar  avatar  avatar

topic0's Issues

Sourcify has migrated from IPNS to DNSLink

Migrate to using DNSLink from IPNS

I would open a PR but I am not sure how you want to handle this

ref changes https://github.com/ethereum/sourcify/commit/1e33e676389f39957bcb00d60e575ad024f10750

Stable

IPNS=k51qzi5uqu5dll0ocge71eudqnrgnogmbr37gsgl12uubsinphjoknl6bbi41p
- IPNS=k51qzi5uqu5dll0ocge71eudqnrgnogmbr37gsgl12uubsinphjoknl6bbi41p

+ IPNS=repo.sourcify.dev # Use DNSLink

Staging

IPNS=k51qzi5uqu5dkuzo866rys9qexfvbfdwxjc20njcln808mzjrhnorgu5rh30lb
- IPNS=k51qzi5uqu5dkuzo866rys9qexfvbfdwxjc20njcln808mzjrhnorgu5rh30lb

+ IPNS=repo.staging.sourcify.dev # Use DNSLink
ipfs resolve -r /ipns/repo.sourcify.dev/manifest.json

Note on improving download speed

IPFS uses QUIC transfers. These connections can be limited by the size of the UDP receive buffer. This buffer holds packets that have been received by the kernel, but not yet read by the application (quic-go is what IPFS uses in this case). Once this buffer fills up, the kernel will drop any new incoming packet.

ensure you have configured

sysctl -w net.core.rmem_max=2500000

default is 208 kiB
you want: 2048 kiB

see https://github.com/lucas-clemente/quic-go/wiki/UDP-Receive-Buffer-Size

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.