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

Commit e234dd4

Browse files
authored
feat: send excessive funds from receiver function back to the sender (#232)
1 parent 53a77a1 commit e234dd4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pages/index.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ contract SimpleCounter with Deployable {
6161
6262
receive(msg: Add) {
6363
self.counter += msg.amount;
64+
65+
// Notify the caller that the receiver was executed and forward remaining value back
66+
self.notify("Cashback".asComment());
6467
}
6568
6669
get fun counter(): Int {

0 commit comments

Comments
 (0)