Socket
Socket
Sign inDemoInstall

ethers-types

Package Overview
Dependencies
Maintainers
0
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethers-types

[![npm package][npm-img]][npm-url] [![Build Status][build-img]][build-url] [![Downloads][downloads-img]][downloads-url] [![Issues][issues-img]][issues-url] [![Commitizen Friendly][commitizen-img]][commitizen-url] [![Semantic Release][semantic-release-img]


Version published
Weekly downloads
519
decreased by-6.32%
Maintainers
0
Weekly downloads
 
Created
Source

ethers-types

npm package Build Status Downloads Issues Commitizen Friendly Semantic Release

🛟 Making web3 more predictable & safer, 1 type at a time!

Install

npm install ethers-types
yarn add ethers-types

Getting Started

Import your favorite protocol's contract types directly into your TypeScript code:

import { getDefaultProvider } from "ethers";
import { MorphoAaveV3__factory } from "ethers-types/factories/protocols/morpho/aave-v3/MorphoAaveV3__factory";
import { ERC20__factory } from "ethers-types/factories/token/ERC20/ERC20__factory";

const provider = getDefaultProvider();

const dai = ERC20__factory.connect("0x6B175474E89094C44Da98b954EedeAC495271d0F", provider);
const ma3Eth = MorphoAaveV3__factory.connect("0x33333aea097c193e66081E930c33020272b33333", provider);

You can even use ethers-multicall-provider to batch your RPC calls and load responses faster!

import { getDefaultProvider } from "ethers";
import { MorphoAaveV3__factory } from "ethers-types/factories/protocols/morpho/aave-v3/MorphoAaveV3__factory";
import { ERC20__factory } from "ethers-types/factories/token/ERC20/ERC20__factory";

const provider = MulticallWrapper.wrap(getDefaultProvider());

const dai = ERC20__factory.connect("0x6B175474E89094C44Da98b954EedeAC495271d0F", provider);

dai.symbol().then(console.log);
dai.decimals().then(console.log);

Keywords

FAQs

Package last updated on 05 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc