-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(relayer_discovery)!: added events to relayer discovery (#198)
Co-authored-by: Milap Sheth <[email protected]>
- Loading branch information
1 parent
763090f
commit 952c2e7
Showing
5 changed files
with
84 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@axelar-network/axelar-cgp-sui': minor | ||
--- | ||
|
||
Add events to register and remove transaction on relayer discovery |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
module relayer_discovery::events; | ||
|
||
use relayer_discovery::transaction::Transaction; | ||
use sui::event; | ||
|
||
/// ------ | ||
/// Events | ||
/// ------ | ||
// Emitted when a transaction is registered | ||
public struct TransactionRegistered has copy, drop { | ||
channel_id: ID, | ||
transaction: Transaction, | ||
} | ||
|
||
// Emitted when a transaction is removed | ||
public struct TransactionRemoved has copy, drop { | ||
channel_id: ID, | ||
} | ||
|
||
/// ----------------- | ||
/// Package Functions | ||
/// ----------------- | ||
public(package) fun transaction_registered( | ||
channel_id: ID, | ||
transaction: Transaction, | ||
) { | ||
event::emit(TransactionRegistered { | ||
channel_id, | ||
transaction, | ||
}) | ||
} | ||
|
||
public(package) fun transaction_removed(channel_id: ID) { | ||
event::emit(TransactionRemoved { | ||
channel_id, | ||
}) | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"structs": { | ||
"TransactionRegistered": { | ||
"name": "TransactionRegistered", | ||
"abilities": [ | ||
"copy", | ||
"drop" | ||
], | ||
"fields": [ | ||
{ | ||
"name": "channel_id", | ||
"type": "ID" | ||
}, | ||
{ | ||
"name": "transaction", | ||
"type": "Transaction" | ||
} | ||
] | ||
}, | ||
"TransactionRemoved": { | ||
"name": "TransactionRemoved", | ||
"abilities": [ | ||
"copy", | ||
"drop" | ||
], | ||
"fields": [ | ||
{ | ||
"name": "channel_id", | ||
"type": "ID" | ||
} | ||
] | ||
} | ||
}, | ||
"publicFunctions": {} | ||
} |