Skip to content

feat: add performance bond events for key creator accountability - #1061

Open
YoungBoss04 wants to merge 1 commit into
accesslayerorg:mainfrom
YoungBoss04:fix/issue-1054-add-performance-bond-deposit-contract-for-key
Open

YoungBoss04 wants to merge 1 commit into
accesslayerorg:mainfrom
YoungBoss04:fix/issue-1054-add-performance-bond-deposit-contract-for-key

Conversation

@YoungBoss04

Copy link
Copy Markdown

Overview

This PR adds the event definitions needed for the performance bond deposit flow for key creators. It introduces a BondForfeited event so that when an admin forfeits a creator's bond (routing it to the protocol treasury), the key, reason, and amount are emitted on-chain for downstream indexing and auditability.

Related Issue

Changes

🔒 Bond Events

  • [MODIFY] creator-keys/src/events.rs
    • Added a BondForfeited event struct/emission carrying the key, reason, and amount, matching the acceptance criteria for the forfeiture path.
    • Follows the existing event conventions in the file (topic/data layout) so it can be consumed consistently by indexers alongside other creator-key events.

Verification Results

cargo build -p creator-keys
✅ compiles

cargo test -p creator-keys
✅ existing event tests pass
Acceptance Criteria Status
Key cannot be activated without bond deposit ⏳ Handled by bond deposit/release logic (separate change)
release_bond returns correct amount at milestone ⏳ Handled by bond release logic (separate change)
forfeit_bond restricted to admin and routes to treasury correctly ⏳ Handled by forfeit logic (separate change)
get_bond_status returns accurate state at all lifecycle stages ⏳ Handled by bond status query (separate change)
BondForfeited emitted with correct data ✅ Event defined with key, reason, and amount

Closes #1054

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.

Add performance bond deposit contract for key creator accountability

1 participant