From 1af2b34be6c3e90d530346896a7168c60bec6b98 Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Thu, 31 Mar 2022 14:30:15 -0700 Subject: [PATCH 1/2] deploy your own Quickstart dapp --- .../using-the-quickstart.md | 47 ++++++++++++++++++- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md b/docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md index eba87cdf..4d3cebc3 100644 --- a/docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md +++ b/docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md @@ -622,9 +622,9 @@ The script: In the browser where you have MetaMask enabled and one of the test accounts loaded, open a new tab and navigate to [the Pet Shop dapp](http://localhost:3001) where you can adopt lovely pets (sorry, not for real, it's a demo). -When you click on **Adopt**, a MetaMask window will pop up and request your permissions to continue with the transaction. +When you select **Adopt**, a MetaMask window pops up and requests your permission to continue with the transaction. -After the transaction is complete and successful, the status of the pet you adopted will show **Success**. +After the transaction is complete and successful, the status of the pet you adopted shows **Success**. ![Dapp UI](../../images/quickstart/dapp-ui.png) @@ -636,6 +636,49 @@ The MetaMask UI also keeps a record of the transaction. ![Dapp UI](../../images/quickstart/dapp-metamask-tx.png) +### Deploy your own dapp + +You can deploy your own dapp to the Quorum Developer Quickstart by configuring your dapp to point to the Quickstart +network. + +If you're using [Truffle](https://trufflesuite.com/truffle/), update the `networks` object in the +[Truffle configuration file](https://trufflesuite.com/docs/truffle/reference/configuration#networks) to specify which +networks to connect to for deployments and testing. +The Quickstart's RPC service endpoint is `http://localhost:8545`. + +For example, the following is the Truffle configuration file for the Pet Shop dapp used in the Quickstart GoQuorum +network: + +```js +const PrivateKeyProvider = require("@truffle/hdwallet-provider"); + +// insert the private key of the account used in MetaMask, e.g. Account 1 (Miner Coinbase Account) +const privateKey = "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3"; + +module.exports = { + networks: { + development: { + host: "127.0.0.1", + port: 7545, + network_id: "*" // Match any network id + }, + develop: { + port: 8545 + }, + quickstartWallet: { + provider: () => new PrivateKeyProvider(privateKey, "http://localhost:8545"), + network_id: "*", + } + } +}; +``` + +Deploy the dapp using: + +```bash +truffle migrate --network quickstartWallet +``` + ## Stop and restart the private network without removing containers To shut down the private network without deleting the containers: From bbf2e476d671095b95c28756be65bc640c653bbe Mon Sep 17 00:00:00 2001 From: Alexandra Tran Date: Thu, 31 Mar 2022 14:34:56 -0700 Subject: [PATCH 2/2] minor fix --- docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md b/docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md index 4d3cebc3..42469b56 100644 --- a/docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md +++ b/docs/tutorials/quorum-dev-quickstart/using-the-quickstart.md @@ -668,6 +668,9 @@ module.exports = { quickstartWallet: { provider: () => new PrivateKeyProvider(privateKey, "http://localhost:8545"), network_id: "*", + type: "quorum", + gasPrice: 0, + chainId: 1337 } } };