You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expose the singleton RedemptionPriceState account through stablecoin_module, using the signed controller state and PDA contract added
by #303.
Scope
Add a pure stablecoin_ffi operation that derives the redemption-price-state
PDA and exactly decodes stablecoin_core::RedemptionPriceState from a
validated public-account read.
Add redemptionPriceState() to StablecoinModuleImpl. It must derive and
read the singleton account rather than accept an arbitrary account ID.
Return both account-ID encodings plus redemptionPriceAtLastUpdate, redemptionRatePerMillisecond, controllerIntegralTerm, and lastUpdatedAt.
Preserve u128, signed i128, and u64 values as exact decimal strings.
Reject an absent account, wrong PDA, wrong program owner, malformed/truncated
data, trailing bytes, or backend read failure with stable error codes.
Goal
Expose the singleton
RedemptionPriceStateaccount throughstablecoin_module, using the signed controller state and PDA contract addedby #303.
Scope
stablecoin_ffioperation that derives the redemption-price-statePDA and exactly decodes
stablecoin_core::RedemptionPriceStatefrom avalidated public-account read.
redemptionPriceState()toStablecoinModuleImpl. It must derive andread the singleton account rather than accept an arbitrary account ID.
redemptionPriceAtLastUpdate,redemptionRatePerMillisecond,controllerIntegralTerm, andlastUpdatedAt.u128, signedi128, andu64values as exact decimal strings.data, trailing bytes, or backend read failure with stable error codes.
read; those are covered by the feat(stablecoin): add current value projection helpers #311 and feat(stablecoin): add redemption rate controller + clamp constants #312 API sub-issues.
Acceptance criteria
compute_redemption_price_state_pda(stablecoin_program_id)for fixed vectorsand the configured deployed program.
controllerIntegralTermvalues round-trip without sign or precision loss.
truncated data, trailing data, and boundary integer values.
response/error shapes.
nix build .#stablecoin-moduleand relevant Rust/module tests pass.Dependencies
Depends on the
stablecoin_modulescaffold andinitializeProgramsub-issueunder #321.