🚀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 buildoryarn buildorpnpm buildRust toolchain (cargo, stuffs...) to compile the code to the binary, executable file.
Running
Clone the repository
$ git clone https://github.com/vutran1710/datafast-runtime.gitEnable the quickstart script
$ chmod +x quickstart.shRun 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.shWhen running, the script will do the following:
export required environment variables, including...
credentials to access the demo blockchain data store we prepared
CONFIGenv to thequickstart_config.toml
docker compose up the demo database (MongoDB & MongoExpress)
run the runtime with
cargo run --release

Last updated