This pull request introduces advanced examples of Solidity events. It builds on the basics covered in the existing Events documentation with two examples: EventDrivenArchitecture and EventSubscription. These examples demonstrate event-driven architecture and real-time event subscription mechanisms.
Changes Introduced
Added EventDrivenArchitecture Contract:
Demonstrates the use of events to coordinate and trigger different stages of a process (e.g., initiating and confirming transfers).
Includes two events: TransferInitiated and TransferConfirmed.
Implements functions to initiate and confirm transfers.
Added EventSubscription Contract:
Showcases how to implement event subscriptions for real-time updates.
Includes the subscribe and unsubscribe functions to manage subscribers.
Emits LogTransfer event and notifies subscribers via the handleTransferEvent function.
This pull request introduces advanced examples of Solidity events. It builds on the basics covered in the existing Events documentation with two examples:
EventDrivenArchitecture
andEventSubscription
. These examples demonstrate event-driven architecture and real-time event subscription mechanisms.Changes Introduced
Added
EventDrivenArchitecture
Contract:TransferInitiated
andTransferConfirmed
.Added
EventSubscription
Contract:subscribe
andunsubscribe
functions to manage subscribers.LogTransfer
event and notifies subscribers via thehandleTransferEvent
function.Additional Information