Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 56ad2c1

Browse files
committed
feat: sending excessive funds in receive() function back
1 parent 53a77a1 commit 56ad2c1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pages/index.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ message Add {
5050
amount: Int as uint32;
5151
}
5252
53+
message AddOk {
54+
queryId: Int as uint64;
55+
amount: Int as uint32;
56+
}
57+
5358
contract SimpleCounter with Deployable {
5459
id: Int as uint32;
5560
counter: Int as uint32;
@@ -61,6 +66,7 @@ contract SimpleCounter with Deployable {
6166
6267
receive(msg: Add) {
6368
self.counter += msg.amount;
69+
self.notify(AddOk{queryId: msg.queryId, amount: msg.amount}.toCell());
6470
}
6571
6672
get fun counter(): Int {

0 commit comments

Comments
 (0)