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 StabilityFeeAccumulator account through stablecoin_module, using the account type and PDA contract introduced by #302.
Scope
Add a pure stablecoin_ffi operation that derives the accumulator PDA and
exactly decodes stablecoin_core::StabilityFeeAccumulator from a validated
public-account read.
Add stabilityFeeAccumulator() to StablecoinModuleImpl. It must derive and
read the singleton account; callers must not supply an arbitrary account ID.
Return a stable map containing both base58 and hex account IDs, accumulatedRateAtLastAccrual, and lastAccruedAt.
Return all integer fields as exact decimal strings.
Reject an absent account, wrong PDA, wrong program owner, malformed/truncated
data, trailing bytes, or a backend read failure with stable error codes.
Goal
Expose the singleton
StabilityFeeAccumulatoraccount throughstablecoin_module, using the account type and PDA contract introduced by#302.
Scope
stablecoin_ffioperation that derives the accumulator PDA andexactly decodes
stablecoin_core::StabilityFeeAccumulatorfrom a validatedpublic-account read.
stabilityFeeAccumulator()toStablecoinModuleImpl. It must derive andread the singleton account; callers must not supply an arbitrary account ID.
accumulatedRateAtLastAccrual, andlastAccruedAt.data, trailing bytes, or a backend read failure with stable error codes.
that belongs to the current-global-projections sub-issue sourced from feat(stablecoin): add current value projection helpers #311.
Acceptance criteria
compute_stability_fee_accumulator_pda(stablecoin_program_id)for fixedvectors and the configured deployed program.
u128andu64values withoutfloating-point conversion.
truncated data, trailing data, and maximum integer values.
response/error shapes.
nix build .#stablecoin-moduleand relevant Rust/module tests pass.Dependencies
Depends on the
stablecoin_modulescaffold andinitializeProgramsub-issueunder #321.