Socket
Book a DemoInstallSign in
Socket

@basementdev/ethers-provider

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@basementdev/ethers-provider

Wrapper for ethers JSON-RPC provider

latest
Source
npmnpm
Version
0.0.4
Version published
Maintainers
2
Created
Source

Basement ethers.js provider wrapper

Installation

npm:

npm install @basementdev/ethers-provider

yarn:

yarn add @basementdev/ethers-provider

Getting started

const provider = new AlchemyProvider(); // It could be any UrlJsonRpcProvider provider
const enhancedProvider = BasementProvider.enhance(provider);

const logs = await enhancedProvider.getEnhancedLogs(
  {
    fromBlock: 16426225,
    toBlock: 16426226,
  },
  { transaction: { from: true, to: true, events: true } }
);
console.log(logs);

getEnhancedLogs can be used as a drop-in replacement for ethers.js' getLogs; there are several improvements added:

  • Find logs from multiple addresses
  • Resolve the related transaction the log was emitted
  • Resolve the reverse profile from the sender and receiver of the transaction.
  • Resolve the events related to the transaction

The documentation for the include options and filters that can be included can be found here

Keywords

ethers

FAQs

Package last updated on 31 Jan 2023

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