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
oryarn build
orpnpm build
Rust toolchain (cargo, stuffs...) to compile the code to the binary, executable file.
Running
Clone the repository
Enable the quickstart script
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
)
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 thequickstart_config.toml
docker compose up the demo database (MongoDB & MongoExpress)
run the runtime with
cargo run --release
Last updated