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

Overview

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

You might also like...

An express-ve way to start an express project

Express-ve express starter An express-ve way to start an express project. Checkout a demo project here or Learn how to use express-ve here Are you sta

Mar 28, 2022

Quick way to start a new TypeScript/Next.js/Firebase web app 😼

Quick way to start a new TypeScript/Next.js/Firebase web app 😼

create-crash-app Template repo to quickly set up an opinionated, strict config, typesafe Next.js project. Get started with create-crash-app by running

Oct 28, 2022

DropSpace is an easy way to self-host a file drop.

DropSpace is an easy way to self-host a file drop.

DropSpace Simple file sharing made in Laravel About DropSpace DropSpace is an easy way to self-host a file drop. Simply upload your file, and share th

Dec 9, 2022

Catalogist is the easy way to catalog and make your software and (micro)services visible to your organization in a lightweight and developer-friendly way.

Catalogist is the easy way to catalog and make your software and (micro)services visible to your organization in a lightweight and developer-friendly way.

catalogist 📚 📓 📒 📖 🔖 The easy way to catalog and make your software and (micro)services visible to your organization through an API You were a pe

Dec 13, 2022

🎨 Beautify your github profile with this amazing tool, creating the readme your way in a simple and fast way 🚀 The best profile readme generator you will find ⚡

🎨 Beautify your github profile with this amazing tool, creating the readme your way in a simple and fast way 🚀 The best profile readme generator you will find ⚡

Demo Profile Readme Generator The best profile readme generator you will find! About | Technologies | Requirements | Starting | Contributing 🎯 About

Jan 1, 2023

A set of tools, helping you building efficient apps in a fast way. SvelteKit & GraphQL

A set of tools, helping you building efficient apps in a fast way. >> SvelteKit & GraphQL <<

KitQL KitQL, A set of tools, helping you building efficient apps in a fast way. 🌐 Infos Documentation: https://kitql.vercel.app/ Day by day progress,

Dec 27, 2022

MUI Core is a collection of React UI libraries for shipping new features faster. Start with Material UI, our fully-loaded component library, or bring your own design system to our production-ready components.

MUI Core is a collection of React UI libraries for shipping new features faster. Start with Material UI, our fully-loaded component library, or bring your own design system to our production-ready components.

MUI Core MUI Core contains foundational React UI component libraries for shipping new features faster. Material UI is a comprehensive library of compo

Dec 30, 2022

The best place to start your Nuxt Theme.

Nuxt Theme Starter Create Nuxt theme with this GitHub template. Setup Make sure to install the dependencies: # yarn yarn install # npm npm install #

Dec 22, 2022

💻 A simple Create Next App template to start your projects with Next.js, TypeScript, ESLint, Prettier and other tools.

⚡ Next Typescript Template ⚡ A simple Create Next App template to start your projects with Next.js, TypeScript, ESLint, Prettier and other tools. Quic

Nov 23, 2022
Owner
Alexander Thomas
⚛️ https://gitcoin.co/grants/1884/react-native-web3
Alexander Thomas
The quickest way to format code!

Only Formats The quickest way to format code! ✨ The live Instance Tech Stack Next.js with TypeScript Chakra UI Prettier to format code Monaco editor f

Max Programming 15 Nov 29, 2022
Subgraph to query Doodles NFT tokens along with the traits and owners.

Doodles Subgraph API Subgraph to query Doodles NFT tokens along with the traits and owners. How to use the API Try it out here Example query: { toke

J 6 Sep 19, 2022
It is a simple Math Sprint Game in which the user must agree or disagree with the answers to math problems in the quickest time possible.

MATH-SPRINT-GAME The user must agree or disagree with the results of math equations in this Math Sprint Game. The amount of time the player spends mak

AMEY THAKUR 8 Aug 1, 2022
A decentralized protocol for indexing and querying data from DecentraMix's on chain contracts across all supported blockchains.

A decentralized protocol for indexing and querying data from DeMix contracts across all supported blockchains.

DecentraWorld Ecosystem 92 May 3, 2022
📊 AlphaSwap subgraph - (Blocks, token info, profiles, pricing data, LP metrics, etc...)

AlphaSwap Subgraph AlphaSwap is a decentralized protocol for automated token exchange on the KCC network. This subgraph dynamically tracks any pair cr

Brandon 3 Jul 9, 2022
Masa saati işte biraz shit code

Arduino Masa Saati Masanızda belli değerleri gösteren bir masa saati Discord Sunucusu | Şema | Videolu Gösterim | İçindekiler Borsa Takibi Saat ve Tak

Furtsy 6 Oct 1, 2022
The best Discord bot with a shit ton of commands w/ a website.

REAPER An Multi-purpose Discord bot with many features! Getting started Creating a fork: 1). Click here to fork the repository 2). Open your terminal

Ryder 2 Oct 6, 2022
fcall, fetch and call any remote hot functions, anywhere, anytime, without installations or configurations.

fcall, fetch and call any remote hot functions, anywhere, anytime, without installations or configurations.

立党 Lidang 4 Sep 20, 2022
Hot-challenge-solving application for any coding challenge services.

✔️ Solv Hot-challenge-solving application for any coding challenge services. Introduction Solv [sɑːlv] is a cli application for solving coding challen

Sophia 8 Dec 13, 2022
Start building admin tools on Slack without going into complex slack syntax and flows.

Slackmin Slackmin helps in easy integration with slack to use slash commands, interactive components, format and send messages, design and use modals.

PLG Works 49 Jan 2, 2023