Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tact-lang/opcode

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tact-lang/opcode - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

5

CHANGELOG.md

@@ -8,2 +8,7 @@ # Changelog

## [0.0.7] - 2023-03-24
## Fixed
- Fix opcode offsets in shifted cells
## [0.0.6] - 2023-03-24

@@ -10,0 +15,0 @@

4

dist/decompiler/decompileAll.js

@@ -46,2 +46,3 @@ "use strict";

src: cell,
srcOffset: 0,
root: false,

@@ -65,2 +66,3 @@ writer: w,

src: body,
srcOffset: value.offset,
root: false,

@@ -124,2 +126,3 @@ writer: w,

src: c,
srcOffset: 0,
root: false,

@@ -157,2 +160,3 @@ writer: writer,

src,
srcOffset: 0,
root: true,

@@ -159,0 +163,0 @@ writer,

/// <reference types="node" />
import { Cell, Slice } from "ton-core";
import { OpCode } from "../codepage/opcodes.gen";
import { Maybe } from "../utils/maybe";
export type DecompiledOpCode = OpCode | {

@@ -15,3 +16,4 @@ code: 'unknown';

src: Cell | Slice | Buffer;
srcOffset?: Maybe<number>;
allowUnknown?: boolean;
}): DecompiledInstruction[];

5

dist/decompiler/decompiler.js

@@ -21,2 +21,3 @@ "use strict";

// Parse cell
let globalOffset = args.srcOffset || 0;
let scl = sc.remainingBits;

@@ -45,3 +46,3 @@ let sco = 0;

},
offset: currentOffset,
offset: currentOffset + globalOffset,
length: currentLength

@@ -58,3 +59,3 @@ });

op: opcode.read,
offset: currentOffset,
offset: currentOffset + globalOffset,
length: currentLength

@@ -61,0 +62,0 @@ });

{
"name": "@tact-lang/opcode",
"version": "0.0.6",
"version": "0.0.7",
"main": "dist/index.js",

@@ -5,0 +5,0 @@ "repository": "https://github.com/tact-lang/ton-opcode.git",

@@ -11,2 +11,3 @@ import { beginCell, BitReader, Cell, Dictionary, DictionaryValue } from "ton-core";

src: Cell,
srcOffset: number,
root: boolean,

@@ -58,2 +59,3 @@ writer: Writer,

src: cell,
srcOffset: 0,
root: false,

@@ -77,2 +79,3 @@ writer: w,

src: body,
srcOffset: value.offset,
root: false,

@@ -140,2 +143,3 @@ writer: w,

src: c,
srcOffset: 0,
root: false,

@@ -175,2 +179,3 @@ writer: writer,

src,
srcOffset: 0,
root: true,

@@ -177,0 +182,0 @@ writer,

import { beginCell, Cell, Slice } from "ton-core";
import { loadOpcode } from "../codepage/loadOpcode";
import { OpCode } from "../codepage/opcodes.gen";
import { Maybe } from "../utils/maybe";

@@ -12,3 +13,3 @@ export type DecompiledOpCode = OpCode | { code: 'unknown', data: Cell };

export function decompile(args: { src: Cell | Slice | Buffer, allowUnknown?: boolean }): DecompiledInstruction[] {
export function decompile(args: { src: Cell | Slice | Buffer, srcOffset?: Maybe<number>, allowUnknown?: boolean }): DecompiledInstruction[] {

@@ -29,2 +30,3 @@ // Result collection

// Parse cell
let globalOffset = args.srcOffset || 0;
let scl = sc.remainingBits;

@@ -56,3 +58,3 @@ let sco = 0;

},
offset: currentOffset,
offset: currentOffset + globalOffset,
length: currentLength

@@ -69,3 +71,3 @@ });

op: opcode.read,
offset: currentOffset,
offset: currentOffset + globalOffset,
length: currentLength

@@ -72,0 +74,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc