Skip to content

feat(registry): export contract registry data to static - #25

Open
alez04 wants to merge 5 commits into
mainfrom
feat/contract-data-source
Open

feat(registry): export contract registry data to static#25
alez04 wants to merge 5 commits into
mainfrom
feat/contract-data-source

Conversation

@alez04

@alez04 alez04 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add configurable registry backfill paths so CI can write generated registry data into an explicit output directory instead of relying on sibling local repos.
  • Add a static export script that writes the registry data into the static contract data layout:
    • registry.json
    • epoch-refs.json
    • epochs/**
    • manifest.json
  • Preserve static schemas during export and only clean generated registry files.
  • Add a scheduled workflow that generates or catches up registry data in qubic-typescript and opens a PR against qubic/static.
  • Add a workflow that syncs static-owned registry data back into qubic-typescript, regenerates typed contract wrappers, and opens a package update PR.
  • Make the old direct registry backfill workflow manual-only to avoid duplicate Wednesday updates.

Why

qubic-typescript already has the ABI backfill and epoch-history tooling, so it should continue producing the generated registry data.

static should own the accepted public data.

This flow makes qubic-typescript generate registry updates, propose them to static, then sync back from static to regenerate @qubic.org/registry and @qubic.org/contracts after static accepts and deploys the data.

New flow

qubic-typescript scheduled workflow
  -> backfill/catch up ABI registry data
  -> export into static data layout
  -> validate with static validator
  -> open PR to qubic/static

qubic/static merge + production deploy
  -> repository_dispatch to qubic-typescript

qubic-typescript sync workflow
  -> copy static-owned registry data
  -> regenerate @qubic.org/contracts wrappers
  -> add changeset
  -> open PR to qubic-typescript

Validation

  • bunx biome check packages/registry/scripts/export-static.ts packages/registry/package.json
  • bun packages/registry/scripts/backfill.ts --rebuild-registry --data-dir packages/registry/data --dry-run
  • Parsed changed GitHub Actions workflow YAML locally with PyYAML.
  • Simulated registry generation and export into a temporary static layout.
  • Validated the simulated exported data with static/scripts/validate_contract_data.py.
  • Simulated static-to-package sync and confirmed packages/registry/data/schema.json is preserved from the static registry schema.

Notes

  • Merge the static PR first.
  • This workflow depends on static having scripts/validate_contract_data.py and the contract schemas.
  • The old direct registry-backfill workflow is now manual-only and should be used only for emergency direct refreshes.

Required secrets

In qubic/qubic-typescript

STATIC_REPO_TOKEN

This token must be able to create branches and PRs in qubic/static.

GH_PAT

This already exists for current workflows and is used to open sync PRs back into qubic-typescript.

@alez04
alez04 force-pushed the feat/contract-data-source branch from 3129b9c to f3a7ca9 Compare July 9, 2026 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant