Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 924 Bytes

README.md

File metadata and controls

41 lines (32 loc) · 924 Bytes

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.