New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dvote/storage-proofs

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dvote/storage-proofs

Javascript/Typescript library to generate storage proofs for ERC token contracts

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

DVote Storage Proofs

Javascript/Typescript library to generate storage proofs for ERC token contracts.

The library is heavily inspired on the prior work of @izqui on evm-storage-proofs.

Usage

Instal with NPM:

npm install @dvote/storage-proofs
const tokenAddress = "0x1234..."
const holderAddress = "0x2345..."
const balancePositionIdx = 1

const balanceSlot = ERC20Prover.getHolderBalanceSlot(holderAddress, balancePositionIdx)

const storageProover = new ERC20Prover(jsonRpcUri)
const data = await storageProover.getProof(tokenAddress, [balanceSlot], blockNumber, true)

const { proof, block, blockHeaderRLP, accountProofRLP, storageProofsRLP } = data

// ...

FAQs

Package last updated on 27 Nov 2020

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