GithubHelp home page GithubHelp logo

sourcifyeth / metadata-playground Goto Github PK

View Code? Open in Web Editor NEW
20.0 5.0 15.0 2.05 MB

Playground for Solidity metadata hash and CBOR encoded data appended to the contract bytecode.

JavaScript 87.12% HTML 3.62% CSS 8.91% Dockerfile 0.35%
ethereum solidity web3 metadata cbor

metadata-playground's Introduction

Solidity Metadata Playground

๐Ÿ•น๏ธ https://playground.sourcify.dev

This tool allows you to see the Solidity metadata hash and other information encoded at the end of the smart contract bytecode. Works with any EVM chain listed in ethereum-lists/chains i.e. https://chainid.network/chains.json.

Usage

With Query Parameters

Either with chainId and address

https://playground.sourcify.dev/?address=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&chainId=1

Or directly with bytecode

https://playground.sourcify.dev/?bytecode=0x7f7050c9e0f4ca769c69bd3a8ef7...

Through the UI

  • Choose network and input the contract address to see its deployed bytecode. Some example contracts provided.
  • In the popup you will see the contract's deployed bytecode. It will be automatically scrolled to the end where CBOR encoded data is appended.
  • The CBOR decoding will be highlighted with the sections indicating its length and its contents.
  • The CBOR encoded data will be decoded. It will differ for each contract but usually this will contain the Solidity version and the IPFS or Swarm hash.
  • It will also try to fetch and display the metadata file from its IPFS hash if available.

Run

Clone the repository and install dependencies

npm install

Ethereum Mainnet and Ethereum testnets' connections are provided throught Infura. Copy the .env-template file to a file named .env and add the Infura key. If left empty, it will use the default ethers.js Infura key

REACT_APP_INFURA_KEY=<Your-Key>

Run the deployment server with

npm start

Build

Build the project with

npm run build

Docker

To serve the project in a Docker container simply use

docker-compose up

It will run at http://localhost:2346 as given in the docker-compose.yaml file.

metadata-playground's People

Contributors

kuzdogan avatar skylenet avatar robriks avatar

Stargazers

 avatar  avatar  avatar Pran avatar i.am_pi3 avatar 0x0918 avatar Ibrahim Umar  avatar James Moses Kelechi avatar Y4nhu1 avatar Royz avatar  avatar  avatar Beau avatar Viktor Lavrenenko avatar sam bacha avatar BLINGBOARD  avatar Olawale Akinro avatar  avatar  avatar Nasser Rahal avatar

Watchers

ligi avatar  avatar Marco Castignoli avatar  avatar  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.