Skip to content

feat: implement contract event mapper for role events - #165

Open
edochieblessing09-max wants to merge 1 commit into
Raegis-RWA:mainfrom
edochieblessing09-max:feat/role-contract-events
Open

feat: implement contract event mapper for role events#165
edochieblessing09-max wants to merge 1 commit into
Raegis-RWA:mainfrom
edochieblessing09-max:feat/role-contract-events

Conversation

@edochieblessing09-max

Copy link
Copy Markdown

Closes #148

Description

This PR implements the contract event mapper for Aegis protocol role events, fulfilling the requirement for Dashboard and SDK consumers to parse these events safely.

Changes Included

  • Event Types: Added RoleContractEvent to the AegisContractEvent types and added 'role' to ContractEventKind.
  • Topics & Aliases: Registered role_grant and role_revoke topics along with aliases (grant_role, role_granted, revoke_role, role_revoked) in topics.ts.
  • Decoder Utility: Added decodeRoleEvent implementation in decoder.ts to map role_grant and role_revoke topics into the typed RoleContractEvent object safely while handling missing fields.
  • Fixtures: Added roleGrant and roleRevoke deterministic test fixtures.
  • Tests: Added tests covering known role events to events-decoder.test.ts.
  • Documentation: Updated contract-events.md to reflect role event support and compatibility.

Acceptance Criteria Met

  • Contract event mapper updated.
  • Compliance, minting, transfer, role, and asset events are supported.
  • Unknown events are handled safely.
  • Fixtures are added.
  • Tests cover known and unknown events.
  • Docs explain event compatibility.

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.

Implement Aegis SDK contract event mapper

1 participant