diff --git a/main/.vuepress/config.js b/main/.vuepress/config.js index 4a990c6c6..5763489e3 100644 --- a/main/.vuepress/config.js +++ b/main/.vuepress/config.js @@ -21,6 +21,36 @@ module.exports = { // Links must be absolute with trailing slash '/guide/' // Trailing slash implies it is looking for a .md file sidebar: { + '/ertp/': [ + { + title: 'ERTP Guide', + path: '/ertp/guide/', + collapsable: false, + sideBarDepth: 3, + children: [ + '/ertp/guide/', + '/ertp/guide/getting-started', + '/ertp/guide/assays', + '/ertp/guide/default-configuration', + '/ertp/guide/contract-hosts' + ] + }, + { + title: 'ERTP API', + path: '/ertp/api/', + collapsable: false, + sideBarDepth: 3, + children: [ + '/ertp/api/', + '/ertp/api/mint', + { + title: 'DescOps', + path: '/ertp/api/descOps' + } + ] + } + ], + '/zoe/': [ { title: 'Zoe', @@ -34,11 +64,10 @@ module.exports = { }, { title: 'Zoe Contracts', - path: '/zoe/guide/contracts/', + path: '/zoe/guide/contracts/autoswap', collapsable: false, sideBarDepth: 3, children: [ - '/zoe/guide/contracts/', '/zoe/guide/contracts/autoswap', '/zoe/guide/contracts/public-auction', '/zoe/guide/contracts/public-swap' @@ -51,32 +80,15 @@ module.exports = { } ], - '/ertp/': [ - { - title: 'ERTP Guide', - path: '/ertp/guide/', - collapsable: false, - sideBarDepth: 3, - children: [ - '/ertp/guide/', - '/ertp/guide/getting-started', - '/ertp/guide/assays', - '/ertp/guide/default-configuration', - '/ertp/guide/contract-hosts' - ] - }, + '/smart-contracts-tutorials/': [ { - title: 'ERTP API', - path: '/ertp/api/', + title: 'Smart Contracts Tutorials', + path: '/smart-contracts-tutorials/guess37-one', collapsable: false, sideBarDepth: 3, children: [ - '/ertp/api/', - '/ertp/api/mint', - { - title: 'DescOps', - path: '/ertp/api/descOps' - } + '/smart-contracts-tutorials/guess37-one', + '/smart-contracts-tutorials/guess37-multiple' ] } ] diff --git a/main/.vuepress/themeConfig/nav.js b/main/.vuepress/themeConfig/nav.js index 103f6bcb9..865546268 100644 --- a/main/.vuepress/themeConfig/nav.js +++ b/main/.vuepress/themeConfig/nav.js @@ -8,6 +8,7 @@ module.exports = [ { text: 'ERTP ', // spaces to add some distance to next link ariaLabel: 'ERTP Menu', + link: '/ertp/guide/', items: [ { text: 'Guide', @@ -29,6 +30,7 @@ module.exports = [ { text: 'Zoe', ariaLabel: 'Zoe Menu', + link: '/zoe/guide', items: [ { text: 'Guide', @@ -38,7 +40,7 @@ module.exports = [ { text: 'Contracts', ariaLabel: 'Zoe Contracts Link', - link: '/zoe/guide/contracts' + link: '/zoe/guide/contracts/autoswap' }, { text: 'API', @@ -52,6 +54,23 @@ module.exports = [ } ], }, + { + text: 'Tutorials', + ariaLabel: 'Tutorials Menu', + link: '/smart-contracts-tutorials/guess37-one', + items: [ + { + text: 'Guess 37 - One Participant', + ariaLabel: 'Guess 37 - One Participant', + link: '/smart-contracts-tutorials/guess37-one' + }, + { + text: 'Guess37 - Multiple Participants', + ariaLabel: 'Guess37 Multiple Participants', + link: '/smart-contracts-tutorials/guess37-multiple' + } + ] + }, { text: 'Learn More', ariaLabel: 'Learn More Menu', diff --git a/smart-contracts-tutorial/guess37-multiple-participants.md b/main/smart-contracts-tutorials/guess37-multiple.md similarity index 99% rename from smart-contracts-tutorial/guess37-multiple-participants.md rename to main/smart-contracts-tutorials/guess37-multiple.md index 17ec88739..7377d35ed 100644 --- a/smart-contracts-tutorial/guess37-multiple-participants.md +++ b/main/smart-contracts-tutorials/guess37-multiple.md @@ -1,4 +1,4 @@ -# Guess37 multiple participants +# Guess37 - Multiple Participants In the [previous step](./first-contract), we set up a contract and ran it and played the guess37 game @@ -122,4 +122,4 @@ Thanks to the [ERTP framework](https://github.com/Agoric/ERTP) and the design of All of this is assured even if the contract installer is malicious Now that we've seen all the guarantees ERTP provide, let's make a more interesting contract than a game to guess a fixed number -In the next step, we'll see how to configure the contract and make bets \ No newline at end of file +In the next step, we'll see how to configure the contract and make bets diff --git a/smart-contracts-tutorial/first-contract.md b/main/smart-contracts-tutorials/guess37-one.md similarity index 97% rename from smart-contracts-tutorial/first-contract.md rename to main/smart-contracts-tutorials/guess37-one.md index d7b7b58ce..d67c1c911 100644 --- a/smart-contracts-tutorial/first-contract.md +++ b/main/smart-contracts-tutorials/guess37-one.md @@ -1,4 +1,6 @@ -# Tutorial on creating and running the simplest Smart Contract +# Guess37 - One Participant + +## Tutorial on creating and running the simplest Smart Contract This first contract will be a one-player game where the player tries to guess a number. If they guess right, they win, otherwise, they lose. The game can be played any number of times and there is no actual stake. For the purpose of keeping things simple, the number is hardcoded to be `37` @@ -119,7 +121,7 @@ seat~.guess(14) seat~.guess(37) ``` -### Commands breakdown +### Commands breakdown The first `home` command shows what was defined in `lib/ag-solo/vats/vat-pixel.js` as return value of `createPixelBundle` It is an object containing the properties `contractHost`, `handoffService` and `guess37ContractSource` @@ -150,4 +152,4 @@ You've successfully written a smart contract in JavaScript and run it in a solo In the next steps, [we'll discover how to make someone else play the `guess37` game](./guess37-multiple-participants) -`TODO : explain ~. syntax` \ No newline at end of file +`TODO : explain ~. syntax` diff --git a/main/zoe/guide/contracts/README.md b/main/zoe/guide/contracts/README.md deleted file mode 100644 index da5c4a994..000000000 --- a/main/zoe/guide/contracts/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Zoe Contracts - -Here you can find several contracts written with Zoe.