Skip to content

Commit

Permalink
fix(deploy-script-support): Use versioned bundleSource
Browse files Browse the repository at this point in the history
This change shifts from using the endowed bundleSource from agoric-cli
to using the version of bundleSource in the contract's lockfile.

Veryfing the integrity of a contract requires that the contract be
bundled consistently and consequently have a consistent hash for
verifying its integrity.
So, the version of bundleSource must be pinned in the contract's
lockfile and cannot vary based on the version of the agoric-cli that
happens to be installed on the developers' systems.

By having contracts pin a version of deploy-script-support,
they will have a consistent version of bundleSource.
  • Loading branch information
kriskowal committed Sep 9, 2022
1 parent 9261bc9 commit 1e8edba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/deploy-script-support/src/helpers.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// @ts-check
import '@agoric/zoe/exported.js';
import { E } from '@endo/far';
import bundleSource from '@endo/bundle-source';

import { makeInstall } from './install.js';
import { makeOfferAndFindInvitationAmount } from './offer.js';
Expand All @@ -22,7 +23,7 @@ const ZOE_INVITE_PURSE_PETNAME = 'Default Zoe invite purse';
export const makeHelpers = async (homePromise, endowments) => {
const { zoe, wallet, scratch, board } = E.get(homePromise);

const { bundleSource, lookup } = endowments;
const { lookup } = endowments;

const walletAdmin = E(wallet).getAdminFacet();
const installationManager = E(walletAdmin).getInstallationManager();
Expand Down

0 comments on commit 1e8edba

Please sign in to comment.