@ton/sandbox 0.43.0 → 0.44.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/dist/coverage/collect.js
CHANGED
|
@@ -4,12 +4,12 @@ exports.collectAsmCoverage = collectAsmCoverage;
|
|
|
4
4
|
exports.collectTxsCoverage = collectTxsCoverage;
|
|
5
5
|
const core_1 = require("@ton/core");
|
|
6
6
|
const data_1 = require("./data");
|
|
7
|
-
const
|
|
7
|
+
const tasm_1 = require("@ton/tasm");
|
|
8
8
|
function collectAsmCoverage(cell, logs) {
|
|
9
9
|
const [cleanCell, mapping] = recompileCell(cell);
|
|
10
|
-
const info =
|
|
11
|
-
const traceInfos =
|
|
12
|
-
const assembly =
|
|
10
|
+
const info = tasm_1.trace.createMappingInfo(mapping);
|
|
11
|
+
const traceInfos = tasm_1.trace.createTraceInfoPerTransaction(logs, info, undefined);
|
|
12
|
+
const assembly = tasm_1.text.print(tasm_1.runtime.decompileCell(cleanCell));
|
|
13
13
|
const combinedTrace = { steps: traceInfos.flatMap(trace => trace.steps) };
|
|
14
14
|
const combinedLines = (0, data_1.buildLineInfo)(combinedTrace, assembly);
|
|
15
15
|
return {
|
|
@@ -18,13 +18,13 @@ function collectAsmCoverage(cell, logs) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
function recompileCell(cell) {
|
|
21
|
-
const instructionsWithoutPositions =
|
|
22
|
-
const assemblyForPositions =
|
|
23
|
-
const parseResult =
|
|
21
|
+
const instructionsWithoutPositions = tasm_1.runtime.decompileCell(cell);
|
|
22
|
+
const assemblyForPositions = tasm_1.text.print(instructionsWithoutPositions);
|
|
23
|
+
const parseResult = tasm_1.text.parse("out.tasm", assemblyForPositions);
|
|
24
24
|
if (parseResult.$ === "ParseFailure") {
|
|
25
25
|
throw new Error("Cannot parse resulting text Assembly");
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return tasm_1.runtime.compileCellWithMapping(parseResult.instructions);
|
|
28
28
|
}
|
|
29
29
|
function collectTxsCoverage(code, address, transactions) {
|
|
30
30
|
const results = [];
|
package/dist/coverage/data.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { runtime } from "ton
|
|
1
|
+
import { runtime } from "@ton/tasm";
|
|
2
2
|
import type { TupleReader } from "@ton/core";
|
|
3
3
|
import type { ContractGetMethodResult } from "@ton/core/dist/contract/ContractProvider";
|
|
4
4
|
export type ExtendedGetResult = ContractGetMethodResult & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.executeInstructions = executeInstructions;
|
|
4
|
-
const
|
|
4
|
+
const tasm_1 = require("@ton/tasm");
|
|
5
5
|
const core_1 = require("@ton/core");
|
|
6
6
|
const __1 = require("../../");
|
|
7
7
|
async function executeInstructions(code, id = 0) {
|
|
@@ -26,7 +26,7 @@ async function executeInstructions(code, id = 0) {
|
|
|
26
26
|
blockchain.verbosity.vmLogs = "vm_logs_verbose";
|
|
27
27
|
const treasure = await blockchain.treasury("treasure");
|
|
28
28
|
const init = {
|
|
29
|
-
code:
|
|
29
|
+
code: tasm_1.runtime.compileCell(code),
|
|
30
30
|
data: new core_1.Cell(),
|
|
31
31
|
};
|
|
32
32
|
const address = (0, core_1.contractAddress)(0, init);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ton/sandbox",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"description": "TON transaction emulator",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
},
|
|
62
62
|
"packageManager": "yarn@4.9.2",
|
|
63
63
|
"dependencies": {
|
|
64
|
+
"@ton/tasm": "0.6.1",
|
|
64
65
|
"chalk": "^4.1.2",
|
|
65
|
-
"table": "^6.9.0"
|
|
66
|
-
"ton-assembly": "0.6.1"
|
|
66
|
+
"table": "^6.9.0"
|
|
67
67
|
}
|
|
68
68
|
}
|