• Stars
    star
    126
  • Rank 284,543 (Top 6 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

npm version

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.

More Repositories

1

ethereum-multicall

Ability to call many ethereum constant function calls in 1 JSONRPC request
TypeScript
256
star
2

simple-uniswap-sdk

Uniswap SDK which handles the routes automatically for you, changes in trade quotes reactive subscriptions, exposure to formatted easy to understand information, bringing back the best trade quotes automatically, generating transactions for you and much more.
TypeScript
160
star
3

ethereum-abi-types-generator

Generate typings based on your ABIs, with provider wrappers exposed.
TypeScript
148
star
4

ethereum-bloom-filters

Ability to check bloom filters on ethereum.
TypeScript
71
star
5

uniswap-dapp-integration-monorepo

A monorepo which holds Angular, vue and react libraries for integrating uniswap into your dApp with a simple config.
TypeScript
31
star
6

simple-pancakeswap-sdk

TypeScript
30
star
7

evm-relayer

open source self hosting evm relayer solution
TypeScript
21
star
8

ethereum-erc20-token-balances-multicall

Get all erc20 token balances for the ethereum addresses you want on chain in 1 JSONRPC call.
TypeScript
17
star
9

ethereum-none-custodial-authentication

Ability to create a web2 style login creating ethereum accounts in a none custodial way.
TypeScript
12
star
10

epm

ethereum package manager to share solidity contracts. Bit of fun..
TypeScript
6
star
11

evm-cli

an evm cli which supports any evm chain
4
star
12

ethereum-typescript-to-solidity

just a little side project, see if we can write a tool to allow you to write smart contracts in typescript
TypeScript
3
star
13

redux-with-angular-architecture

TypeScript
2
star
14

bull-bear

A simple tool which blocks you access to the main price websites to allow you to build
2
star
15

open-source-package-ideas

Looking for a package which does something but can't find it? Open a issue and hopefully someone sees it and creates it or links you to something which does what you want.
2
star
16

epm-api

ethereum package manager API to handle all the tasks for epm command line tool and UI
C#
2
star
17

create-generic-complex-type-classes

TypeScript
1
star
18

joshstevens19

1
star
19

epm-ui

ethereum package manager UI
1
star
20

rentable-protocol

Rentable Protocol - smart contracts
Solidity
1
star