Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4c5be02
feat(toolshed/interfaces): add recurring collector helpers and deploy…
RembrandtK May 11, 2026
283575c
feat(issuance): MockRewardsEligibilityOracle test mock
RembrandtK May 11, 2026
92e1d62
refactor(address-book): consolidate publish source list to one place
RembrandtK Apr 29, 2026
47bce26
chore: update arbitrumSepolia addresses and deployment metadata
RembrandtK May 11, 2026
0833d95
docs(address-book): publishing guide and 1.2.0 changelog
RembrandtK May 11, 2026
2e7319d
chore: bump interfaces 0.7.1-dips.0 / toolshed 1.2.1-dips.2 for dips …
RembrandtK May 6, 2026
324b04e
fix: root tooling compat (rocketh patch, hardhat-waffle deps, ethersc…
RembrandtK May 11, 2026
dc8f8f5
refactor(data-edge): upgrade to ethers v6 and @nomicfoundation plugins
RembrandtK Apr 10, 2026
45fb80e
feat(subgraph-service): wire RecurringCollector parameter and StakeCl…
RembrandtK May 11, 2026
854a435
fix: correct localNetwork addresses (governor / pauseGuardian / SAO)
RembrandtK Apr 29, 2026
4dda611
feat(deployment): add GIP-0088 deployment infrastructure
RembrandtK May 11, 2026
1619599
docs: REO testing plans and rewards behaviour documentation
RembrandtK Apr 10, 2026
fc57994
docs(contracts): capture pending updates as sidecar .todo.md files
RembrandtK May 11, 2026
6a64d07
chore(lint): include json5 files in lint:json glob
RembrandtK May 11, 2026
51b2208
refactor(horizon): drive governor from config parameter in deploy mod…
RembrandtK May 11, 2026
c1079ff
chore(lint): bump solhint catalog ^6.0.3 → ^6.2.1
RembrandtK May 11, 2026
640f91b
docs(issuance): capture pending NatSpec updates and refine test docst…
RembrandtK May 12, 2026
cf055bd
docs(audit): drop intermediate PDFs and per-finding markdown
RembrandtK May 12, 2026
c8101b8
docs(audit): prefix issuance audit PDFs with issue date and unnest fr…
RembrandtK May 12, 2026
56ab1cf
feat(build): publish workspace as ghcr.io/graphprotocol/contracts image
RembrandtK May 13, 2026
fd15b17
fix(deployment): address PR1338 reviewer feedback
RembrandtK May 13, 2026
2a45144
refactor(deployment): centralize address-book routing
RembrandtK May 13, 2026
7d2fea2
fix(deployment): record proxyDeployment metadata at deploy time
RembrandtK May 13, 2026
c881da2
refactor(deployment): canonical computeArtifactBytecodeHash helper
RembrandtK May 13, 2026
9413793
refactor(deployment): drop unused setPendingImplementation
RembrandtK May 13, 2026
85e8289
refactor(deployment): unify block-number + artifact-load helpers
RembrandtK May 13, 2026
fcd9094
chore: drop personal/external references from comments and docs
RembrandtK May 13, 2026
1237b95
chore: exclude forge core dumps from docker build context
RembrandtK May 13, 2026
67c3428
chore: bump publishable package versions
RembrandtK May 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 40 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Patterns are path-anchored under packages/ rather than `**/<name>/` because
# BuildKit treats `<name>/` as matching files too, so `**/build/` would also
# hide the per-package `scripts/build` entry scripts.

.git
.github
**/node_modules
.pnpm-store

# Build outputs (regenerated by `pnpm build`).
packages/*/artifacts
packages/*/cache
packages/*/cache_forge
packages/*/forge-artifacts
packages/*/out
packages/*/dist
packages/*/build
packages/*/typechain-types
packages/*/coverage
packages/*/types

# Forge crash dumps (also gitignored). Match only the per-package `core` file at the
# package root — NOT `**/core`, which would also exclude `packages/toolshed/src/core/`
# and other directories named `core` deeper in the tree.
packages/*/core

# Editor / OS noise
.vscode
.idea
.DS_Store

# Local env / addresses (must not leak into a published image)
.env
**/.env
**/addresses-local*.json
**/localNetwork.json
**/.keystore

# Docs and audit PDFs aren't needed at runtime
docs
148 changes: 148 additions & 0 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
# Builds the workspace image multi-arch (linux/amd64 + linux/arm64) and pushes
# to ghcr.io/graphprotocol/contracts. Consumed by local-network's
# graph-contracts wrapper via CONTRACTS_VERSION (pin a `:sha-<short>` for
# reproducibility).
#
# Native runner per platform (no QEMU), per-platform digest push, manifest
# merge in a separate job. Runs independently of build-test.yml — they share
# `pnpm install + pnpm build` but stay decoupled so test feedback isn't tied
# to release packaging.

name: Publish container image

permissions:
contents: read

on:
workflow_dispatch:
push:
branches:
- main
- 'deployment/**'
tags:
- 'v*'

env:
IMAGE: ghcr.io/graphprotocol/contracts

jobs:
build:
name: Build (${{ matrix.platform }})
strategy:
fail-fast: false
matrix:
include:
- platform: linux/amd64
runner: ubuntu-24.04
- platform: linux/arm64
runner: ubuntu-24.04-arm
runs-on: ${{ matrix.runner }}
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Prepare platform pair
run: |
platform=${{ matrix.platform }}
echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV

- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
submodules: recursive

- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0

- name: Log in to GitHub Container Registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker labels
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ env.IMAGE }}

- name: Build and push by digest
id: build
uses: docker/build-push-action@bcafcacb16a39f128d818304e6c9c0c18556b85f # v7.1.0
with:
context: .
file: Dockerfile
platforms: ${{ matrix.platform }}
labels: ${{ steps.meta.outputs.labels }}
pull: true
cache-from: type=gha,scope=${{ env.PLATFORM_PAIR }}
cache-to: type=gha,mode=max,scope=${{ env.PLATFORM_PAIR }}
outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=${{ github.event_name != 'pull_request' }}

- name: Export digest
if: github.event_name != 'pull_request'
run: |
mkdir -p ${{ runner.temp }}/digests
digest="${{ steps.build.outputs.digest }}"
touch "${{ runner.temp }}/digests/${digest#sha256:}"

- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: github.event_name != 'pull_request'
with:
name: digests-${{ env.PLATFORM_PAIR }}
path: ${{ runner.temp }}/digests/*
if-no-files-found: error
retention-days: 1

merge:
name: Merge into multi-arch manifest
needs: build
# Avoids orphan per-platform digest blobs if a `need` is skipped or fails.
if: |
!cancelled()
&& needs.build.result == 'success'
&& github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: ${{ runner.temp }}/digests
pattern: digests-*
merge-multiple: true

- uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0

- name: Log in to GitHub Container Registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker tags
id: meta
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
with:
images: ${{ env.IMAGE }}
tags: |
type=ref,event=tag
# Moving per-branch tag for casual use; pin :sha-<short> for reproducibility.
type=ref,event=branch
# Ensures workflow_dispatch from any branch yields a usable tag.
type=sha,enable=true

# Glob `*` expands to the digest-named files from the build job.
- name: Create manifest list and push
working-directory: ${{ runner.temp }}/digests
run: |
docker buildx imagetools create \
$(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
$(printf '${{ env.IMAGE }}@sha256:%s ' *)

- name: Inspect image
run: |
docker buildx imagetools inspect ${{ env.IMAGE }}:${{ steps.meta.outputs.version }}
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Workspace base image: deps + `pnpm install` + `pnpm build`, no entrypoint.
# Consumers (e.g. local-network's graph-contracts wrapper) layer their own
# deploy script on top, or `docker run` to invoke pnpm/hardhat directly.

FROM node:24-bookworm-slim

# libudev-dev / libusb-1.0-0-dev: native deps of hardhat-secure-accounts.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl git jq python3 make g++ libudev-dev libusb-1.0-0-dev \
&& rm -rf /var/lib/apt/lists/*

COPY --from=ghcr.io/foundry-rs/foundry:stable \
/usr/local/bin/forge /usr/local/bin/cast /usr/local/bin/

ENV COREPACK_ENABLE_STRICT=1
RUN corepack enable

# Husky's postinstall needs .git and is pointless in an image build.
ENV HUSKY=0

WORKDIR /opt/contracts

COPY . .

RUN pnpm install --frozen-lockfile \
&& pnpm build
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Local build of the workspace image. Pair with local-network's
# CONTRACTS_VERSION=local to consume this build from there.
#
# `docker compose build` (or `just build-image`) produces
# `ghcr.io/graphprotocol/contracts:${CONTRACTS_TAG:-local}`. Override
# CONTRACTS_TAG to distinguish multiple in-flight checkouts.

services:
contracts:
image: ghcr.io/graphprotocol/contracts:${CONTRACTS_TAG:-local}
build:
context: .
dockerfile: Dockerfile
Loading
Loading