multicall-batcher
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

Multicall Batcher

easy to use multicall integration for your dapp. supports both multicall and multicall2.

Installation

npm i multicall-batcher
// or
yard add multicall-batcher

Usage example

import multicallBatcher from 'multicall-batcher';

function getLibrary(provider) {
  const library = new Web3Provider(multicallBatcher(provider, {
    // batchDebounce: false,
    // batchInterval: 10,
    // batchMax: 0,
    // v1: false,
    // ignoreWithFrom: false,
    multicallAddress: "0x3E01dD8a5E1fb3481F0F589056b428Fc308AF0Fb",
  }))
  return library;
}

ReactDOM.render(
  <Web3ReactProvider getLibrary={getLibrary}>
    <App />
  </Web3ReactProvider>,
  document.getElementById('root')
);

Contract Address

you can find multicall contract address for different networks here.

Readme

Keywords

none

Package Sidebar

Install

npm i multicall-batcher

Weekly Downloads

29

Version

0.2.0

License

MIT

Unpacked Size

56.2 kB

Total Files

12

Last publish

Collaborators

  • sijad