Skip to content

feat(contract-manager): multi-payload verification for EVM Lazer contracts#3541

Open
aditya520 wants to merge 2 commits intomainfrom
feat/evm-lazer-multi-payload-check
Open

feat(contract-manager): multi-payload verification for EVM Lazer contracts#3541
aditya520 wants to merge 2 commits intomainfrom
feat/evm-lazer-multi-payload-check

Conversation

@aditya520
Copy link
Copy Markdown
Member

@aditya520 aditya520 commented Mar 10, 2026

Summary

  • Refactors check_evm_lazer_contracts.ts to test 15 payload variants (5 property combos x 3 channels) against on-chain verifyUpdate
  • Reports gas estimates per variant via estimateGas()
  • Prints chain info table, detailed results table, and final summary with pass/fail counts + min/max/avg gas

Test plan

  • Run single chain: npx tsx scripts/check_evm_lazer_contracts.ts --lazer-token <token> --chain megaeth
  • Verify 15 payload variants appear in output with gas estimates
  • Confirm summary table prints at the end
  • Run without --chain to test all-chains mode

🤖 Generated with Claude Code


Open with Devin

…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>
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 10, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
api-reference Ready Ready Preview, Comment Mar 17, 2026 7:00pm
component-library Ready Ready Preview, Comment Mar 17, 2026 7:00pm
developer-hub Ready Ready Preview, Comment Mar 17, 2026 7:00pm
entropy-explorer Ready Ready Preview, Comment Mar 17, 2026 7:00pm
insights Ready Ready Preview, Comment Mar 17, 2026 7:00pm
proposals Ready Ready Preview, Comment Mar 17, 2026 7:00pm
staking Ready Ready Preview, Comment Mar 17, 2026 7:00pm

Request Review

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +327 to +328
if (failed > 0) {
process.exit(1);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Comment on lines +183 to +186
if (payloads.size === 0) {
console.error("No payloads fetched, exiting.");
process.exit(1);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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>
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