[DX-3049] use v2 PoR workflow as example#21696
[DX-3049] use v2 PoR workflow as example#21696Tofel merged 2 commits intocodex/dx-3043-local-cre-cli-use-state-filefrom
Conversation
75b8319 to
b4b29c0
Compare
|
✅ No conflicts with other open PRs targeting |
There was a problem hiding this comment.
Pull request overview
Risk Rating: MEDIUM (CLI behavior + local env workflow execution + CI workflow now runs the PoR example)
This PR updates the CRE environment “example workflow” to use the PoR v2 cron workflow as the canonical reference, and wires multiple commands to resolve defaults (RPC, DON ID, registry addresses) from local CRE state when available.
Changes:
- Switch example PoR workflow support from v1 (cron/web-trigger) to the v2 cron example and remove the v1 web-trigger example module.
- Introduce a
LocalCREStateResolverand use it to hydrate CLI defaults (RPC/DON ID/contract addresses) across workflow + billing commands. - Enable the “Execute example PoR workflow” step in
cre-local-env-tests(now callsworkflow run-por-example).
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| go.md | Updates the dependency/workflow diagram to reference PoR v2 cron example. |
| core/scripts/go.mod | Switches replace/require from v1 PoR example modules to the v2 cron example module; promotes chain-selectors to direct dep. |
| core/scripts/cre/environment/examples/pkg/deploy/consumer.go | Adds chain metadata helper + address generation/funding helper used by the PoR v2 example. |
| core/scripts/cre/environment/examples/examples.go | Adds RPC auto-resolution from local CRE state for example contract deploy commands. |
| core/scripts/cre/environment/environment/state_resolver.go | Adds local CRE state resolver (RPC, address refs, DON metadata, gateway URL, workflow registry output). |
| core/scripts/cre/environment/environment/workflow.go | Refactors workflow deploy/delete commands to resolve RPC/DON ID/addresses via local state + shared resolver logic. |
| core/scripts/cre/environment/environment/examples.go | Replaces “deploy-and-verify-example” with run-por-example using PoR v2 cron workflow + new config generation. |
| core/scripts/cre/environment/environment/environment.go | Removes v1 trigger selection flags/logic and always uses PoR v2 cron example when --with-example is set. |
| core/scripts/cre/environment/environment/billing.go | Hydrates billing config from local CRE state when setup output isn’t available; normalizes docker-host RPC rewriting. |
| core/scripts/cre/environment/completions.go | Updates shell completions for renamed workflow command and removed trigger flag. |
| core/scripts/cre/environment/README.md | Updates docs to reflect PoR v2 cron example as the default/only example. |
| .github/workflows/cre-local-env-tests.yaml | Enables running the PoR example workflow in CI (workflow run-por-example). |
| core/scripts/cre/environment/examples/workflows/v1/proof-of-reserve/web-trigger-based/* | Removes the v1 web-trigger-based PoR example module (go.mod/go.sum/types/main). |
CORA - Analysis SkippedReason: The number of code owners (4) is less than the minimum required (5) and/or the number of CODEOWNERS entries with changed files (5) is less than the minimum required (2). |
|
I see you added a changeset file but it does not contain a tag. Please edit the text include at least one of the following tags:
|
6fa08ab to
1a6885c
Compare
…dx-3049-v2-por-example
|
I see you updated files related to
|
3764847
into
codex/dx-3043-local-cre-cli-use-state-file
|




No description provided.