Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Agoric/documentation
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8a063360488879db3fbebf22bfbdc3b46f1ff5fe
Choose a base ref
..
head repository: Agoric/documentation
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b4a19de830aec996b1dcb1747e39215949a836ab
Choose a head ref
Showing with 2,743 additions and 1,545 deletions.
  1. +5 −5 .github/workflows/test-getting-started.yml
  2. +2 −2 .github/workflows/test-markdown.yml
  3. +0 −1 .prettierrc.json
  4. +4 −4 CONTRIBUTING.md
  5. +30 −5 main/.vitepress/config.mjs
  6. +35 −6 main/.vitepress/themeConfig/nav.js
  7. +15 −15 main/e2e-testing.md
  8. +20 −6 main/glossary/index.md
  9. +5 −5 main/guides/coreeval/permissions.md
  10. +23 −23 main/guides/coreeval/proposal.md
  11. +8 −8 main/guides/ertp/index.md
  12. +1 −1 main/guides/ertp/purses-and-payments.md
  13. +5 −5 main/guides/getting-started/contract-rpc.md
  14. +1 −1 main/guides/getting-started/deploying.md
  15. +1 −1 main/guides/getting-started/explainer-how-to-make-an-offer.md
  16. +20 −20 main/guides/getting-started/sell-concert-tickets-contract-explainer.md
  17. +26 −26 main/guides/getting-started/swaparoo-how-to-swap-assets-explainer.md
  18. +3 −3 main/guides/getting-started/swaparoo-making-a-payment-explainer.md
  19. +9 −9 main/guides/getting-started/ui-tutorial/agoric-provider.md
  20. +17 −17 main/guides/getting-started/ui-tutorial/connect-wallet.md
  21. +25 −25 main/guides/getting-started/ui-tutorial/making-an-offer.md
  22. +11 −11 main/guides/getting-started/ui-tutorial/querying-vstorage.md
  23. +9 −9 main/guides/getting-started/ui-tutorial/starting.md
  24. +40 −38 main/guides/governance/index.md
  25. +8 −8 main/guides/integration/name-services.md
  26. +3 −3 main/guides/js-programming/far.md
  27. +19 −19 main/guides/js-programming/hardened-js.md
  28. +23 −23 main/guides/js-programming/notifiers.md
  29. +0 −101 main/guides/orchestration/getting-started/api.md
  30. +43 −43 main/guides/orchestration/getting-started/contract-walkthrough/cross-chain-swap.md
  31. +21 −21 main/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond.md
  32. +93 −70 main/guides/orchestration/getting-started/key-concepts.md
  33. +39 −21 main/guides/orchestration/how-orch-works.md
  34. +3 −3 main/guides/wallet/index.md
  35. +6 −6 main/guides/zoe/actual-contracts/PSM.md
  36. +5 −5 main/guides/zoe/actual-contracts/index.md
  37. +8 −8 main/guides/zoe/contract-requirements.md
  38. +41 −41 main/guides/zoe/contract-upgrade.md
  39. +2 −2 main/guides/zoe/contract-walkthru.md
  40. +26 −26 main/guides/zoe/contracts/atomic-swap.md
  41. +21 −21 main/guides/zoe/contracts/constantProductAMM.md
  42. +29 −29 main/guides/zoe/contracts/covered-call.md
  43. +25 −25 main/guides/zoe/contracts/second-price-auction.md
  44. +33 −28 main/guides/zoe/contracts/simple-exchange.md
  45. +14 −14 main/guides/zoe/offer-enforcement.md
  46. +2 −2 main/guides/zoe/price-authority.md
  47. +2 −2 main/guides/zoe/proposal.md
  48. +10 −10 main/guides/zoe/pub-to-storage.md
  49. +6 −0 main/index.md
  50. +67 −0 main/public/orchestrate.svg
  51. +45 −45 main/reference/ertp-api/amount-math.md
  52. +3 −3 main/reference/ertp-api/brand.md
  53. +3 −3 main/reference/ertp-api/ertp-data-types.md
  54. +46 −44 main/reference/ertp-api/issuer.md
  55. +7 −6 main/reference/ertp-api/mint.md
  56. +2 −2 main/reference/ertp-api/payment.md
  57. +28 −28 main/reference/ertp-api/purse.md
  58. +1 −1 main/reference/repl/board.md
  59. +10 −10 main/reference/repl/networking.md
  60. +1 −1 main/reference/repl/priceAuthority.md
  61. +1 −1 main/reference/repl/timerServices.md
  62. +10 −10 main/reference/vstorage-ref.md
  63. +15 −15 main/reference/zoe-api/price-authority.md
  64. +26 −26 main/reference/zoe-api/ratio-math.md
  65. +1 −1 main/reference/zoe-api/user-seat.md
  66. +15 −15 main/reference/zoe-api/zcfseat.md
  67. +19 −19 main/reference/zoe-api/zoe-contract-facet.md
  68. +4 −4 main/reference/zoe-api/zoe-data-types.md
  69. +26 −26 main/reference/zoe-api/zoe-helpers.md
  70. +23 −23 main/reference/zoe-api/zoe.md
  71. +13 −12 package.json
  72. +237 −0 scripts/markdown-js-snippets-linter.mjs
  73. +1,343 −473 yarn.lock
10 changes: 5 additions & 5 deletions .github/workflows/test-getting-started.yml
Original file line number Diff line number Diff line change
@@ -16,23 +16,23 @@ jobs:
with:
node-version: '18'
- name: Creating Your Dapp From a Template
run: yarn create @agoric/dapp demo
run: yarn create @agoric/dapp offer-up
- name: Install dependencies
run: |
cd demo
cd offer-up
corepack enable
yarn install
- name: Start the Docker container
run: |
cd demo
cd offer-up
yarn start:docker
- name: Wait for Docker container to be ready
run: |
cd demo
cd offer-up
yarn runWaitForBlocks
- name: yarn start:contract
run: |
cd demo
cd offer-up
yarn start:contract
- name: verify contracts started onchain
run: |
4 changes: 2 additions & 2 deletions .github/workflows/test-markdown.yml
Original file line number Diff line number Diff line change
@@ -5,11 +5,11 @@ name: Lint Markdown

on:
push:
branches: [$default-branch]
branches: [main]
pull_request:

jobs:
build:
lint-markdown:
runs-on: ubuntu-latest
strategy:
matrix:
1 change: 0 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,6 @@
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": false,
"singleQuote": true,
"proseWrap": "preserve",
"trailingComma": "none",
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -107,7 +107,7 @@ module.exports = {
themeConfig: {
sidebar: 'auto'
}
}
};
```

Or, add a config entry, either as part of a group or as an individual page.
@@ -133,7 +133,7 @@ module.exports = {
}
]
}
}
};
```

## Writing Links
@@ -564,8 +564,8 @@ export default ({ router }) => {
path: '/getting-started/agoric-cli-guide.html',
redirect: '/guides/agoric-cli/'
}
])
}
]);
};
```

The general format should be self-explanatory. However, there are two things you need to know that aren't apparent
35 changes: 30 additions & 5 deletions main/.vitepress/config.mjs
Original file line number Diff line number Diff line change
@@ -120,6 +120,35 @@ export default defineConfig({
// Trailing slash implies it is looking for a .md file
sidebar: {
'/': [
{
text: 'Orchestrate',
link: '/guides/orchestration/',
collapsed: true,
items: [
{
text: 'Key Concepts and APIs',
link: '/guides/orchestration/getting-started/key-concepts',
},
{
text: 'Contract Walkthroughs',
link: '/guides/orchestration/getting-started/contract-walkthroughs',
items: [
{
text: 'Cross-Chain Swap Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/cross-chain-swap',
},
{
text: 'Cross-Chain Unbond Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond',
},
{
text: 'Orchestration Basics',
link: '/guides/orchestration/getting-started/contract-walkthrough/orchestration-basics',
}
]
},
]
},
{
text: 'Build',
collapsed: true,
@@ -426,13 +455,9 @@ export default defineConfig({
collapsed: true,
items: [
{
text: 'Key Concepts',
text: 'Key Concepts and APIs',
link: '/guides/orchestration/getting-started/key-concepts',
},
{
text: 'API',
link: '/guides/orchestration/getting-started/api',
},
{
text: 'Contract Walkthroughs',
link: '/guides/orchestration/getting-started/contract-walkthroughs',
41 changes: 35 additions & 6 deletions main/.vitepress/themeConfig/nav.js
Original file line number Diff line number Diff line change
@@ -5,6 +5,41 @@
// Trailing slash implies it is looking for a .md file

export const nav = [
{
text: 'Orchestrate',
collapsed: true,
items: [
{
text: 'What is Orchestration?',
link: '/guides/orchestration/',
},
{
text: 'Key Concepts',
link: '/guides/orchestration/getting-started/key-concepts',
},
{
text: 'API',
link: '/guides/orchestration/getting-started/api',
},
{
text: 'Contract Walkthroughs',
items: [
{
text: 'Cross-Chain Swap Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/cross-chain-swap',
},
{
text: 'Cross-Chain Unbond Example',
link: '/guides/orchestration/getting-started/contract-walkthrough/cross-chain-unbond',
},
{
text: 'Orchestration Basics',
link: '/guides/orchestration/getting-started/contract-walkthrough/orchestration-basics',
}
]
},
]
},
{
text: 'Build',
items: [
@@ -82,12 +117,6 @@ export const nav = [
collapsed: true,
items: [],
},
{
text: 'Orchestration',
link: '/guides/orchestration/',
collapsed: true,
items: [],
},
{
text: 'Zoe Smart Contract Framework',
link: '/guides/zoe/',
30 changes: 15 additions & 15 deletions main/e2e-testing.md
Original file line number Diff line number Diff line change
@@ -40,16 +40,16 @@ Before you start writing your E2E tests, you'll need to create a configuration f
Inside `synpress.config.js`, you'll set the `baseUrl` property within the e2e configuration. This tells Cypress where to find your DApp during testing. Here's an example configuration:

```js
const baseConfig = require('@agoric/synpress/synpress.config')
const { defineConfig } = require('cypress')
const baseConfig = require('@agoric/synpress/synpress.config');
const { defineConfig } = require('cypress');

module.exports = defineConfig({
...baseConfig,
e2e: {
...baseConfig.e2e,
baseUrl: 'http://localhost:5173'
}
})
});
```

In this example, `baseUrl` is set to `http://localhost:5173`. Make sure to replace this with the actual URL where your DApp is running.
@@ -69,7 +69,7 @@ Navigate to your project's `tests/e2e` directory and create a new file named `su
After creating your `support.js` file, make sure to include the following import statement:

```js
import '@agoric/synpress/support/index'
import '@agoric/synpress/support/index';
```

This import is essential because it brings in the necessary functionalities from `@agoric/synpress` to interact with the Keplr wallet within your e2e tests. Without it, your tests won't be able to leverage the features provided by `@agoric/synpress` for Keplr integration.
@@ -86,8 +86,8 @@ You use `describe` blocks to group related tests together, and `it` blocks to de
describe('User Login', () => {
it('should login with valid credentials', () => {
// Test steps for login functionality
})
})
});
});
```

### Test 1: Setting Up Keplr Wallet
@@ -96,9 +96,9 @@ describe('User Login', () => {
it('should setup a Keplr wallet', () => {
cy.setupWallet({
secretWords: 'KEPLR_MNEMONIC'
})
cy.visit('/')
})
});
cy.visit('/');
});
```

This test case simulates setting up a Keplr wallet for your tests, using the `cy.setupWallet` method. Make sure to replace `KEPLR_MNEMONIC` with a 24-word mnemonic phrase. The `setupWallet` method creates a wallet based on the provided mnemonic phrase, which can then be used throughout your test suite.
@@ -109,9 +109,9 @@ After setting up the wallet, we visit the root path (`/`) of the DApp using `cy.

```js
it('should accept connection with wallet', () => {
cy.contains('Connect Wallet').click()
cy.acceptAccess()
})
cy.contains('Connect Wallet').click();
cy.acceptAccess();
});
```

This test simulates a user connecting their Keplr wallet to your DApp. `cy.contains('Connect Wallet')` searches for an element containing the text `Connect Wallet` on the webpage and triggers a click event. `cy.acceptAccess` simulates accepting Keplr wallet access for your DApp.
@@ -120,9 +120,9 @@ This test simulates a user connecting their Keplr wallet to your DApp. `cy.conta

```js
it('should confirm make an offer transaction', () => {
cy.contains('Make an Offer').click()
cy.confirmTransaction()
})
cy.contains('Make an Offer').click();
cy.confirmTransaction();
});
```

This test simulates transaction Signing on your DApp. `cy.contains('Make an Offer')` searches for an element containing the text `Make an Offer` and triggers a click event. `cy.confirmTransaction` simulates confirming a transaction.
26 changes: 20 additions & 6 deletions main/glossary/index.md
Original file line number Diff line number Diff line change
@@ -141,10 +141,10 @@ and the [ERTP API's Brand section](/reference/ertp-api/brand).
Before a contract can be installed on Zoe, its source code must be bundled. This is done by:

```js
import bundleSource from '@endo/bundle-source'
import bundleSource from '@endo/bundle-source';
const atomicSwapBundle = await bundleSource(
require.resolve('@agoric/zoe/src/contracts/atomicSwap')
)
);
```

The installation operation returns an `installation`, which is an object with a single
@@ -153,7 +153,7 @@ In most cases, the bundle contains a base64-encoded zip file that you can
extract for review.

```js
const { endoZipBase64 } = await E(installation).getBundle()
const { endoZipBase64 } = await E(installation).getBundle();
```

```sh
@@ -296,10 +296,10 @@ A _facet_ is an object that exposes an API or particular view of some larger ent
You can make any number of facets of an entity. In JavaScript, you often make a facet that forwards method calls:

```js
import { Far } from '@endo/far'
import { Far } from '@endo/far';
const facet = Far('FacetName', {
myMethod: (...args) => oldObject.method(...args)
})
});
```

Two Agoric uses are:
@@ -495,6 +495,20 @@ vat-orchestration. This [vat](/glossary/#vat) manages [Inter-Chain Account (ICA)
chains, ensuring proper transaction authorization.
For more information, see the [Orchestration API](/guides/orchestration/).

## Orthogonal Persistence

Orthogonal Persistence refers to a persistence model in which it appears to the programmer as if the program's memory is always there forever.
The system automatically keeps the entire memory state in such a way that computation can always resume after events like crashes or restarts.
This means the programmer doesn't need to explicitly save or restore any data, making for an easy and convenient programming model.

Orthogonal persistence is contrasted with:

- Manual Persistence: Where all in-memory state is volatile, and anything you want saved you have to explicitly save yourself, such as by writing
to a file or database. All acts of recording and recovering state are deliberate actions performed by the code.
- Automatic Persistence: Where certain data is designated to be kept, either declaratively or through procedural interfaces.
Updates to this data are automatically saved and available upon resuming execution, but the programmer may still need to manually
reestablish in-memory invariants when the program starts or restarts.

## Passable

A _passable_ is something that can be sent to and from remote objects.
@@ -550,7 +564,7 @@ const myProposal = harden({
give: { Asset: AmountMath.make(quatloosBrand, 4n) },
want: { Price: AmountMath.make(moolaBrand, 15n) },
exit: { onDemand: null }
})
});
```

`give` and `want` each associate [Keywords](#keyword) defined by the contract with corresponding [Amounts](#amount) describing respectively what will be given and what is being requested in exchange.
10 changes: 5 additions & 5 deletions main/guides/coreeval/permissions.md
Original file line number Diff line number Diff line change
@@ -25,9 +25,9 @@ export const permit = harden({
instance: { produce: { [contractName]: true } },
issuer: { consume: { IST: true }, produce: { Ticket: true } },
brand: { consume: { IST: true }, produce: { Ticket: true } }
})
});

export const main = startSellConcertTicketsContract
export const main = startSellConcertTicketsContract;
```

## Selected BootstrapPowers
@@ -49,7 +49,7 @@ In the top level promise space, we have:
**Warning: this includes access to over-write previously allocated storage nodes.**

- **chainTimerService**: for getting the current timer and setting timer wake-ups; for example, at the conclusion of a governance vote.
See [Timer Service API](../../reference/repl/timerServices).
See [Timer Service API](/reference/repl/timerServices).
**Note: this includes access to schedule infinitely repeating events.**

- **namesByAddress**: for [looking up objects published under an address](../integration/name-services#namesbyaddress-namesbyaddressadmin-and-depositfacet-per-account-namespace); in particular,
@@ -60,6 +60,6 @@ In the top level promise space, we have:

- **priceAuthority**: access to get price quotes and triggers; see [Price Authority Guide](../zoe/price-authority).

- **priceAuthorityAdmin**: access to add and replace sources of price quotes using [E(priceAuthorityAdmin).registerPriceAuthority()](../../reference/zoe-api/price-authority-admin#e-priceauthorityregistryadmin-registerpriceauthority-priceauthority-brandin-brandout-force)
- **priceAuthorityAdmin**: access to add and replace sources of price quotes using [E(priceAuthorityAdmin).registerPriceAuthority()](/reference/zoe-api/price-authority-admin#e-priceauthorityregistryadmin-registerpriceauthority-priceauthority-brandin-brandout-force)

- **zoe**: the [Zoe service](../../reference/zoe-api//zoe)
- **zoe**: the [Zoe service](/reference/zoe-api/zoe)
Loading