@tact-lang/opcode
Advanced tools
Comparing version 0.0.15 to 0.0.16
@@ -10,2 +10,12 @@ # Changelog | ||
## [0.0.16] - 2024-07-21 | ||
### Added | ||
- Test decompilation of the binary produced for [`mathlib.fc`](https://github.com/ton-blockchain/ton/blob/5c392e0f2d946877bb79a09ed35068f7b0bd333a/crypto/smartcont/mathlib.fc): PR [#16](https://github.com/tact-lang/ton-opcode/pull/16) | ||
### Fixed | ||
- Division instructions parsing: PR [#16](https://github.com/tact-lang/ton-opcode/pull/16) | ||
## [0.0.15] - 2024-06-09 | ||
@@ -12,0 +22,0 @@ |
@@ -127,3 +127,3 @@ import { Cell } from '@ton/core'; | ||
code: 'DIV'; | ||
args: [boolean, number, boolean, number, number]; | ||
args: [boolean, number, boolean, number, number, number]; | ||
} | { | ||
@@ -130,0 +130,0 @@ code: 'LSHIFT'; |
@@ -332,2 +332,3 @@ "use strict"; | ||
CP0Auto.insertHex('a8', 8, { code: 'MUL' }); | ||
// #A9 m:uint1 s:uint2 cdft:(Either [ d:uint2 f:uint2 ] [ d:uint2 f:uint2 tt:uint8 ]) | ||
CP0Auto.insertHex('A9', 8, (slice) => { | ||
@@ -339,3 +340,3 @@ let m = slice.loadBit(); | ||
let f = slice.loadUint(2); | ||
return { code: 'DIV', args: [m, s, c, d, f] }; | ||
return { code: 'DIV', args: [m, s, c, d, f, c ? slice.loadUint(8) : 0] }; | ||
}); | ||
@@ -342,0 +343,0 @@ // 11079680 (DUMMY) |
{ | ||
"name": "@tact-lang/opcode", | ||
"version": "0.0.15", | ||
"version": "0.0.16", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/tact-lang/ton-opcode.git", |
@@ -45,3 +45,3 @@ import { Cell } from '@ton/core'; | ||
| { code: 'MULCONST', args: [number] } | ||
| { code: 'DIV', args: [boolean, number, boolean, number, number] } | ||
| { code: 'DIV', args: [boolean, number, boolean, number, number, number] } | ||
| { code: 'LSHIFT', args: [number] } | ||
@@ -48,0 +48,0 @@ | { code: 'RSHIFT', args: [number] } |
@@ -332,2 +332,4 @@ import { beginCell, Cell, Slice } from '@ton/core'; | ||
CP0Auto.insertHex('a8', 8, { code: 'MUL' }); | ||
// #A9 m:uint1 s:uint2 cdft:(Either [ d:uint2 f:uint2 ] [ d:uint2 f:uint2 tt:uint8 ]) | ||
CP0Auto.insertHex('A9', 8, (slice) => { | ||
@@ -339,3 +341,3 @@ let m = slice.loadBit(); | ||
let f = slice.loadUint(2); | ||
return { code: 'DIV', args: [m, s, c, d, f] }; | ||
return { code: 'DIV', args: [m, s, c, d, f, c ? slice.loadUint(8) : 0] }; | ||
}); | ||
@@ -342,0 +344,0 @@ // 11079680 (DUMMY) |
@@ -67,2 +67,8 @@ import { decompileAll } from "./decompileAll"; | ||
}); | ||
it('should decompile mathlib.fc', () => { | ||
const mathlib = fs.readFileSync(__dirname + '/__testdata__/mathlib.boc'); | ||
let res = decompileAll({ src: mathlib }); | ||
expect(res).toMatchSnapshot(); | ||
}); | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6177283
72
6534
0