Code Monkey home page Code Monkey logo

4bytes's Introduction

This is a collection of Ethereum Method signatures. It can be used to get the text-signatures from hex-signatures (with 4-bytes - hence the name)

A real world example:

> curl https://raw.githubusercontent.com/ethereum-lists/4bytes/master/signatures/a9059cbb

will result in this method (from the ERC-20 standard):

transfer(address,uint256)

If there are 2 methods matching this hex-signature they will be separated by semicolon(";").

You can also get signatures with parameter names. Note that collisions will be higher here as people can use different parameter names and the parameter names do not change the signature. In the example before:

> curl https://raw.githubusercontent.com/ethereum-lists/4bytes/master/with_parameter_names/a9059cbb

will result in:

transfer(address _to,uint256 _value);transfer(address to,uint val)

So please also a plea to all smart contract developers. Please try to check if there are methods with similar signatures and think if you could use the same parameter names to have better UX in the consuming side.

To add your own signatures ideally verify your sourcecode via sourcify You can also use the 4ByteBot - or enter them manually on the 4byte.directory. But verified source-code is the preferred option here.

4bytes's People

Contributors

evertonfraga avatar ligi avatar

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.