Skip to content

fix(credence_bond): enforce fee bounds and emit old/new values - #1256

Open
sudo-robi wants to merge 2 commits into
CredenceOrg:mainfrom
sudo-robi:fix/bond-fee-bounds-fresh
Open

fix(credence_bond): enforce fee bounds and emit old/new values#1256
sudo-robi wants to merge 2 commits into
CredenceOrg:mainfrom
sudo-robi:fix/bond-fee-bounds-fresh

Conversation

@sudo-robi

Copy link
Copy Markdown

Closes #279

kimmoris12345 and others added 2 commits July 29, 2026 08:13
…nceOrg#1027)

- fees: gate [MIN/MAX]_FEE_BPS=[0,1000] (10%); panic with "fee_bps out of bounds".
- fees/events: emit fee_config_updated(admin, old_treasury, new_treasury, old_fee_bps, new_fee_bps).
- lib: add set_fee_config/get_fee_config entrypoints + DataKey::{FeeTreasury, FeeBps}.
- test: bounds at MIN/MAX boundaries, MAX+1 rejected, event payload assertions, re-emit on no-op.
- errors: pre-req ContractError::RoleRequired = 128 variant + category/is_recoverable arms (lands CredenceOrg#1235 dependency).
- docs: fees.md + EVENTS.md mirror the new bounds and event shape.
- baseline: panic_baseline.txt picks up fees.rs::panic!("fee_bps out of bounds").

Closes CredenceOrg#1027
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.

[Fresh 2026-04][Contracts] Bond: fee config safety rails (bounds + events include old/new)

2 participants