diff --git a/package.json b/package.json index 8c88226e..8c7635f5 100644 --- a/package.json +++ b/package.json @@ -25,11 +25,13 @@ "devDependencies": { "@agoric/internal": "0.4.0-u18.0", "@cosmjs/stargate": "^0.28.9", + "@endo/eventual-send": "^1.2.8", "@subql/cli": "^5.4.0", "@subql/node-cosmos": "^4.2.1", "@subql/testing": "latest", "execa": "^9.5.2", "prettier": "^3.4.2", + "ses": "^1.10.0", "starknet": "6.11.0", "typescript": "^5.7.2" }, diff --git a/scripts/changePrice.mjs b/scripts/changePrice.mjs old mode 100644 new mode 100755 index e72900b9..45fbaa7f --- a/scripts/changePrice.mjs +++ b/scripts/changePrice.mjs @@ -1,4 +1,5 @@ #! /usr/bin/env node +import './lockdown.mjs'; import { execa } from 'execa'; import { assertAllDefined } from '@agoric/internal'; diff --git a/scripts/checkLiquidation.mjs b/scripts/checkLiquidation.mjs index 9b8208ed..008f9ca6 100644 --- a/scripts/checkLiquidation.mjs +++ b/scripts/checkLiquidation.mjs @@ -76,7 +76,7 @@ const validate = async ({ apiUrl, maxRetries, retryDuration, expectations, filte for (const key of Object.keys(expectations)) { for (let i = 0; i < nodes.length; i++) { - equal(nodes[i][key], expectations[i].key); + equal(nodes[i][key], expectations[key][i]); } } diff --git a/scripts/createVault.mjs b/scripts/createVault.mjs index 241df2f2..563e1f67 100644 --- a/scripts/createVault.mjs +++ b/scripts/createVault.mjs @@ -1,4 +1,5 @@ #! /usr/bin/env node +import './lockdown.mjs'; import { execa } from 'execa'; import assert from 'node:assert/strict'; import { assertAllDefined } from '@agoric/internal'; diff --git a/scripts/lockdown.mjs b/scripts/lockdown.mjs new file mode 100644 index 00000000..76a83b63 --- /dev/null +++ b/scripts/lockdown.mjs @@ -0,0 +1,10 @@ +import 'ses'; +import '@endo/eventual-send/shim.js'; + +const options = { + overrideTaming: 'severe', + stackFiltering: 'verbose', + errorTaming: 'unsafe', +}; + +lockdown(options); diff --git a/scripts/placeBid.mjs b/scripts/placeBid.mjs index 8ee96e7a..a3e8f847 100644 --- a/scripts/placeBid.mjs +++ b/scripts/placeBid.mjs @@ -1,4 +1,5 @@ #! /usr/bin/env node +import './lockdown.mjs'; import { execa } from 'execa'; import assert from 'node:assert/strict'; import { assertAllDefined } from '@agoric/internal'; diff --git a/yarn.lock b/yarn.lock index 9b3c15a8..3d72bb34 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4321,6 +4321,7 @@ __metadata: dependencies: "@agoric/internal": "npm:0.4.0-u18.0" "@cosmjs/stargate": "npm:^0.28.9" + "@endo/eventual-send": "npm:^1.2.8" "@subql/cli": "npm:^5.4.0" "@subql/node-cosmos": "npm:^4.2.1" "@subql/testing": "npm:latest" @@ -4332,6 +4333,7 @@ __metadata: js-sha256: "npm:^0.11.0" pino: "npm:^7.8.0" prettier: "npm:^3.4.2" + ses: "npm:^1.10.0" starknet: "npm:6.11.0" typescript: "npm:^5.7.2" languageName: unknown