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 🙏

© 2024 – Pkg Stats / Ryan Hefner

evmsavvy

v0.1.0

Published

[ ] Error handling: whenever an error occurs, the toast "contact" button should open a modal, with:

Downloads

4

Readme

TODO

[ ] Error handling: whenever an error occurs, the toast "contact" button should open a modal, with:

  • a code block with all the values for the stores in json that can be copy/pasted
  • a quick and a more long version of bug reporting: quick is just drop a dm with the logs, longer would be with some details, screenshots, etc
  • maybe just automatically send/save the logs somewhere? would rather have the user decide if they want to send it or not, although the logs (stores) won't contain any sensitive information at all; or at most only send the data that comes from the app and nothing related to the user input

[ ] Fix nextBaseFee => priority ratios; really bad when the base fee starts very low, as it increases way too much

[ ] Save results history in local storage, and let the user retrieve them

[ ] Handle issues in retrieving token price (coinmarketcap), and other api calls as well (gas fees) => if error, use a default value & let the user choose

[ ] Add guides; e.g. on airdrop page, a button in the sidebar to go to a quick guide to use it

[ ] Add documentation (use vocs.dev) for both guides and breakdowns, how it works, calculations, contributing, roadmap, etc

[ ] Button "share results" to export them (md? pdf? json?); probably a table as well as all the details in a concise document

[ ] in the local-chain api, return different error codes based on what failed, and decode them browser-side to display in the toast

[ ] When integrating Arbitrum, will need to change 'hasCustomStack' to differenciate OP and Arbitrum + add oracle addresses to config

[ ] Add a "underlying" property on rollups to be able to calculate the fee later, for instance the id of the underlying chain (e.g. currentChain being Optimism, we need to access the Ethereum client)

  • Use 2 gas price selection to simulate both the L2 and the L1 conditions
  • We can't just return a l1Submission string/bigint to account for that, needs more complex logic

[ ] Allow do estimation with url query (amount of recipients, sender, token address, type…); even though drop.gaslite.org or any app can already do so with estimateGas, this provides a nice table with results + lets user estimate with different network conditions

  • also maybe if more convenient directly an api endpoint would be better? Actually maybe can be setup from vercel

[x] REFACTORED: Put gas price & native token price inside Advanced (in a collapsible)

[x] DONE: Utils to convert gwei (or anything really) based on currency; e.g. L2 on OP stack need at least 3-4 decimals when Ethereum/Polygon is ok with 2

[x] REFACTORED: See if there is a "maxSupply" for the provided token (BEFORE fetching local-chain), and if so, compare it to the amount of tokens airdropped; if not enough, ask the user to provide an account that owns enough tokens

[x] Use some kind of toggle group for recipients amount/custom data

  • when clicking on "mock" data, highlights input + slider, otherwise click on custom data (just the button like custom token but above the textarea on the left, and amount of recipients small on the right?) and highlight it and grey out the other
  • Add accordion for example data

[x] DONE: Add custom priority fee button, and actually move "low", "medium" and "high" to a more stealthy place like right below

[x] DONE: Move everything using alchemy id in an api route, pass the chainId, the method from the client (with the params) the params and return the data; for each call to the api, decode the params using a type for this specific call (considering what should be returned)

[x] DONE: Put token above recipients, with a check "custom options" that opens a collapsible and sets some bool to true

[x] DONE: Same with the recipients, with a custom option to use custom addresses/amounts/(ids)


Steps

[x] For ERC20, just fetch the owner of the token contract (if any), and either mint as them or as the contract itself

[ ] For ERC721, except if there is something better, crawl through the token IDS, see if there is an owner; if there is, impersonate them and send the token(s) to our caller, if not, mint them

[ ] For ERC1155, same as ERC721, but just mint the tokens for each id


Error cases (to handle)

Just search for anny "throw" and "console.error" in the code

[ ] revert in a Tevm call

[ ] provided arguments (addresses, amounts, ids) not valid

[ ] provided token not found/issue

[ ] provided owner/holder not able to mint, not holding enough tokens

[ ] provided token not mintable/transferrable (see call revert)


This is a Next.js project bootstrapped with create-next-app.

Getting Started

First, run the development server:

npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev

Open http://localhost:3000 with your browser to see the result.

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Inter, a custom Google Font.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.