feat(contract-manager): multi-payload verification for EVM Lazer contracts#3541
feat(contract-manager): multi-payload verification for EVM Lazer contracts#3541
Conversation
…er contracts Add check_evm_lazer_contracts.ts that tests 15 payload variants (5 property combos x 3 channels) against on-chain verifyUpdate, reports gas estimates, and prints a summary with pass/fail counts and min/max/avg gas usage. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6242483e8c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (failed > 0) { | ||
| process.exit(1); |
There was a problem hiding this comment.
Fail when chain filter matches no contracts
If --chain is mistyped or doesn’t match any DefaultStore.lazer_contracts entry, the script runs zero checks but still exits successfully because it only fails when failed > 0. In that case results.length stays 0, failed is 0, and CI/manual runs get a false green result instead of being told that no chain was tested.
Useful? React with 👍 / 👎.
| if (payloads.size === 0) { | ||
| console.error("No payloads fetched, exiting."); | ||
| process.exit(1); | ||
| } |
There was a problem hiding this comment.
Fail when any payload variant cannot be fetched
The script logs fetch errors per variant but only aborts when payloads.size === 0, so partial fetch failures still produce a success exit code and silently skip verification for missing variants. Since this check is intended to validate the full variant matrix, not failing when payloads.size !== variants.length can hide regressions in specific channels/property combinations.
Useful? React with 👍 / 👎.
- Add process.exit(0) on success path to prevent script hanging (open WebSocket) - Fail when --chain filter matches no contracts instead of false-green exit - Fail when any payload variant fetch fails instead of silently skipping - Add missing @pythnetwork/pyth-lazer-sdk dependency to package.json - Fix import path for EvmLazerContract Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
check_evm_lazer_contracts.tsto test 15 payload variants (5 property combos x 3 channels) against on-chainverifyUpdateestimateGas()Test plan
npx tsx scripts/check_evm_lazer_contracts.ts --lazer-token <token> --chain megaeth--chainto test all-chains mode🤖 Generated with Claude Code