Conversation
Replace lying casts/guards in the SVM event pipeline with honest predicates (superstruct where structural). Behaviour changes: - findFillEvent: populate blockNumber/txnRef from the tx envelope (were undefined at runtime). - getEventName: exact match; unknown event names now throw at the query boundary. - findDeposit: skip malformed events rather than throwing mid-search. Groundwork for typed SVM event decoding (codama decoders follow separately).
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a11392587
ℹ️ 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".
`name in SVMEventNames` also matches keys inherited from Object.prototype
("toString", "constructor", ...), so getEventName returned those as valid
event names instead of throwing. Use Object.hasOwn for an own-property check.
Adds a unit test covering the declared names, the inherited keys, and the
substring near-misses the previous `includes()` matcher accepted.
Co-Authored-By: Claude <noreply@anthropic.com>
|
It's publicly exported ( Given the stack's premise is removing type lies, a predicate named |
|
The md0x's #1490 ("preserve event log indices") assigns the real inner-instruction ordinal and is the proper fix. It also touches |
Remove the superstruct DepositIdEventData guard and the isByteArray/isUint8Array ArrayUtils split. These hardened consumers of untyped decode output; the typed codama decoders (next PR) fix the producer instead, and the final cleanup PR was deleting this machinery again. Dropping it keeps each rung of the stack touching this surface once. Also reverts an unrelated yarn.lock pin change.
|
Re-reviewed at Verified locally (installed The I confirmed the bug is real by probing the returned fill on both sides of the change:
This matters because expect(fill.depositId).to.equal(BigNumber.from(relayData.depositId));
// SortableEvent fields are sourced from the tx envelope, not event data.
expect(fill.blockNumber).to.be.greaterThan(0);
expect(fill.txnRef).to.equal(fillSignature);Checks that came back clean, recording them so they don't get re-litigated:
Still open from last round: the |
Reinis-FRP
left a comment
There was a problem hiding this comment.
LGTM - scoped, correct, and well-tested
Replace lying casts/guards in the SVM event pipeline with honest predicates. Behaviour changes:
Groundwork for typed SVM event decoding (codama decoders follow separately).