โฌ Fetch the most up-to-date ABI of verified Smart Contracts (including proxy implementations) from Etherscan in seconds!

Overview

etherscan-abi

npm package Build Status Downloads Issues Commitizen Friendly Semantic Release

โฌ ๐Ÿš€ Fetch the most up-to-date ABI of verified Smart Contracts (including proxy implementations) from Etherscan in seconds!

Usage

CLI

  • Fetch the ABI of a contract from an address and save it to abis/ContractName.json:
npx etherscan-abi 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984
  • Note that if a standard proxy is detected, the proxy's implementation ABI will automatically be fetched:
npx etherscan-abi 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9
  • You can optionally provide a target directory path, an Etherscan apiKey (to bypass the default query rate limit), or specify a network on which to query the Smart Contract's source code (by name or chainId, decimal or hexadecimal):
npx etherscan-abi --target abis/uniswap/ \
    --apiKey ... \
    --network polygon \
    0xb33EaAd8d922B1083446DC23f610c2567fB5180f

Javascript

const { ethers } = require("ethers");
const { getContractAt } = require("etherscan-abi");

getContractAt(
  "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
  new ethers.providers.JsonRpcProvider("...")
)
  .then((uni) => uni.balanceOf("..."))
  .then(console.log);

Install

npm install etherscan-abi
yarn add etherscan-abi
You might also like...

GraphErr is an open-source error handling library for GraphQL implementations in Deno. It's a lightweight solution that provides developers with descriptive error messages, reducing ambiguity and improving debugging.

GraphErr is an open-source error handling library for GraphQL implementations in Deno. It's a lightweight solution that provides developers with descriptive error messages, reducing ambiguity and improving debugging.

GraphErr Descriptive GraphQL error handling for Deno/Oak servers. Features Provides additional context to GraphQL's native error messaging for faster

Nov 1, 2022

Brainfuck implementations each other in different languages.

Brainfuck implementations Brainfuck implementations in each other in different languages. What is brainfuck? Brainfuck is an esoteric programming lang

Nov 15, 2022

A collection of smart contracts for the Stackup platform ๐Ÿค– ๐Ÿ“‘

Contracts A collection of smart contracts for the Stackup platform. Dev Blog Deployed Contracts See releases for deployed contracts of previous versio

Nov 29, 2021

Ethereum Smart Contracts for locking your Ether and ERC20 tokens based on time and price conditions

SmartHold - a simple way to lock and hold your ETH or ERC20 in a smart contract This is a BETA software that has not been audited for security. USE AT

May 5, 2022

โ™ฆ Crowd funding project using Smart Contracts on the Ethereum. Created with Next.js and Tailwind CSS.

โ™ฆ Crowd funding project using Smart Contracts on the Ethereum. Created with Next.js and Tailwind CSS.

Crowdcoin โ™ฆ Crowd funding project using Smart Contracts on the Ethereum. Created with Next.js and Tailwind CSS. Project from "Ethereum and Solidity: T

Dec 14, 2022

Cooperative databases using smart contracts.

Cooperative databases using smart contracts.

Vitra โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆ

Dec 30, 2022

Run CosmWasm smart contracts in Node.js and web browsers

Run CosmWasm smart contracts in Node.js and web browsers

Nov 25, 2022

A 'to do list' powered by Ethereum smart contracts

A 'to do list' powered by Ethereum smart contracts. built with JavaScript, Ganache, Truffle, Node.js, Metamask, jQuery, and Bootstrap

Feb 17, 2022

Context-aware smart contracts for blockchain IoT systems

Context-aware smart contracts for blockchain IoT systems It contains 2 directories: contracts: contains the ContextAwareSmartContract.sol contract wit

Jun 17, 2022
Releases(v2.3.5)
Owner
Romain Milon
Engineer @morpho-labs ๐Ÿฆ‹ | Solidity | Typescript | Python | Java | Rust
Romain Milon
proxy ๐Ÿฆ„ yxorp is your Web Proxy as a Service (SAAS) Multi-tenant, Multi-Threaded, with Cache & Article Spinner

proxy ?? yxorp is your Web Proxy as a Service (SAAS) Multi-tenant, Multi-Threaded, with Cache & Article Spinner. Batteries are included, Content Spinning and Caching Engine, all housed within a stunning web GUI. A unique high-performance, plug-and-play, multi-threaded website mirror and article spinner

4D/าต.com Dashboards 13 Dec 30, 2022
Proxy but misspelled -- closed proxy for the internet

pyrox Proxy that runs on Cloudflare Workers. Setup Install wrangler2. npm install wrangler. Generate a public Ed25519 key, exported under SPKI mode wi

bots.gg 10 Sep 9, 2022
๐Ÿท๏ธ See what Games are verified for the Steam Deck and which Medal they have on ProtonDB in the Steam Store

Show Great on Deck on Steam great-on-deck-search ??๏ธ See what games are verified for the Steam Deck and which medal they got on ProtonDB in the Steam

Piepmatz 31 Dec 5, 2022
InReach is the worldโ€™s first tech platform matching LGBTQ+ people with safe, verified resources.

Explore the screenshots ยป Report a Bug ยท Request a Feature . Ask a Question Table of Contents About Built With Getting Started Prerequisites Installat

InReach 10 Jan 3, 2023
Contribute in this repository by raising genuine PR. Get verified, merged and earn the free swags from Hacktoberfest 2022.

Webd-and-Blockchain-development Welcome to Hacktober Fest 2022 โ€ข EVERYONE IS WELCOME โœจ โ€ข Contribute anything in In web-development and blockchain-deve

Abhishek Rawat 13 Dec 29, 2022
solana-base-app is a base level, including most of the common features and wallet connectivity, try using `npx solana-base-app react my-app`

solana-base-app solana-base-app is for Solana beginners to get them up and running fast. To start run : run npx solana-base-app react my-app change th

UjjwalGupta49 33 Dec 27, 2022
this is a single-page web application. we built a book website where the user can add , remove and display books. we used modules to implement these functionalities. also, we used the Date class to display the date and time.

Awsome Books In this Project, we have built A Books websites. Built With ?? HTML CSS javascript Git & Github Live Demo Here you can find the live Demo

Nedjwa Bouraiou 10 Aug 3, 2022
This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my initial appointment date. It doesn't handle rescheduling.

US-visa-appointment-notifier This is just a script I put together to check and notify me via email (MailGun) when there's an earlier date before my in

Theophilus Omoregbee 13 Jan 4, 2023
Collection of bolt-js InstallationStore implementations

โšก Bolt for JavaScript Extensions (WIP) โš ๏ธ Important Notice โš ๏ธ This project is still work in progress, and may have bugs in it. If you would like to im

Kazuhiro Sera 21 Jan 6, 2023
Data structures & algorithms implementations and coding problem solutions. Written in Typescript and tested with Jest. Coding problems are pulled from LeetCode and Daily Coding Problem.

technical-interview-prep Data structures & algorithms implementations and coding problem solutions. Written in Typescript and tested with Jest. Coding

Lesley Chang 7 Aug 5, 2022