Skip to content

Upstream the versioned deploy-constants completeness check into rainix #236

@thedavidmeister

Description

@thedavidmeister

Summary

The "versioned deploy-constants matching soldeer" pattern — pin a frozen *_DEPLOYED_ADDRESS_<ver> / *_DEPLOYED_CODEHASH_<ver> suite per published soldeer tag in the deploy lib, plus a test asserting every published tag has its suite — is being copy-pasted per repo. Per the org convention that shared CI/tooling lives in rainix (reusable workflows, not duplicated in consumers), it should be upstreamed here.

Current state (duplicated)

The check-published-deploy-constants.sh is ~identical across repos — only the soldeer package name, the deploy-lib path, and the constant base-names differ.

Proposal

  1. Add a parameterized lib/check-published-deploy-constants.sh to rainix (alongside lib/sol-single-contract.sh etc.), taking the soldeer package name, the deploy-lib path, and the constant base-names (env/args). It queries api.soldeer.xyz/api/v1/revision?project_name=<pkg> and prints OK / MISSING: <names> / SKIP: <reason> (always exit 0) — the same contract the consumer FFI tests already consume.
  2. Consumers reduce to: the literal versioned constants in their deploy lib + a thin FFI test that calls the rainix script with their params (no copied logic). Expose it on #sol-shell so the test runs nix develop github:rainlanguage/rainix#sol-shell -c check-published-deploy-constants ....
  3. (Optional) Have rainix-sol-test.yaml run the check as a CI step so a published tag missing its pinned suite fails uniformly, independent of each repo remembering the test.

Acceptance

  • rainix ships the parameterized script (+ optionally the CI step).
  • raindex and rain.math.float drop their bespoke script/check-published-deploy-constants.sh and call rainix's.
  • rain-org-health's deploy-constants-unversioned check (2024 01 09 tauri #4) recognizes "uses the rainix shared check" as the adopted state.

Refs: rainlanguage/rain.math.float#246, rainlanguage/rain-org-health#4.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions