From 53afdb14d0a4009d591f2c3ffee14f4b4f4ba9a1 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 4 May 2022 20:58:25 -0500 Subject: [PATCH 1/2] prune call to obsolete getFeePurse `getFeePurse` is not in the agoric sdk since https://github.com/Agoric/agoric-sdk/pull/4225 --- contract/deploy.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/contract/deploy.js b/contract/deploy.js index 3a0998f..e57af67 100644 --- a/contract/deploy.js +++ b/contract/deploy.js @@ -57,22 +57,6 @@ const installBundle = async (pathResolve, zoe, board) => { return { CONTRACT_NAME, INSTALLATION_BOARD_ID }; }; -/** - * @param {ERef} wallet - * @param {ERef} faucet - */ -const sendDeposit = async (wallet, faucet) => { - // We must first fund our "feePurse", the purse that we will use to - // pay for our interactions with Zoe. - const RUNPurse = E(wallet).getPurse(pursePetnames.RUN); - const runAmount = await E(RUNPurse).getCurrentAmount(); - const feePurse = E(faucet).getFeePurse(); - const feePayment = await E(E(wallet).getPurse(pursePetnames.RUN)).withdraw( - runAmount, - ); - await E(feePurse).deposit(feePayment); -}; - /** * @param {Promise<{zoe: ERef, board: ERef, agoricNames: * Object, wallet: ERef, faucet: ERef}>} homePromise @@ -110,7 +94,6 @@ const deployContract = async (homePromise, { pathResolve }) => { faucet, } = home; - await sendDeposit(wallet, faucet); const { CONTRACT_NAME, INSTALLATION_BOARD_ID } = await installBundle( pathResolve, zoe, From 7ad2fe53bb12144651d310fb6596c4aefcd86fd0 Mon Sep 17 00:00:00 2001 From: Dan Connolly Date: Wed, 4 May 2022 22:26:56 -0500 Subject: [PATCH 2/2] style: prune unused names --- contract/deploy.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/contract/deploy.js b/contract/deploy.js index e57af67..01e68f9 100644 --- a/contract/deploy.js +++ b/contract/deploy.js @@ -5,8 +5,6 @@ import '@agoric/zoe/exported.js'; import { E } from '@endo/eventual-send'; import bundleSource from '@endo/bundle-source'; -import { pursePetnames } from './petnames.js'; - // This script takes our contract code, installs it on Zoe, and makes // the installation publicly available. Our backend API script will // use this installation in a later step. @@ -86,12 +84,6 @@ const deployContract = async (homePromise, { pathResolve }) => { // have a one-to-one bidirectional mapping. If a value is added a // second time, the original id is just returned. board, - - // The wallet holds and manages assets for the user. - wallet, - - // The faucet provides an initial amount of RUN for the user to use. - faucet, } = home; const { CONTRACT_NAME, INSTALLATION_BOARD_ID } = await installBundle(