Skip to content

Commit

Permalink
fix: send mode 16 not working
Browse files Browse the repository at this point in the history
chore: bump version, changelog
  • Loading branch information
krigga committed Apr 27, 2024
1 parent c856e2d commit 06479e3
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 3 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).

## [0.19.0] - 2024-04-27

### Fixed

- Fixed a bug in the emulator that caused send mode 16 to not properly work

## [0.18.0] - 2024-04-23

### Changed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ton/sandbox",
"version": "0.18.0",
"version": "0.19.0",
"description": "TON transaction emulator",
"main": "dist/index.js",
"license": "MIT",
Expand Down
32 changes: 32 additions & 0 deletions src/blockchain/Blockchain.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -669,4 +669,36 @@ describe('Blockchain', () => {

expect(res.stackReader.readBigNumber()).toEqual(40000n)
})

it('should bounce in action phase when send mode = 16', async () => {
const blockchain = await Blockchain.create()
const addr = randomAddress()
await blockchain.setShardAccount(addr, createShardAccount({
address: addr,
code: Cell.fromBase64('te6cckEBAgEAOwABFP8A9KQT9LzyyAsBAFjTbDEgxwCRMODTHzDAAY4bcIAYyMsF+CjPFoIjjX6kxoAA+gLLasmAEPsA3jGRSXg='),
data: new Cell(),
balance: toNano('1'),
}))

const from = randomAddress()
const res = await blockchain.sendMessage(internal({
from,
to: addr,
value: toNano('1'),
bounce: true,
body: beginCell().storeUint(1, 32).endCell(),
}))

expect(res.transactions).toHaveTransaction({
on: addr,
from,
exitCode: 0,
})

expect(res.transactions).toHaveTransaction({
from: addr,
on: from,
inMessageBounced: true,
})
})
})
2 changes: 1 addition & 1 deletion src/executor/emulator-emscripten.js

Large diffs are not rendered by default.

Binary file modified src/executor/emulator-emscripten.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion src/executor/emulator-emscripten.wasm.js

Large diffs are not rendered by default.

0 comments on commit 06479e3

Please sign in to comment.