Skip to content

WIP: feat: get chain contract versions#687

Draft
alxdca wants to merge 4 commits intofeat/docker-command-runnerfrom
feat/get-chain-contract-verions
Draft

WIP: feat: get chain contract versions#687
alxdca wants to merge 4 commits intofeat/docker-command-runnerfrom
feat/get-chain-contract-verions

Conversation

@alxdca
Copy link
Copy Markdown
Contributor

@alxdca alxdca commented Apr 8, 2026

Depends on #685. This PR is part of a stack created with Aviator.

WIP: DO NOT MERGE. The orbit-actions npm package has to be published first.

Summary

  • add a reusable getOrbitChainContractVersions SDK helper that runs Orbit Actions via Docker and parses the
    JSON response
  • add a shared runDockerCommand utility plus unit tests that avoid leaking env secret values into logged
    argv/error metadata
  • add a get-chain-contract-versions example that builds the local workspace package and prints contract
    version data for an Orbit chain

Why / Context

  • consumers currently need to leave the SDK and invoke Orbit Actions manually to inspect deployed Nitro
    contract versions
  • this change adds a TypeScript entry point for that workflow while keeping execution inside the existing
    offchainlabs/chain-actions Docker image
  • the example gives users a concrete way to supply INBOX_ADDRESS, NETWORK, and PARENT_CHAIN_RPC and run the helper against a real chain

Risks / Notes

  • the helper depends on Docker being installed and available on PATH
  • the helper currently validates only the top-level JSON shape (versions and upgradeRecommendation)
    returned by Orbit Actions
  • failures from the Docker process are surfaced through the shared runner with argv/stdout/stderr metadata

Test Plan

  • Run pnpm vitest src/getOrbitChainContractVersions.unit.test.ts src/runDockerCommand.unit.test.ts
  • Run pnpm build
  • Run pnpm --dir examples/get-chain-contract-versions dev with Docker available and valid
    INBOX_ADDRESS / PARENT_CHAIN_RPC

@alxdca alxdca changed the base branch from main to feat/docker-command-runner April 8, 2026 09:00
@alxdca alxdca force-pushed the feat/get-chain-contract-verions branch from 04b4152 to 61186f2 Compare April 8, 2026 09:45
@alxdca alxdca force-pushed the feat/get-chain-contract-verions branch from ec19ea7 to 0653361 Compare April 16, 2026 11:12
@alxdca alxdca requested a review from spsjvc April 17, 2026 13:40
@alxdca alxdca marked this pull request as draft April 21, 2026 13:16
@alxdca alxdca changed the title feat: get chain contract versions WIP: feat: get chain contract versions Apr 21, 2026
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