diff --git a/dapps/dapp-challenges/challenge-0-crowdfund.mdx b/dapps/dapp-challenges/challenge-0-crowdfund.mdx index 24ed92a7..1ac34492 100644 --- a/dapps/dapp-challenges/challenge-0-crowdfund.mdx +++ b/dapps/dapp-challenges/challenge-0-crowdfund.mdx @@ -26,16 +26,14 @@ Start by installing the required dependencies. Required: - `soroban-cli alias`: [Download Soroban Alias](https://github.com/stellar/soroban-example-dapp#install-dependencies) -- `docker` (Standalone backend requires it): [Download Docker](https://www.docker.com/products/docker-desktop) - `Node` v18: [Download Node](https://nodejs.org/en/download/) - `Freighter Wallet`: [Freighter Wallet](https://freighter.app/) -First, clone the Soroban example dapp repo and check out the `challenge` branch: +First, clone the Soroban Dapps Challenge repo and check out the `crowdfund` branch: ```sh -git clone https://github.com/stellar/soroban-example-dapp -cd soroban-example-dapp -git checkout challenge +git clone https://github.com/stellar/soroban-dapps-challenge.git +git checkout crowdfund ``` Then, install soroban-cli alias by running the following command: @@ -44,35 +42,14 @@ Then, install soroban-cli alias by running the following command: 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/). +## Checkpoint 1: 🎬 Deploy Smart Contracts -Then, and build the soroban-preview docker image: +Now that you have the Crowdfund branch checked out, it's time to deploy the smart contracts to a Sandbox environment. -```sh -make build-docker -``` - -Building the docker image lets you avoid installing the specific version of soroban-cli if desired. - -## Checkpoint 1: πŸš€ Launch Backend 🌐 - -Open your Docker Desktop app and make sure it is running. Then run the following command to start the backend: +In your terminal, load the contracts and initialize them in the Sandbox environment by running the following commands: ```sh -./quickstart.sh standalone -``` - -and wait for it to start. - -## Checkpoint 2: 🎬 Deploy Smart Contracts - -Now that the backend environment is set up, we need to deploy our smart contracts to in a sandbox environment. - -In another terminal, load the contracts and initialize them on the Standalone network by running the following commands: - -```sh -npm run clean -NETWORK=standalone npm run setup +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. @@ -100,7 +77,9 @@ Please, save your deployed contract ID, you will need it to complete the challen Mark smart contracts deployed -## Checkpoint 3: 🀝 Connect the Frontend to the Backend +## Checkpoint 2: 🀝 Connect the Frontend to the Backend + +Now that you have the smart contracts deployed, it's time to check out the frontend of your dapp. First, start the development server: @@ -110,28 +89,15 @@ npm run dev Now open your browser and visit [http://localhost:3000](http://localhost:3000). You should be able to see the frontend of your dapp. -> Note: Follow the instructions below and ensure that you have funded your wallet address that you intend to use from browser, otherwise the dapp display will be blank and a 'Account not found' will be printed on browser's console only. - -Now that we have the frontend running, it's time to connect it with our smart contracts. +> Note: Follow the instructions below and ensure that you have funded your wallet address that you intend to use from browser, otherwise the dapp display will be blank and a 'Account not found' will be printed on browser's console only. If you are using Freighter, be sure that you have properly configured the Freighter Wallet by following the instructions [here](../guides/wallets#connect-a-wallet-freighter). -First, be sure that you have properly configured the Freighter Wallet by following the instructions [here](../guides/wallets#connect-a-wallet-freighter). +Now that you have the frontend running, it's time to connect it with your smart contracts. -Then, add the Standalone network in Freighter: +You will need to add some Futurenet network lumens to your wallet to interact with the dapp. Visit https://laboratory.stellar.org/#account-creator?network=futurenet, and follow the instructions to create and or fund an account on Futurenet. -- Name: `Standalone` -- URL: `http://localhost:8000/soroban/rpc` -- Passphrase: `Standalone Network ; February 2017` -- Allow HTTP connection: `Enabled` -- Switch to this network: `Enabled` +> Note: These are test lumens for use with Futurenet and cannot be used on Mainnet -Next, add some Standalone network lumens to your Freighter wallet by doing the following: - -- Copy the address for your freighter wallet. -- Visit `http://localhost:8000/friendbot?addr=` - -> Note: These are test lumens for use with your local network and cannot be used on Futurenet or Mainnet - -## Checkpoint 4: 🏦 Mint Tokens for the Crowdfunding Campaign +## Checkpoint 3: 🏦 Mint Tokens for the Crowdfunding Campaign Open the dapp frontend and click on the "Mint 100 ABND" button. @@ -145,9 +111,9 @@ You should see an updated balance in the pledge component. -> Note: These are test tokens for use with your local network and cannot be used on Futurenet or Mainnet +> Note: These are test tokens for use with Futurenet and cannot be used on Mainnet -## Checkpoint 5: πŸ’° Fund the Crowdfunding Campaign +## Checkpoint 4: πŸ’° Fund the Crowdfunding Campaign Now that you have your wallet set up, let's fund the crowdfunding campaign. @@ -169,23 +135,14 @@ You should see an updated balance in the amount you have pledged in the pledge c Funding completed -## Checkpoint 6: 🚒 Ship it! 🚁 - -Now that your dapp is fully functional locally, next prepare it for deployment on Futurenet. +## Checkpoint 5: 🚒 Ship it! 🚁 -Stop the development server by pressing `ctrl+c` in the terminal where it is running. - -If you are running docker, now is a good time to stop the Stellar and Soroban preview containers. - -```sh -docker stop stellar soroban-preview -``` +Now that your dapp is fully functional, next prepare it for a new deployment on Futurenet, this time with a hosted frontend. Then, run the following commands to initialize the contracts on Futurenet: ```sh -npm run clean -npm run setup +npm run reset ``` Then run the dev server again: @@ -198,6 +155,12 @@ Now, open your browser and visit [http://localhost:3000](http://localhost:3000). Ensure that you are connected to Futurenet and you should be able to see the frontend of your dapp! +Next, you will need to remove unneccessary files for the the deployment. Run the following command to remove the `target` directory: + +```sh +rm -rf target +``` + Next, you will use the Vercel cli to complete our deployment. > Note: If you don’t already have a [Vercel account], you will need to create one and link it to your GitHub account. @@ -207,13 +170,13 @@ Next, you will use the Vercel cli to complete our deployment. First install the Vercel cli: ```sh -npm i global vercel +npm i --global vercel ``` Then, run the following command to deploy your dapp: ```sh -npx vercel +npx vercel --prod ``` Then, continue through the prompts (you will not need to modify any settings) until you reach the completion prompt similar to the following: @@ -235,9 +198,8 @@ You can now visit the preview link to see your deployed dapp! πŸŽ‰ -You will need to add some Futurenet network lumens to your Freighter wallet to interact with the deployed 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. -## Checkpoint 7: πŸ’ͺ Pass the Challenge! +## Checkpoint 6: πŸ’ͺ Pass the Challenge! Submit your public url to the challenge form and proceed to the next step to check your work. @@ -251,7 +213,7 @@ Join [our Community in Discord](https://discord.gg/stellardev) in case you have ::: -## Checkpoint 8: βœ… Check your work! +## Checkpoint 7: βœ… Check your work! In order to successfully complete this challenge, your work needs to be checked. Please, follow this steps: @@ -264,7 +226,7 @@ public key: GBSXUXZSA2VEXN5VGOWE5ODAJLC575JCMWRJ4FFRDWSTRCJ123456789 contract Id: CBKY7UN5VGD4LIQFOBOTSUSQWK67BZZTA23NIEVWSWRR5SAT26JQN2BN production: https://soroban-example-dapp-rho.vercel.app ``` -3. Create a Pull Request to the `stellar/soroban-dapps-challenge/main` branch. When the PR will be created, CI actions will check the `crowdfund/challenge/output.txt` file data and update your progress. +3. Create a Pull Request to the `stellar/soroban-dapps-challenge/crowdfund` branch. When the PR will be created, CI actions will check the `crowdfund/challenge/output.txt` file data and update your progress. 4. Wait for the CI/CD pipeline results. 5. Fix errors if present: - find the error reason in the Crowdfund challenge CI results (you can find a link right in the pull request); @@ -317,3 +279,7 @@ Then via the web UI, you should be able to: - Deposit an allowed asset - See your deposit(s) appear on the page as the transactions are confirmed. - "Live"-Update the page with the total amount with the new amount + +## πŸ›‘οΈπŸ—‘οΈ Take On More Challenges + +View your progress and take on more challenges by visiting your [User Dashboard!](/dashboard) \ No newline at end of file diff --git a/dapps/dapp-challenges/challenge-1-payment.mdx b/dapps/dapp-challenges/challenge-1-payment.mdx index ed57aef2..2114336d 100644 --- a/dapps/dapp-challenges/challenge-1-payment.mdx +++ b/dapps/dapp-challenges/challenge-1-payment.mdx @@ -41,8 +41,8 @@ Before you begin, ensure you have the following installed on your system: Clone and set up the Example Soroban Payment Dapp repository: ```bash -git clone https://github.com/stellar/soroban-react-payment.git -cd soroban-react-payment +git clone https://github.com/stellar/soroban-dapps-challenge.git +git checkout payment yarn ``` @@ -230,13 +230,13 @@ For this example, we will use the Vercel cli to complete your deployment First install the Vercel cli: ```bash -npm i global vercel +npm i --global vercel ``` Then run the following command to deploy your app: ```bash -npx vercel +npx vercel --prod ``` Then continue through the prompts until you see the following output: @@ -309,3 +309,7 @@ To ensure that you've covered all the key user actions during the challenge, fol - Send tokens to another account - Deploy the site with Vercel - Submit your public key and URL + +## πŸ›‘οΈπŸ—‘οΈ Take On More Challenges + +View your progress and take on more challenges by visiting your [User Dashboard!](/dashboard) \ No newline at end of file diff --git a/dapps/dapp-challenges/challenge-2-liquidity-pool.mdx b/dapps/dapp-challenges/challenge-2-liquidity-pool.mdx index 78a6ad16..e958eef6 100644 --- a/dapps/dapp-challenges/challenge-2-liquidity-pool.mdx +++ b/dapps/dapp-challenges/challenge-2-liquidity-pool.mdx @@ -30,7 +30,6 @@ Start by installing the required dependencies. Required: - `soroban-cli`: [Download Soroban-CLI](https://soroban.stellar.org/docs/getting-started/setup#install-the-soroban-cli) -- `docker` (standalone backend requires it): [Download Docker](https://www.docker.com/products/docker-desktop) - `Node` v18: [Download Node](https://nodejs.org/en/download/) - `Freighter Wallet`: [Freighter Wallet](https://freighter.app/) @@ -38,35 +37,22 @@ First, clone the Soroban example dapp repo and navigate to the `liquidity-pool` ```bash git clone https://github.com/stellar/soroban-dapps-challenge -cd soroban-dapps-challenge/liquidity-pool -yarn +git checkout liquidity-pool ``` +Then, install soroban-cli alias by running the following command: -Next, ensure 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/) and proceed to the next step. - -## Checkpoint 1: πŸš€ Launch Backend 🌐 - -Open your Docker Desktop app and make sure it is running. Then run the following command to start the backend: - -```bash -docker run --rm -it \ - -p 8000:8000 \ - --name stellar \ - stellar/quickstart:soroban-dev \ - --standalone \ - --enable-soroban-rpc +```sh +cargo install_soroban ``` -and wait for it to start. - -## Checkpoint 2: 🎬 Deploy Smart Contracts +## Checkpoint 1: 🎬 Deploy Smart Contracts -Now that the backend environment is set up, you must deploy your smart contracts to a sandbox environment. +Now that you have the Liquidity Pool branch checked out, it's time to deploy the smart contracts to a Sandbox environment. -In another terminal, load the contracts and initialize them on the Standalone network by running the following commands: +In your terminal, load the contracts and initialize them in the Sandbox environment by running the following commands: ```bash -./initialize.sh standalone +./initialize.sh futurenet ``` 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. @@ -89,35 +75,12 @@ Done Mark smart contracts deployed -## Checkpoint 3: 🀝 Connect the Frontend to the Backend - -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`: +## Checkpoint 2: 🀝 Connect the Frontend to the Backend -```diff --const rpcUrl = 'https://rpc-futurenet.stellar.org' -+const rpcUrl = 'http://localhost:8000/soroban/rpc' -``` - -Then, change each contract network to `standalone`: - -```diff --export const tokenAContract = new TokenA({ ...networksA.futurenet, rpcUrl }) --export const tokenBContract = new TokenB({ ...networksB.futurenet, rpcUrl }) --export const shareTokenContract = new ShareToken({ ...networksShareToken.futurenet, rpcUrl }) --export const liquidityPoolContract = new LiquidityPool({ ...networksLiquidityPool.futurenet, rpcUrl }) - -+export const tokenAContract = new TokenA({ ...networksA.standalone, rpcUrl }) -+export const tokenBContract = new TokenB({ ...networksB.standalone, rpcUrl }) -+export const shareTokenContract = new ShareToken({...networksShareToken.standalone,rpcUrl}) -+export const liquidityPoolContract = new LiquidityPool({...networksLiquidityPool.standalone, rpcUrl }) -``` - -Then, navigate to the frontend folder and run the development server: +Navigate to the frontend folder and run the development server: ```bash -cd path/to/soroban-dapps-challenge/liquidity-pool/frontend +cd frontend make setup && make start_dev ``` @@ -125,28 +88,15 @@ make setup && make start_dev Now open your browser and visit [http://localhost:5173](http://localhost:5173/). You should be able to see the frontend of your dapp. -> Note: Follow the instructions below and ensure that you have funded the wallet address that you intend to use from the browser. Otherwise, the dapp display will be blank and 'Account not found' will be printed on the browser's console. Furthermore, the example endpoint may differ from your local endpoint. +> Note: Follow the instructions below and ensure that you have funded your wallet address that you intend to use from browser. If you are using Freighter, be sure that you have properly configured the Freighter Wallet by following the instructions [here](../guides/wallets#connect-a-wallet-freighter). Now that you have the frontend running, it's time to connect it with your smart contracts. -First, ensure that you have properly configured the Freighter wallet by following the instructions [here](../guides/wallets#connect-a-wallet-freighter). - -Then, add the Standalone network in Freighter: - -- Name: `Standalone` -- URL: `http://localhost:8000/soroban/rpc` -- Passphrase: `Standalone Network ; February 2017` -- Allow HTTP connection: `Enabled` -- Switch to this network: `Enabled` - -Next, add some Standalone network lumens to your Freighter wallet by doing the following: - -- Copy the address for your Freighter wallet. -- Visit `http://localhost:8000/friendbot?addr=` +You will need to add some Futurenet network lumens to your wallet to interact with the dapp. Visit https://laboratory.stellar.org/#account-creator?network=futurenet, and follow the instructions to create and or fund an account on Futurenet. -> Note: These are test lumens for use with your local network and cannot be used on Futurenet or Mainnet. +> Note: These are test lumens for use on Futurenet and cannot be used on Mainnet -## Checkpoint 4: 🏦 Mint Tokens for the Liquidity Pool +## Checkpoint 3: 🏦 Mint Tokens for the Liquidity Pool Open the dapp frontend and click the "MINT" button for USDC and BTC. @@ -160,9 +110,9 @@ You should see an updated balance in the account balance component. -> Note: These are test tokens for use with your local network and cannot be used on Futurenet or Mainnet. +> Note: These are test tokens for use on Futurenet or Mainnet. -## Checkpoint 5: πŸ’° Deposit into the Liquidity Pool +## Checkpoint 4: πŸ’° Deposit into the Liquidity Pool Now that your wallet is set up, let's fund the liquidity pool. @@ -178,7 +128,7 @@ Once the transaction is confirmed, you should see your balances updated. You should see an updated balance in the amounts you have deposited in the account and reserve balance components, respectively. Following the example, you should see 50 USDC, 50 BTC, and 50 POOL. -## Checkpoint 6: πŸ”„ Make a Swap +## Checkpoint 5: πŸ”„ Make a Swap Now that you have funded the liquidity pool, let's make a swap. @@ -192,7 +142,7 @@ Once the transaction is confirmed, you should see updated balances on the fronte -## Checkpoint 7: ‴️ Make a Withdrawal +## Checkpoint 6: ‴️ Make a Withdrawal Now that you have funded the liquidity pool, let's make a withdrawal. @@ -208,19 +158,11 @@ Once the transaction is confirmed, you should see updated balances on the fronte Transactions completed -## Checkpoint 8: 🚒 Ship It! 🚁 +## Checkpoint 7: 🚒 Ship It! 🚁 -Now that your dapp is fully functional locally, it's time to prepare it for deployment on Futurenet. +Now that your dapp is fully functional , it's time to prepare it for new deployment on Futurenet using Vercel. -Stop the development server by pressing `ctrl+c` in the terminal where it is running. - -If you are running docker, now is a good time to stop the Stellar and Soroban preview containers. - -```bash -docker stop stellar soroban-preview -``` - -Then, run the following commands to initialize the contracts on Futurenet: +First, run the following commands to initialize the contracts on Futurenet: ```bash rm -rf .soroban @@ -229,41 +171,17 @@ 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](#checkpoint-3--connect-the-frontend-to-the-backend). - -Navigate to `frontend/src/contracts.ts` and change `const rpcUrl`: - -```diff --const rpcUrl = 'http://localhost:8000/soroban/rpc' -+const rpcUrl = 'https://rpc-futurenet.stellar.org' -``` - -Then, change each contract network to Futurenet: - -```diff --export const tokenAContract = new TokenA({ ...networksA.standalone, rpcUrl }) --export const tokenBContract = new TokenB({ ...networksB.standalone, rpcUrl }) --export const shareTokenContract = new ShareToken({...networksShareToken.standalone, rpcUrl }) --export const liquidityPoolContract = new LiquidityPool({...networksLiquidityPool.standalone, rpcUrl }) - -+export const tokenAContract = new TokenA({ ...networksA.futurenet, rpcUrl }) -+export const tokenBContract = new TokenB({ ...networksB.futurenet, rpcUrl }) -+export const shareTokenContract = new ShareToken({ ...networksShareToken.futurenet, rpcUrl }) -+export const liquidityPoolContract = new LiquidityPool({ ...networksLiquidityPool.futurenet, rpcUrl }) -``` - -Then, navigate to the frontend directory and run the development server: +Then, navigate to the `frontend` directory and run the development server: ```bash -cd path/to/soroban-dapps-challenge/liquidity-pool/frontend -make start_dev +cd frontend +make setup && make start_dev ``` - Now, open your browser and visit [http://localhost:5173](http://localhost:5173/). 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: +Next, you will remove the target directory, as it is not used by Vercel to deploy your site. To do this, navigate to the `liquidity-pool` directory and run the following: ``` rm -rf target @@ -271,7 +189,7 @@ rm -rf target Next, you must move your `.soroban` directory to the frontend directory. -From a terminal in the liquidity-pool directory, run the following command: +From a terminal in the `liquidity-pool` directory, run the following command: ```bash mv .soroban frontend/.soroban @@ -300,13 +218,13 @@ Next, you will use the Vercel CLI to complete your deployment. First, install the Vercel CLI: ```bash -npm i global vercel +npm i --global vercel ``` Then, open a terminal in the `liquidity-pool` directory and run the following command to deploy your example dapp: ```bash -npx vercel +npx vercel --prod ``` Then, continue through the prompts until you see the following message about setting overrides: @@ -353,13 +271,13 @@ You can now visit the preview link to see your deployed dapp! πŸŽ‰ 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! +## Checkpoint 8: βœ… Complete the Challenge! Submit your public URL to the challenge form. - + -## Checkpoint 10: πŸ’ͺ Flex! +## Checkpoint 9: πŸ’ͺ Flex! 🍴 [Fork the liquidity pool repo] and make your own changes to the dapp. @@ -387,3 +305,7 @@ Then, via the web UI, you should be able to: - Swap assets - Withdraw assets - See your transaction(s) appear on the page as the transactions are confirmed + +## πŸ›‘οΈπŸ—‘οΈ Take On More Challenges + +View your progress and take on more challenges by visiting your [User Dashboard!](/dashboard) \ No newline at end of file diff --git a/dapps/guides/docker.mdx b/dapps/guides/docker.mdx index 08b99fec..d9cfa274 100644 --- a/dapps/guides/docker.mdx +++ b/dapps/guides/docker.mdx @@ -30,7 +30,7 @@ This command simplifies the Docker build process and ensures it's consistently e ```bash docker build . \ - --tag soroban-preview:9 \ + --tag soroban-preview:11 \ --force-rm \ --rm ``` @@ -44,7 +44,7 @@ docker build . Instructs Docker to build an image using the Dockerfile in the current directory (denoted by the "."). ```bash ---tag soroban-preview:9 +--tag soroban-preview:11 ``` Gives a name and tag to our image, in this case, soroban-preview with the tag 9. @@ -89,7 +89,7 @@ esac # this is set to the quickstart `soroban-dev` image anointed as the release # for a given Soroban Release, it is captured on Soroban Releases - https://soroban.stellar.org/docs/reference/releases -QUICKSTART_SOROBAN_DOCKER_SHA=stellar/quickstart:soroban-dev@sha256:ed57f7a7683e3568ae401f5c6e93341a9f77d8ad41191bf752944d7898981e0c +QUICKSTART_SOROBAN_DOCKER_SHA=stellar/quickstart:testing@sha256:40636cdb1b9168b47e5dc120949fe3610ff914e8dd43409edb6fa66496bdd9c3 shift @@ -118,7 +118,7 @@ docker run -dti \ -p 8001:8000 \ --ipc=host \ --network soroban-network \ - soroban-preview:9 + soroban-preview:11 # Run the stellar quickstart image diff --git a/dapps/index.mdx b/dapps/index.mdx index ae5387f1..0339c631 100644 --- a/dapps/index.mdx +++ b/dapps/index.mdx @@ -15,13 +15,18 @@ While the course specifically focuses on the Soroban platform, the knowledge you Through The Soroban Dapps Challenge, you'll have hands-on experience using Soroban's initial versions of the smart contracts environment, a Rust SDK, a CLI, and an RPC server. You'll learn how to write, test, and deploy smart contracts, and you'll get to see your code in action on Futurenet. -# What this course entails +# What This Course Entails We've designed this course as a learning adventure. It's a way for developers from the Stellar ecosystem and other blockchain communities to experiment, provide feedback, and contribute to the Soroban development process. As you progress through The Soroban Dapps Challenge, anticipate your code to break and updates to shift things. We invite you to experiment and build but also remind you that changes are afoot as we prepare for the production release. -# Giving your feedback + +## Getting Started + +To get started, simply head over to the [Dashboard](/dashboard), connect your wallet, and see what challenges await you! + +# Giving Your Feedback We value your input. Feel free to file issues in the Soroban repos or raise them in the soroban channel in the Stellar Developer [Discord](https://discord.gg/3qrBhbwE). diff --git a/sidebarsDapps.js b/sidebarsDapps.js index 306b997c..774dd63d 100644 --- a/sidebarsDapps.js +++ b/sidebarsDapps.js @@ -6,8 +6,27 @@ module.exports = { href: '/dashboard', }, { - type: "autogenerated", - dirName: ".", // generate sidebar from the docs folder (or versioned_docs/) + type: 'doc', + id: 'index', + label: 'Index', + }, + { + type: 'doc', + id: 'scaffold-soroban', + label: 'Scaffold Soroban', + }, + { + type: 'category', + label: 'Guides', + items: [ + 'guides/docker', + 'guides/initialization', + 'guides/react', + 'guides/smart-contracts', + 'guides/wallets' + ], + collapsible: true, // The category can be collapsed. + collapsed: true, // Initially, the category will be collapsed. }, ], }; diff --git a/src/components/atoms/challenge-card/index.tsx b/src/components/atoms/challenge-card/index.tsx index 22e2b5e6..06746ac2 100644 --- a/src/components/atoms/challenge-card/index.tsx +++ b/src/components/atoms/challenge-card/index.tsx @@ -27,7 +27,7 @@ const challengeConfig: { [key: string]: ChallengeConfig } = { icon: iconBulb, route: "/dapps/dapp-challenges/challenge-0-crowdfund", lastCheckpointRoute: - "/dapps/dapp-challenges/challenge-0-crowdfund#checkpoint-8--check-your-work", + "/dapps/dapp-challenges/challenge-0-crowdfund#checkpoint-7--check-your-work", }, 1: { icon: iconWallet, diff --git a/src/components/atoms/challenge-form/index.tsx b/src/components/atoms/challenge-form/index.tsx index 11ef913d..679ce0bc 100644 --- a/src/components/atoms/challenge-form/index.tsx +++ b/src/components/atoms/challenge-form/index.tsx @@ -140,15 +140,15 @@ function InnerComponent({ id }: { id: number }) { useEffect(() => { if (activeChain) { - if (activeChain.name?.toString() !== "Testnet") { - alert("Please ensure that you are connected to Testnet"); + if (activeChain.name?.toString() !== "Futurenet" || activeChain.name !=="Testnet" ) { + alert("Please ensure that you are connected to Futurenet or Testnet"); setLoading(true); } if (activeChain.name?.toString() === undefined) { - alert("Please ensure that you are connected to Testnet"); + alert("Please ensure that you are connected to Futurenet or Testnet"); setLoading(true); } - if (activeChain.name?.toString() === "Testnet" && address) { + if (activeChain.name?.toString() === "Futurenet" && address || activeChain.name?.toString() === "Testnet" && address) { setLoading(false); } } @@ -158,7 +158,7 @@ function InnerComponent({ id }: { id: number }) { if (loading) { return (
- Please connect to Testnet network. + Please connect to Testnet or Futurenet network.
); diff --git a/src/components/atoms/start-challenge-button/index.tsx b/src/components/atoms/start-challenge-button/index.tsx index 7aa1c375..01fdb468 100644 --- a/src/components/atoms/start-challenge-button/index.tsx +++ b/src/components/atoms/start-challenge-button/index.tsx @@ -43,7 +43,7 @@ export default function StartChallengeButton({ const fetchProgress = async () => { setIsLoading(true); try { - const response = await fetchUserProgress(address); + const response = await fetchUserProgress(address?.toString() || ""); const challenges = response.data.challenges || []; const challenge = getActiveChallenge(challenges, id); setData(challenges); @@ -60,7 +60,7 @@ export default function StartChallengeButton({ const startChallenge = async () => { const updatedItem: UpdateProgressData = { - userId: address, + userId: address?.toString() || "", challengeId: id, challengeProgress: 0, startDate: Date.now(),