Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

@neo-one/node-vm

Package Overview
Dependencies
55
Maintainers
4
Versions
149
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-preview3.1 to 3.0.1-preview3

23

CHANGELOG.json

@@ -5,2 +5,25 @@ {

{
"version": "3.0.0",
"tag": "@neo-one/node-vm_v3.0.0",
"date": "Tue, 08 Dec 2020 19:29:01 GMT",
"comments": {
"major": [
{
"comment": "3.0.0preview3-alpha release bump"
}
],
"dependency": [
{
"comment": "Updating dependency \"@neo-one/node-core\" from `^2.7.0` to `^3.0.0`"
},
{
"comment": "Updating dependency \"@neo-one/client-common\" from `^2.7.0` to `^3.0.0`"
},
{
"comment": "Updating dependency \"@neo-one/utils\" from `^2.6.1` to `^3.0.0`"
}
]
}
},
{
"version": "2.7.0",

@@ -7,0 +30,0 @@ "tag": "@neo-one/node-vm_v2.7.0",

9

CHANGELOG.md
# Change Log - @neo-one/node-vm
This log was last generated on Thu, 23 Jul 2020 22:11:12 GMT and should not be manually modified.
This log was last generated on Tue, 08 Dec 2020 19:29:01 GMT and should not be manually modified.
## 3.0.0
Tue, 08 Dec 2020 19:29:01 GMT
### Breaking changes
- 3.0.0preview3-alpha release bump
## 2.7.0

@@ -6,0 +13,0 @@ Thu, 23 Jul 2020 22:11:12 GMT

9

dist/cjs/ApplicationEngine.d.ts
/// <reference types="node" />
import { VMState } from '@neo-one/client-common';
import { CallFlags, SerializableContainer, SnapshotName, TriggerType } from '@neo-one/node-core';
import { TriggerType, VMState } from '@neo-one/client-common';
import { CallFlags, SerializableContainer, SnapshotName } from '@neo-one/node-core';
import BN from 'bn.js';
import { EngineMethods } from './Methods';

@@ -10,3 +11,3 @@ import { DispatcherFunc } from './types';

readonly snapshot?: SnapshotName;
readonly gas: number;
readonly gas: BN;
readonly testMode: boolean;

@@ -21,3 +22,3 @@ }

get trigger(): TriggerType;
get gasConsumed(): number;
get gasConsumed(): BN;
get state(): VMState;

@@ -24,0 +25,0 @@ get resultStack(): readonly import("@neo-one/node-core").StackItem[];

@@ -15,3 +15,3 @@ "use strict";

get trigger() {
return node_core_1.TriggerType[this.dispatch({
return client_common_1.TriggerType[this.dispatch({
method: 'gettrigger',

@@ -21,7 +21,10 @@ })];

get gasConsumed() {
return client_common_1.common
.fixed8ToDecimal(new bn_js_1.BN(this.dispatch({
method: 'getgasconsumed',
})))
.toNumber();
try {
return new bn_js_1.BN(this.dispatch({
method: 'getgasconsumed',
}));
}
catch (_a) {
return new bn_js_1.BN(-1);
}
}

@@ -49,3 +52,3 @@ get state() {

container: container ? node_core_1.serializeScriptContainer(container) : undefined,
gas: client_common_1.common.fixed8FromDecimal(gas.toString()).toString(),
gas: gas.toString(),
snapshot,

@@ -52,0 +55,0 @@ testMode,

@@ -42,3 +42,3 @@ "use strict";

case 'Integer':
return new node_core_1.IntegerStackItem(new bn_js_1.BN(item.value));
return new node_core_1.IntegerStackItem(new bn_js_1.BN(item.value, 'le'));
default:

@@ -45,0 +45,0 @@ throw new Error(`invalid stack item when parsing, found type ${item}`);

/// <reference types="node" />
import { VMState } from '@neo-one/client-common';
import { CallFlags, SerializedScriptContainer, SnapshotName, TriggerType } from '@neo-one/node-core';
import { TriggerType, VMState } from '@neo-one/client-common';
import { CallFlags, SerializedScriptContainer, SnapshotName } from '@neo-one/node-core';
import { StackItemReturn } from '../converters';

@@ -5,0 +5,0 @@ import { DefaultMethods, DispatchMethod } from '../types';

/// <reference types="node" />
import { VMState } from '@neo-one/client-common';
import { CallFlags, SerializableContainer, SnapshotName, TriggerType } from '@neo-one/node-core';
import { TriggerType, VMState } from '@neo-one/client-common';
import { CallFlags, SerializableContainer, SnapshotName } from '@neo-one/node-core';
import BN from 'bn.js';
import { EngineMethods } from './Methods';

@@ -10,3 +11,3 @@ import { DispatcherFunc } from './types';

readonly snapshot?: SnapshotName;
readonly gas: number;
readonly gas: BN;
readonly testMode: boolean;

@@ -21,3 +22,3 @@ }

get trigger(): TriggerType;
get gasConsumed(): number;
get gasConsumed(): BN;
get state(): VMState;

@@ -24,0 +25,0 @@ get resultStack(): readonly import("@neo-one/node-core/dist/esm").StackItem[];

@@ -1,3 +0,3 @@

import { common, VMState } from '@neo-one/client-common';
import { CallFlags, serializeScriptContainer, TriggerType, } from '@neo-one/node-core';
import { TriggerType, VMState } from '@neo-one/client-common';
import { CallFlags, serializeScriptContainer } from '@neo-one/node-core';
import BN from 'bn.js';

@@ -16,7 +16,10 @@ import _ from 'lodash';

get gasConsumed() {
return common
.fixed8ToDecimal(new BN(this.dispatch({
method: 'getgasconsumed',
})))
.toNumber();
try {
return new BN(this.dispatch({
method: 'getgasconsumed',
}));
}
catch {
return new BN(-1);
}
}

@@ -44,3 +47,3 @@ get state() {

container: container ? serializeScriptContainer(container) : undefined,
gas: common.fixed8FromDecimal(gas.toString()).toString(),
gas: gas.toString(),
snapshot,

@@ -47,0 +50,0 @@ testMode,

@@ -39,3 +39,3 @@ import { ArrayStackItem, BooleanStackItem, BufferStackItem, ByteStringStackItem, IntegerStackItem, InteropInterface, MapStackItem, NullStackItem, PointerStackItem, StructStackItem, } from '@neo-one/node-core';

case 'Integer':
return new IntegerStackItem(new BN(item.value));
return new IntegerStackItem(new BN(item.value, 'le'));
default:

@@ -42,0 +42,0 @@ throw new Error(`invalid stack item when parsing, found type ${item}`);

/// <reference types="node" />
import { VMState } from '@neo-one/client-common';
import { CallFlags, SerializedScriptContainer, SnapshotName, TriggerType } from '@neo-one/node-core';
import { TriggerType, VMState } from '@neo-one/client-common';
import { CallFlags, SerializedScriptContainer, SnapshotName } from '@neo-one/node-core';
import { StackItemReturn } from '../converters';

@@ -5,0 +5,0 @@ import { DefaultMethods, DispatchMethod } from '../types';

{
"name": "@neo-one/node-vm",
"version": "3.0.0-preview3.1",
"version": "3.0.1-preview3",
"description": "NEO•ONE C# Wrapper for neo3 VM",

@@ -17,5 +17,5 @@ "main": "./dist/cjs/index",

"@neo-one/edge": "^15.0.0",
"@neo-one/node-core": "3.0.0-preview3.1",
"@neo-one/client-common": "3.0.0-preview3.1",
"@neo-one/utils": "3.0.0-preview3.1",
"@neo-one/node-core": "3.0.1-preview3",
"@neo-one/client-common": "3.0.1-preview3",
"@neo-one/utils": "3.0.1-preview3",
"bn.js": "^5.0.0"

@@ -22,0 +22,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc