Skip to content

feat: get chain contract versions#687

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

feat: get chain contract versions#687
alxdca wants to merge 2 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.

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 mentioned this pull request Apr 8, 2026
3 tasks
@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
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