-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#12) Add events module + unit tests fixes
- Loading branch information
1 parent
75f8f56
commit 11950d1
Showing
6 changed files
with
102 additions
and
88 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
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,39 @@ | ||
// All events emitted by DTP. | ||
|
||
module dtp::events { | ||
// === Imports === | ||
use sui::event; | ||
// === Friends === | ||
friend dtp::host; | ||
friend dtp::inner_pipe; | ||
friend dtp::transport_control; | ||
|
||
// === Errors === | ||
|
||
// === Constants === | ||
|
||
// === Structs === | ||
struct ConReq has copy, drop { | ||
// TODO Add ServiceTYpe, Pipe and InnerPipe addresses. | ||
tc_address: address, // Transport Control Address. | ||
sender: address, // Sender requesting the connection. | ||
} | ||
|
||
|
||
// === Public-Mutative Functions === | ||
|
||
// === Public-View Functions === | ||
|
||
// === Admin Functions === | ||
|
||
// === Public-Friend Functions === | ||
public(friend) fun emit_con_req( tc_address: address, sender: address ) { | ||
event::emit(ConReq {tc_address, sender} ); | ||
} | ||
|
||
// === Private Functions === | ||
|
||
// === Test Functions === | ||
|
||
|
||
} |
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
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