Skip to content

No credit rate change count getter in FarmingPool #264

Description

@ritaifeoluwa

Description

The FarmingPool contract does not have a way to query the total number of credit rate changes performed. While individual changes are trackable via events, there is no aggregate count.

Current behavior

No credit rate change count.

Expected behavior

Maintain a running count:

fn credit_rate_change_count(env: &Env) -> u32 {
    env.storage().instance().get(&DataKey::CreditRateChangeCount).unwrap_or(0)
}

Increment during set_credit_rate.

Why this matters

Protocol analytics need credit rate change counts for governance monitoring.

Labels

enhancement, farming-pool, good first issue

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions