Skip to content

Commit

Permalink
Update start-a-project.md
Browse files Browse the repository at this point in the history
Fixed spacing issues
  • Loading branch information
kbennett2000 authored Dec 11, 2023
1 parent 8f52a1a commit 7edab30
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions main/guides/getting-started/start-a-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,34 +18,41 @@ Currently Agoric supports [Windows Subsystem for Linux](https://learn.microsoft.
# Installing Curl
Begin by installing the `curl` utility, if it's not already installed. If using Ubuntu you'll first need to run the command below to prevent an error when installing `curl`.
`sudo apt-get update --fix-missing`

![006](./assets/006.png)

Install the `curl` utility.
`sudo apt install curl`

![007](./assets/007.png)


# Installing NVM and Node v18.16.0
At this point the Node Version Manager (NVM) utility will be installed. NVM makes it easy to select the specific version of Node that will be required (v18.16.0).
`curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash`

![008](./assets/008.png)

Next, run the command:
`source ~/.bashrc`

![009](./assets/009.png)

Finally, install NVM with the command:
`nvm install v18.16.0`

![010](./assets/010.png)


# Installing Yarn
Run the `corepack enable` command.
`corepack enable`

![023](./assets/023.png)

Now run the `yarn –version` command
`yarn –version`

![049](./assets/049.png)


Expand All @@ -71,79 +78,100 @@ sudo apt-get update

Now you can install Docker!
`sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin`

![028](./assets/028.png)

Now that Docker has been installed you'll need to add your user account to the Docker group.
`sudo usermod -aG docker $USER`

![029](./assets/029.png)

Now go ahead and reboot your image.

![030](./assets/030.png)

Once your image has rebooted and you've logged back on, test that Docker works by running the `hello-world` sample.
`docker run hello-world`

![031](./assets/031.png)


# Installing the Sample Dapp
Now you'll use yarn to pull down the sample dapp. The sample dapp will be placed in a subfolder named `demo`.
`yarn create @agoric/dapp --dapp-base https://github.com/agoric-labs/ --dapp-template dapp-game-places demo`

![024](./assets/024.png)


# Install Dapp Dependencies
Now navigate to the `demo` directory and run the `yarn install` command to install any solution dependencies.
`cd demo`
`yarn install`

![033](./assets/033.png)


# Starting the Network
Now go ahead and start the network using the `yarn start` command.
`yarn start:docker`

![034](./assets/034.png)

Once the network has started you can check the logs. Once you see messages showing blocks with a status of `commit` you can rest assured the network is running properly.
`yarn docker:logs`

![035](./assets/035.png)


# Starting the Dapp Smart Contract
Exit the log window and start the smart contract by running the `yarn start` command.
`yarn start:contract`

![036](./assets/036.png)


# Installing Keplr Wallet
Next, you'll install the Keplr wallet plug-in. Open up your browser and navigate to [https://www.keplr.app/download](https://www.keplr.app/download). Select the version appropriate to your browser.

![037](./assets/037.png)

Once the plug-in has been installed, open Keplr and select the option to "Import an existing wallet". Then choose the option to "Use recovery phrase or private key".

![038](./assets/038.png)

![040](./assets/040.png)

To import your wallet, you'll need to copy your mnemonic phrase into Keplr. You can find this series of 24 words back on your terminal window. Copy from this window into your Keplr wallet, then hit the "Import" button. Note that your phrase will NOT be the same as the one shown in this guide, all phrases are unique!

![039](./assets/039.png)

![041](./assets/041.png)

Give your new wallet a name and a password.

![042](./assets/042.png)

Ensure the "Cosmos Hub" chain is selected, then click "Save".

![043](./assets/043.png)

Starting the Dapp
To start the UI for the sample dapp, run the `yarn start:ui` command. Note the localhost link that appears on your terminal window. Open this link in your browser.

![044](./assets/044.png)

![045](./assets/045.png)

From the browser UI, click the "Connect Wallet" button to connect your Keplr wallet. You will be asked to approve this connection.

![046](./assets/046.png)

Once your wallet is connected, click on the "Make Offer" button to purchase 3 properties. Approve the transaction in your Keplr wallet.

![047](./assets/047.png)

When the transaction is complete you will notice some IST has been debited from your wallet, and you are the owner of three new properties.

![048](./assets/048.png)

Congratulations! You've just completed your first Agoric dapp!

0 comments on commit 7edab30

Please sign in to comment.