Datafast Runtime
  • 😁Introduction
  • 🚀Quickstart
  • 🏛️Architecture
  • 🎛️Components
    • Manifest
    • BlockSource
    • Valve
    • BlockInspector
    • DataFilter
    • Database
    • Subgraph
    • JSON-RPC Client
  • 📊Metrics
  • 📜License
  • 📬Contact
Powered by GitBook
On this page
  • Prerequisites
  • Running

Quickstart

Quickly run a demo with Datafast Runtime

Prerequisites

Before running Datafast-Runtime using this Quickstart''s tutorial, you have to prepare yourself…

  • A subgraph with at least version ≥ 0.0.5 correctly codegen-ed & built. Refer to https://thegraph.com/docs/en/developing/creating-a-subgraph/.

    If you don't have a subgraph already, you can use our example Uniswap-V3 subgraph at https://github.com/datafast-network/subgraph-testing/tree/main/packages/uniswap-v3

    To use the example Uniswap-V3 subgraph, you need either npm, yarn or pnpm.

    Clone the repo and build the code with npm run build or yarn build or pnpm build

  • Rust toolchain (cargo, stuffs...) to compile the code to the binary, executable file.

Running

Clone the repository

$ git clone https://github.com/vutran1710/datafast-runtime.git

Enable the quickstart script

$ chmod +x quickstart.sh

Run the script with env DFR_SUBGRAPH_DIR exported being the absolute path to your subgraph's build-dir (when using the example subgraph, path should be something like some-path/uniswap-v3/build)

$ DFR_SUBGRAPH_DIR=/path/to/your/subgraph/build/dir ./quickstart.sh

When running, the script will do the following:

  • export required environment variables, including...

    • credentials to access the demo blockchain data store we prepared

    • CONFIG env to the quickstart_config.toml

  • docker compose up the demo database (MongoDB & MongoExpress)

  • run the runtime with cargo run --release

PreviousIntroductionNextArchitecture

Last updated 1 year ago

🚀