Skip to content

Commit 9c8025d

Browse files
committedSep 20, 2024··
feat: add get_receipt
1 parent 9f2dbc7 commit 9c8025d

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed
 

‎contracts/sui/intent_v1/sources/cluster_connection.move

+5
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,9 @@ module intents_v1::cluster_connection {
6969
self.conn_sn = sn;
7070
sn
7171
}
72+
73+
public fun get_receipt(self: &ConnectionState, net_id: String, sn: u128): bool {
74+
let receipt_key = Receipt { src_nid: net_id, conn_sn: sn };
75+
self.receipts.contains<Receipt,bool>(receipt_key)
76+
}
7277
}

‎contracts/sui/intent_v1/sources/main.move

+4
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,10 @@ module intents_v1::main {
412412

413413
}
414414

415+
entry fun get_receipt(self:&Storage,nid:String,conn_sn:u128):bool {
416+
self.connection.get_receipt(nid, conn_sn)
417+
}
418+
415419

416420

417421

0 commit comments

Comments
 (0)
Please sign in to comment.