npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

chainview

v1.2.0

Published

A tool to retrieve onchain data efficiently

Readme

Chainview

alt text

Description

ChainView is a tool that allows us to retrieve dependent data in a simple ONE blockchain call, without deploying contract and paying any fees to anyone. It's also an alternative of the Multicall, and can also simulate some transactions. You just need to write your logic in Solidity to obtain your desired informations. Enjoy anons !

alt text

How to use

1-Create your logic

Create your Solidity(s) smart contract(s) on a Chainview folder at the root of the repo.

2-Compile your code

Your smart contract wants to be in a folder named Chainview, to be compiled using the command:

npx chainview compile

A new folder is created named chainviewArtifacts that contains the ABI and bytecode of your smart contract.

3-Call ChainView

Through a JavaScript/Typescript script, you can now call the ChainView function.

See examples in the examples folder.

4-And voilà !

Usage

ChainView can be useful if you need to get multiple data onchain dependent from each others for a function that doesn't exist on a contract, or to be an alternative of a multicall (See examples below). The main interest for ChainView is that you can implement all the logic that you want to get some informations, your only limitation is the implementation of a Solidity contract itself, and all of that for FREE ! Also, using this method will clean and secure your code, because all the logic are managed by the Solidity contract, so you will have less side effect by implementing it on your projects. The usage of ChainView instead of a multicall can be better/faster* but keep in mind that more you add some logic more the time to get the data will increase. Usually the public RPC's has a timeout (approximately 30s) for the onchain call so be careful with that anon.

Example 1

You want to get from an ERC721Enumerable contract:

  • the balance of an address => balanceOf(address)
  • the tokenId of an address for a each index => tokenOfOwnerByIndex(address,index)
  • result => tokenId owned by the address

If you want to get it from the classic way, you will need to call firstly balanceOf, waiting for the response and, secondly, use the response to call the tokenOfOwnerByIndex function. With Chainview, you just need to implement a Solidity function that will fetch all these onchain data with a simple call.

Example 2

You want to get from the UniswapV2 factory contract:

  • the pairs from index 0 to 5 => factory.allPairs(index)
  • for each pair you want the token0/token1 => pair.token0() / pair.token(1)
  • for each tokens of the pair you want the symbol and the decimals => token.symbol() / token.decimals()
  • result => a struct array with all the data returned

If you want to get it from the classic way, you will need to multicall firstly all the pairs from index 0 to 5, then waiting for the response and multicall token0 and token1 for each pairs, waiting again for the response, and finally get the symbol and the decimals data for each tokens of each pairs with a last multicall. With Chainview, you just need to implement a Solidity function that will fetch all these onchain data with a simple call.

Example 3

You want to simulate a transaction by sending ethers and returning some informations:

  1. Send ETH to the ChainView contract with the ZeroAddress
  2. Contract sends its balance to the DeadAddress
  3. Return the contract's balance before the burn and after

If you want to do it from the classic way, it's not possible. You can only if you fork the mainnet and do some actions. With ChainView, you are able to simulate any onchain action by sending ETH to your ChainView contract.

Example 4

You want to get totalSupply of CVG token in a past block:

  1. You add the pinned block in the options
  2. Then you call ChainView
  3. You get you totalSupply in the past
  4. You verify the blockNumber returned to check if the snapshot is well done

Example 5

You want to get a list of holder of veCVG in a past block:

  1. You add the pinned block in the options
  2. Then you call ChainView
  3. You get you the list of holder + other informations related to the tokenIds
  4. You verify the blockNumber returned to check if the snapshot is well done

Medium Article

https://medium.com/@r3vert/chainview-a-new-web3-tool-8184883d27c0

Projects that use ChainView

alt text https://cvg.finance/