Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
add reference to earlier step; fix conflict in crowdfund dapp page
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian-dev28 committed Sep 18, 2023
1 parent d7d0366 commit fdd0cd8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
26 changes: 13 additions & 13 deletions dapps/dapp-challenges/challenge-0-crowdfund.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,23 @@ Required:

First, clone the Soroban example dapp repo and check out the `challenge` branch:

```bash
```sh
git clone https://github.com/stellar/soroban-example-dapp
cd soroban-example-dapp
git checkout challenge
```

Then, install soroban-cli alias by running the following command:

```bash
```sh
cargo install_soroban
```

Next, make sure that your Docker daemon is running by either opening [Docker Desktop](https://www.docker.com/products/docker-desktop) (recommended) or following the instructions provided [here](https://docs.docker.com/config/daemon/start/).

Then, and build the soroban-preview docker image:

```bash
```sh
make build-docker
```

Expand All @@ -58,7 +58,7 @@ Building the docker image lets you avoid installing the specific version of soro

Open your Docker Desktop app and make sure it is running. Then run the following command to start the backend:

```bash
```sh
./quickstart.sh standalone
```

Expand All @@ -70,13 +70,13 @@ Now that the backend environment is set up, we need to deploy our smart contract

In another terminal, load the contracts and initialize them on the Standalone network by running the following commands:

```bash
```sh
npm run clean
NETWORK=standalone npm run setup
```
If the command runs successfully, your terminal will return a series of messages notifying you about the successful initialization of the contracts and the post-installation sequence.

```bash
```sh
Contract deployed succesfully with ID: CBXHU5BWWTOCZRYX3DMSSKCFG7B3K2YG2I5F75ALPQ6GCY6ZES2XKLTI
Deploy the crowdfund contract
Contract deployed succesfully with ID: CBKY7UN5VGD4LIQFOBOTSUSQWK67BZZTA23NIEVWSWRR5SAT26JQN2BN
Expand Down Expand Up @@ -104,7 +104,7 @@ Please, save your deployed contract ID, you will need it to complete the challen

First, start the development server:

```bash
```sh
npm run dev
```

Expand Down Expand Up @@ -177,20 +177,20 @@ Stop the development server by pressing `ctrl+c` in the terminal where it is run

If you are running docker, now is a good time to stop the Stellar and Soroban preview containers.

```bash
```sh
docker stop stellar soroban-preview
```

Then, run the following commands to initialize the contracts on Futurenet:

```bash
```sh
npm run clean
npm run setup
```

Then run the dev server again:

```bash
```sh
npm run dev
```

Expand All @@ -206,19 +206,19 @@ Next, you will use the Vercel cli to complete our deployment.

First install the Vercel cli:

```bash
```sh
npm i global vercel
```

Then, run the following command to deploy your dapp:

```bash
```sh
npx vercel
```

Then, continue through the prompts (you will not need to modify any settings) until you reach the completion prompt similar to the following:

```bash
```sh
Vercel CLI 30.1.1
🔗 Linked to julian-dev28/soroban-example-dapp (created .vercel)
🔍 Inspect: https://vercel.com/julian-dev28/soroban-example-dapp/C1YZVQSqh6WcyR1uvxz8q2tW1tjD [2s]
Expand Down
12 changes: 6 additions & 6 deletions dapps/dapp-challenges/challenge-2-liquidity-pool.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,14 @@ Done

For this step, you must change the existing contract configuration to suit a local deployment.

First, navigate to `frontend/src/contracts.ts` and change const rpcUrl:
First, navigate to `frontend/src/contracts.ts` and change `const rpcUrl`:

```diff
-const rpcUrl = 'https://rpc-futurenet.stellar.org'
+const rpcUrl = 'http://localhost:8000/soroban/rpc'
```

Then, change each contract network to standalone:
Then, change each contract network to `standalone`:

```diff
-export const tokenAContract = new TokenA({ ...networksA.futurenet, rpcUrl })
Expand Down Expand Up @@ -229,7 +229,7 @@ rm -rf .soroban

> Note: This will remove the existing contracts and initialize new ones on Futurenet.
Next, revert the changes made to the contract network configs earlier.
Next, revert the changes made to the contract network configs [earlier](#checkpoint-3--connect-the-frontend-to-the-backend).

Navigate to `frontend/src/contracts.ts` and change `const rpcUrl`:

Expand Down Expand Up @@ -261,7 +261,7 @@ make start_dev

Now, open your browser and visit [http://localhost:5173](http://localhost:5173/).

Ensure that you are connected to Futurenet, and you should be able to see the frontend of your dapp!
Ensure that Freighter is connected to Futurenet, and you should be able to see the frontend of your dapp!

Next, you will remove the target directory, as it is not used by Vercel to deploy your site. To do this, run the following:

Expand Down Expand Up @@ -309,7 +309,7 @@ Then, open a terminal in the `liquidity-pool` directory and run the following co
npx vercel
```

Then, continue through the prompts until you see the following message:
Then, continue through the prompts until you see the following message about setting overrides:

```bash
? Want to override the settings? [y/N] y
Expand Down Expand Up @@ -351,7 +351,7 @@ You can now visit the preview link to see your deployed dapp! 🎉

<img src={futurenetDeployment} width="90%" />

You must add Futurenet network lumens to your Freighter wallet to interact with the deployed example dapp. Visit [https://laboratory.stellar.org/#account-creator?network=futurenet](https://laboratory.stellar.org/#account-creator?network=futurenet), and follow the instructions to create your Freighter account on Futurenet.
You must add Futurenet network lumens to your Freighter wallet to interact with the deployed example dapp. Visit https://laboratory.stellar.org/#account-creator?network=futurenet, and follow the instructions to create your Freighter account on Futurenet.

## Checkpoint 9: ✅ Complete the Challenge!

Expand Down

0 comments on commit fdd0cd8

Please sign in to comment.