Skip to content

Commit

Permalink
feat: getVersion method
Browse files Browse the repository at this point in the history
chore: bump version
  • Loading branch information
krigga committed Jul 29, 2024
1 parent 8ffd73c commit 95b38a3
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ton/sandbox",
"version": "0.21.0-beta.0",
"version": "0.21.0-beta.1",
"description": "TON transaction emulator",
"main": "dist/index.js",
"license": "MIT",
Expand Down
11 changes: 11 additions & 0 deletions src/executor/Executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,17 @@ export class Executor implements IExecutor {
])
}

getVersion(): { commitHash: string, commitDate: string } {
const v: {
emulatorLibCommitHash: string,
emulatorLibCommitDate: string,
} = JSON.parse(this.extractString(this.invoke('_version', [])));
return {
commitHash: v.emulatorLibCommitHash,
commitDate: v.emulatorLibCommitDate,
};
}

private createEmulator(config: string, verbosity: number) {
if (this.emulator !== undefined) {
this.invoke('_destroy_emulator', [this.emulator.ptr]);
Expand Down
2 changes: 1 addition & 1 deletion src/executor/emulator-emscripten.js

Large diffs are not rendered by default.

Binary file modified src/executor/emulator-emscripten.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion src/executor/emulator-emscripten.wasm.js

Large diffs are not rendered by default.

0 comments on commit 95b38a3

Please sign in to comment.