npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

evmcontracts

v1.0.3

Published

a simple cli tool to load a contract code up in your IDE instantly.

Downloads

5

Readme

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.