Skip to content

Commit

Permalink
style: markdown lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Mar 11, 2024
1 parent 18ef04f commit e1f7124
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions main/guides/coreeval/proposal.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,16 @@ with various capabilities useful for deploying contracts.
For example, in [dapp-agoric-basics](https://github.com/Agoric/dapp-agoric-basics/),
there's a contract to sell concert tickets. To deploy it, we

- install the contract bundle as a Zoe installation
- start the contract instance, using the **IST** brand to make price amounts for terms
- publish the installation and instance in the [agoricNames](../integration/name-services.html#agoricnames-agoricnamesadmin-well-known-names) name service under the name **sellConcertTickets**
in the **installation** and **instance** section, respectively
- publish its its **Ticket** issuer and brand in the **agoricNames** **issuer** and **brand** sections, respectively.
- install the contract bundle as a Zoe installation
- start the contract instance, using the **IST** brand to make price amounts for terms
- publish the installation and instance in the [agoricNames](../integration/name-services.html#agoricnames-agoricnamesadmin-well-known-names) name service under the name **sellConcertTickets**
in the **installation** and **instance** section, respectively
- publish its **Ticket** issuer and brand in the **agoricNames** **issuer** and **brand** sections, respectively.

After some preliminaries, ...

::: details imports, makeTerms etc.


```js
// @ts-check
import { allValues } from './objectTools.js';
Expand Down Expand Up @@ -61,6 +60,7 @@ export const makeTerms = (brand, baseUnit) => {
* }} SellTicketsSpace
*/
```

:::

... the function for deploying the contract is `startSellConcertTicketsContract`:
Expand All @@ -74,10 +74,7 @@ const contractName = 'sellConcertTickets';
* @param {BootstrapPowers} permittedPowers
* @param {*} config
*/
export const startSellConcertTicketsContract = async (
powers,
config,
) => {
export const startSellConcertTicketsContract = async (powers, config) => {
console.log('core eval for', contractName);
const {
// must be supplied by caller or template-replaced
Expand Down Expand Up @@ -113,17 +110,17 @@ export const startSellConcertTicketsContract = async (
A `BootstrapPowers` object is composed of several _promise spaces_.
A promise space is a `{ produce, consume }` pair where
- `consume[name]` is a promise associated with a specific name.
- `produce[name].resolve(value)` resolves the promise associated with the same name by providing a value.
- `consume[name]` is a promise associated with a specific name.
- `produce[name].resolve(value)` resolves the promise associated with the same name by providing a value.
There is one such space at the top, so that `powers.consume.zoe` is a promise for the Zoe Service. _This promise was resolved early in the execution of the virtual machine._
There are also several more promise spaces one level down, including:
- `powers.installation`
- `powers.instance`
- `powers.issuer`
- `powers.brand`
- `powers.installation`
- `powers.instance`
- `powers.issuer`
- `powers.brand`
The `installContract` helper calls `E(zoe).installBundleID(bundleID)` to create an `Installation`, much like our earlier discussion of [Contract installation](http://localhost:8080/guides/zoe/#contract-installation).
It also calls `powers.installation[name].resolve(installation)`.
Expand Down

0 comments on commit e1f7124

Please sign in to comment.