Skip to content

Commit

Permalink
Merge pull request #106 from novusnota-forks/tact-template-update
Browse files Browse the repository at this point in the history
feat: make receiver in Tact template refund remaining value
  • Loading branch information
krigga authored May 27, 2024
2 parents c17c1b8 + 67986d5 commit 5f13508
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed

- Changed `contract.tact.template` counter template to return remaining value from the message

## [0.20.0] - 2024-05-07

### Added
Expand Down
3 changes: 3 additions & 0 deletions src/templates/tact/counter/contracts/contract.tact.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ contract {{name}} with Deployable {

receive(msg: Add) {
self.counter += msg.amount;

// Notify the caller that the receiver was executed and forward remaining value back
self.notify("Cashback".asComment());
}

get fun counter(): Int {
Expand Down

0 comments on commit 5f13508

Please sign in to comment.