diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml new file mode 100644 index 000000000..8aff77ae9 --- /dev/null +++ b/.github/workflows/spellcheck.yml @@ -0,0 +1,15 @@ +name: Spellcheck + +on: + push: + branches: [master] + pull_request: + +jobs: + build: + name: Spellcheck + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: rojopolis/spellcheck-github-actions@0.5.0 + name: Spellcheck \ No newline at end of file diff --git a/.spellcheck.yml b/.spellcheck.yml new file mode 100644 index 000000000..527e6653f --- /dev/null +++ b/.spellcheck.yml @@ -0,0 +1,18 @@ +matrix: +- name: Markdown + aspell: + lang: en + dictionary: + wordlists: + - .wordlist.txt + encoding: utf-8 + pipeline: + - pyspelling.filters.markdown: + - pyspelling.filters.html: + comments: false + ignores: + - code + - pre + sources: + - '**/*.md' + default_encoding: utf-8 \ No newline at end of file diff --git a/.wordlist.txt b/.wordlist.txt new file mode 100644 index 000000000..d6f098e2b --- /dev/null +++ b/.wordlist.txt @@ -0,0 +1,769 @@ +ABCGames +acceptOffer +actionLink +actionText +addEntry +addIssuer +addLiquidityInvitation +addLiquidityInvite +addLiquiditySeat +addNewIssuer +addOffer +addPool +adjacentProperty +affordances +afterDeadline +ag +agoric +Agoric +Agoric's +agoricTheatreTicketAmountMath +agoricTheatreTicketMint +agoricTheatreTicketPayments +alamedaCountyPropertyTitle +aliceAddLiquidityInvitation +aliceAssetPayout +aliceBucksPayment +aliceInvitation +aliceInvite +aliceLiquidityPurse +aliceMoola +aliceMoolaGainAmount +aliceMoolaPayment +aliceMoolaPayout +aliceMoolaPurse +alicePayment +alicePayments +alicePricePayout +aliceProposal +aliceQuatloosDepositFacet +aliceQuatloosDepositFacetBoardId +aliceQuatloosDepositFacetId +aliceQuatloosPayment +aliceQuatloosPurse +aliceRemoveLiquidityInvitation +aliceRemoveLiquidityProposal +aliceSeat +aliceSellOrderProposal +aliceSimGainAmount +aliceSimoleanPayment +aliceSimoleanPayout +aliceSimPurse +allegedAmount +allegedamount +allegedBrand +allegedName +AllegedName +allegedValue +allegedvalue +amm +amountArray +amountExpectedToTransfer +amountIn +AmountKeywordRecord +amountKeywordRecord +amountKeywordRecords +amountMath +AmountMath +amountmath +amountMath's +AmountMathKeywordRecord +amountMathKind +AmountMathKinds +amountMaths +amountOut +amountToBurn +amountToTransfer +anotherAmountKeywordRecord +anotherQuatloos +api +API's +APIs +arg +args +arrayOfNewPayments +assayable +assertIssuerKeywords +assertProposalShape +assertUniqueKeyword +assertUsesNatMath +assetAmount +assetAmountMath +AssetHolder +AssetHolders +assuranceMath +async +asynchronicity +atomicSwap +atomicSwapDescription +atomicSwapInstance +automaticRefund +autoswap +autoswapInstallation +backend +badAmounts +badList +badPayment +badQuatloosAmounts +baseTime +blockchain +blockchains +boardId +bobAssetPayout +bobAssetPayoutP +bobBucksPayment +bobBuyOrderProposal +bobExclOption +bobExclusiveInvitation +bobInstallation +bobInstallationId +bobInvitation +bobInvitationValue +bobIssuers +bobMoolaForSimProposal +bobMoolaGainAmount +bobMoolaPayment +bobMoolaPayout +bobMoolaProposal +bobMoolaPurse +bobOfferResult +bobPayment +bobPayments +bobPayoutP +bobPricePayout +bobPricePayoutP +bobProposal +bobProposalSwap +bobSeat +bobSimGainAmount +bobSimoleanPayment +bobSimoleanPayout +bobSimoleanPurse +bobSimoleanRefundAmount +bobSimPayment +bobSimPurse +bobSwapInvitation +bobSwapSeat +boolean +brandKeywordRecord +brandRegKey +brandToPurse +brk +bucksAmountMath +bucksR +bucksValue +bundleSource +burnLosses +burntAmount +burntAmountValue +buySeats +cancelOffer +canvasStatePublisher +captp +CapTP +cd +chainTimer +chainTimerService +changeColorAll +cli +CLI +closesAfter +collectFromGallery +combinedList +combinedPayment +combinedProperty +comparables +completeObj +concertTicket +conf +config +const +ContractFacet +ContractHost +contractHost +contractOfferPromise +ContractStartFn +contractSupport +cornerProperty +counterparty +CoveredCall +coveredCall +coveredCallInstallation +createRepeater +createSharedMap +creatorFacet +creatorInvitation +creatorSeat +creatorStage +creatorTips +Crockford +cryptocurrency +cryptographic +currentAllocation +currentBalance +customProperties +Dapp +dapp +Dapp's +dapps +dApps +daveBucksPayment +daveCallSeat +daveCoveredCallPayments +daveCoveredCallProposal +daveIssuers +daveOption +daveSimoleanPayment +daveSimoleanPurse +daveSwapInstall +daveSwapInvitation +daveSwapIssuers +daveSwapPayments +daveSwapProposal +daveSwapSeat +declaratively +declineOffer +defaultAcceptanceMsg +DeFi +delaySecs +deployer +depositAmount +depositAmountA +depositAmountB +depositFacet +depositOnlyFacet +depositSomewhere +dev +DEX +dIBC +dibc +disjuncts +DOM +EcmaScript +encourageMe +encouragementBot +encouragementinstallation +enduser +ertp +ERTP +ERTP's +escrowed +Escrowing +escrowing +Eval +exampleAmountMath +exampleBrand +ExitRule +exitRule +ExpectedRecord +expirationDate +finalState +firstOffer +firstSeat +foobars +frontend +fThis +getAllegedBrand +getAllegedName +getAmountAllocated +getAmountMath +getAmountMathKind +getAmountOf +getArgs +getAssays +getBalance +getBrand +getBrandForIssuer +getBrands +getCalls +getCurrentAllocation +getCurrentAmount +getCurrentTimestamp +getDepositFacet +getEmpty +getempty +getId +getInputPrice +getInstallation +getInstance +getInvitationDetails +getInvitationIssuer +getInvite +getInviteIssuer +getIssuer +getIssuerForBrand +getIssuerNames +getIssuerRecord +getIssuers +getLiquidityIssuer +getLiquiditySupply +getNotifier +getOfferHandle +getOfferHandles +getOfferNotifier +getOfferResult +getOffers +getOutPutPrice +getOutputPrice +getPayout +getPayouts +getPoolAllocation +getProposal +getPublicFacet +getPurse +getPurseIssuer +getPurses +getRefund +getTerms +getUpdateSince +getUse +getValue +getZoeService +github +goodAmounts +goodQuatloosAmounts +grabSharedMap +HandledPromise +HandledPromises +hasExited +heroImage +hookArgs +hookMethod +hookName +hostInvite +hostport +html +http +https +hydrateHooks +IBC +IDEs +idToOfferHandle +iframe +implementating +init +inspectable +installationConstants +installationHandle +installationP +instanceHandle +instantiation +Interchain +interoperable +invitationHandle +invitationIssuer +invitationMaker +invitationP +invitationValue +inviteIssuer +inviteP +isEmpty +isEqual +isGTE +isIssuer +isItLive +isLive +islive +isMyIssuer +isOfferSafe +issuerKeywordRecord +IssuerKit +issuerPetname +IssuerRecord +issuerRecord +itemsAmountMath +javascript +js +JSON +json +KeywordAmount +kickOut +lastHandle +leftAmount +leftamount +leftHasExitedMsg +leftSeat +legos +lifecycles +LinkedIn +liquidityAmountMath +liquidityIssuer +liquidityPayment +listAmountA +listAmountB +listAmountC +liveness +lnk +localAmountMath +localhost +localTimerService +lockdown +MacOS +Mainnet +makeAddLiquidityInvitation +makeBidInvitation +makeCallOption +makeContract +makeDepositFacet +makeEmptyPurse +makeEmptySeatKit +makeHandler +makeInvitation +makeInvite +makeIssuerKit +makeLocalAmountMath +makeMatchingInvitation +makeRefundInvitation +makeRemoveLiquidityInvitation +makeSwapInInvitation +makeSwapOutInvitation +makeZCFMint +makeZoeHelpers +matchingSeat +matchingSeatInvitation +matchingSeatOfferHandler +matchOffer +MathKind +md +minimumBidAmount +MinRaise +mintGains +mintPayment +moola +moolaAmountMath +moolaBrand +moolah +moolaIssuer +moolaKit +moolaLiquidity +moolaLiquidityAmountMath +moolaLiquidityIssuer +moolaPayment +moolaPoolAlloc +moolaProceeds +moolaProceedsAmount +moolaPurse +moolaRefundAmount +moolaValue +Morningstar's +msg +Multipool +MultipoolAutoswap +multipoolAutoswap +multiuser +myAmountKeywordRecord +myAmountMathKind +myItems +myItemsAmountMath +myItemsIssuer +myItemsLocalAmountMath +MyKeyword +myMethod +myProposal +myQuatloosBrand +myQuatloosPayment +mySeat +mySynchronousMint +MySyncMint +myTimer +myValue +namespace +nat +natively +nav +newAllocation +newAmount +newBalance +newPayment +newState +nft +NFTs +npm +NUM +numBids +numBidsAllowed +ocap +OCaps +OCAPs +offerHandle +offerHandlePromise +offerHandler +offerHandlers +offerHandles +offerNotifier +OfferResult +offerResult +OfferResultRecord +offerSafety +OfferStatuses +ok +oldPayment +oldQuatloosPayment +oldUpdateHandle +onDemand +optAmount +optionAmount +optTotalAmount +originalPayment +otherAmountMath +otherIssuer +otherMint +otherPayment +overpayment +params +pathResolve +paymentA +paymentAmountA +paymentAmountArray +paymentB +paymentKeywordRecord +paymentKeywordRecordPromise +PaymentPKeywordRecord +paymentsArray +paymentToBurn +Petname +petname +petnameOrPath +petnames +png +polymorphically +poolSeat +pre +primordials +probablyAppropriatePurse +produceNotifier +ProposalRecord +provisioner +publicAPI +publicFacet +purseIssuer +pursePetname +pursePetName +px +pxPurse +quatloo +quatlooAmountMath +quatlooIssuer +quatloos +quatloosAmountMath +quatloosBrand +quatloosFive +quatloosIssuer +quatloosIssuerAllegedName +quatloosKit +quatloosLocalAmountMath +quatloosMint +quatloosMintIssuer +quatloosPayment +quatloosPurse +quatloosSeven +rawOffer +rc +ReactJS +README +reallocations +realtor +Reddit's +reentrancy +relayers +remoteCompleteObj +remoteObj +remoteServiceP +removeWakeup +REPL +REPL's +repo +respondToNewValue +reusability +rightAmount +rightamount +rightHasExitedMsg +rightSeat +rl +Roadmap +runtime +saraMoolaPurse +saraProposal +saraResult +saraSeat +saraSimoleanPurse +satisfiedBy +saveIssuer +sdk +SDK +seatAAllocation +seatBAllocation +SeatGainsLossesRecord +SeatGainsLossesRecords +SeatStaging +seatStaging +seatStagings +secondaryIssuer +secondPayment +secondPriceAuctionInstallation +secondSeat +sellAssetForPrice +sellerSeat +sellItemsInstance +sellSeats +sellToGallery +SES +ses +setWakeup +sevenSimoleans +SharedMap +sharingService +sharingService's +sidebarDepth +simolean +simoleanAmountMath +simoleanAmounts +simoleanBrand +simoleanGainAmount +simoleanIssuer +simoleanPayment +simoleanRefund +simoleans +simoleansBrand +simoleansForDave +simoleons +SimpleExchange +simpleExchangeInstallation +simpleExchangeInvitation +someAmount +someAmountKeywordRecord +someBrand +someExitRule +someListOfOfferHandles +someTimer +someValue +SourceBundle +splitMany +src +startDateString +startInstance +StartInstanceResult +stopTracking +str +STR +StrikePrice +strikePrice +stringify +strSet +subdirectories +subdirectory +subfolders +subtractedList +sudo +suggestedDappPetname +svg +swapIfCanTradeAndUpdateBook +swapIn +swapInstallation +swapInvitation +swapIssuerKeywordRecord +swapOfferHandler +swapOut +swapResult +swapSeat +swingset +Swingset +SwingSet +SwingSets +tapFaucet +targetName +tc +TCP +Tendermint +testnet +TestNet +themeConfig +threeMoola +ticketAmount +ticketAmountMath +ticketAmounts +ticketSalesPublicFacet +ticketValue +ticketValues +tildot +timeAuthority +timerAuthority +timerService +timerService's +timerServices +tipAmount +tipAmountMath +titleAmountMath +titleIssuer +titleLocalAmountMath +titleMint +tl +TODO +toISOString +toplevel +tradable +Triskelion +tryExit +tv +TypeError +TypeScript +ui +un +underlyingAsset +underlyingAssets +unforgeable +ungranted +UniSwap +Uniswap +UnitOps +unitOps +untrusted +untrustedInvitation +updateHandle +updateState +updateStateOnChanges +url +USDollar +UserSeat +userSeat +UserSeats +userStage +useTheService +usr +verifiedAmount +vm +VM's +vsCode +VuePress +vuepress +waitForNextUpdate +wakeups +walletSend +walletSuggestInstallation +walletSuggestInstance +walletSuggestIssuer +WebSocket +WebSockets +WebStorm +withdrawalPayment +Woohoo +wsl +xSeat +YAML +yourFunction +ySeat +zcf +zcfMint +ZCFMint +ZCFMints +ZCFSeat +zcfSeat +ZCFSeats +zoe +ZoeHelper +ZoeHelpers +zoeHelpers +ZoeService +zoeService +txt +wordlist \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9eddeddcc..8e0c3e298 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,28 +1,46 @@ -## Current intention - -The current work aims at creating a progressive learning experience into writing Smart Contracts as proposed by Agoric. An attention is given to provide a very simple first experience and increase the complexity gradually - -Identified sources of complexity: -- How contracts can be expressed - - Jessie -- What can be expressed in contracts - - multi-party contracts with invites - - turn-based contracts - - ERTP framework - - ContractHost - - Escrow - - CoveredCall - - hierarchical rights - - non-determinism (time, randomness)? -- Infrastructure/Tooling - - @agoric npm packages - - User interface - - Vats - - Swingset - - Cosmic-Swingset - - -### Progress - -Progress can be followed [on this -board](https://github.com/Agoric/documentation/projects/1?fullscreen=true) +## Build Locally + +To run a local server to see the changes in real time, run: + +```shell +npm run docs:dev +``` + +Note that changes to the site config may require stopping this program +and restarting. + +To build the site as it will be built for production, run: + +```shell +npm run docs:build +``` + +## Github Actions and Continuous Integration + +On every pull request and on every commit to master, the following +Github Actions run: + +* Test the build - This tests that the build does not have any errors and + that the result passes HTML5 validation +* Spellcheck - This checks the Markdown documents against a dictionary and a local wordlist + +## Spellcheck + +This is currently only available in Github Actions on Pull Requests. +Any words that do not pass spell check will be shown in the logs of +the Github Action. Please either fix the words or add them to the list +in `Agoric/documentation/.wordlist.txt`. Please maintain the list's alphabetical order when entering new words for the convenience of future maintainers. + +![](./contributing-assets/spellcheck-results.png) + +## Check Links + +To check internal Vuepress links locally, run the following shell command. It does *not* check either external links or router-links. Output consists of the text of any broken links, what file they're in, and what line number they occur on. + +```shell +npm run check-links +``` + +Links should be relative and in [this format](https://vuepressbook.com/tutorial/tutorial2.html#linking-to-headers-inside-a-file). + + diff --git a/contributing-assets/spellcheck-results.png b/contributing-assets/spellcheck-results.png new file mode 100644 index 000000000..8737e80bc Binary files /dev/null and b/contributing-assets/spellcheck-results.png differ diff --git a/main/.vuepress/config.js b/main/.vuepress/config.js index a5229a872..7756d97a7 100644 --- a/main/.vuepress/config.js +++ b/main/.vuepress/config.js @@ -64,7 +64,7 @@ module.exports = { { title: 'Agoric Alpha', path: '/getting-started/alpha.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -72,7 +72,7 @@ module.exports = { { title: 'Documentation Guide', path: '/getting-started/', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -80,7 +80,7 @@ module.exports = { { title: 'Before Using Agoric', path: '/getting-started/before-using-agoric.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -88,7 +88,7 @@ module.exports = { { title: 'Starting A Project', path: '/getting-started/start-a-project.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -96,7 +96,7 @@ module.exports = { { title: 'Development Cycle', path: '/getting-started/development-cycle.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -104,7 +104,7 @@ module.exports = { { title: 'Deploying Smart Contracts', path: '/getting-started/deploying.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -112,7 +112,7 @@ module.exports = { { title: 'ERTP Introduction', path: '/getting-started/ertp-introduction.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -120,7 +120,7 @@ module.exports = { { title: 'Zoe Introduction', path: '/getting-started/intro-zoe.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -128,7 +128,7 @@ module.exports = { { title: 'Agoric CLI Guide', path: '/getting-started/agoric-cli-guide.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -138,7 +138,7 @@ module.exports = { { title: 'ERTP Introduction', path: '/getting-started/ertp-introduction.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -146,7 +146,7 @@ module.exports = { { title: 'ERTP Guide', path: '/ertp/guide/', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ '/ertp/guide/', @@ -159,7 +159,7 @@ module.exports = { { title: 'ERTP API', path: '/ertp/api/', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ '/ertp/api/issuer', @@ -175,7 +175,7 @@ module.exports = { { title: 'Zoe Introduction', path: '/getting-started/intro-zoe.html', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ ] @@ -183,7 +183,7 @@ module.exports = { { title: 'Zoe Guide', path: '/zoe/guide/', - collapsable: false, + collapsible: false, sideBarDepth: 5, children: [ '/zoe/guide/', @@ -195,7 +195,7 @@ module.exports = { { title: 'Zoe Contracts', path: '/zoe/guide/contracts/', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ '/zoe/guide/contracts/atomic-swap', @@ -210,7 +210,7 @@ module.exports = { { title: 'Zoe API', path: '/zoe/api/', - collapsable: false, + collapsible: false, sideBarDepth: 3, children: [ '/zoe/api/zoe', diff --git a/main/dapps/README.md b/main/dapps/README.md index f304ea29f..c7b17325b 100644 --- a/main/dapps/README.md +++ b/main/dapps/README.md @@ -73,7 +73,7 @@ In the `api` directory, you can find the following files to edit: - `src` /api endpoint handler, starting with `src/handler.js` -Other files and folders that you don't typicaly need to edit: +Other files and folders that you don't typically need to edit: - `deploy.js` generic Agoric API handler deployment script diff --git a/main/distributed-programming.md b/main/distributed-programming.md index a7b0c2c31..32205286e 100644 --- a/main/distributed-programming.md +++ b/main/distributed-programming.md @@ -206,7 +206,7 @@ similar methods. This method provides a long-lived notifier object associated with a particular stream of updates. ```js -const offerNotifer = zoe.getOfferNotifier(offerHandle); +const offerNotifier = zoe.getOfferNotifier(offerHandle); const { value, updateHandle, done } = offerNotifier.getUpdateSince(); if (done) { @@ -284,7 +284,7 @@ contract calls `complete()` on the offer, its notifier is marked `done`. Contract instances use a notifier to provide updates to people who want to follow changes. They import and call -`produceNotifer()`, which returns two facets, a notifier and an updater. You can +`produceNotifier()`, which returns two facets, a notifier and an updater. You can pass the notifier object to anyone allowed to see that contract instance's state changes. diff --git a/main/ertp/api/brand.md b/main/ertp/api/brand.md index e99ab2506..a14c3b9b2 100644 --- a/main/ertp/api/brand.md +++ b/main/ertp/api/brand.md @@ -14,7 +14,7 @@ But recipients of a purported `amount` cannot use the `brand` by itself to verify its authenticity, since the `brand` can be reused by a misbehaving `issuer`. -All of these relationships are unchangable; if, say, a `mint` is created that makes new Quatloos, it +All of these relationships are unchangeable; if, say, a `mint` is created that makes new Quatloos, it can never create new assets of any other `brand`. And a `brand` cannot be associated with any other `mint` or `issuer`. diff --git a/main/ertp/api/issuer.md b/main/ertp/api/issuer.md index d8a57f073..0dfba14df 100644 --- a/main/ertp/api/issuer.md +++ b/main/ertp/api/issuer.md @@ -92,7 +92,7 @@ of API methods (i.e. `amountMath` methods are polymorphic). const { issuer: quatloosIssuer } = makeIssuerKit('quatloos'); quatloosIssuer.getAmountMathKind(); // Returns 'nat', also known as MathKind.NAT, the default value. const { issuer: moolaIssuer } = makeIssuerKit('moola', MathKind.STRING_SET); -moolaIssuer.getAmountMathKind(); // Returns 'str', also known as'MathKind.STRING_SET` +moolaIssuer.getAmountMathKind(); // Returns 'str', also known as 'MathKind.STRING_SET` ``` ## issuer.getAmountOf(payment) - `payment` `{Payment}` @@ -266,7 +266,7 @@ const goodAmounts = Array(10).fill(quatloosAmountMath.make(10)); const arrayOfNewPayments = quatloos.Issuer.splitMany(oldPayment, goodAmounts); // The total amount in the amountArray must equal the original payment amount -// Set original amout to 1000 +// Set original amount to 1000 const payment = quatloosMint.mintPayment(quatloosAmountMath.make(1000)); // Total amounts in badAmounts equal 20, when it should equal 1000 diff --git a/main/ertp/api/mint.md b/main/ertp/api/mint.md index da8c0c3d7..eef225193 100644 --- a/main/ertp/api/mint.md +++ b/main/ertp/api/mint.md @@ -19,7 +19,7 @@ See here`issuer.getAmountMathKind()` - Get the kind of `amountMath` for this `issuer`, either `MathKind.NAT` (`nat`), diff --git a/main/ertp/guide/purses-and-payments.md b/main/ertp/guide/purses-and-payments.md index 15d3ce773..e8e69ca1e 100644 --- a/main/ertp/guide/purses-and-payments.md +++ b/main/ertp/guide/purses-and-payments.md @@ -106,7 +106,7 @@ API Reference](./api/#ertp-api). - ```js const quatloosPurse = quatloosIssuer.makeEmptyPurse(); const quatloosPayment = quatloosMint.mintPayment(quatloosAmountMath.make(123)); - const quatloos123 = quatloosmountMath.make(123); + const quatloos123 = quatloosAmountMath.make(123); // Deposit a payment for 123 quatloos into the purse. Ensure that this is the amount you expect. quatloosPurse.deposit(quatloosPayment, quatloos123); const secondPayment = quatloosMint.mintPayment(quatloosAmountMath.make(100)); @@ -203,7 +203,7 @@ Other objects' `payment`-related methods: - Transfer all assets from the `payment` to a returned new `payment` and delete the original from the `issuer`'s records. Any references to the old `payment` outside the `issuer` will still exist, but if anyone attempts to use the - old `paymen`t, an error is thrown. + old `payment`, an error is thrown. If `optAmount` is present, the `payment` balance must be equal to it or it throws @@ -274,7 +274,7 @@ Other objects' `payment`-related methods: const quatloos123 = quatloosAmountMath.make(123); // Deposit a payment for 123 quatloos into the purse. Ensure that this is what you expect. quatloosPurse.deposit(quatloosPayment, quatloos123); - const secondPayment = quatloosint.mintPayment(quatloosmountMath.make(100)); + const secondPayment = quatloosMint.mintPayment(quatloosAmountMath.make(100)); // Throws error quatloosPurse.deposit(secondPayment, quatloos123); ``` diff --git a/main/getting-started/agoric-cli-guide.md b/main/getting-started/agoric-cli-guide.md index 9495cd712..504e21395 100644 --- a/main/getting-started/agoric-cli-guide.md +++ b/main/getting-started/agoric-cli-guide.md @@ -6,7 +6,7 @@ You use the Agoric CLI to install dependencies, initialize, deploy, and start Ag ### Starting Multiuser Dapps -When developing a Dapp, you may need to test how it behaves with multiple users before deploying it publically. +When developing a Dapp, you may need to test how it behaves with multiple users before deploying it publicly. These users could have different roles, such as the contract deployer, an auctioneer, a bidder, a buyer, a seller, etc. The Agoric CLI implements a local-chain-multiuser scenario for developing and testing multiuser Dapps. @@ -87,7 +87,7 @@ that doesn’t share cookies with any other ag-solo’s browser. For example, if create a new Chrome profile, or open a Firefox or Safari window. Navigate to `https://local.agoric.com/` and, in the resulting page, set the address to `http://localhost:8001` Click **Save**. Then click **Open** and verify that it opens a different wallet and REPL (the REPL history will be blank). Type `console.log(8001)` -in the REPL, hit **Enter**, and see the `console.log` command and output in the REPL’s history. +in the REPL, hit **Enter**, and see the `console.log` command and output in the REPL's history. ![REPL](./assets/REPL-2.png) @@ -192,7 +192,7 @@ Use `agoric help` whenever you need help with one of the above Agoric CLI comman - `-v`, `--verbose`: Output a more detailed version of help (note: only for some commands) - `-h`, `--help`: display help for command - **Examples**: - - Display Agoric CLI commmands with brief descriptions. + - Display Agoric CLI commands with brief descriptions. - `agoric help` - Display current Agoric version number - `agoric -V help` diff --git a/main/getting-started/deploying.md b/main/getting-started/deploying.md index bebeb7fb1..47b8c1865 100644 --- a/main/getting-started/deploying.md +++ b/main/getting-started/deploying.md @@ -19,7 +19,7 @@ Remember, your Dapp has three primary subdirectories: ## How it works All deployment happens via the local running Agoric process. This is usually the `ag-solo` process, -and frequently refered to as that or just as `ag-solo`. It is also sometimes described as/called an Agoric VM or a local server. +and frequently referred to as that or just as `ag-solo`. It is also sometimes described as/called an Agoric VM or a local server. `ag-solo` communicates with either a locally running or remote chain. The local process has a `home` object, which contains references to services on-chain, including `zoe`, the default `registry`, and an application user's `wallet`. Developers can diff --git a/main/getting-started/start-a-project.md b/main/getting-started/start-a-project.md index a6889e9d3..3b8db37c7 100644 --- a/main/getting-started/start-a-project.md +++ b/main/getting-started/start-a-project.md @@ -80,7 +80,7 @@ Cycle](https://agoric.com/documentation/getting-started/development-cycle/) 6 Open another shell, go to your demo directory - For the remainer of this table, we call this the deploy shell. + For the remainder of this table, we call this the deploy shell.

Use the same project directory name and location as you used in Step 2. In this example, we used demo but you may have used a different name in Step 2. diff --git a/main/glossary/README.md b/main/glossary/README.md index 382a394e0..1499593c9 100644 --- a/main/glossary/README.md +++ b/main/glossary/README.md @@ -67,7 +67,7 @@ synchronously compared for structural equivalence. A comparable is a JavaScript object containing no promises, and can thus be locally compared for equality with another object. If either object -contains promises, equality is indeterminable. If both are fullfilled down +contains promises, equality is indeterminable. If both are fulfilled down to Presences and local state, then either they're the same all the way down, or they represent different objects. @@ -94,7 +94,7 @@ see the [ERTP Introduction](https://agoric.com/documentation/getting-started/ert A particular view or API of an object. An object can have many facets. ## Fungible -A fungible asset is one where all exemplars of the asset are interchangable. For example, if you +A fungible asset is one where all exemplars of the asset are interchangeable. For example, if you have 100 one dollar bills and need to pay someone five dollars, it does not matter which five one dollar bills you use. Also see [non-fungible](#non-fungible). @@ -130,10 +130,10 @@ and the [ERTP API's Mint section](https://agoric.com/documentation/ertp/api/mint ## Non-fungible A non-fungible asset is one where each incidence of the asset has unique individual properties and -is not interchangable with another incidence. For example, if your asset is show tickets, it matters to the buyer +is not interchangeable with another incidence. For example, if your asset is show tickets, it matters to the buyer what the date and time of the show is, which row the seat is in, and where in the row the seat is (and likely other factors as well). You can't just give them any ticket in your supply, -as they are not interchangable (and may even have different prices). See also [fungible](#fungible). +as they are not interchangeable (and may even have different prices). See also [fungible](#fungible). ## Notifier @@ -144,12 +144,12 @@ See more: [Notifier](/distributed-programming.md) ## Object Capabilities -Objects have state, behavior, and references. Lets say Object A has references to Objects B and C, while B and C do not have references to each other. Thus, A can communicate with B and C, and B and C cannot commuicate with each other. +Objects have state, behavior, and references. Lets say Object A has references to Objects B and C, while B and C do not have references to each other. Thus, A can communicate with B and C, and B and C cannot communicate with each other. There is an effective zero-cost firewall between B and C. An *object capability system* constrains how references are obtained. You can't get one just by knowing the name of a global variable or a public class. You can get a reference in only three ways. - Creation: Functions that create objects get a reference to them. -- Construction: Constuctors can endow their constructed objects with references, including inherited references. +- Construction: Constructors can endow their constructed objects with references, including inherited references. - Introduction: - A has references to B and C. - B and C do *not* have references to each other diff --git a/main/manual-setup/README.md b/main/manual-setup/README.md index 44eaeaebd..4e48eb2d1 100644 --- a/main/manual-setup/README.md +++ b/main/manual-setup/README.md @@ -8,7 +8,7 @@ This document gives an overview of the process of setting up 1. a local environment that will allow you to build and debug 2. an environment that emulates a remote setup for testing 3. deploying to the TestNet -4. (not available yet) deploying to MainNet +4. (not available yet) deploying to Mainnet In order to build a DeFi app in the SwingSet environment, your team will have to write code for three things: @@ -19,7 +19,7 @@ In order to build a DeFi app in the SwingSet environment, your team will have to other chains -To develop and deploy new code, you'll have to clone our [Cosmic SwingSet](https://github.com/Agoric/cosmic-swingset) repo from GitHib +To develop and deploy new code, you'll have to clone our [Cosmic SwingSet](https://github.com/Agoric/cosmic-swingset) repo from GitHub ```sh $ git clone https://github.com/Agoric/cosmic-swingset @@ -86,7 +86,7 @@ In this scenario, you run: The solo nodes communicate with the testnet node -Before using this scenario, it is recommanded that you test your code with Scenario 3. +Before using this scenario, it is recommended that you test your code with Scenario 3. Prepare the chain and solo nodes: ```sh diff --git a/main/manual-setup/pixel-demo.md b/main/manual-setup/pixel-demo.md deleted file mode 100644 index e43a9bdc8..000000000 --- a/main/manual-setup/pixel-demo.md +++ /dev/null @@ -1,161 +0,0 @@ -# Pixel Demo - -This demo is roughly based on [Reddit's -r/Place](https://en.wikipedia.org/wiki/Place_(Reddit)), but has a -number of additional features that showcase the unique affordances of -the Agoric platform, including: higher-order contracts, easy creation -of new assets, and safe code reusability. - -| ![Reddit's r/place](./assets/rplace.png) | -|:--:| -| *Reddit's r/place as a social experiment in cooperation* | - - -## Installation - -| ![Pixel Gallery](./assets/pixel-demo.png) | -|:--:| -| *The testnet pixel demo. Slightly fewer pixels.* | - - -The pixel demo runs on [our private testnet](https://github.com/Agoric/cosmic-swingset#agorics-cosmic-swingset). For instructions on how to -run a local, off-chain version for yourself, please see [Scenario 3 -here](https://github.com/Agoric/cosmic-swingset#different-scenarios). - -## Getting Started - -In the pixel demo, the goal is to be able to amass enough pixels to -draw a design on a pixel canvas. You start out empty-handed, with no -money and no pixels to your name. However, you do have access to the *gallery*, the -administrator of the canvas. The gallery has a handful of -methods that allow you to obtain a few pixels for free, color them, -sell them, and buy more. - -To access the gallery, type `home.gallery` in the REPL. `home.gallery` -is a remote object (what we call a *presence*). It actually lives in -another environment (what we call a *vat*). Instead of `obj.foo()`, we -can write `E(obj).foo()` or the syntactic sugar, `obj~.foo()` and get a -promise for the result. We call this syntactic sugar ['wavy dot'](https://github.com/Agoric/proposal-wavy-dot). The syntax -means "deliver the message foo() to the actual object asynchronously, -in its own turn, wherever and whenever it is, even if it is local." -Using `E` or `~.`, you can talk asynchronously to local and remote objects -in exactly the same way. For example, the first thing you might want -to do is tap the gallery faucet to get a pixel for free: - -```js -px = home.gallery~.tapFaucet() -``` - -`tapFaucet` returns a pixel and saves it under `px`. The pixel that you receive is -actually in the form of an ERTP payment. [ERTP](/ertp/guide/) (Electronic Rights Transfer Protocol) -is our smart contract framework for handling transferable objects. -Payments have a few functions. Let's call `getBalance()` on our payment -to see which pixel we received. - -```js -px~.getBalance() -``` - -You might see something like: - -```js -{ - "label": { - "assay": [Presence 15], - "allegedName": "pixels" - }, - "units" : [{ "x":1, "y":4 }] -} -``` - -The `units` tells us which pixels we've received. `{ x:1, y:4 }` -means that we got a pixel that is in the fifth row (`y:4`) and 2 pixels -from the left (`x:1`). To color the pixel, we need to get the use -object from the payment. You can think of the use object as a regular -JavaScript object that just happens to be associated with an ERTP -payment. - -```js -use = px~.getUse() -``` - -Your use object will be stored under `use`. Now we -can use it to color. - -```js -use~.changeColorAll('#FF69B4') -``` - -The following commands show a pixel being obtained from the faucet, -getting the 'use' object, coloring the pixel, and selling a pixel to the gallery through an -escrow smart contract. - -``` -px = home.gallery~.tapFaucet(); -px~.getBalance(); -use = px~.getUse(); -use~.changeColorAll('yellow'); -px2 = home.gallery~.tapFaucet(); -asset2 = px2~.getBalance(); -asset2.then(a => home.gallery~.pricePixelUnitOps(a)); -hostInvite = home.gallery~.sellToGallery(asset2); -seat = hostInvite~.host~.redeem(hostInvite~.inviteP); -offered = seat~.offer(px2); -assays = home.gallery~.getAssays(); -pxPurse = assays~.pixelAssay~.makeEmptyPurse(); -dustPurse = assays~.dustAssay~.makeEmptyPurse(); -collected = offered.then(_ => home.gallery~.collectFromGallery(seat, dustPurse, pxPurse, 'my escrow')); -collected.then(_ => dustPurse~.getBalance()); -``` - -Woohoo! We're now a few dust richer than when we started. - -Learn more about ERTP and our pixel demo [here](https://github.com/Agoric/ERTP). - -To see the contracts you've uploaded [as per the README](https://github.com/Agoric/cosmic-swingset/blob/master/lib/ag-solo/contracts/README-contract.md), try: - -```js -home.uploads~.list() -home.uploads~.get('encouragementBot')~.spawn()~.encourageMe('Person') -``` - -## Initial Endowments - -When a client is started up, it has a few items in a record named home. - -* gallery: the Pixel Gallery, described above -* purse: a purse that can hold pixel Dust -* moolah: a purse that starts out with 1000 `moolah` -* sharingService: a service that makes it possible to pass capabilities between vats -* canvasStatePublisher: a service with the message subscribe(callback) -* [uploads](https://github.com/Agoric/cosmic-swingset/blob/master/lib/ag-solo/contracts/README-contract.md): a private directory - of contracts you've uploaded -* registrar: a public directory for published objects -* localTimerService and chainTimerService: tools for scheduling -* [zoe](/zoe/guide/): support for contracts with Offer-Safety Enforcement - -### sharingService - -`home.sharingService` is a service that lets you connect to -other vats that are connected to the same remote chain vat. sharingService -has three methods: `createSharedMap(name)`, `grabSharedMap(name)`, and -`validate(sharedMap)`. These allow you to create a SharedMap which you can -use to pass items to and from another vat. The sharingService's -methods are designed to allow you to share a newly created sharedMap -with one other vat, after which the name can't be reused. - -The way to use it is to call `createSharedMap() `with a name that you share -with someone else. They then call `grabSharedMap`() and pass the name you -gave. If they get a valid SharedMap, then you have a private -channel. If they don't get it, then someone else must have tried to -grab the name first, and you can discard that one and try again. - -Once you each have an end, either of you can call `addEntry(key, value)` -to store an object, which the other party can retrieve with -`lookup(key)`. - -### canvasStatePublisher - -`home.canvasStatePublisher` has a `subscribe()` method, which takes a callback -function. When the state of the pixel gallery changes, the callback's -`notify()` method is called with the new state. diff --git a/main/miscellaneous/contributing.md b/main/miscellaneous/contributing.md index 0f8c7b641..58a7313f4 100644 --- a/main/miscellaneous/contributing.md +++ b/main/miscellaneous/contributing.md @@ -69,7 +69,7 @@ If we are using child routes, we must use the Object form as child routes are sp { title: 'API', path: '/api/', - collapsable: false, + collapsible: false, sidebarDepth: 2, children: [ { title: 'Mint', path: '/api/mint' }, diff --git a/main/zoe/api/records.md b/main/zoe/api/records.md index 430fa82a4..fc12bb575 100644 --- a/main/zoe/api/records.md +++ b/main/zoe/api/records.md @@ -130,22 +130,11 @@ The possible records are: } ``` -## OfferStatuses Record - -`active` and `inactive` lists of offerHandles. - -```js -{ - active: someListOfOfferHandles, - inactive: anotherListOfOfferHandles -} -``` - ## Installation Record ```js { installationHandle, // opaque identifier, used as the table key - bundle, // contains source code (accesible via bundle.source) and other info. + bundle, // contains source code (accessible via bundle.source) and other info. } ``` diff --git a/main/zoe/api/zoe-contract-facet.md b/main/zoe/api/zoe-contract-facet.md index 255e4de0d..aced012d9 100644 --- a/main/zoe/api/zoe-contract-facet.md +++ b/main/zoe/api/zoe-contract-facet.md @@ -77,7 +77,7 @@ the same as ERTP `mint`-created assets by ERTP methods. it is returned. Otherwise a new `seat` is returned. - `zcfMint.mintGains({ Token: amount }, seat);` - `burnLosses` - - `losses`: `AmountKeyWordRecord` + - `losses`: `AmountKeywordRecord` - `zcfSeat` : `{ZCFSeat}` - Returns: void - All `amounts` in `losses` must be of this `ZCFMint`'s `brand`. @@ -244,7 +244,7 @@ to manipulate the offer. The queries and operations are as follows: `Allocations` represent the `amounts` to be paid out to each `seat` on exit. Normal reasons for exiting are the user requesting to exit or the contract - explicitly chosing to close out the `seat`. The guarantees also hold if the contract + explicitly choosing to close out the `seat`. The guarantees also hold if the contract encounters an error or misbehaves. There are several methods for finding out what `amount` a current `allocation` is. diff --git a/main/zoe/api/zoe.md b/main/zoe/api/zoe.md index d5cf2eb4d..14358a1f1 100644 --- a/main/zoe/api/zoe.md +++ b/main/zoe/api/zoe.md @@ -295,7 +295,7 @@ and an operation to request that the offer exit, as follows: contract. The value is an `amount`. `Allocations` represent the `amounts` to be paid out to each `seat` on exit. Normal - reasons for exiting are the user requesting to exit or the contract explicitly chosing + reasons for exiting are the user requesting to exit or the contract explicitly choosing to close out the `seat`. The guarantees also hold if the contract encounters an error or misbehaves. There are several methods for finding out what `amount` a current `allocation` is. diff --git a/main/zoe/guide/contracts/barter-exchange.md b/main/zoe/guide/contracts/barter-exchange.md index aca9ba9dd..cbefc9a67 100644 --- a/main/zoe/guide/contracts/barter-exchange.md +++ b/main/zoe/guide/contracts/barter-exchange.md @@ -14,7 +14,7 @@ each other, it exchanges the specified amounts in each side's want clause. Since it pays no attention to keywords, and doesn't require registration of issuers, it can handle trades between goods of any type. It's like conventional "barter" in that there's no common -currency. "I have cantelopes and am looking for pillow cases." It +currency. "I have cantaloupes and am looking for pillow cases." It keeps an order book, and each time it receives a new offer, it looks for matches throughout the order book. diff --git a/main/zoe/guide/contracts/covered-call.md b/main/zoe/guide/contracts/covered-call.md index 45b4dadfa..a897e5b23 100644 --- a/main/zoe/guide/contracts/covered-call.md +++ b/main/zoe/guide/contracts/covered-call.md @@ -12,7 +12,7 @@ those derivative rights, and makes it possible for someone else to tell what they would get if they successfully exercise that right. The call option has an expiry date, at which point the contract is cancelled. It is "covered", meaning that the assets it describes is in the seller's -possession, and the actual asset will be transfered when the exchange takes +possession, and the actual asset will be transferred when the exchange takes place. In this contract, the expiry date is represented by the deadline at which diff --git a/main/zoe/guide/contracts/multipoolAutoswap.md b/main/zoe/guide/contracts/multipoolAutoswap.md index c04331ff7..ba865a0eb 100644 --- a/main/zoe/guide/contracts/multipoolAutoswap.md +++ b/main/zoe/guide/contracts/multipoolAutoswap.md @@ -156,7 +156,7 @@ Now he can add liquidity. The price ratio changes when anyone trades with the p so he should leave some flexibility in the proposal. The pool calculates the amount of `secondary` currency required based on the amount of `central` currency provided. Bob bumps up the amount of Moola he'll contribute by a little. If he was concerned -about how much liquidity this would produce, he would calcuate it and specify a rough +about how much liquidity this would produce, he would calculate it and specify a rough figure, but there's no need in this case. ```js diff --git a/main/zoe/guide/contracts/simple-exchange.md b/main/zoe/guide/contracts/simple-exchange.md index 66ab47b37..145c64e01 100644 --- a/main/zoe/guide/contracts/simple-exchange.md +++ b/main/zoe/guide/contracts/simple-exchange.md @@ -111,7 +111,7 @@ const bobBuyOrderProposal = harden({ }); const bobSimPayment = await E(bobSimoleanPurse).withdraw(simoleanAmountMath(7)); -onst bobPayments = { Price: bobSimPayment }; +const bobPayments = { Price: bobSimPayment }; const bobSeat = await E(zoe).offer( bobExclusiveInvitation,