Code Monkey home page Code Monkey logo

evmc's Introduction

npm version downloads

evmc

When browsing any evm blockchain, it is often useful to be able to see the source code of a contract. This is especially true when trying to understand the behavior of a contract, or when trying to verify the behavior of a contract. You may be able to hack around and see it on etherscan but really you know your true home is your IDE (any IDE). This tool allows you to fetch the source code of a contract from the blockchain, and create you the full project files for you to view in YOUR IDE, support to deploy on a local node, compile if you choose to. This uses etherscan API to grab the verified sources of the contract. It will keep the same directory structure as how the contract was deployed, alongside all of the dependencies it uses, the project evmc fetches for you will be ready to go!

Features ๐Ÿš€

๐Ÿš€ Fetch the source code of a contract from the blockchain and use it in your favourite editor
๐Ÿš€ Support for hardhat project instantly creating you a hardhat project template with the compile, deploy scripts and local node running all ready to go.

Chains Supported ๐ŸŒ

๐ŸŒ Ethereum Mainnet - eth
๐ŸŒ Ethereum Ropsten - eth_ropsten
๐ŸŒ Ethereum Rinkeby - eth_rinkeby
๐ŸŒ Ethereum Goerli - eth_goerli
๐ŸŒ Ethereum Kovan - eth_kovan
๐ŸŒ Binance Smart Chain Mainnet - bsc
๐ŸŒ Binance Smart Chain Testnet - bsc_testnet
๐ŸŒ Polygon Mainnet - polygon
๐ŸŒ Polygon Mumbai - mumbai
๐ŸŒ Avalanche C-Chain - avalanche
๐ŸŒ Avalanche Fuji - avalance_testnet
๐ŸŒ Fantom - fantom
๐ŸŒ Fantom Testnet - fantom_testnet
๐ŸŒ Optimism - optimism
๐ŸŒ Optimism Goerli - optimism_goerli
๐ŸŒ Arbitrum - arbitrum
๐ŸŒ Arbitrum Goerli - arbitrum_goerli
๐ŸŒ Cronos - cronos
๐ŸŒ Cronos Testnet - cronos_testnet

Installation

npm:

$ npm install evmcontracts -g

yarn:

$ yarn global add evmcontracts

CLI usage

Once installed it will expose a command called evmc which can be executed anywhere.

Get

please note when executing these commands it will create a folder with the name of the contract in the current directory you are in, unless you use --output

Just contracts

To get just the contracts without any development tool:

$ evmc get <network> <contractAddress>

Development toolset project setup

hardhat

To get the contract and setup a hardhat development environment, with deploy scripts and compiling ready to go:

$ evmc get <network> <contractAddress> --hardhat

foundry

already supported by the foundry team already it seems.. nice work!

To change the output path

$ evmc get <network> <contractAddress> --output=PATH_DIRECTORY

Incoming features

The following features are coming soon:

๐Ÿš€ allow you to interact with the contract without downloading them on your machine
๐Ÿš€ ability to config your main network and development kit (to avoid repeating yourself)
๐Ÿš€ ability to fetch multiple contracts at once with a yaml file
๐Ÿš€ bring your own API key

note

I have generated API keys so its plug and play but these are rate limited at 5 requests per second, this should be plenty as long as the tool does not used by thousands of people, these are free API keys so nobody has motive of stealing them. Above we bring a way to bring your own API key in anyway so if this ever happens we can migrate and make it best practice.

evmc's People

Contributors

joshstevens19 avatar dependabot[bot] avatar

Watchers

James Cloos 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.