diff --git a/.gitignore b/.gitignore index 61b4007f..46941c6e 100644 --- a/.gitignore +++ b/.gitignore @@ -68,6 +68,7 @@ web_modules/ # Output of 'npm pack' *.tgz +!agoric-synthetic-chain-*.tgz # Yarn Integrity file .yarn-integrity diff --git a/proposals/34:upgrade-10/actions.js b/proposals/34:upgrade-10/actions.js index 2ec871e8..e679c98a 100644 --- a/proposals/34:upgrade-10/actions.js +++ b/proposals/34:upgrade-10/actions.js @@ -7,20 +7,20 @@ import { agops, agopsLocation, executeCommand, -} from '../../upgrade-test-scripts/lib/cliHelper.js'; +} from '@agoric/synthetic-chain/src/lib/cliHelper.js'; import { HOME, ATOM_DENOM, GOV1ADDR, GOV2ADDR, GOV3ADDR, -} from '../../upgrade-test-scripts/lib/constants.js'; +} from '@agoric/synthetic-chain/src/lib/constants.js'; import { waitForBlock, executeOffer, getUser, provisionSmartWallet, -} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; const govAccounts = [GOV1ADDR, GOV2ADDR, GOV3ADDR]; diff --git a/proposals/34:upgrade-10/agoric-synthetic-chain-v0.0.1-alpha.tgz b/proposals/34:upgrade-10/agoric-synthetic-chain-v0.0.1-alpha.tgz new file mode 100644 index 00000000..82a37bdc Binary files /dev/null and b/proposals/34:upgrade-10/agoric-synthetic-chain-v0.0.1-alpha.tgz differ diff --git a/proposals/34:upgrade-10/package.json b/proposals/34:upgrade-10/package.json index 86ead8e9..e481ba9a 100644 --- a/proposals/34:upgrade-10/package.json +++ b/proposals/34:upgrade-10/package.json @@ -8,6 +8,7 @@ "type": "module", "license": "Apache-2.0", "dependencies": { + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz", "ava": "^5.3.1", "better-sqlite3": "^8.5.1", "execa": "^7.2.0" diff --git a/proposals/34:upgrade-10/performActions.js b/proposals/34:upgrade-10/performActions.js index d256fa30..8d61564e 100644 --- a/proposals/34:upgrade-10/performActions.js +++ b/proposals/34:upgrade-10/performActions.js @@ -12,22 +12,22 @@ import { agd, agoric, agops, -} from '../../upgrade-test-scripts/lib/cliHelper.js'; +} from '@agoric/synthetic-chain/src/lib/cliHelper.js'; import { GOV1ADDR, GOV2ADDR, -} from '../../upgrade-test-scripts/lib/constants.js'; +} from '@agoric/synthetic-chain/src/lib/constants.js'; import { getUser, newOfferId, waitForBlock, -} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; import { submitDeliverInbound } from './upgradeHelpers.js'; import { openVault, adjustVault, closeVault, -} from '../../upgrade-test-scripts/lib/econHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/econHelpers.js'; const START_FREQUENCY = 600; // StartFrequency: 600s (auction runs every 10m) const CLOCK_STEP = 20; // ClockStep: 20s (ensures auction completes in time) diff --git a/proposals/34:upgrade-10/post.test.js b/proposals/34:upgrade-10/post.test.js index 873cf394..561a7f74 100644 --- a/proposals/34:upgrade-10/post.test.js +++ b/proposals/34:upgrade-10/post.test.js @@ -1,13 +1,13 @@ import test from 'ava'; -import { agd, agoric } from '../../upgrade-test-scripts/lib/cliHelper.js'; +import { agd, agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; import { GOV1ADDR, GOV2ADDR, GOV3ADDR, USER1ADDR, -} from '../../upgrade-test-scripts/lib/constants.js'; -import { calculateWalletState } from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/constants.js'; +import { calculateWalletState } from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; test('DeliverInbound from un-provisioned account is discarded', async t => { const result = await agd.query('swingset', 'mailbox', USER1ADDR); diff --git a/proposals/34:upgrade-10/pre.test.js b/proposals/34:upgrade-10/pre.test.js index 60d65fa3..75677b3d 100644 --- a/proposals/34:upgrade-10/pre.test.js +++ b/proposals/34:upgrade-10/pre.test.js @@ -6,19 +6,19 @@ import { agd, agoric, agops, -} from '../../upgrade-test-scripts/lib/cliHelper.js'; +} from '@agoric/synthetic-chain/src/lib/cliHelper.js'; import { GOV1ADDR, GOV2ADDR, GOV3ADDR, PSM_PAIR, -} from '../../upgrade-test-scripts/lib/constants.js'; -import { openVault } from '../../upgrade-test-scripts/lib/econHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/constants.js'; +import { openVault } from '@agoric/synthetic-chain/src/lib/econHelpers.js'; import { getUser, waitForBlock, -} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; test.before(async () => { console.log('Wait for upgrade to settle'); diff --git a/proposals/34:upgrade-10/upgradeHelpers.js b/proposals/34:upgrade-10/upgradeHelpers.js index 14817083..b0622c4c 100644 --- a/proposals/34:upgrade-10/upgradeHelpers.js +++ b/proposals/34:upgrade-10/upgradeHelpers.js @@ -8,10 +8,10 @@ import { VALIDATORADDR, USER1ADDR, CHAINID, -} from '../../upgrade-test-scripts/lib/constants.js'; +} from '@agoric/synthetic-chain/src/lib/constants.js'; -import { agd } from '../../upgrade-test-scripts/lib/cliHelper.js'; -import { getUser } from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +import { agd } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; +import { getUser } from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; export const printKeys = async () => { console.log('========== GOVERNANCE KEYS =========='); diff --git a/proposals/34:upgrade-10/yarn.lock b/proposals/34:upgrade-10/yarn.lock index 4c46ad3e..44afad1c 100644 --- a/proposals/34:upgrade-10/yarn.lock +++ b/proposals/34:upgrade-10/yarn.lock @@ -5,6 +5,171 @@ __metadata: version: 8 cacheKey: 10c0 +"@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.1-alpha + resolution: "@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz#./agoric-synthetic-chain-v0.0.1-alpha.tgz::hash=b9d229&locator=root-workspace-0b6124%40workspace%3A." + dependencies: + tsx: "npm:^3.12.8" + bin: + test-proposals: ./cli.ts + checksum: 222779b0c1a582f871f48c57387fae94cb9826459e7784ba66b8ccbcf21857732d8610c707261ca608b68e035558d4ed7465cde65434db3f25bb3d2cbb2be2f5 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm64@npm:0.18.20" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm@npm:0.18.20" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-x64@npm:0.18.20" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-arm64@npm:0.18.20" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-x64@npm:0.18.20" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-arm64@npm:0.18.20" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-x64@npm:0.18.20" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm64@npm:0.18.20" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm@npm:0.18.20" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ia32@npm:0.18.20" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-loong64@npm:0.18.20" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-mips64el@npm:0.18.20" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ppc64@npm:0.18.20" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-riscv64@npm:0.18.20" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-s390x@npm:0.18.20" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-x64@npm:0.18.20" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/netbsd-x64@npm:0.18.20" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/openbsd-x64@npm:0.18.20" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/sunos-x64@npm:0.18.20" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-arm64@npm:0.18.20" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-ia32@npm:0.18.20" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-x64@npm:0.18.20" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -332,6 +497,13 @@ __metadata: languageName: node linkType: hard +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 + languageName: node + linkType: hard + "buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" @@ -671,6 +843,83 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.18.20": + version: 0.18.20 + resolution: "esbuild@npm:0.18.20" + dependencies: + "@esbuild/android-arm": "npm:0.18.20" + "@esbuild/android-arm64": "npm:0.18.20" + "@esbuild/android-x64": "npm:0.18.20" + "@esbuild/darwin-arm64": "npm:0.18.20" + "@esbuild/darwin-x64": "npm:0.18.20" + "@esbuild/freebsd-arm64": "npm:0.18.20" + "@esbuild/freebsd-x64": "npm:0.18.20" + "@esbuild/linux-arm": "npm:0.18.20" + "@esbuild/linux-arm64": "npm:0.18.20" + "@esbuild/linux-ia32": "npm:0.18.20" + "@esbuild/linux-loong64": "npm:0.18.20" + "@esbuild/linux-mips64el": "npm:0.18.20" + "@esbuild/linux-ppc64": "npm:0.18.20" + "@esbuild/linux-riscv64": "npm:0.18.20" + "@esbuild/linux-s390x": "npm:0.18.20" + "@esbuild/linux-x64": "npm:0.18.20" + "@esbuild/netbsd-x64": "npm:0.18.20" + "@esbuild/openbsd-x64": "npm:0.18.20" + "@esbuild/sunos-x64": "npm:0.18.20" + "@esbuild/win32-arm64": "npm:0.18.20" + "@esbuild/win32-ia32": "npm:0.18.20" + "@esbuild/win32-x64": "npm:0.18.20" + dependenciesMeta: + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 473b1d92842f50a303cf948a11ebd5f69581cd254d599dd9d62f9989858e0533f64e83b723b5e1398a5b488c0f5fd088795b4235f65ecaf4f007d4b79f04bc88 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -840,7 +1089,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2": +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -850,7 +1099,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -873,6 +1122,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.2": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 169b2beababfbb16e8a0ae813ee59d3e14d4960231c816615161ab5be68ec07a394dce59695742ac84295e2efab8d9e89bcf3abaf5e253dfbec3496e01bb9a65 + languageName: node + linkType: hard + "github-from-package@npm:0.0.0": version: 0.0.0 resolution: "github-from-package@npm:0.0.0" @@ -1781,6 +2039,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -1799,6 +2064,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz" ava: "npm:^5.3.1" better-sqlite3: "npm:^8.5.1" execa: "npm:^7.2.0" @@ -1941,6 +2207,23 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:^0.5.21": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -2103,6 +2386,23 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^3.12.8": + version: 3.14.0 + resolution: "tsx@npm:3.14.0" + dependencies: + esbuild: "npm:~0.18.20" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.2" + source-map-support: "npm:^0.5.21" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: b6c938bdae9c656aef2aa0130ee6aa8f3487b5d411d5f7934b705c28ff44ab268db3dde123cf5237b4e5e2ab4441a0bad4b1a39e3ff2170d138538e44082f05d + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" diff --git a/proposals/43:upgrade-11/agoric-synthetic-chain-v0.0.1-alpha.tgz b/proposals/43:upgrade-11/agoric-synthetic-chain-v0.0.1-alpha.tgz new file mode 100644 index 00000000..82a37bdc Binary files /dev/null and b/proposals/43:upgrade-11/agoric-synthetic-chain-v0.0.1-alpha.tgz differ diff --git a/proposals/43:upgrade-11/package.json b/proposals/43:upgrade-11/package.json index 53813c5b..4058c86b 100644 --- a/proposals/43:upgrade-11/package.json +++ b/proposals/43:upgrade-11/package.json @@ -8,6 +8,7 @@ "type": "module", "license": "Apache-2.0", "dependencies": { + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz", "ava": "^5.3.1", "better-sqlite3": "^8.5.1", "execa": "^7.2.0" diff --git a/proposals/43:upgrade-11/performActions.js b/proposals/43:upgrade-11/performActions.js index b0d4fe72..bc838c12 100644 --- a/proposals/43:upgrade-11/performActions.js +++ b/proposals/43:upgrade-11/performActions.js @@ -3,13 +3,13 @@ // FIXME get TypeScript to resolve these, probably with lib:ES2022 import assert from 'node:assert/strict'; -import { agoric, agops } from '../../upgrade-test-scripts/lib/cliHelper.js'; -import { GOV1ADDR } from '../../upgrade-test-scripts/lib/constants.js'; +import { agoric, agops } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; +import { GOV1ADDR } from '@agoric/synthetic-chain/src/lib/constants.js'; import { openVault, adjustVault, closeVault, -} from '../../upgrade-test-scripts/lib/econHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/econHelpers.js'; console.log('Open Vaults'); diff --git a/proposals/43:upgrade-11/pre.test.js b/proposals/43:upgrade-11/pre.test.js index 9b704134..30ef67db 100644 --- a/proposals/43:upgrade-11/pre.test.js +++ b/proposals/43:upgrade-11/pre.test.js @@ -1,7 +1,7 @@ import test from 'ava'; -import { agd, agoric } from '../../upgrade-test-scripts/lib/cliHelper.js'; -import { waitForBlock } from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +import { agd, agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; +import { waitForBlock } from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; test.before(async () => { console.log('Wait for upgrade to settle'); diff --git a/proposals/43:upgrade-11/yarn.lock b/proposals/43:upgrade-11/yarn.lock index 4c46ad3e..44afad1c 100644 --- a/proposals/43:upgrade-11/yarn.lock +++ b/proposals/43:upgrade-11/yarn.lock @@ -5,6 +5,171 @@ __metadata: version: 8 cacheKey: 10c0 +"@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.1-alpha + resolution: "@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz#./agoric-synthetic-chain-v0.0.1-alpha.tgz::hash=b9d229&locator=root-workspace-0b6124%40workspace%3A." + dependencies: + tsx: "npm:^3.12.8" + bin: + test-proposals: ./cli.ts + checksum: 222779b0c1a582f871f48c57387fae94cb9826459e7784ba66b8ccbcf21857732d8610c707261ca608b68e035558d4ed7465cde65434db3f25bb3d2cbb2be2f5 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm64@npm:0.18.20" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm@npm:0.18.20" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-x64@npm:0.18.20" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-arm64@npm:0.18.20" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-x64@npm:0.18.20" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-arm64@npm:0.18.20" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-x64@npm:0.18.20" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm64@npm:0.18.20" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm@npm:0.18.20" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ia32@npm:0.18.20" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-loong64@npm:0.18.20" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-mips64el@npm:0.18.20" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ppc64@npm:0.18.20" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-riscv64@npm:0.18.20" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-s390x@npm:0.18.20" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-x64@npm:0.18.20" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/netbsd-x64@npm:0.18.20" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/openbsd-x64@npm:0.18.20" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/sunos-x64@npm:0.18.20" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-arm64@npm:0.18.20" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-ia32@npm:0.18.20" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-x64@npm:0.18.20" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -332,6 +497,13 @@ __metadata: languageName: node linkType: hard +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 + languageName: node + linkType: hard + "buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" @@ -671,6 +843,83 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.18.20": + version: 0.18.20 + resolution: "esbuild@npm:0.18.20" + dependencies: + "@esbuild/android-arm": "npm:0.18.20" + "@esbuild/android-arm64": "npm:0.18.20" + "@esbuild/android-x64": "npm:0.18.20" + "@esbuild/darwin-arm64": "npm:0.18.20" + "@esbuild/darwin-x64": "npm:0.18.20" + "@esbuild/freebsd-arm64": "npm:0.18.20" + "@esbuild/freebsd-x64": "npm:0.18.20" + "@esbuild/linux-arm": "npm:0.18.20" + "@esbuild/linux-arm64": "npm:0.18.20" + "@esbuild/linux-ia32": "npm:0.18.20" + "@esbuild/linux-loong64": "npm:0.18.20" + "@esbuild/linux-mips64el": "npm:0.18.20" + "@esbuild/linux-ppc64": "npm:0.18.20" + "@esbuild/linux-riscv64": "npm:0.18.20" + "@esbuild/linux-s390x": "npm:0.18.20" + "@esbuild/linux-x64": "npm:0.18.20" + "@esbuild/netbsd-x64": "npm:0.18.20" + "@esbuild/openbsd-x64": "npm:0.18.20" + "@esbuild/sunos-x64": "npm:0.18.20" + "@esbuild/win32-arm64": "npm:0.18.20" + "@esbuild/win32-ia32": "npm:0.18.20" + "@esbuild/win32-x64": "npm:0.18.20" + dependenciesMeta: + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 473b1d92842f50a303cf948a11ebd5f69581cd254d599dd9d62f9989858e0533f64e83b723b5e1398a5b488c0f5fd088795b4235f65ecaf4f007d4b79f04bc88 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -840,7 +1089,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2": +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -850,7 +1099,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -873,6 +1122,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.2": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 169b2beababfbb16e8a0ae813ee59d3e14d4960231c816615161ab5be68ec07a394dce59695742ac84295e2efab8d9e89bcf3abaf5e253dfbec3496e01bb9a65 + languageName: node + linkType: hard + "github-from-package@npm:0.0.0": version: 0.0.0 resolution: "github-from-package@npm:0.0.0" @@ -1781,6 +2039,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -1799,6 +2064,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz" ava: "npm:^5.3.1" better-sqlite3: "npm:^8.5.1" execa: "npm:^7.2.0" @@ -1941,6 +2207,23 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:^0.5.21": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -2103,6 +2386,23 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^3.12.8": + version: 3.14.0 + resolution: "tsx@npm:3.14.0" + dependencies: + esbuild: "npm:~0.18.20" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.2" + source-map-support: "npm:^0.5.21" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: b6c938bdae9c656aef2aa0130ee6aa8f3487b5d411d5f7934b705c28ff44ab268db3dde123cf5237b4e5e2ab4441a0bad4b1a39e3ff2170d138538e44082f05d + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" diff --git a/proposals/49:smart-wallet-nft/agoric-synthetic-chain-v0.0.1-alpha.tgz b/proposals/49:smart-wallet-nft/agoric-synthetic-chain-v0.0.1-alpha.tgz new file mode 100644 index 00000000..82a37bdc Binary files /dev/null and b/proposals/49:smart-wallet-nft/agoric-synthetic-chain-v0.0.1-alpha.tgz differ diff --git a/proposals/49:smart-wallet-nft/core-eval-support.js b/proposals/49:smart-wallet-nft/core-eval-support.js index 61910552..aa22c05e 100644 --- a/proposals/49:smart-wallet-nft/core-eval-support.js +++ b/proposals/49:smart-wallet-nft/core-eval-support.js @@ -3,13 +3,13 @@ import { Far, makeMarshal, makeTranslationTable, -} from '../../upgrade-test-scripts/lib/unmarshal.js'; -import { Fail, NonNullish } from '../../upgrade-test-scripts/lib/assert.js'; +} from '@agoric/synthetic-chain/src/lib/unmarshal.js'; +import { Fail, NonNullish } from '@agoric/synthetic-chain/src/lib/assert.js'; // TODO: factor out ambient authority from these // or at least allow caller to supply authority. -import { mintIST } from '../../upgrade-test-scripts/lib/econHelpers.js'; -import { agoric } from '../../upgrade-test-scripts/lib/cliHelper.js'; +import { mintIST } from '@agoric/synthetic-chain/src/lib/econHelpers.js'; +import { agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; // move to unmarshal.js? const makeBoardUnmarshal = () => { diff --git a/proposals/49:smart-wallet-nft/upgrade-wf.test.js b/proposals/49:smart-wallet-nft/upgrade-wf.test.js index 18a747d4..bb968a56 100644 --- a/proposals/49:smart-wallet-nft/upgrade-wf.test.js +++ b/proposals/49:smart-wallet-nft/upgrade-wf.test.js @@ -13,10 +13,10 @@ import { makeFileRW, makeWebCache, makeWebRd, -} from '../../upgrade-test-scripts/lib/webAsset.js'; -import { makeAgd } from '../../upgrade-test-scripts/lib/agd-lib.js'; -import { dbTool } from '../../upgrade-test-scripts/lib/vat-status.js'; -import { voteLatestProposalAndWait } from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/webAsset.js'; +import { makeAgd } from '@agoric/synthetic-chain/src/lib/agd-lib.js'; +import { dbTool } from '@agoric/synthetic-chain/src/lib/vat-status.js'; +import { voteLatestProposalAndWait } from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; import { bundleDetail, ensureISTForInstall, @@ -29,7 +29,7 @@ import { import { agoric, wellKnownIdentities, -} from '../../upgrade-test-scripts/lib/cliHelper.js'; +} from '@agoric/synthetic-chain/src/lib/cliHelper.js'; /** @typedef {Awaited>} TestContext */ /** @type {import('ava').TestFn}} */ @@ -50,7 +50,12 @@ const assetInfo = { /** @type {Record} */ buildAssets: { 'upgrade-walletFactory-proposal': { - evals: [{ permit: 'upgrade-walletFactory-permit.json', script: 'upgrade-walletFactory.js' }], + evals: [ + { + permit: 'upgrade-walletFactory-permit.json', + script: 'upgrade-walletFactory.js', + }, + ], bundles: [ // entry: upgrade-walletFactory-proposal.js 'b1-e229e4bb6c8720016d92116e3dccaebec20a43699d5547a1c815f8710985ba897e825cbe4cd5b80c1d9d674f086bcaf3981b82a0d5546a095542c14174d5f942.json', @@ -301,5 +306,5 @@ test.serial('core eval proposal passes', async t => { }); test.skip('walletFactory installation was not changed', async t => { - // upgrading wf should not have updated agoricNames.installation, but it did. + // upgrading wf should not have updated agoricNames.installation, but it did. }); diff --git a/proposals/53:kread-start/agoric-synthetic-chain-v0.0.1-alpha.tgz b/proposals/53:kread-start/agoric-synthetic-chain-v0.0.1-alpha.tgz new file mode 100644 index 00000000..82a37bdc Binary files /dev/null and b/proposals/53:kread-start/agoric-synthetic-chain-v0.0.1-alpha.tgz differ diff --git a/proposals/53:kread-start/core-eval-support.js b/proposals/53:kread-start/core-eval-support.js index d27d76e5..71ecc257 100644 --- a/proposals/53:kread-start/core-eval-support.js +++ b/proposals/53:kread-start/core-eval-support.js @@ -3,13 +3,13 @@ import { Far, makeMarshal, makeTranslationTable, -} from '../../upgrade-test-scripts/lib/unmarshal.js'; -import { Fail, NonNullish } from '../../upgrade-test-scripts/lib/assert.js'; +} from '@agoric/synthetic-chain/src/lib/unmarshal.js'; +import { Fail, NonNullish } from '@agoric/synthetic-chain/src/lib/assert.js'; // TODO: factor out ambient authority from these // or at least allow caller to supply authority. -import { mintIST } from '../../upgrade-test-scripts/lib/econHelpers.js'; -import { agoric } from '../../upgrade-test-scripts/lib/cliHelper.js'; +import { mintIST } from '@agoric/synthetic-chain/src/lib/econHelpers.js'; +import { agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; // move to unmarshal.js? const makeBoardUnmarshal = () => { diff --git a/proposals/53:kread-start/mn2-start.test.js b/proposals/53:kread-start/mn2-start.test.js index 0432b585..f8c76a80 100644 --- a/proposals/53:kread-start/mn2-start.test.js +++ b/proposals/53:kread-start/mn2-start.test.js @@ -27,20 +27,20 @@ import dbOpenAmbient from 'better-sqlite3'; import { agoric, wellKnownIdentities, -} from '../../upgrade-test-scripts/lib/cliHelper.js'; +} from '@agoric/synthetic-chain/src/lib/cliHelper.js'; import { provisionSmartWallet, voteLatestProposalAndWait, waitForBlock, -} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; -import { makeAgd } from '../../upgrade-test-scripts/lib/agd-lib.js'; -import { dbTool } from '../../upgrade-test-scripts/lib/vat-status.js'; +import { makeAgd } from '@agoric/synthetic-chain/src/lib/agd-lib.js'; +import { dbTool } from '@agoric/synthetic-chain/src/lib/vat-status.js'; import { makeFileRW, makeWebCache, makeWebRd, -} from '../../upgrade-test-scripts/lib/webAsset.js'; +} from '@agoric/synthetic-chain/src/lib/webAsset.js'; import { bundleDetail, ensureISTForInstall, diff --git a/proposals/53:kread-start/package.json b/proposals/53:kread-start/package.json index a7c82063..4b073535 100644 --- a/proposals/53:kread-start/package.json +++ b/proposals/53:kread-start/package.json @@ -5,6 +5,7 @@ "type": "module", "license": "Apache-2.0", "dependencies": { + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz", "@endo/zip": "^0.2.35", "ava": "^5.3.1", "better-sqlite3": "^8.5.1", diff --git a/proposals/53:kread-start/yarn.lock b/proposals/53:kread-start/yarn.lock index 42763199..f0fab8a7 100644 --- a/proposals/53:kread-start/yarn.lock +++ b/proposals/53:kread-start/yarn.lock @@ -5,6 +5,17 @@ __metadata: version: 8 cacheKey: 10c0 +"@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.1-alpha + resolution: "@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz#./agoric-synthetic-chain-v0.0.1-alpha.tgz::hash=b9d229&locator=root-workspace-0b6124%40workspace%3A." + dependencies: + tsx: "npm:^3.12.8" + bin: + test-proposals: ./cli.ts + checksum: 222779b0c1a582f871f48c57387fae94cb9826459e7784ba66b8ccbcf21857732d8610c707261ca608b68e035558d4ed7465cde65434db3f25bb3d2cbb2be2f5 + languageName: node + linkType: hard + "@endo/zip@npm:^0.2.35": version: 0.2.35 resolution: "@endo/zip@npm:0.2.35" @@ -12,6 +23,160 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm64@npm:0.18.20" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm@npm:0.18.20" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-x64@npm:0.18.20" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-arm64@npm:0.18.20" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-x64@npm:0.18.20" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-arm64@npm:0.18.20" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-x64@npm:0.18.20" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm64@npm:0.18.20" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm@npm:0.18.20" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ia32@npm:0.18.20" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-loong64@npm:0.18.20" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-mips64el@npm:0.18.20" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ppc64@npm:0.18.20" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-riscv64@npm:0.18.20" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-s390x@npm:0.18.20" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-x64@npm:0.18.20" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/netbsd-x64@npm:0.18.20" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/openbsd-x64@npm:0.18.20" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/sunos-x64@npm:0.18.20" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-arm64@npm:0.18.20" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-ia32@npm:0.18.20" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-x64@npm:0.18.20" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -349,6 +514,13 @@ __metadata: languageName: node linkType: hard +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 + languageName: node + linkType: hard + "buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" @@ -695,6 +867,83 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.18.20": + version: 0.18.20 + resolution: "esbuild@npm:0.18.20" + dependencies: + "@esbuild/android-arm": "npm:0.18.20" + "@esbuild/android-arm64": "npm:0.18.20" + "@esbuild/android-x64": "npm:0.18.20" + "@esbuild/darwin-arm64": "npm:0.18.20" + "@esbuild/darwin-x64": "npm:0.18.20" + "@esbuild/freebsd-arm64": "npm:0.18.20" + "@esbuild/freebsd-x64": "npm:0.18.20" + "@esbuild/linux-arm": "npm:0.18.20" + "@esbuild/linux-arm64": "npm:0.18.20" + "@esbuild/linux-ia32": "npm:0.18.20" + "@esbuild/linux-loong64": "npm:0.18.20" + "@esbuild/linux-mips64el": "npm:0.18.20" + "@esbuild/linux-ppc64": "npm:0.18.20" + "@esbuild/linux-riscv64": "npm:0.18.20" + "@esbuild/linux-s390x": "npm:0.18.20" + "@esbuild/linux-x64": "npm:0.18.20" + "@esbuild/netbsd-x64": "npm:0.18.20" + "@esbuild/openbsd-x64": "npm:0.18.20" + "@esbuild/sunos-x64": "npm:0.18.20" + "@esbuild/win32-arm64": "npm:0.18.20" + "@esbuild/win32-ia32": "npm:0.18.20" + "@esbuild/win32-x64": "npm:0.18.20" + dependenciesMeta: + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 473b1d92842f50a303cf948a11ebd5f69581cd254d599dd9d62f9989858e0533f64e83b723b5e1398a5b488c0f5fd088795b4235f65ecaf4f007d4b79f04bc88 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -871,7 +1120,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2": +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -881,7 +1130,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -904,6 +1153,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.2": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 169b2beababfbb16e8a0ae813ee59d3e14d4960231c816615161ab5be68ec07a394dce59695742ac84295e2efab8d9e89bcf3abaf5e253dfbec3496e01bb9a65 + languageName: node + linkType: hard + "github-from-package@npm:0.0.0": version: 0.0.0 resolution: "github-from-package@npm:0.0.0" @@ -1852,6 +2110,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -1881,6 +2146,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz" "@endo/zip": "npm:^0.2.35" ava: "npm:^5.3.1" better-sqlite3: "npm:^8.5.1" @@ -2025,6 +2291,23 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:^0.5.21": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -2196,6 +2479,23 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^3.12.8": + version: 3.14.0 + resolution: "tsx@npm:3.14.0" + dependencies: + esbuild: "npm:~0.18.20" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.2" + source-map-support: "npm:^0.5.21" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: b6c938bdae9c656aef2aa0130ee6aa8f3487b5d411d5f7934b705c28ff44ab268db3dde123cf5237b4e5e2ab4441a0bad4b1a39e3ff2170d138538e44082f05d + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" diff --git a/proposals/55:statom-vaults/add-collateral.test.js b/proposals/55:statom-vaults/add-collateral.test.js index 9744d53c..09fb503c 100644 --- a/proposals/55:statom-vaults/add-collateral.test.js +++ b/proposals/55:statom-vaults/add-collateral.test.js @@ -13,10 +13,10 @@ import { makeFileRW, makeWebCache, makeWebRd, -} from '../../upgrade-test-scripts/lib/webAsset.js'; -import { makeAgd } from '../../upgrade-test-scripts/lib/agd-lib.js'; -import { dbTool } from '../../upgrade-test-scripts/lib/vat-status.js'; -import { voteLatestProposalAndWait } from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/webAsset.js'; +import { makeAgd } from '@agoric/synthetic-chain/src/lib/agd-lib.js'; +import { dbTool } from '@agoric/synthetic-chain/src/lib/vat-status.js'; +import { voteLatestProposalAndWait } from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; import { bundleDetail, ensureISTForInstall, @@ -29,7 +29,7 @@ import { import { agoric, wellKnownIdentities, -} from '../../upgrade-test-scripts/lib/cliHelper.js'; +} from '@agoric/synthetic-chain/src/lib/cliHelper.js'; /** @typedef {Awaited>} TestContext */ /** @type {import('ava').TestFn}} */ diff --git a/proposals/55:statom-vaults/agoric-synthetic-chain-v0.0.1-alpha.tgz b/proposals/55:statom-vaults/agoric-synthetic-chain-v0.0.1-alpha.tgz new file mode 100644 index 00000000..82a37bdc Binary files /dev/null and b/proposals/55:statom-vaults/agoric-synthetic-chain-v0.0.1-alpha.tgz differ diff --git a/proposals/55:statom-vaults/core-eval-support.js b/proposals/55:statom-vaults/core-eval-support.js index 61910552..aa22c05e 100644 --- a/proposals/55:statom-vaults/core-eval-support.js +++ b/proposals/55:statom-vaults/core-eval-support.js @@ -3,13 +3,13 @@ import { Far, makeMarshal, makeTranslationTable, -} from '../../upgrade-test-scripts/lib/unmarshal.js'; -import { Fail, NonNullish } from '../../upgrade-test-scripts/lib/assert.js'; +} from '@agoric/synthetic-chain/src/lib/unmarshal.js'; +import { Fail, NonNullish } from '@agoric/synthetic-chain/src/lib/assert.js'; // TODO: factor out ambient authority from these // or at least allow caller to supply authority. -import { mintIST } from '../../upgrade-test-scripts/lib/econHelpers.js'; -import { agoric } from '../../upgrade-test-scripts/lib/cliHelper.js'; +import { mintIST } from '@agoric/synthetic-chain/src/lib/econHelpers.js'; +import { agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; // move to unmarshal.js? const makeBoardUnmarshal = () => { diff --git a/proposals/63:upgrade-12/agoric-synthetic-chain-v0.0.1-alpha.tgz b/proposals/63:upgrade-12/agoric-synthetic-chain-v0.0.1-alpha.tgz new file mode 100644 index 00000000..82a37bdc Binary files /dev/null and b/proposals/63:upgrade-12/agoric-synthetic-chain-v0.0.1-alpha.tgz differ diff --git a/proposals/63:upgrade-12/package.json b/proposals/63:upgrade-12/package.json index 62567749..3ebadced 100644 --- a/proposals/63:upgrade-12/package.json +++ b/proposals/63:upgrade-12/package.json @@ -8,6 +8,7 @@ "type": "module", "license": "Apache-2.0", "dependencies": { + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz", "ava": "^5.3.1", "execa": "^7.2.0" }, diff --git a/proposals/63:upgrade-12/post.test.js b/proposals/63:upgrade-12/post.test.js index 9aa1af59..4e844b6d 100644 --- a/proposals/63:upgrade-12/post.test.js +++ b/proposals/63:upgrade-12/post.test.js @@ -1,6 +1,6 @@ import test from 'ava'; -import { agd } from '../../upgrade-test-scripts/lib/cliHelper.js'; +import { agd } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; test('Ensure MaxBytes param was updated', async t => { const { value: rawParams } = await agd.query( diff --git a/proposals/63:upgrade-12/yarn.lock b/proposals/63:upgrade-12/yarn.lock index 7dd389c9..ff38d352 100644 --- a/proposals/63:upgrade-12/yarn.lock +++ b/proposals/63:upgrade-12/yarn.lock @@ -5,6 +5,171 @@ __metadata: version: 8 cacheKey: 10c0 +"@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.1-alpha + resolution: "@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz#./agoric-synthetic-chain-v0.0.1-alpha.tgz::hash=b9d229&locator=root-workspace-0b6124%40workspace%3A." + dependencies: + tsx: "npm:^3.12.8" + bin: + test-proposals: ./cli.ts + checksum: 222779b0c1a582f871f48c57387fae94cb9826459e7784ba66b8ccbcf21857732d8610c707261ca608b68e035558d4ed7465cde65434db3f25bb3d2cbb2be2f5 + languageName: node + linkType: hard + +"@esbuild/android-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm64@npm:0.18.20" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm@npm:0.18.20" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-x64@npm:0.18.20" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-arm64@npm:0.18.20" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-x64@npm:0.18.20" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-arm64@npm:0.18.20" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-x64@npm:0.18.20" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm64@npm:0.18.20" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm@npm:0.18.20" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ia32@npm:0.18.20" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-loong64@npm:0.18.20" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-mips64el@npm:0.18.20" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ppc64@npm:0.18.20" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-riscv64@npm:0.18.20" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-s390x@npm:0.18.20" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-x64@npm:0.18.20" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/netbsd-x64@npm:0.18.20" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/openbsd-x64@npm:0.18.20" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/sunos-x64@npm:0.18.20" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-arm64@npm:0.18.20" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-ia32@npm:0.18.20" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-x64@npm:0.18.20" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -294,6 +459,13 @@ __metadata: languageName: node linkType: hard +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 + languageName: node + linkType: hard + "cacache@npm:^18.0.0": version: 18.0.1 resolution: "cacache@npm:18.0.1" @@ -584,6 +756,83 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.18.20": + version: 0.18.20 + resolution: "esbuild@npm:0.18.20" + dependencies: + "@esbuild/android-arm": "npm:0.18.20" + "@esbuild/android-arm64": "npm:0.18.20" + "@esbuild/android-x64": "npm:0.18.20" + "@esbuild/darwin-arm64": "npm:0.18.20" + "@esbuild/darwin-x64": "npm:0.18.20" + "@esbuild/freebsd-arm64": "npm:0.18.20" + "@esbuild/freebsd-x64": "npm:0.18.20" + "@esbuild/linux-arm": "npm:0.18.20" + "@esbuild/linux-arm64": "npm:0.18.20" + "@esbuild/linux-ia32": "npm:0.18.20" + "@esbuild/linux-loong64": "npm:0.18.20" + "@esbuild/linux-mips64el": "npm:0.18.20" + "@esbuild/linux-ppc64": "npm:0.18.20" + "@esbuild/linux-riscv64": "npm:0.18.20" + "@esbuild/linux-s390x": "npm:0.18.20" + "@esbuild/linux-x64": "npm:0.18.20" + "@esbuild/netbsd-x64": "npm:0.18.20" + "@esbuild/openbsd-x64": "npm:0.18.20" + "@esbuild/sunos-x64": "npm:0.18.20" + "@esbuild/win32-arm64": "npm:0.18.20" + "@esbuild/win32-ia32": "npm:0.18.20" + "@esbuild/win32-x64": "npm:0.18.20" + dependenciesMeta: + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 473b1d92842f50a303cf948a11ebd5f69581cd254d599dd9d62f9989858e0533f64e83b723b5e1398a5b488c0f5fd088795b4235f65ecaf4f007d4b79f04bc88 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -732,7 +981,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2": +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -742,7 +991,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -765,6 +1014,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.2": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 169b2beababfbb16e8a0ae813ee59d3e14d4960231c816615161ab5be68ec07a394dce59695742ac84295e2efab8d9e89bcf3abaf5e253dfbec3496e01bb9a65 + languageName: node + linkType: hard + "glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" @@ -1542,6 +1800,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -1560,6 +1825,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz" ava: "npm:^5.3.1" execa: "npm:^7.2.0" languageName: unknown @@ -1676,6 +1942,23 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:^0.5.21": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -1797,6 +2080,23 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^3.12.8": + version: 3.14.0 + resolution: "tsx@npm:3.14.0" + dependencies: + esbuild: "npm:~0.18.20" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.2" + source-map-support: "npm:^0.5.21" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: b6c938bdae9c656aef2aa0130ee6aa8f3487b5d411d5f7934b705c28ff44ab268db3dde123cf5237b4e5e2ab4441a0bad4b1a39e3ff2170d138538e44082f05d + languageName: node + linkType: hard + "type-fest@npm:^0.13.1": version: 0.13.1 resolution: "type-fest@npm:0.13.1" diff --git a/proposals/b:zoe1/agoric-synthetic-chain-v0.0.1-alpha.tgz b/proposals/b:zoe1/agoric-synthetic-chain-v0.0.1-alpha.tgz new file mode 100644 index 00000000..82a37bdc Binary files /dev/null and b/proposals/b:zoe1/agoric-synthetic-chain-v0.0.1-alpha.tgz differ diff --git a/proposals/b:zoe1/core-eval-support.js b/proposals/b:zoe1/core-eval-support.js index 61910552..aa22c05e 100644 --- a/proposals/b:zoe1/core-eval-support.js +++ b/proposals/b:zoe1/core-eval-support.js @@ -3,13 +3,13 @@ import { Far, makeMarshal, makeTranslationTable, -} from '../../upgrade-test-scripts/lib/unmarshal.js'; -import { Fail, NonNullish } from '../../upgrade-test-scripts/lib/assert.js'; +} from '@agoric/synthetic-chain/src/lib/unmarshal.js'; +import { Fail, NonNullish } from '@agoric/synthetic-chain/src/lib/assert.js'; // TODO: factor out ambient authority from these // or at least allow caller to supply authority. -import { mintIST } from '../../upgrade-test-scripts/lib/econHelpers.js'; -import { agoric } from '../../upgrade-test-scripts/lib/cliHelper.js'; +import { mintIST } from '@agoric/synthetic-chain/src/lib/econHelpers.js'; +import { agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; // move to unmarshal.js? const makeBoardUnmarshal = () => { diff --git a/proposals/b:zoe1/package.json b/proposals/b:zoe1/package.json index 99ec844f..62c38591 100644 --- a/proposals/b:zoe1/package.json +++ b/proposals/b:zoe1/package.json @@ -5,6 +5,7 @@ "type": "module", "license": "Apache-2.0", "dependencies": { + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz", "@endo/zip": "^0.2.35", "ava": "^5.3.1", "better-sqlite3": "^8.5.1", diff --git a/proposals/b:zoe1/performActions.ts b/proposals/b:zoe1/performActions.ts index f616b43c..9b8de9f4 100755 --- a/proposals/b:zoe1/performActions.ts +++ b/proposals/b:zoe1/performActions.ts @@ -9,11 +9,11 @@ import { ZipReader } from '@endo/zip'; import dbOpen from 'better-sqlite3'; import assert from 'assert'; -import { makeAgd } from '../../upgrade-test-scripts/lib/agd-lib.js'; -import { agoric } from '../../upgrade-test-scripts/lib/cliHelper.js'; -import { voteLatestProposalAndWait } from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; -import { dbTool } from '../../upgrade-test-scripts/lib/vat-status.js'; -import { type WebCache } from '../../upgrade-test-scripts/lib/webAsset.js'; +import { makeAgd } from '@agoric/synthetic-chain/src/lib/agd-lib.js'; +import { agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; +import { voteLatestProposalAndWait } from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; +import { dbTool } from '@agoric/synthetic-chain/src/lib/vat-status.js'; +import { type WebCache } from '@agoric/synthetic-chain/src/lib/webAsset.js'; import { type ProposalInfo, bundleDetail, diff --git a/proposals/b:zoe1/post.test.js b/proposals/b:zoe1/post.test.js index 16f8024c..9803dcab 100644 --- a/proposals/b:zoe1/post.test.js +++ b/proposals/b:zoe1/post.test.js @@ -1,5 +1,5 @@ import test from 'ava'; -import { getIncarnation } from '../../upgrade-test-scripts/lib/vat-status.js'; +import { getIncarnation } from '@agoric/synthetic-chain/src/lib/vat-status.js'; test(`Zoe vat was upgraded`, async t => { const incarantion = await getIncarnation('zoe'); diff --git a/proposals/b:zoe1/yarn.lock b/proposals/b:zoe1/yarn.lock index 42763199..f0fab8a7 100644 --- a/proposals/b:zoe1/yarn.lock +++ b/proposals/b:zoe1/yarn.lock @@ -5,6 +5,17 @@ __metadata: version: 8 cacheKey: 10c0 +"@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.1-alpha + resolution: "@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz#./agoric-synthetic-chain-v0.0.1-alpha.tgz::hash=b9d229&locator=root-workspace-0b6124%40workspace%3A." + dependencies: + tsx: "npm:^3.12.8" + bin: + test-proposals: ./cli.ts + checksum: 222779b0c1a582f871f48c57387fae94cb9826459e7784ba66b8ccbcf21857732d8610c707261ca608b68e035558d4ed7465cde65434db3f25bb3d2cbb2be2f5 + languageName: node + linkType: hard + "@endo/zip@npm:^0.2.35": version: 0.2.35 resolution: "@endo/zip@npm:0.2.35" @@ -12,6 +23,160 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm64@npm:0.18.20" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm@npm:0.18.20" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-x64@npm:0.18.20" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-arm64@npm:0.18.20" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-x64@npm:0.18.20" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-arm64@npm:0.18.20" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-x64@npm:0.18.20" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm64@npm:0.18.20" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm@npm:0.18.20" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ia32@npm:0.18.20" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-loong64@npm:0.18.20" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-mips64el@npm:0.18.20" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ppc64@npm:0.18.20" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-riscv64@npm:0.18.20" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-s390x@npm:0.18.20" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-x64@npm:0.18.20" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/netbsd-x64@npm:0.18.20" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/openbsd-x64@npm:0.18.20" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/sunos-x64@npm:0.18.20" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-arm64@npm:0.18.20" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-ia32@npm:0.18.20" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-x64@npm:0.18.20" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -349,6 +514,13 @@ __metadata: languageName: node linkType: hard +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 + languageName: node + linkType: hard + "buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" @@ -695,6 +867,83 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.18.20": + version: 0.18.20 + resolution: "esbuild@npm:0.18.20" + dependencies: + "@esbuild/android-arm": "npm:0.18.20" + "@esbuild/android-arm64": "npm:0.18.20" + "@esbuild/android-x64": "npm:0.18.20" + "@esbuild/darwin-arm64": "npm:0.18.20" + "@esbuild/darwin-x64": "npm:0.18.20" + "@esbuild/freebsd-arm64": "npm:0.18.20" + "@esbuild/freebsd-x64": "npm:0.18.20" + "@esbuild/linux-arm": "npm:0.18.20" + "@esbuild/linux-arm64": "npm:0.18.20" + "@esbuild/linux-ia32": "npm:0.18.20" + "@esbuild/linux-loong64": "npm:0.18.20" + "@esbuild/linux-mips64el": "npm:0.18.20" + "@esbuild/linux-ppc64": "npm:0.18.20" + "@esbuild/linux-riscv64": "npm:0.18.20" + "@esbuild/linux-s390x": "npm:0.18.20" + "@esbuild/linux-x64": "npm:0.18.20" + "@esbuild/netbsd-x64": "npm:0.18.20" + "@esbuild/openbsd-x64": "npm:0.18.20" + "@esbuild/sunos-x64": "npm:0.18.20" + "@esbuild/win32-arm64": "npm:0.18.20" + "@esbuild/win32-ia32": "npm:0.18.20" + "@esbuild/win32-x64": "npm:0.18.20" + dependenciesMeta: + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 473b1d92842f50a303cf948a11ebd5f69581cd254d599dd9d62f9989858e0533f64e83b723b5e1398a5b488c0f5fd088795b4235f65ecaf4f007d4b79f04bc88 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -871,7 +1120,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2": +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -881,7 +1130,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -904,6 +1153,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.2": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 169b2beababfbb16e8a0ae813ee59d3e14d4960231c816615161ab5be68ec07a394dce59695742ac84295e2efab8d9e89bcf3abaf5e253dfbec3496e01bb9a65 + languageName: node + linkType: hard + "github-from-package@npm:0.0.0": version: 0.0.0 resolution: "github-from-package@npm:0.0.0" @@ -1852,6 +2110,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -1881,6 +2146,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz" "@endo/zip": "npm:^0.2.35" ava: "npm:^5.3.1" better-sqlite3: "npm:^8.5.1" @@ -2025,6 +2291,23 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:^0.5.21": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -2196,6 +2479,23 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^3.12.8": + version: 3.14.0 + resolution: "tsx@npm:3.14.0" + dependencies: + esbuild: "npm:~0.18.20" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.2" + source-map-support: "npm:^0.5.21" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: b6c938bdae9c656aef2aa0130ee6aa8f3487b5d411d5f7934b705c28ff44ab268db3dde123cf5237b4e5e2ab4441a0bad4b1a39e3ff2170d138538e44082f05d + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" diff --git a/proposals/c:crabble-start/agoric-synthetic-chain-v0.0.1-alpha.tgz b/proposals/c:crabble-start/agoric-synthetic-chain-v0.0.1-alpha.tgz new file mode 100644 index 00000000..82a37bdc Binary files /dev/null and b/proposals/c:crabble-start/agoric-synthetic-chain-v0.0.1-alpha.tgz differ diff --git a/proposals/c:crabble-start/core-eval-support.js b/proposals/c:crabble-start/core-eval-support.js index d27d76e5..71ecc257 100644 --- a/proposals/c:crabble-start/core-eval-support.js +++ b/proposals/c:crabble-start/core-eval-support.js @@ -3,13 +3,13 @@ import { Far, makeMarshal, makeTranslationTable, -} from '../../upgrade-test-scripts/lib/unmarshal.js'; -import { Fail, NonNullish } from '../../upgrade-test-scripts/lib/assert.js'; +} from '@agoric/synthetic-chain/src/lib/unmarshal.js'; +import { Fail, NonNullish } from '@agoric/synthetic-chain/src/lib/assert.js'; // TODO: factor out ambient authority from these // or at least allow caller to supply authority. -import { mintIST } from '../../upgrade-test-scripts/lib/econHelpers.js'; -import { agoric } from '../../upgrade-test-scripts/lib/cliHelper.js'; +import { mintIST } from '@agoric/synthetic-chain/src/lib/econHelpers.js'; +import { agoric } from '@agoric/synthetic-chain/src/lib/cliHelper.js'; // move to unmarshal.js? const makeBoardUnmarshal = () => { diff --git a/proposals/c:crabble-start/package.json b/proposals/c:crabble-start/package.json index a7c82063..4b073535 100644 --- a/proposals/c:crabble-start/package.json +++ b/proposals/c:crabble-start/package.json @@ -5,6 +5,7 @@ "type": "module", "license": "Apache-2.0", "dependencies": { + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz", "@endo/zip": "^0.2.35", "ava": "^5.3.1", "better-sqlite3": "^8.5.1", diff --git a/proposals/c:crabble-start/test-crabble-start.js b/proposals/c:crabble-start/test-crabble-start.js index 5a2ce77d..ad370d87 100644 --- a/proposals/c:crabble-start/test-crabble-start.js +++ b/proposals/c:crabble-start/test-crabble-start.js @@ -27,19 +27,19 @@ import dbOpenAmbient from 'better-sqlite3'; import { agoric, wellKnownIdentities, -} from '../../upgrade-test-scripts/lib/cliHelper.js'; +} from '@agoric/synthetic-chain/src/lib/cliHelper.js'; import { provisionSmartWallet, voteLatestProposalAndWait, waitForBlock, -} from '../../upgrade-test-scripts/lib/commonUpgradeHelpers.js'; +} from '@agoric/synthetic-chain/src/lib/commonUpgradeHelpers.js'; -import { makeAgd } from '../../upgrade-test-scripts/lib/agd-lib.js'; -import { dbTool } from '../../upgrade-test-scripts/lib/vat-status.js'; +import { makeAgd } from '@agoric/synthetic-chain/src/lib/agd-lib.js'; +import { dbTool } from '@agoric/synthetic-chain/src/lib/vat-status.js'; import { makeFileRd, makeFileRW, -} from '../../upgrade-test-scripts/lib/webAsset.js'; +} from '@agoric/synthetic-chain/src/lib/webAsset.js'; import { ensureISTForInstall, flags, @@ -58,13 +58,10 @@ const assetInfo = { buildAssets: { crabbleCoreEvalInfo: { evals: [ - { permit: 'crabble-permit.json', script: 'crabbleCoreEval.js' }, - { permit: 'gov-permit.json', script: 'govStarting.js' }, - ], - bundles: [ - 'bundle-contract.json', - 'bundle-governor.json', + { permit: 'crabble-permit.json', script: 'crabbleCoreEval.js' }, + { permit: 'gov-permit.json', script: 'govStarting.js' }, ], + bundles: ['bundle-contract.json', 'bundle-governor.json'], }, }, }; @@ -182,7 +179,7 @@ test.before(async t => (t.context = await makeTestContext())); test.serial(`pre-flight: not in agoricNames.instance`, async t => { const { config, agoric } = t.context; const { instance: target } = config; - console.log({ config, agoric }) + console.log({ config, agoric }); const { instance } = await wellKnownIdentities({ agoric }); testIncludes(t, target, Object.keys(instance), 'instance keys', false); }); @@ -364,7 +361,7 @@ test.serial('core eval proposal passes', async t => { ], { from, chainId, yes: true }, ); - console.log('RESULT', { result }) + console.log('RESULT', { result }); t.log(txAbbr(result)); t.is(result.code, 0); @@ -402,7 +399,6 @@ test.serial(`agoricNames.instance is populated`, async t => { }; const checkForInstance = async () => { - const { instance } = await wellKnownIdentities({ agoric }); const present = Object.keys(instance); return present.includes(target); @@ -432,7 +428,7 @@ test.serial('crabble governance is present', async t => { 'children', 'published.crabble', ]); - console.log({ children }) + console.log({ children }); testIncludes(t, 'governance', children, 'crabble committee'); }); // diff --git a/proposals/c:crabble-start/yarn.lock b/proposals/c:crabble-start/yarn.lock index 1e19d9e7..3afe3209 100644 --- a/proposals/c:crabble-start/yarn.lock +++ b/proposals/c:crabble-start/yarn.lock @@ -5,6 +5,17 @@ __metadata: version: 8 cacheKey: 10c0 +"@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz::locator=root-workspace-0b6124%40workspace%3A.": + version: 0.0.1-alpha + resolution: "@agoric/synthetic-chain@file:./agoric-synthetic-chain-v0.0.1-alpha.tgz#./agoric-synthetic-chain-v0.0.1-alpha.tgz::hash=b9d229&locator=root-workspace-0b6124%40workspace%3A." + dependencies: + tsx: "npm:^3.12.8" + bin: + test-proposals: ./cli.ts + checksum: 222779b0c1a582f871f48c57387fae94cb9826459e7784ba66b8ccbcf21857732d8610c707261ca608b68e035558d4ed7465cde65434db3f25bb3d2cbb2be2f5 + languageName: node + linkType: hard + "@endo/zip@npm:^0.2.35": version: 0.2.35 resolution: "@endo/zip@npm:0.2.35" @@ -12,6 +23,160 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm64@npm:0.18.20" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/android-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-arm@npm:0.18.20" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@esbuild/android-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/android-x64@npm:0.18.20" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/darwin-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-arm64@npm:0.18.20" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/darwin-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/darwin-x64@npm:0.18.20" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/freebsd-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-arm64@npm:0.18.20" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/freebsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/freebsd-x64@npm:0.18.20" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/linux-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm64@npm:0.18.20" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/linux-arm@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-arm@npm:0.18.20" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@esbuild/linux-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ia32@npm:0.18.20" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/linux-loong64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-loong64@npm:0.18.20" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + +"@esbuild/linux-mips64el@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-mips64el@npm:0.18.20" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + +"@esbuild/linux-ppc64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-ppc64@npm:0.18.20" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + +"@esbuild/linux-riscv64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-riscv64@npm:0.18.20" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + +"@esbuild/linux-s390x@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-s390x@npm:0.18.20" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + +"@esbuild/linux-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/linux-x64@npm:0.18.20" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/netbsd-x64@npm:0.18.20" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/openbsd-x64@npm:0.18.20" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/sunos-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/sunos-x64@npm:0.18.20" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/win32-arm64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-arm64@npm:0.18.20" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@esbuild/win32-ia32@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-ia32@npm:0.18.20" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@esbuild/win32-x64@npm:0.18.20": + version: 0.18.20 + resolution: "@esbuild/win32-x64@npm:0.18.20" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@isaacs/cliui@npm:^8.0.2": version: 8.0.2 resolution: "@isaacs/cliui@npm:8.0.2" @@ -349,6 +514,13 @@ __metadata: languageName: node linkType: hard +"buffer-from@npm:^1.0.0": + version: 1.1.2 + resolution: "buffer-from@npm:1.1.2" + checksum: 124fff9d66d691a86d3b062eff4663fe437a9d9ee4b47b1b9e97f5a5d14f6d5399345db80f796827be7c95e70a8e765dd404b7c3ff3b3324f98e9b0c8826cc34 + languageName: node + linkType: hard + "buffer@npm:^5.5.0": version: 5.7.1 resolution: "buffer@npm:5.7.1" @@ -695,6 +867,83 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.18.20": + version: 0.18.20 + resolution: "esbuild@npm:0.18.20" + dependencies: + "@esbuild/android-arm": "npm:0.18.20" + "@esbuild/android-arm64": "npm:0.18.20" + "@esbuild/android-x64": "npm:0.18.20" + "@esbuild/darwin-arm64": "npm:0.18.20" + "@esbuild/darwin-x64": "npm:0.18.20" + "@esbuild/freebsd-arm64": "npm:0.18.20" + "@esbuild/freebsd-x64": "npm:0.18.20" + "@esbuild/linux-arm": "npm:0.18.20" + "@esbuild/linux-arm64": "npm:0.18.20" + "@esbuild/linux-ia32": "npm:0.18.20" + "@esbuild/linux-loong64": "npm:0.18.20" + "@esbuild/linux-mips64el": "npm:0.18.20" + "@esbuild/linux-ppc64": "npm:0.18.20" + "@esbuild/linux-riscv64": "npm:0.18.20" + "@esbuild/linux-s390x": "npm:0.18.20" + "@esbuild/linux-x64": "npm:0.18.20" + "@esbuild/netbsd-x64": "npm:0.18.20" + "@esbuild/openbsd-x64": "npm:0.18.20" + "@esbuild/sunos-x64": "npm:0.18.20" + "@esbuild/win32-arm64": "npm:0.18.20" + "@esbuild/win32-ia32": "npm:0.18.20" + "@esbuild/win32-x64": "npm:0.18.20" + dependenciesMeta: + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 473b1d92842f50a303cf948a11ebd5f69581cd254d599dd9d62f9989858e0533f64e83b723b5e1398a5b488c0f5fd088795b4235f65ecaf4f007d4b79f04bc88 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -871,7 +1120,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:~2.3.2": +"fsevents@npm:~2.3.2, fsevents@npm:~2.3.3": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -881,7 +1130,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.3#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -904,6 +1153,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.2": + version: 4.7.2 + resolution: "get-tsconfig@npm:4.7.2" + dependencies: + resolve-pkg-maps: "npm:^1.0.0" + checksum: 169b2beababfbb16e8a0ae813ee59d3e14d4960231c816615161ab5be68ec07a394dce59695742ac84295e2efab8d9e89bcf3abaf5e253dfbec3496e01bb9a65 + languageName: node + linkType: hard + "github-from-package@npm:0.0.0": version: 0.0.0 resolution: "github-from-package@npm:0.0.0" @@ -1852,6 +2110,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: fb8f7bbe2ca281a73b7ef423a1cbc786fb244bd7a95cbe5c3fba25b27d327150beca8ba02f622baea65919a57e061eb5005204daa5f93ed590d9b77463a567ab + languageName: node + linkType: hard + "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -1881,6 +2146,7 @@ __metadata: version: 0.0.0-use.local resolution: "root-workspace-0b6124@workspace:." dependencies: + "@agoric/synthetic-chain": "file:./agoric-synthetic-chain-v0.0.1-alpha.tgz" "@endo/zip": "npm:^0.2.35" ava: "npm:^5.3.1" better-sqlite3: "npm:^8.5.1" @@ -2025,6 +2291,23 @@ __metadata: languageName: node linkType: hard +"source-map-support@npm:^0.5.21": + version: 0.5.21 + resolution: "source-map-support@npm:0.5.21" + dependencies: + buffer-from: "npm:^1.0.0" + source-map: "npm:^0.6.0" + checksum: 9ee09942f415e0f721d6daad3917ec1516af746a8120bba7bb56278707a37f1eb8642bde456e98454b8a885023af81a16e646869975f06afc1a711fb90484e7d + languageName: node + linkType: hard + +"source-map@npm:^0.6.0": + version: 0.6.1 + resolution: "source-map@npm:0.6.1" + checksum: ab55398007c5e5532957cb0beee2368529618ac0ab372d789806f5718123cc4367d57de3904b4e6a4170eb5a0b0f41373066d02ca0735a0c4d75c7d328d3e011 + languageName: node + linkType: hard + "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -2196,6 +2479,23 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^3.12.8": + version: 3.14.0 + resolution: "tsx@npm:3.14.0" + dependencies: + esbuild: "npm:~0.18.20" + fsevents: "npm:~2.3.3" + get-tsconfig: "npm:^4.7.2" + source-map-support: "npm:^0.5.21" + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: b6c938bdae9c656aef2aa0130ee6aa8f3487b5d411d5f7934b705c28ff44ab268db3dde123cf5237b4e5e2ab4441a0bad4b1a39e3ff2170d138538e44082f05d + languageName: node + linkType: hard + "tunnel-agent@npm:^0.6.0": version: 0.6.0 resolution: "tunnel-agent@npm:0.6.0" diff --git a/upgrade-test-scripts/install_deps.sh b/upgrade-test-scripts/install_deps.sh index f6ac8632..e0e6b11b 100755 --- a/upgrade-test-scripts/install_deps.sh +++ b/upgrade-test-scripts/install_deps.sh @@ -14,10 +14,6 @@ yarn --version # Run where this script is cd "$(dirname "$(realpath -- "$0")")" -pushd ./lib/ -yarn install -popd - # TODO consider yarn workspaces to install all in one command if [ -n "$PROPOSAL_PATH" ]; then cd "../proposals/$PROPOSAL_PATH" diff --git a/upgrade-test-scripts/lib/.yarnrc.yml b/upgrade-test-scripts/lib/.yarnrc.yml deleted file mode 100644 index 3186f3f0..00000000 --- a/upgrade-test-scripts/lib/.yarnrc.yml +++ /dev/null @@ -1 +0,0 @@ -nodeLinker: node-modules diff --git a/upgrade-test-scripts/lib/agd-lib.js b/upgrade-test-scripts/lib/agd-lib.js deleted file mode 100644 index 8d2220e4..00000000 --- a/upgrade-test-scripts/lib/agd-lib.js +++ /dev/null @@ -1,119 +0,0 @@ -// @ts-check -// @jessie-check - -const { freeze } = Object; - -const agdBinary = 'agd'; - -/** @param {{ execFileSync: typeof import('child_process').execFileSync }} io */ -export const makeAgd = ({ execFileSync }) => { - console.warn('XXX is sync IO essential?'); - - /** @param {{ home?: string, keyringBackend?: string, rpcAddrs?: string[] }} keyringOpts */ - const make = ({ home, keyringBackend, rpcAddrs } = {}) => { - const keyringArgs = [ - ...(home ? ['--home', home] : []), - ...(keyringBackend ? [`--keyring-backend`, keyringBackend] : []), - ]; - console.warn('XXX: rpcAddrs after [0] are ignored'); - const nodeArgs = [...(rpcAddrs ? [`--node`, rpcAddrs[0]] : [])]; - - // TODO: verbose option - const l = a => { - console.log(a); // XXX unilateral logging by a library... iffy - return a; - }; - - /** - * @param {string[]} args - * @param {*} [opts] - */ - const exec = (args, opts) => execFileSync(agdBinary, args, opts).toString(); - - const outJson = ['--output', 'json']; - - const ro = freeze({ - status: async () => JSON.parse(exec([...nodeArgs, 'status'])), - /** - * @param { - * | [kind: 'tx', txhash: string] - * | [mod: 'vstorage', kind: 'data' | 'children', path: string] - * } qArgs - */ - query: async qArgs => { - const out = await exec(['query', ...qArgs, ...nodeArgs, ...outJson], { - stdio: ['ignore', 'pipe', 'ignore'], - }); - try { - return JSON.parse(out); - } catch (e) { - console.error(e); - console.info('output:', out); - } - }, - }); - const nameHub = freeze({ - /** - * @param {string[]} path - * NOTE: synchronous I/O - */ - lookup: (...path) => { - if (!Array.isArray(path)) { - // TODO: use COND || Fail`` - throw TypeError(); - } - if (path.length !== 1) { - throw Error(`path length limited to 1: ${path.length}`); - } - const [name] = path; - const txt = exec(['keys', 'show', `--address`, name, ...keyringArgs]); - return txt.trim(); - }, - }); - const rw = freeze({ - /** - * TODO: gas - * - * @param {string[]} txArgs - * @param {{ chainId: string, from: string, yes?: boolean }} opts - */ - tx: async (txArgs, { chainId, from, yes }) => { - const yesArg = yes ? ['--yes'] : []; - const args = [ - ...nodeArgs, - ...[`--chain-id`, chainId], - ...keyringArgs, - ...[`--from`, from], - 'tx', - ...txArgs, - ...['--broadcast-mode', 'block'], - ...yesArg, - ...outJson, - ]; - const out = exec(args); - try { - return JSON.parse(out); - } catch (e) { - console.error(e); - console.info('output:', out); - } - }, - ...ro, - ...nameHub, - readOnly: () => ro, - nameHub: () => nameHub, - keys: { - add: (name, mnemonic) => { - return execFileSync( - agdBinary, - [...keyringArgs, 'keys', 'add', name, '--recover'], - { input: mnemonic }, - ).toString(); - }, - }, - withOpts: opts => make({ home, keyringBackend, rpcAddrs, ...opts }), - }); - return rw; - }; - return make(); -}; diff --git a/upgrade-test-scripts/lib/assert.js b/upgrade-test-scripts/lib/assert.js deleted file mode 100644 index 26d81b0d..00000000 --- a/upgrade-test-scripts/lib/assert.js +++ /dev/null @@ -1,24 +0,0 @@ -// XXX subset of @endo/assert -// consider using Node built-in assert https://nodejs.org/api/assert.html - -export const Fail = (template, ...args) => { - throw Error(String.raw(template, ...args.map(val => String(val)))); -}; - -export const assert = (cond, msg = 'check failed') => { - if (!cond) { - throw Error(msg); - } -}; - -assert.typeof = (val, type) => { - if (typeof val !== type) { - throw Error(`expected ${type}, got ${typeof val}`); - } -}; - -/** @type {(val: T | undefined) => T} */ -export const NonNullish = val => { - if (!val) throw Error('required'); - return val; -}; diff --git a/upgrade-test-scripts/lib/cliHelper.js b/upgrade-test-scripts/lib/cliHelper.js deleted file mode 100644 index cb3c3adf..00000000 --- a/upgrade-test-scripts/lib/cliHelper.js +++ /dev/null @@ -1,182 +0,0 @@ -/* eslint-disable @jessie.js/safe-await-separator */ -import { $, execaCommand } from 'execa'; -import { BINARY } from './constants.js'; - -export const executeCommand = async (command, params, options = {}) => { - const { stdout } = await execaCommand( - `${command} ${params.join(' ')}`, - options, - ); - return stdout; -}; - -export const agd = { - query: async (...params) => { - const newParams = ['query', ...params, '-o json']; - const data = await executeCommand(BINARY, newParams); - return JSON.parse(data); - }, - tx: async (...params) => { - const newParams = ['tx', ...params, '-o json']; - const data = await executeCommand(BINARY, newParams, { shell: true }); - return JSON.parse(data); - }, - keys: async (...params) => { - let newParams = ['keys', ...params]; - let shouldParse = true; - - if (params.includes('show')) { - if (params.includes('-a') || params.includes('-address')) { - shouldParse = false; - } - } - - if (shouldParse) { - newParams = [...newParams, '--output json']; - } - - const data = await executeCommand(BINARY, newParams, { input: 'Y' }); - if (!shouldParse) { - return data; - } - - return JSON.parse(data); - }, - export: async (...params) => { - const newParams = ['export', ...params]; - const data = await executeCommand(BINARY, newParams); - return JSON.parse(data); - }, -}; - -export const agoric = { - follow: async (...params) => { - let newParams = ['follow', ...params]; - let parseJson = false; - - if (!params.includes('-o')) { - newParams = [...newParams, '-o json']; - parseJson = true; - } - const data = await executeCommand('agoric', newParams); - - if (parseJson) { - return JSON.parse(data); - } - - return data; - }, - wallet: async (...params) => { - const newParams = ['wallet', ...params]; - return executeCommand('agoric', newParams); - }, - run: async (...params) => { - const newParams = ['run', ...params]; - return executeCommand('agoric', newParams); - }, -}; - -export const { stdout: agopsLocation } = await $({ - shell: true, - cwd: '/usr/src/agoric-sdk', -})`yarn bin agops`; - -export const agops = { - vaults: async (...params) => { - const newParams = ['vaults', ...params]; - - const result = await executeCommand(agopsLocation, newParams); - - if (params[0] === 'list') { - if (result === '') return []; - - return result.split('\n'); - } - - return result; - }, - ec: async (...params) => { - const newParams = ['ec', ...params]; - return executeCommand(agopsLocation, newParams); - }, - oracle: async (...params) => { - const newParams = ['oracle', ...params]; - return executeCommand(agopsLocation, newParams); - }, - perf: async (...params) => { - const newParams = ['perf', ...params]; - return executeCommand(agopsLocation, newParams); - }, - auctioneer: async (...params) => { - const newParams = ['auctioneer', ...params]; - return executeCommand(agopsLocation, newParams); - }, -}; - -export const { stdout: bundleSourceLocation } = await $({ - shell: true, - cwd: '/usr/src/agoric-sdk', -})`yarn bin bundle-source`; - -/** - * @param {string} filePath - * @param {string} bundleName - * @returns {Promise} Returns the filepath of the bundle - */ -export const bundleSource = async (filePath, bundleName) => { - const output = - await $`${bundleSourceLocation} --cache-json /tmp ${filePath} ${bundleName}`; - console.log(output.stderr); - return `/tmp/bundle-${bundleName}.json`; -}; - -export const wellKnownIdentities = async (io = {}) => { - const { agoric: { follow = agoric.follow } = {} } = io; - const zip = (xs, ys) => xs.map((x, i) => [x, ys[i]]); - const fromSmallCapsEntries = txt => { - const { body, slots } = JSON.parse(txt); - const theEntries = zip(JSON.parse(body.slice(1)), slots).map( - ([[name, ref], boardID]) => { - const iface = ref.replace(/^\$\d+\./, ''); - return [name, { iface, boardID }]; - }, - ); - return Object.fromEntries(theEntries); - }; - - const installation = fromSmallCapsEntries( - await follow('-lF', ':published.agoricNames.installation', '-o', 'text'), - ); - - const instance = fromSmallCapsEntries( - await follow('-lF', ':published.agoricNames.instance', '-o', 'text'), - ); - - const brand = fromSmallCapsEntries( - await follow('-lF', ':published.agoricNames.brand', '-o', 'text'), - ); - - return { brand, installation, instance }; -}; - -export const smallCapsContext = () => { - const slots = []; // XXX global mutable state - const smallCaps = { - Nat: n => `+${n}`, - // XXX mutates obj - ref: obj => { - if (obj.ix) return obj.ix; - const ix = slots.length; - slots.push(obj.boardID); - obj.ix = `$${ix}.Alleged: ${obj.iface}`; - return obj.ix; - }, - }; - - const toCapData = body => { - const capData = { body: `#${JSON.stringify(body)}`, slots }; - return JSON.stringify(capData); - }; - - return { smallCaps, toCapData }; -}; diff --git a/upgrade-test-scripts/lib/commonUpgradeHelpers.js b/upgrade-test-scripts/lib/commonUpgradeHelpers.js deleted file mode 100644 index 2c7945d5..00000000 --- a/upgrade-test-scripts/lib/commonUpgradeHelpers.js +++ /dev/null @@ -1,281 +0,0 @@ -/* eslint-disable @jessie.js/safe-await-separator */ -import { $ } from 'execa'; -import { promises as fs } from 'fs'; -import * as path from 'path'; -import { agd, agoric, agops } from './cliHelper.js'; -import { CHAINID, VALIDATORADDR } from './constants.js'; - -const waitForBootstrap = async () => { - const endpoint = 'localhost'; - // eslint-disable-next-line no-constant-condition - while (true) { - const { stdout: json } = await $({ - reject: false, - })`curl -s --fail -m 15 ${`${endpoint}:26657/status`}`; - - if (json.length === 0) { - continue; - } - - const data = JSON.parse(json); - - if (data.jsonrpc !== '2.0') { - continue; - } - - const lastHeight = data.result.sync_info.latest_block_height; - - if (lastHeight !== '1') { - return lastHeight; - } - - // eslint-disable-next-line no-undef - await new Promise(r => setTimeout(r, 2000)); - } -}; - -export const waitForBlock = async (times = 1) => { - console.log(times); - let time = 0; - while (time < times) { - const block1 = await waitForBootstrap(); - // eslint-disable-next-line no-constant-condition - while (true) { - const block2 = await waitForBootstrap(); - - if (block1 !== block2) { - console.log('block produced'); - break; - } - - // eslint-disable-next-line no-undef - await new Promise(r => setTimeout(r, 1000)); - } - time += 1; - } -}; - -export const provisionSmartWallet = async (address, amount) => { - console.log(`funding ${address}`); - await agd.tx( - 'bank', - 'send', - 'validator', - address, - amount, - '-y', - '--keyring-backend=test', - `--chain-id="${CHAINID}"`, - ); - await waitForBlock(); - - console.log(`provisioning ${address}`); - await agd.tx( - 'swingset', - 'provision-one', - 'my-wallet', - address, - 'SMART_WALLET', - '--keyring-backend=test', - '-y', - `--chain-id="${CHAINID}"`, - `--from="${address}"`, - ); - - await waitForBlock(2); - console.log(await agoric.wallet('show', `--from ${address}`)); -}; - -export const newOfferId = async () => { - const { stdout: date } = await $`date +${'%s%3M'}`; - // eslint-disable-next-line no-undef - await new Promise(r => setTimeout(r, 1000)); - - return date; -}; - -export const mkTemp = async template => { - const { stdout: data } = await $({ - shell: true, - })`mktemp -t ${template}`; - return data; -}; - -export const calculateWalletState = async addr => { - const result = await agoric.follow( - '-lF', - `:published.wallet.${addr}`, - '-o', - 'text', - ); - - const body = JSON.parse(result).body; - let state = body; - - if (body.includes('@qclass')) { - state = 'old'; - } else if (body.includes('#{}')) { - state = 'upgraded'; - } else if (body.includes('#')) { - state = 'revived'; - } - - return state; -}; - -export const executeOffer = async (address, offerPromise) => { - const offerPath = await mkTemp('agops.XXX'); - const offer = await offerPromise; - await fs.writeFile(offerPath, offer); - - await agops.perf( - 'satisfaction', - '--from', - address, - '--executeOffer', - offerPath, - '--keyring-backend=test', - ); -}; - -export const getUser = async user => { - return agd.keys('show', user, '-a', '--keyring-backend=test'); -}; - -export const voteLatestProposalAndWait = async () => { - await waitForBlock(); - const proposalsData = await agd.query('gov', 'proposals'); - const lastProposalId = proposalsData.proposals.at(-1).proposal_id; - - await waitForBlock(); - - await agd.tx( - 'gov', - 'deposit', - lastProposalId, - '50000000ubld', - '--from', - VALIDATORADDR, - `--chain-id=${CHAINID}`, - '--yes', - '--keyring-backend', - 'test', - ); - - await waitForBlock(); - - await agd.tx( - 'gov', - 'vote', - lastProposalId, - 'yes', - '--from', - VALIDATORADDR, - `--chain-id=${CHAINID}`, - '--yes', - '--keyring-backend', - 'test', - ); - - let info = {}; - for ( - ; - info.status !== 'PROPOSAL_STATUS_REJECTED' && - info.status !== 'PROPOSAL_STATUS_PASSED'; - await waitForBlock() - ) { - info = await agd.query('gov', 'proposal', lastProposalId); - console.log( - `Waiting for proposal ${lastProposalId} to pass (status=${info.status})`, - ); - } - return info; -}; - -const Fail = (template, ...args) => { - throw Error(String.raw(template, ...args.map(val => String(val)))); -}; - -/** - * Parse output of `agoric run proposal-builder.js` - * - * @param {string} txt - * - * adapted from packages/boot/test/bootstrapTests/supports.js - */ -const parseProposalParts = txt => { - const evals = [ - ...txt.matchAll(/swingset-core-eval (?\S+) (?