Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace VM2 with isolated-vm #8

Merged
merged 13 commits into from
Nov 2, 2023
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"graphql-yoga": "^3.6.0",
"hamt-sharding": "^3.0.2",
"hive-tx": "^4.3.0",
"isolated-vm": "^4.6.0",
"it-pushable": "^1.4.2",
"k-bucket": "^5.1.0",
"key-did-provider-ed25519": "^1.1.0",
Expand All @@ -48,7 +49,6 @@
"tiny-secp256k1": "^2.2.3",
"uuid": "^8.3.2",
"varuint-bitcoin": "^1.1.2",
"vm2": "^3.9.19",
"winston": "^3.8.2",
"xor-distance": "^2.0.0"
},
Expand All @@ -74,10 +74,10 @@
"build:clear": "rimraf & tsc",
"contracts:deploy": "node --experimental-specifier-resolution=node --max-old-space-size=3072 --loader ts-node/esm src/transactions/scriptDeployContract.ts",
"contracts:compile": "cd contracts && live-tsc --src . --dest ./ -p ../live-tsc.json",
"ts-node": "node --experimental-specifier-resolution=node --max-old-space-size=3072 --loader ts-node/esm",
"start": "node --experimental-specifier-resolution=node --max-old-space-size=3072 dist/index.js",
"start:benchmark": "nodemon --exec \"node --experimental-specifier-resolution=node --max-old-space-size=3072 --loader ts-node/esm\" src/benchmarkVm.ts",
"dev": "nodemon --exec \"node --experimental-specifier-resolution=node --max-old-space-size=3072 --loader ts-node/esm\" src/index.ts",
"ts-node": "node --experimental-specifier-resolution=node --max-old-space-size=3072 --no-node-snapshot --loader ts-node/esm",
"start": "node --experimental-specifier-resolution=node --max-old-space-size=3072 --no-node-snapshot dist/index.js",
"start:benchmark": "nodemon --exec \"node --experimental-specifier-resolution=node --max-old-space-size=3072 --no-node-snapshot --loader ts-node/esm\" src/benchmarkVm.ts",
"dev": "nodemon --exec \"node --experimental-specifier-resolution=node --max-old-space-size=3072 --no-node-snapshot --loader ts-node/esm\" src/index.ts",
"lint:fix": "eslint --fix \"src/**/*.{ts,tsx}\"",
"lint": "eslint \"src/**/*.{ts,tsx}\"",
"test:report": "sensible-browser ./coverage/lcov-report/index.html",
Expand Down
1 change: 0 additions & 1 deletion src/services/chainBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Collection } from 'mongodb'
import networks from './networks'
import { WitnessService } from './witness'
import type PQueue from 'p-queue'
import { VMScript } from 'vm2'
import * as vm from 'vm';
import Pushable from 'it-pushable'
import { CommitmentStatus, Contract, ContractCommitment } from '../types/contracts'
Expand Down