Repository navigation
feat(evm)!: add prevDepositBlock to the Deposit event - #9
Open
hubagaspar91 wants to merge 1 commit into
Open
hubagaspar91 wants to merge 1 commit into
hubagaspar91 wants to merge 1 commit into
Conversation
The bridge upgrade from DLC-link/evm-asset-bridge#68 adds a prevDepositBlock field to its Deposit event. The new field changes the event signature and its topic0, so the old binding no longer matches the logs that the upgraded bridge emits. The crate replaces the old event and does not keep both. Two deposit topics in the API would stay forever, and the crate has few users. The changelog gives the old topic0 as a literal for a caller that reads logs from before the upgrade. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
Author
Factory report: requirementsDone
Sizing
Considered and rejected
Agents and models
|
Collaborator
Author
Factory report: implementationDone
Considered and rejected
Agents and models
|
Collaborator
Author
Factory report: review and fixDone
Fix
Considered and rejected
Human gate
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the Deposit binding update.
No open issues 🎉
What changed in this PR
Updates the EVM bridge’s Deposit binding to match the upgraded contract. This is a breaking API change intended for the next release, 0.4.0; this PR does not cut a release.
Changes:
- Adds
prevDepositBlockas the final event field and documents its meaning. - Updates the topic test to pin the new event signature.
- Documents migration requirements, including the old topic and safe decoding of pre-upgrade logs.
| File | Description |
|---|---|
src/kits/evm/evm_asset_bridge.rs |
Extends the event binding and updates the expected deposit topic. |
CHANGELOG.md |
Explains the breaking change and legacy-log decoding requirements. |
Review effort: Balanced
Collaborator
Author
Factory report: CI and handoffDone
Considered and rejected
Agents and models
Next step
|
scolear
approved these changes
Nov 3, 2026
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.
What
This PR adds the field
uint256 prevDepositBlockas the last field of theDepositevent binding. The bridge upgrade from DLC-link/evm-asset-bridge#68 adds this field. The upstream contract change is DLC-link/evm-asset-bridge#69.Deposit(bytes32,bytes,address,uint256), topic00xacaea730…7ef8.Deposit(bytes32,bytes,address,uint256,uint256), topic00xf3ca8897…30e2.DEPOSIT_EVENT_TOPICstill comes from the event, so its value changes with the event. The namesDepositandDEPOSIT_EVENT_TOPICstay the same.Why
The upgraded bridge emits only the new event. The old binding does not match those logs. The crate replaces the old event and does not keep both, because two deposit topics in the API would stay forever. The crate is new and has few users, so we accept the breaking change now.
Breaking change
Depositstruct has a new field. Code that builds or decodes aDepositmust handle it.DEPOSIT_EVENT_TOPICmatches only the new event.CHANGELOG.mdentry gives the old topic0 as a literal. A caller that reads pre-upgrade logs uses it.A probe test showed two facts, which the changelog states.
Deposit::decode_logrejects an old log, because its topic0 differs. Old log data decodes as aDepositwithout an error, butprevDepositBlockthen holds the byte length of the deposit id.No caller of
DEPOSIT_EVENT_TOPICexists in the org today. This PR does not cut a release. The next release is 0.4.0.How tested
cargo test,cargo clippy --all-targets --all-features -D warnings,cargo docwith-D warningsandcargo fmt --checkpass.Out of scope
lastDepositBlockview.🤖 Generated with Claude Code