Skip to content

fix: on-chain update prices return excess send mode#626

Open
vicentevieytes wants to merge 4 commits intomainfrom
vv/fix-update-prices-return-excess-send-mode
Open

fix: on-chain update prices return excess send mode#626
vicentevieytes wants to merge 4 commits intomainfrom
vv/fix-update-prices-return-excess-send-mode

Conversation

@vicentevieytes
Copy link
Collaborator

No description provided.

@vicentevieytes vicentevieytes requested a review from a team as a code owner February 25, 2026 21:08
Copilot AI review requested due to automatic review settings February 25, 2026 21:08
@github-actions
Copy link

👋 vicentevieytes, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts TON fee/cost parameters and fixes how the FeeQuoter contract returns excess TON after UpdatePrices, so excess value is sent back without risking draining the contract’s existing balance.

Changes:

  • Bumped default OCR ContractTransmitter TON cost constants for commit (price-only / price+root).
  • Increased on-chain FeeQuoter_Costs.updatePrices() value requirement from 0.01 TON to 0.02 TON.
  • Updated FeeQuoter’s excess-return mechanism to reserve the original balance and send excess using SEND_MODE_CARRY_ALL_BALANCE.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/ccip/ocr/config.go Updates default TON cost constants used by the OCR contract transmitter.
contracts/contracts/ccip/fee_quoter/messages.tolk Increases the declared TON cost for updatePrices().
contracts/contracts/ccip/fee_quoter/contract.tolk Changes excess return to reserve original balance and carry all remaining balance to the refund recipient.

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

@smartcontractkit smartcontractkit deleted a comment from Copilot AI Feb 25, 2026
Copy link
Collaborator

@patricios-space patricios-space left a comment

Choose a reason for hiding this comment

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

Looks good, but if you plan to run an in-place upgrade, you'll need a migrate function.

@vicentevieytes vicentevieytes force-pushed the vv/fix-update-prices-return-excess-send-mode branch from ea68bda to 0ddf173 Compare February 25, 2026 22:07
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.

3 participants