feat: add standardized event emission for lending contract#236
Merged
ONEONUORA merged 4 commits intoFracverse:masterfrom Feb 26, 2026
Merged
feat: add standardized event emission for lending contract#236ONEONUORA merged 4 commits intoFracverse:masterfrom
ONEONUORA merged 4 commits intoFracverse:masterfrom
Conversation
ONEONUORA
approved these changes
Feb 26, 2026
Contributor
ONEONUORA
left a comment
There was a problem hiding this comment.
Great job @dinahmaccodes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #233
This pull request introduces a comprehensive event logging system to the borrowing contract, allowing key actions such as borrowing, repaying, and liquidating loans to be tracked via structured events. These changes improve contract transparency, enable easier integration with off-chain systems, and provide better observability for users and developers. The implementation includes new event types, emits events at relevant contract actions, and updates test snapshots to validate event outputs.
Event system enhancements:
BorrowEvent,RepayEvent,LiquidationEvent, andInterestAccrualEvent) to define the structure of contract events for loan actions inlib.rs.Testing and validation:
Codebase improvements:
lib.rsto includesymbol_shortfor event topic encoding and improved clarity in loan creation logic by using.clone()for struct fields. [1] [2]These changes lay the foundation for robust contract event tracking and pave the way for future improvements in analytics and off-chain integrations.