Skip to content

feat(sdk): add skipTradingDelay to the yield DTF refresh basket builder - #58

Merged
JuampiRombola merged 1 commit into
mainfrom
feat/yield-refresh-basket-skip-delay
Dec 4, 2026
Merged

JuampiRombola merged 1 commit into
mainfrom
feat/yield-refresh-basket-skip-delay

Conversation

@JuampiRombola

Copy link
Copy Markdown
Collaborator

Summary

Yield protocol 4.3.0 adds the overload BasketHandler.refreshBasket(bool skipTradingDelay). On 4.3.0 a plain refreshBasket() waits the full tradingDelay, also when governance calls it. Governance must call refreshBasket(true) to switch the basket without the delay.

prepareYieldDtfRefreshBasket encoded only refreshBasket(). A consumer that builds a basket proposal with the SDK had no way to skip the delay.

Changes

  • prepareYieldDtfRefreshBasket accepts an optional skipTradingDelay. With true it encodes refreshBasket(true).
  • The default does not change. It is refreshBasket(), the only form that versions before 4.3.0 accept.
  • basketHandlerAbi includes the new overload.
  • Changeset: minor.

The caller decides when to set the flag. Set it only for a BasketHandler on 4.3.0 or later; an earlier version does not have the overload and the call reverts.

Tests

propose.test.ts checks the exact calldata of the two forms (0x8a55015b and 0x1a8e6e6c + true).

Related

Register encodes these calls locally and does not use this builder: reserve-protocol/register#1178.

Human review required: this is a calldata builder.

@coderabbitai

coderabbitai Bot commented Dec 4, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7c4b10a9-60e3-4070-84f8-4f589e29fef2
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@JuampiRombola
JuampiRombola merged commit a1667eb into main Dec 4, 2026
4 checks passed
@JuampiRombola
JuampiRombola deleted the feat/yield-refresh-basket-skip-delay branch December 4, 2026 19:47
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.

2 participants