Skip to content

Commit

Permalink
WIP(contractStarter): misc review
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Jan 21, 2024
1 parent 4b9f2a6 commit 1282df8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions contract/src/contractStarter.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
* An experiment in delegating the right to start new contracts
* from the full set of stakers to something smaller.
*
* WARNING: anyone can start anything for free.
* WARNING: anyone can start anything.
*
* Options:
* TODO(#24): use governance framework; for example...
* - use a governed API (in the sense of @agoric/governance)
* for install, start
* - use a governed API for install
* - use a governed API for access to bootstrap powers
*
* Issues:
* ISSUE(#25):
* - adminFacet is NOT SAVED. UPGRADE IS IMPOSSIBLE
*/
// @ts-check
Expand Down Expand Up @@ -43,40 +43,39 @@ export const meta = harden({
storageNode: AmountShape,
timerService: AmountShape,
},
board: M.remotable('board'),
namesByAddress: M.remotable('namesByAddress'),
agoricNames: M.remotable('agoricNames'),
priceAuthority: M.remotable('priceAuthority'),
},
privateArgsShape: {
storageNode: M.remotable('storageNode'),
timerService: M.remotable('timerService'),
board: M.remotable('board'),
priceAuthority: M.remotable('priceAuthority'),
},
});
// subordinating these shapes under meta was added after zoe launched on mainnet
export const customTermsShape = meta.customTermsShape;
export const privateArgsShape = meta.privateArgsShape;

/**
* @typedef {{
* board: import('@agoric/vats').Board,
* namesByAddress: NameHub,
* agoricNames: NameHub,
* priceAuthority: unknown,
* }} PublicServices
*/

/**
* @typedef {{
* startInstance: Amount<'nat'>,
* installBundleID: Amount<'nat'>,
* storageNode: Amount<'nat'>,
* timerService: Amount<'nat'>,
* }} Prices
* @typedef {Record<keyof LimitedAccess
* | 'startInstance' | 'installBundleID', Amount<'nat'>>
* } Prices
*/

/**
* @typedef {{
* storageNode: StorageNode,
* timerService: unknown,
* board: import('@agoric/vats').Board,
* priceAuthority: unknown,
* }} LimitedAccess
*/

Expand Down Expand Up @@ -133,6 +132,7 @@ export const start = (zcf, limitedPowers, _baggage) => {

const zoe = zcf.getZoeService();
const invitationIssuerP = E(zoe).getInvitationIssuer();
// TODO(#26): let creator collect fees
const { zcfSeat: fees } = zcf.makeEmptySeatKit();

const pubMarshaller = E(board).getPublishingMarshaller();
Expand Down

0 comments on commit 1282df8

Please sign in to comment.