From 1ad0d210bc8c12f35ffe2dc08e18459f634016e2 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Fri, 17 Jul 2020 18:09:10 -0600 Subject: [PATCH] Remove tictactoe, add Break and Hello World to docs (#11117) * Remove tictactoe, add Break to apps docs * Add hello world * fix whitespace Co-authored-by: publish-docs.sh --- docs/.gitignore | 1 + docs/sidebars.js | 3 ++- docs/src/apps/break.md | 31 +++++++++++++++++++++++++++++++ docs/src/apps/hello-world.md | 23 +++++++++++++++++++++++ docs/src/apps/tictactoe.md | 23 ----------------------- 5 files changed, 57 insertions(+), 24 deletions(-) create mode 100644 docs/src/apps/break.md create mode 100644 docs/src/apps/hello-world.md delete mode 100644 docs/src/apps/tictactoe.md diff --git a/docs/.gitignore b/docs/.gitignore index 76a7583077..9ffcecb90e 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -11,6 +11,7 @@ /static/img/*.svg /static/img/*.png vercel.json +package-lock.json # Misc .DS_Store diff --git a/docs/sidebars.js b/docs/sidebars.js index f44ff95d2f..c49caae6dc 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -46,8 +46,9 @@ module.exports = { "Develop Applications": [ "apps", "apps/rent", + "apps/hello-world", + "apps/break", "apps/webwallet", - "apps/tictactoe", "apps/drones", "transaction", "apps/jsonrpc-api", diff --git a/docs/src/apps/break.md b/docs/src/apps/break.md new file mode 100644 index 0000000000..90aa1ec1f9 --- /dev/null +++ b/docs/src/apps/break.md @@ -0,0 +1,31 @@ +--- +title: "Example: Break" +--- + +[Break](https://break.solana.com/) is a React app that gives users a visceral +feeling for just how fast and high-performance the Solana network really is. +Can you _break_ the Solana blockchain? +During a 15 second playthough, each click of a button or keystroke +sends a new transaction to the cluster. Smash the keyboard as fast as you can +and watch your transactions get finalized in real time while the network takes +it all in stride! + +Break can be played on our Devnet, Testnet and Mainnet Beta networks. Plays are +free on Devnet and Testnet, where the session is funded by a network faucet. +On Mainnet Beta, users pay to play 0.08 SOL per game. The session account can +be funded by a local keystore wallet or by scanning a QR code from Trust Wallet +to transfer the tokens. + +[Click here to play Break](https://break.solana.com/) + +## Build and run Break locally + +First fetch the latest version of the example code: + +```bash +$ git clone https://github.com/solana-labs/break.git +$ cd break +``` + +Next, follow the steps in the git repository's +[README](https://github.com/solana-labs/break/blob/master/README.md). diff --git a/docs/src/apps/hello-world.md b/docs/src/apps/hello-world.md new file mode 100644 index 0000000000..f448b4ab7f --- /dev/null +++ b/docs/src/apps/hello-world.md @@ -0,0 +1,23 @@ +--- +title: "Example: Hello World" +--- + +Hello World is a project that demonstrates how to use the Solana Javascript API +to build, deploy, and interact with programs on the Solana blockchain. + +The project comprises of: + - An on-chain hello world program + - A client that can send a "hello" to an account and get back the number of + times "hello" has been sent + +## Build and run Hello World program + +First fetch the latest version of the example code: + +```bash +$ git clone https://github.com/solana-labs/example-helloworld.git +$ cd example-helloworld +``` + +Next, follow the steps in the git repository's +[README](https://github.com/solana-labs/example-helloworld/blob/master/README.md). diff --git a/docs/src/apps/tictactoe.md b/docs/src/apps/tictactoe.md deleted file mode 100644 index fe603e9639..0000000000 --- a/docs/src/apps/tictactoe.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -title: "Example: Tic-Tac-Toe" ---- - -[Click here to play Tic-Tac-Toe](https://solana-example-tictactoe.herokuapp.com/) on the Solana testnet. Open the link and wait for another player to join, or open the link in a second browser tab to play against yourself. You will see that every move a player makes stores a transaction on the ledger. - -## Build and run Tic-Tac-Toe locally - -First fetch the latest release of the example code: - -```bash -$ git clone https://github.com/solana-labs/example-tictactoe.git -$ cd example-tictactoe -$ TAG=$(git describe --tags $(git rev-list --tags ---max-count=1)) -$ git checkout $TAG -``` - -Next, follow the steps in the git repository's [README](https://github.com/solana-labs/example-tictactoe/blob/master/README.md). - -## Getting lamports to users - -You may have noticed you interacted with the Solana cluster without first needing to acquire lamports to pay transaction fees. Under the hood, the web app creates a new ephemeral identity and sends a request to an off-chain service for a signed transaction authorizing a user to start a new game. The service is called a _drone_. When the app sends the signed transaction to the Solana cluster, the drone's lamports are spent to pay the transaction fee and start the game. In a real world app, the drone might request the user watch an ad or pass a CAPTCHA before signing over its lamports.