Skip to content

feat: support vetiver bridge abi (DX-1812)#72

Merged
ivegabr merged 3 commits into
developfrom
feat/DX-1812-update-bridge-methods
May 21, 2026
Merged

feat: support vetiver bridge abi (DX-1812)#72
ivegabr merged 3 commits into
developfrom
feat/DX-1812-update-bridge-methods

Conversation

@nicov-iov

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the new VETIVER Bridge ABI release (bridge-vetiver.json) and registers it in bridgeAbi.js at mainnet height 8804200 and testnet height 7604200.
  • Bumps @rsksmart/rsk-precompiled-abis from ^8.0.0-REED to ^9.0.0-VETIVER.
  • Adds tests verifying the new ABI decodes both getEstimatedFeesForPegOutAmount(uint256) and the updated getEstimatedFeesForNextPegOutEvent().

Why

Rootstock node (RSKj) introduced a new Bridge method getEstimatedFeesForPegOutAmount(uint256 pegOutAmountInWeis) and updated the semantics of getEstimatedFeesForNextPegOutEvent() (now uses the minimum peg-out value instead of 1 BTC). The parser must recognize and decode these so the explorer correctly displays Bridge interactions.

Test plan

  • npm run test:local — 402 passing, including 2 new decode tests for vetiver ABI
  • npm run lint — clean
  • npm run builddist/ regenerated and consistent with src/

Notes

  • Existing getEstimatedFeesForNextPegOutEvent() selector is unchanged — only semantics updated.
  • Version bump for the parser package will happen in a separate release PR per repo convention.

@nicov-iov
nicov-iov marked this pull request as ready for review May 18, 2026 23:04
@nicov-iov
nicov-iov requested review from Copilot and ivegabr May 18, 2026 23:05
@nicov-iov nicov-iov assigned carlos-rsk and unassigned carlos-rsk May 18, 2026
@nicov-iov
nicov-iov requested a review from carlos-rsk May 18, 2026 23:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds the VETIVER Bridge ABI and registers it for block-aware Bridge release selection, while updating the packaged precompiled ABI dependency and tests.

Changes:

  • Registers VETIVER for mainnet/testnet release heights.
  • Adds bridge-vetiver.json to source and generated dist/.
  • Updates dependency lock state and adds ABI decode-oriented tests.

Reviewed changes

Copilot reviewed 4 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/bridgeAbi.spec.js Adds Vetiver release expectations and peg-out fee method decode tests.
src/lib/nativeContracts/bridgeAbi.js Imports and registers the Vetiver ABI release.
src/lib/nativeContracts/bridge-vetiver.json Adds the new Bridge ABI definition.
package.json Bumps @rsksmart/rsk-precompiled-abis to VETIVER.
package-lock.json Locks the updated precompiled ABI package.
dist/lib/nativeContracts/bridgeAbi.js Generated registration update for Vetiver.
dist/lib/nativeContracts/bridge-vetiver.json Generated copy of the Vetiver ABI.
Comments suppressed due to low confidence (1)

test/bridgeAbi.spec.js:96

  • Like the previous case, this encodes and parses with the same ABI, which does not prove the parser recognizes the actual precompile selector for getEstimatedFeesForNextPegOutEvent() after the Vetiver boundary. A fixed calldata/selector fixture would make this regression test independent of the ABI under test.
    const iface = new Interface(vetiver.filter(i => i.type === 'function'))
    const data = iface.encodeFunctionData('getEstimatedFeesForNextPegOutEvent', [])
    const parsed = iface.parseTransaction({ data })

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment thread test/bridgeAbi.spec.js

@ivegabr ivegabr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ok

@ivegabr
ivegabr merged commit 1c37eaf into develop May 21, 2026
4 checks passed
@ivegabr
ivegabr deleted the feat/DX-1812-update-bridge-methods branch May 21, 2026 13:33
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.

4 participants