You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will revisit this, but this is for note taking, and ideation:
Here the difference between makeDeployBuilder functions (could paraneterize it with the path used in await tools.installBundles):
exportconstmakeDeployBuilder=(tools,readJSON,execa)=>asyncfunctiondeployBuilder(builder){console.log(`building plan: ${builder}`);// build the planconst{ stdout }=awaitexeca`agoric run ${builder}`;constmatch=stdout.match(/(?<name>[-\w]+)-permit.json/);if(!(match&&match.groups)){thrownewError('no permit found');}constplan=awaitreadJSON(`./${match.groups.name}-plan.json`);console.log(plan);console.log('copying files to container');tools.copyFiles([nodeRequire.resolve(`../${plan.script}`),nodeRequire.resolve(`../${plan.permit}`),
...plan.bundles.map(b=>b.fileName),]);console.log('installing bundles');awaittools.installBundles(// plan.bundles.map(b => `/tmp/contracts/${b.bundleID}.json`),plan.bundles.map(b=>`/root/${b.bundleID}.json`),// <===== HEREconsole.log,);console.log('executing proposal');awaittools.runCoreEval({name: plan.name,description: `${plan.name} proposal`,});};exportconstmakeDeployBuilderE2E=(tools,readJSON,execa)=>asyncfunctiondeployBuilder(builder){console.log(`building plan: ${builder}`);// build the planconst{ stdout }=awaitexeca`agoric run ${builder}`;constmatch=stdout.match(/(?<name>[-\w]+)-permit.json/);if(!(match&&match.groups)){thrownewError('no permit found');}constplan=awaitreadJSON(`./${match.groups.name}-plan.json`);console.log(plan);console.log('copying files to container');tools.copyFiles([nodeRequire.resolve(`../${plan.script}`),nodeRequire.resolve(`../${plan.permit}`),
...plan.bundles.map(b=>b.fileName),]);console.log('installing bundles');awaittools.installBundles(plan.bundles.map(b=>`/tmp/contracts/${b.bundleID}.json`),// plan.bundles.map(b => `/root/${b.bundleID}.json`), // <===== HEREconsole.log,);console.log('executing proposal');awaittools.runCoreEval({name: plan.name,description: `${plan.name} proposal`,});};
and here is the diffference between installBundles, and installBundlesE2E (could parameterize it to follow a different control flow based on if its for orca-multichain.test.js, or the e2e script to preserve DRY (if orca-multichain, take simple path, else do more work etc) :
Here the difference between makeDeployBuilder functions (could paraneterize it with the path used in
await tools.installBundles
):and here is the diffference between installBundles, and installBundlesE2E (could parameterize it to follow a different control flow based on if its for
orca-multichain.test.js
, or thee2e
script to preserve DRY (iforca-multichain
, take simple path, else do more work etc) :Originally posted by @Jovonni in #37 (comment)
The text was updated successfully, but these errors were encountered: