Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5ffcf3c
Chore: Update editorconfig with specific rules
Quantumlyy May 30, 2026
1fb31ae
Feat: Introduce core devnet utilities and prool dependency
Quantumlyy May 30, 2026
5c0f40e
Feat: Add main devnet runner script
Quantumlyy May 30, 2026
8208fa2
Chore: Prepare Docker environment for devnet
Quantumlyy May 30, 2026
fc891e7
Feat: Integrate devnet into Docker Compose configurations
Quantumlyy May 30, 2026
a800c50
Chore: Update package.json for devnet scripts and project details
Quantumlyy May 30, 2026
fbc009e
Test: Add EFP devnet integration tests
Quantumlyy May 30, 2026
87e56e7
chore(deps): update bun lockfile
Quantumlyy May 30, 2026
bf9af22
ci(devnet): add workflow to build, test, and publish devnet image
Quantumlyy May 30, 2026
c644b32
Potential fix for pull request finding
Quantumlyy May 30, 2026
22cad80
Apply suggestions from code review
Quantumlyy May 30, 2026
2041d7e
chore(bun): update lockfile format to bun.lock
Quantumlyy May 30, 2026
5384d43
refactor: Update SPDX license identifier to MIT in all Solidity files
Quantumlyy May 30, 2026
72862fa
chore(dockerfiles): update to use bun.lock
Quantumlyy May 30, 2026
0f63bd1
chore(dockerignore): explicitly include bun.lock for docker builds
Quantumlyy May 30, 2026
8d72481
fix(devnet): remove extraneous brace in shutdown handlers
Quantumlyy May 30, 2026
1dc38a2
Apply suggestions from code review
Quantumlyy May 30, 2026
c42bcf2
feat: Introduce 'blockTime' for Anvil interval mining
Quantumlyy May 30, 2026
9bcb53d
refactor(devnet): Update SetupDevnetOptions to use 'blockTime'
Quantumlyy May 30, 2026
898ed76
refactor(devnet): Use 'blockTime' in setupDevnet function
Quantumlyy May 30, 2026
0e1e023
refactor(scripts): Replace --no-auto-mine with --block-time in runDevnet
Quantumlyy May 30, 2026
a49cfe0
ci(build-devnet): limit pull request triggers to relevant paths
Quantumlyy May 30, 2026
d50b269
style(scripts): remove extraneous closing brace
Quantumlyy May 30, 2026
2bd9543
feat(devnet): integrate devnet tests into CI and refine runtime options
Quantumlyy May 31, 2026
7140d24
chore(solidity): update SPDX license identifier to UNLICENSED
Quantumlyy May 31, 2026
65a94a0
Update scripts/devnet/anvil.ts
Quantumlyy May 31, 2026
94616d2
ci(build-devnet): update push trigger branch to master
Quantumlyy May 31, 2026
5944bc3
feat(devnet): pin Foundry version in Dockerfile
Quantumlyy May 31, 2026
91f847b
fix(devnet): improve private key security in deploy script
Quantumlyy May 31, 2026
e48f99b
fix(devnet): stop anvil on setup failure
Quantumlyy May 31, 2026
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
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@
# except for
!.gitmodules
!bun.lockb
!bun.lock
!foundry.toml
!package.json
!solhint.json
!tsconfig.json
!generated/
!lib/
!scripts/
!scripts/devnet/
!deployments/
!Dockerfile.devnet
!src/

# needed for forge
Expand Down
21 changes: 19 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,22 @@ indent_size = 2
insert_final_newline = true
max_line_length = 120
trim_trailing_whitespace = true
use_tabs = false
use_single_quotes = true

[*.json]
indent_size = 2

[package.json]
indent_size = 4

[funding.json]
indent_size = 4

[env.d.ts]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[*.sol]
indent_size = 2
max_line_length = 120
103 changes: 103 additions & 0 deletions .github/workflows/build-devnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: build-devnet

on:
push:
branches: [main]
pull_request:
paths:
Comment thread
greptile-apps[bot] marked this conversation as resolved.
- 'src/**'
- 'scripts/**'
- 'lib/**'
- 'generated/**'
- 'Dockerfile.devnet'
- 'compose.yml'
- 'compose.attach.yml'
- 'foundry.toml'
- 'package.json'
- 'bun.lock'
- '.github/workflows/build-devnet.yml'
Comment thread
Quantumlyy marked this conversation as resolved.
Comment thread
Quantumlyy marked this conversation as resolved.
workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE: ghcr.io/${{ github.repository }}/devnet

concurrency:
group: build-devnet-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
name: Build & publish devnet image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,format=long
type=sha,format=short,prefix=${{ github.ref_name }}-,enable={{is_default_branch}}
type=raw,value=latest,enable={{is_default_branch}}

- name: Build image
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile.devnet
load: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

- name: Smoke test (deploy + seed + health)
env:
IMAGE_REF: ${{ env.IMAGE }}:${{ steps.meta.outputs.version }}
run: |
docker run -d --name efp-devnet -p 8545:8545 -p 8000:8000 "$IMAGE_REF"
for i in $(seq 1 90); do
if curl -fsS http://localhost:8000/health >/dev/null; then
echo "Healthy after ${i}s"
exit 0
fi
if [ -z "$(docker ps -q -f name=efp-devnet -f status=running)" ]; then
echo "::error::container exited early"
docker logs efp-devnet
exit 1
fi
sleep 1
done
echo "::error::devnet did not become healthy"
docker logs efp-devnet
exit 1

- name: Tear down smoke test
if: always()
run: docker rm -f efp-devnet || true

- name: Log in to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Push image
if: github.event_name != 'pull_request'
run: docker push --all-tags "${IMAGE}"
22 changes: 11 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ FROM oven/bun:latest as setup

RUN apt-get update \
&& apt-get install -y \
ca-certificates \
curl \
git \
gnupg \
tree \
ca-certificates \
curl \
git \
gnupg \
tree \
&& rm -rf /var/lib/apt/lists/*

# install nodejs
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
&& apt-get update \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*

# install foundryup
RUN curl -L https://foundry.paradigm.xyz | bash
Expand All @@ -26,7 +26,7 @@ RUN foundryup
WORKDIR /usr/src/app

# install project dependencies
COPY bun.lockb package.json ./
COPY bun.lock package.json ./
RUN bun install --production --frozen-lockfile

# copy the rest of the project
Expand Down
36 changes: 36 additions & 0 deletions Dockerfile.devnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM oven/bun:1.2.13

# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
git \
build-essential \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Install Foundry
RUN curl -L https://foundry.paradigm.xyz | bash
ENV PATH="/root/.foundry/bin:${PATH}"
RUN foundryup
Comment thread
Quantumlyy marked this conversation as resolved.
Outdated

WORKDIR /app

# Install dependencies
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile

# Copy source and build contracts
COPY . .
RUN forge install && forge build

EXPOSE 8545 8000

ENV FOUNDRY_DISABLE_NIGHTLY_WARNING=true
# Bind to all interfaces inside the container; everything else is env-driven:
# DEVNET_RPC_URL attach to an existing node (e.g. http://devnet:8545) instead of spawning anvil
# DEVNET_SCENARIO composable scenario to seed (empty | minimal | demoGraph)
# DEVNET_CHAIN_ID chain id when spawning a node (default 31337)
ENV DEVNET_HOST=0.0.0.0
ENV DEVNET_SCENARIO=demoGraph

CMD ["bun", "scripts/runDevnet.ts"]
Loading
Loading