Skip to content

feat: subgraph on base #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion apps/local
Submodule local deleted from a4b70a
Binary file modified bun.lockb
Binary file not shown.
37 changes: 37 additions & 0 deletions packages/subgraph/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Graph CLI generated artifacts
build/
generated/

# Dependency directories
node_modules/
jspm_packages/

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# dotenv environment variables file
.env

# Testing
coverage
coverage.json

# Typechain
typechain
typechain-types

# Hardhat files
cache

# note: we commit subgraph.template.yaml, but the subgraph.yaml is generated
subgraph.yaml
28 changes: 28 additions & 0 deletions packages/subgraph/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM --platform=linux/x86_64 ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive

ENV ARGS=""

RUN apt update \
&& apt install -y sudo curl postgresql postgresql-contrib

RUN curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - \
&& sudo apt-get install -y nodejs

RUN curl -OL https://github.com/LimeChain/matchstick/releases/download/0.6.0/binary-linux-22 \
&& chmod a+x binary-linux-22

WORKDIR /app

# Copy package files
COPY package.json .
COPY package-lock.json* .

# Install dependencies
RUN npm install

# Copy the rest of the application
COPY . .

CMD ../binary-linux-22 ${ARGS}
7 changes: 7 additions & 0 deletions packages/subgraph/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# PWNDAO subgraph

## How to build / run
1) `bun install` from root folder
2) `bunx nx codegen @pwndao/subgraph`
3) choose what network you want to build your subgraph on, and then run e.g. `bunx nx prepare:sepolia @pwndao/subgraph`
4) `bunx nx build @pwndao/subgraph`
Loading
Loading