Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uniswap/redux-multicall

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uniswap/redux-multicall

A React + Redux lib for fetching and caching chain state via the MultiCall contract

  • 1.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
increased by15.89%
Maintainers
1
Weekly downloads
 
Created
Source

MultiCall

A React + Redux library for fetching, batching, and caching chain state via the MultiCall contract.

Setup

yarn add @uniswap/redux-multicall or npm install @uniswap/redux-multicall

Usage

The usage of this library is similar to RTK Query.

// Somewhere in your app
export const multicall = createMulticall({ reducerPath: 'multicall' })

// In your store's root reducer
export const rootReducer = combineReducers({
  // Other reducers
  [multicall.reducerPath]: multicall.reducer
})

To use the updater, you'll need an instance of the Uniswap Multicall2 contract:

import { abi as MulticallABI } from '@uniswap/v3-periphery/artifacts/contracts/lens/UniswapInterfaceMulticall.sol/UniswapInterfaceMulticall.json'
import { Contract } from '@ethersproject/contracts'
import { UniswapInterfaceMulticall } from './abi/types'

const multicall2Contract = new Contract(address, MulticallABI, provider) as UniswapInterfaceMulticall

For a more detailed example, see basic example app in ./integration-tests

Alpha software

The latest version of the SDK is used in production in the Uniswap Interface, but it is considered Alpha software and may contain bugs or change significantly between patch versions. If you have questions about how to use the SDK, please reach out in the #dev-chat channel of the Discord. Pull requests welcome!

Keywords

FAQs

Package last updated on 15 Nov 2022

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