[pull] master from foundry-rs:master#1088
Merged
Merged
Conversation
* feat(primitives): add variant predicates Expose documented const helpers across Foundry network and transaction enums, including feature-gated Optimism variants. Keep standard typed transaction predicates on Typed2718 where appropriate and migrate exact single-variant checks to the shared API. * fix(primitives): satisfy clippy use-self lint Use the enum's Self type in the Optimism transaction trait implementation so the workspace use_self lint remains warning-free. --------- Co-authored-by: mattsse <19890894+mattsse@users.noreply.github.com>
* feat(lint): detect balance reentrancy Extend the existing reentrancy analysis to track locals derived from address(this).balance and report reentrant calls followed by stale balance guards. Register the high-severity lint and add documentation plus focused true- and false-path UI coverage. * fix(lint): harden balance reentrancy Track native self-balance values across casts, tuples, helper boundaries, operand ordering, and loop control flow. Resolve external calls semantically while preserving view, static, storage, and stipend-capped exclusions. * fix(lint): address reentrancy reviews Require fresh and stale balances on opposite comparison operands, model standard state-lock guards across effective entry points, restore bounded recursive entry analysis, and account for value-call gas stipends. * fix(lint): preserve balance flow facts Carry stale-balance comparison and boolean path provenance through helper returns, compound assignments, and control-flow joins. This avoids false positives on complementary conditions without hiding reachable callback paths. * fix(lint): track self address aliases Preserve address(this) provenance through locals, tuples, helper and modifier parameters, and branch-correlated call paths. Invalidate aliases on observable writes and assembly reassignment. * fix(lint): track balance expression paths Propagate path constraints and self-address provenance through short-circuit expressions and helper returns so balance reentrancy diagnostics follow feasible paths. * fix(lint): complete balance reentrancy flow Track internal function-pointer targets through assignments and control-flow joins so helper callbacks remain visible to the balance analysis. Recognize standard lock modifiers whose sole placeholder is nested in an unconditional block. Amp-Thread-ID: https://ampcode.com/threads/T-019f896c-fd1a-745b-be37-de6016df1dbb Co-authored-by: Amp <amp@ampcode.com> --------- Co-authored-by: Mablr <59505383+mablr@users.noreply.github.com> Co-authored-by: Amp <amp@ampcode.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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )