@ton/sandbox 0.26.0 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.27.0] - 2025-02-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Added better extra currency support
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
8
18
|
## [0.26.0] - 2025-02-12
|
|
9
19
|
|
|
10
20
|
### Changed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { Address, Cell, Contract, ContractGetMethodResult, ContractProvider, ContractState, Message, OpenedContract, Sender, SendMode, StateInit, Transaction, TupleItem } from "@ton/core";
|
|
2
|
+
import { Address, Cell, Contract, ContractGetMethodResult, ContractProvider, ContractState, ExtraCurrency, Message, OpenedContract, Sender, SendMode, StateInit, Transaction, TupleItem } from "@ton/core";
|
|
3
3
|
import { TickOrTock } from "../executor/Executor";
|
|
4
4
|
import { GetMethodResult, SmartContract } from "./SmartContract";
|
|
5
5
|
export interface SandboxContractProvider extends ContractProvider {
|
|
@@ -47,6 +47,7 @@ export declare class BlockchainContractProvider implements SandboxContractProvid
|
|
|
47
47
|
*/
|
|
48
48
|
internal(via: Sender, args: {
|
|
49
49
|
value: string | bigint;
|
|
50
|
+
extracurrency?: ExtraCurrency;
|
|
50
51
|
bounce?: boolean | null;
|
|
51
52
|
sendMode?: SendMode;
|
|
52
53
|
body?: string | Cell | null;
|
|
@@ -51,6 +51,7 @@ class BlockchainContractProvider {
|
|
|
51
51
|
const contract = await this.blockchain.getContract(this.address);
|
|
52
52
|
return {
|
|
53
53
|
balance: contract.balance,
|
|
54
|
+
extracurrency: contract.ec,
|
|
54
55
|
last: {
|
|
55
56
|
lt: contract.lastTransactionLt,
|
|
56
57
|
hash: bigintToBuffer(contract.lastTransactionHash),
|
|
@@ -111,6 +112,7 @@ class BlockchainContractProvider {
|
|
|
111
112
|
to: this.address,
|
|
112
113
|
value,
|
|
113
114
|
bounce,
|
|
115
|
+
extracurrency: args.extracurrency,
|
|
114
116
|
sendMode: args.sendMode,
|
|
115
117
|
init,
|
|
116
118
|
body,
|
|
@@ -20,7 +20,7 @@ class BlockchainSender {
|
|
|
20
20
|
bounced: false,
|
|
21
21
|
src: this.address,
|
|
22
22
|
dest: args.to,
|
|
23
|
-
value: { coins: args.value },
|
|
23
|
+
value: { coins: args.value, other: args.extracurrency ? (0, core_1.packExtraCurrencyDict)(args.extracurrency) : undefined },
|
|
24
24
|
forwardFee: 0n,
|
|
25
25
|
createdAt: 0,
|
|
26
26
|
createdLt: 0n,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ton/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0",
|
|
4
4
|
"description": "TON transaction emulator",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"url": "git+https://github.com/ton-org/sandbox"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@ton/core": "^0.
|
|
16
|
+
"@ton/core": "^0.60.1",
|
|
17
17
|
"@ton/crypto": "3.3.0",
|
|
18
18
|
"@ton/test-utils": "^0.3.1",
|
|
19
|
-
"@ton/ton": "^15.
|
|
19
|
+
"@ton/ton": "^15.2.1",
|
|
20
20
|
"@types/jest": "^29.5.0",
|
|
21
21
|
"@types/node": "^18.15.11",
|
|
22
22
|
"jest": "^29.5.0",
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"typescript": "^4.9.5"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@ton/core": ">=0.58.1",
|
|
29
28
|
"@ton/crypto": ">=3.3.0"
|
|
30
29
|
},
|
|
31
30
|
"scripts": {
|