Giter VIP home page Giter VIP logo

ethereum-code-viewer's Introduction

ethereum code viewer

Ethereum Code Viewer

View source of deployed Ethereum smart contracts in VS Code

Comfortably browse contracts verified on etherscan

Build Status Join our discord!

๐Ÿ’ธ Enjoy using Ethereum Code Viewer? Consider funding development via GitCoin ๐Ÿ’ธ

Usage

While browsing smart contract code on Etherscan just change URL from .io to deth.net. This will open Visual Studio Code instance and fetch the verified code using Etherscan API.

ecv

Features โšก

  • frictionless - just tweak URL while browsing etherscan .io -> deth.net
  • proxy support - automatically follows proxies and displays implementation source code
  • multichain - supports many etherscan instances (testnets, L2s, L1s) (COMING SOON)

Motivation

Browsing contracts directly on etherscan sucks! Browsing multi-file contracts on etherscan sucks even more. Limited search, weird syntax highlighting, and many, many more. Finally, it's often impossible to just git clone repository and browse source code locally because it's hard to find the exact commit that matches onchain code.

Ethereum Code Viewer was born out of frustration, and it's here to fix all of these issues. In addition, it improves the experience by automatically following the implementation of proxies and so on.

Examples

Contributing

Repository structure and package managers

The repository contains two packages, ethereum-viewer extension and the VSCode compilation meant for hosting it online.

All packages (currently one) except of @dethcrypto/ethereum-viewer-vscode-host located in packages/vscode-host are managed by pnpm. As VSCode depends on Yarn, our vscode-host also needs Yarn.

You need to create dummy certs using mkcert:

cd ./certs
mkcert localhost
mkcert -install

Scripts

  • pnpm install - Installs dependencies for the workspace, ethereum-viewer extension, and triggers yarn install for vscode-host through the postinstall script.

  • pnpm build - Builds all packages.

  • pnpm watch - Starts webpack for ethereum-extension in watch mode.

  • pnpm serve - Starts HTTP server with vscode-host.

  • pnpm dev - Copies ethereum-extension and serves vscode-host. Run alongside pnpm watch.

Resources

Ethereum Code Viewer is a VSCode Web Extension using FileSystemProvider API to show sources of deployed Ethereum smart contracts. The following links might be provide some insight, if you're not familiar with some of the aforementioned terms.

ethereum-code-viewer's People

Contributors

hasparus avatar krzkaczor 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.