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

autographed

v0.1.3

Published

The self-building, hot-reloading subgraph. The quickest way to start indexing your shit.

Downloads

3

Readme

npx autographed

The self-building, hot-reloading subgraph. The quickest way to start indexing your shit.

🚀 getting started

Okay, so there's a lot that goes into running a subgraph. The purpose of this library is to take care of most of that, and just get you to indexing your smart contract as quickly as possible.

Notice: autographed dynamically generates all the mappings and runtime architecture you need to quickly query for historical blockchain data emitted during smart contract events. It is not suitable for writing custom indexing logic.

If this sounds like a good fit for you, you will need to make sure you have some of the following system dependencies available on your runtime.

First, please make sure you've installed and configured the Rust Toolchain:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

On top of that, you'll need to be able to run Docker Containers. The easiest way to do this is to download and install Docker Desktop.

With these steps out of the way, you'll finally need to install these last low-level dependencies:

ipfs jq gsed libpq cmake

Inside of your hardhat project root, create a .autograph.json. This is what's used to control the name of the autogenerated subgraph, and which contracts in your local hardhat project you want to get indexed. You'll want to provide the addresses the contracts get deployed to when initializing your local chain.

{
  "name": "MySubgraphName",
  "sources": [
    {
      "contractName": "MyContractName",
      "contractAddress": "0x..."
    }
  ]
}

For a vanilla project configuration, an initial contract deployment transaction sent by (await ethers.getSigners())[0], commonly referred to as owner, will be stored at the on-chain address 0x5FbDB2315678afecb367f032d93F642f64180aa3.

There are some additional configuration options that can be used to tune the generator to your local runtime. By default, autographed will use the following settings:

GRAPH_NODE_GRAPHQL_PORT=8000
GRAPH_NODE_STATUS_PORT=8020
IPFS_PORT=5001
POSTGRES_PORT=5432
ETHEREUM_PORT=8545
ETHEREUM_NETWORK=hardhat
POSTGRES_DB=dev
POSTGRES_USER=dev
POSTGRES_PASSWORD=dev

These can be overridden using environment variables i.e:

IPFS_PORT=420 ETHEREUM_PORT=6969 npx autographed

There's a ton of binary files that will need to be compiled on your first run. In the mean time, why don't you put on a cup of coffee or do some yoga or something? ☕️

🔨 building

If you'd like to build this repo yourself, just git clone and run yarn from the top-level directory. You can also use yarn test to make sure everything's working okay or if you need to debug any issues you ~~might~~ will encounter.

✌️ license

MIT