From b2d96c1950dd0e02690ae2d3658e52250fb10a19 Mon Sep 17 00:00:00 2001 From: Nadai <112663528+Nadai2010@users.noreply.github.com> Date: Mon, 2 Sep 2024 04:49:22 +0100 Subject: [PATCH] Update Reference CH-1 (#133) --- README.md | 14 ++++++++++---- packages/nextjs/components/Footer.tsx | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0fc4837b..bbf0ed7a 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ ![readme-1](./packages/nextjs/public/banner-decentralized-staking.svg) +📚 This tutorial is meant for developers that already understand the 🖍️ basics: [Starklings](https://starklings.app/) or [Node Guardians](https://nodeguardians.io/campaigns?f=3%3D2) + 🦸 A superpower of Smart contracts is allowing you, the builder, to create a simple set of rules that an adversarial group of players can use to work together. In this challenge, you create a decentralized application where users can coordinate a group funding effort. If the users cooperate, the money is collected in a second smart contract. If they defect, the worst that can happen is everyone gets their money back. The users only have to trust the code. 🏦 Build a `Staker.cairo` contract that collects **ETH** from numerous addresses using a function `stake()` function and keeps track of `balances`. After some `deadline` if it has at least some `threshold` of ETH, it sends it to an `ExampleExternalContract` and triggers the `complete()` action sending the full balance. If not enough **ETH** is collected, allows users to `withdraw()`. @@ -18,9 +20,12 @@ Before you begin, you need to install the following tools: -- [Node (v18 LTS)](https://nodejs.org/en/download/) +- [Node (>= v18.17)](https://nodejs.org/en/download/) - Yarn ([v1](https://classic.yarnpkg.com/en/docs/install/) or [v2+](https://yarnpkg.com/getting-started/install)) - [Git](https://git-scm.com/downloads) +- [Rust](https://www.rust-lang.org/tools/install) +- [asdf](https://asdf-vm.com/guide/getting-started.html) +- [Cairo 1.0 extension for VSCode](https://marketplace.visualstudio.com/items?itemName=starkware.cairo1) ### Compatible versions @@ -28,13 +33,14 @@ Before you begin, you need to install the following tools: - Scarb - v2.6.5 - Snforge - v0.27.0 - Cairo - v2.6.4 +- Rpc - v0.7.0 -Make sure you have the compatible versions otherwise refer to [Scaffold-Stark Requirements](https://github.com/Quantum3-Labs/scaffold-stark-2?.tab=readme-ov-file#requirements) +Make sure you have the compatible versions otherwise refer to [Scaffold-Stark Requirements](https://github.com/Scaffold-Stark/scaffold-stark-2?.tab=readme-ov-file#requirements) Then download the challenge to your computer and install dependencies by running: ```sh -git clone https://github.com/Quantum3-Labs/speedrunstark.git challenge-1-decentralized-staking +git clone https://github.com/Scaffold-Stark/speedrunstark.git challenge-1-decentralized-staking cd challenge-1-decentralized-staking git checkout challenge-1-decentralized-staking yarn install @@ -281,6 +287,6 @@ For production-grade applications, it's recommended to obtain your own API keys --- -> 🏃 Head to your next challenge [here](https://github.com/Quantum3-Labs/speedrunstark/tree/challenge-2-token-vendor). +> 🏃 Head to your next challenge [here](https://github.com/Scaffold-Stark/speedrunstark/tree/challenge-2-token-vendor). > 💬 Problems, questions, comments on the stack? Post them to the [🏗 scaffold-stark developers chat](https://t.me/+wO3PtlRAreo4MDI9) diff --git a/packages/nextjs/components/Footer.tsx b/packages/nextjs/components/Footer.tsx index a4b95b6d..fb64489a 100644 --- a/packages/nextjs/components/Footer.tsx +++ b/packages/nextjs/components/Footer.tsx @@ -58,7 +58,7 @@ export const Footer = () => {