@tact-lang/opcode
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -8,2 +8,5 @@ # Changelog | ||
## [0.0.9] - 2023-03-24 | ||
- Fix oppcode length in shifted cells | ||
## [0.0.8] - 2023-03-24 | ||
@@ -10,0 +13,0 @@ |
@@ -20,9 +20,9 @@ "use strict"; | ||
} | ||
// Parse cell | ||
let scl = sc.remainingBits; | ||
// Prepare offset | ||
let sco = args.srcOffset || 0; | ||
// Skip offset | ||
if (args.srcOffset && args.srcOffset > 0) { | ||
sc.skip(args.srcOffset); | ||
} | ||
// Prepare remaining tracker | ||
let scl = sc.remainingBits; | ||
while (sc.remainingBits > 0) { | ||
@@ -29,0 +29,0 @@ // Load opcode |
{ | ||
"name": "@tact-lang/opcode", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/tact-lang/ton-opcode.git", |
import { decompileAll } from "./decompileAll"; | ||
import * as fs from 'fs'; | ||
import { Printer } from "./printer"; | ||
@@ -33,2 +34,12 @@ describe('decompileAll', () => { | ||
expect(res).toMatchSnapshot(); | ||
// Check internals | ||
let printer: Printer = (src) => { | ||
if (typeof src === 'string') { | ||
return src; | ||
} | ||
return JSON.stringify({ op: src.op, hash: src.hash, offset: src.offset, length: src.length, }); | ||
}; | ||
let snap = decompileAll({ src: wallet, printer }); | ||
expect(snap).toMatchSnapshot(); | ||
}); | ||
@@ -35,0 +46,0 @@ |
@@ -28,7 +28,4 @@ import { beginCell, Cell, Slice } from "ton-core"; | ||
// Parse cell | ||
let scl = sc.remainingBits; | ||
// Prepare offset | ||
let sco = args.srcOffset || 0; | ||
// Skip offset | ||
if (args.srcOffset && args.srcOffset > 0) { | ||
@@ -38,2 +35,5 @@ sc.skip(args.srcOffset); | ||
// Prepare remaining tracker | ||
let scl = sc.remainingBits; | ||
while (sc.remainingBits > 0) { | ||
@@ -40,0 +40,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6064627
5894