feat(e2e): gas snapshot infra and consolidated test helpers#68
Merged
Conversation
Centralize shared test helpers (EvmHandle, CallResult, LogEntry, selectors, ABI encoding/decoding, for_all_opt_levels) into helpers.rs with automatic gas recording via atexit handler. Refactor all e2e test files to use shared helpers, eliminating duplicated code. Add gas snapshot collection to `just e2e` / `just e2e-ci` recipes. Gas recording only tracks successful calls (skips reverts) and keeps the max gas per (function, opt_level) for worst-case analysis. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for edgelang ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
atexithook flushes results to/tmp/edge-gas/e2e.csv, andjust e2e/just e2e-cinow sort that intocrates/e2e/.gas-snapshot(140 entries).call_fn,call_with_value,compile_contract,compile_named,decode_bool,decode_address,encode_address,event_sig, and a structuredCallResulttype (with logs) tohelpers.rs. Replaced raw tuple returns(bool, Vec<u8>)withCallResultacross all 20+ test files, eliminating ~1000 lines of boilerplate.e2eande2e-cirecipes now automatically collect and write the gas snapshot after test runs.Test plan
cargo test -p edge-e2e)🤖 Generated with Claude Code