Coder Social home page Coder Social logo

se-2-challenges's Introduction

๐Ÿ— Scaffold-ETH 2 Challenges

Learn how to use ๐Ÿ— Scaffold-ETH 2 to create decentralized applications on Ethereum. ๐Ÿš€


๐Ÿšฉ Challenge 0: ๐ŸŽŸ Simple NFT Example

๐ŸŽซ Create a simple NFT to learn the basics of ๐Ÿ— scaffold-eth. You'll use ๐Ÿ‘ทโ€โ™€๏ธ HardHat to compile and deploy smart contracts. Then, you'll use a template React app full of important Ethereum components and hooks. Finally, you'll deploy an NFT to a public network to share with friends! ๐Ÿš€

https://github.com/scaffold-eth/se-2-challenges/tree/challenge-0-simple-nft


๐Ÿšฉ Challenge 1: ๐Ÿฅฉ Decentralized Staking App

๐Ÿฆธ A superpower of Ethereum 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.

https://github.com/scaffold-eth/se-2-challenges/tree/challenge-1-decentralized-staking


๐Ÿšฉ Challenge 2: ๐Ÿต Token Vendor

๐Ÿค– Smart contracts are kind of like "always on" vending machines that anyone can access. Let's make a decentralized, digital currency. Then, let's build an unstoppable vending machine that will buy and sell the currency. We'll learn about the "approve" pattern for ERC20s and how contract to contract interactions work.

https://github.com/scaffold-eth/se-2-challenges/tree/challenge-2-token-vendor


๐ŸŽ‰ Checkpoint: Eligible to join ๐Ÿฐ๏ธ BuidlGuidl

The BuidlGuidl is a curated group of Ethereum builders creating products, prototypes, and tutorials to enrich the web3 ecosystem. A place to show off your builds and meet other builders. Start crafting your Web3 portfolio by submitting your DEX, Multisig or SVG NFT build.

https://buidlguidl.com/


๐Ÿšฉ Challenge 3: ๐ŸŽฒ Dice Game

๐ŸŽฐ Randomness is tricky on a public deterministic blockchain. In this challenge you will explore creating random numbers using block hash and how that may be exploitable. Attack the dice game with your own contract by predicting the randomness ahead of time to always roll a winner!

https://github.com/scaffold-eth/se-2-challenges/tree/challenge-3-dice-game


๐Ÿšฉ Challenge 4: โš–๏ธ Build a DEX Challenge

๐Ÿ’ต Build an exchange that swaps ETH to tokens and tokens to ETH. ๐Ÿ’ฐ This is possible because the smart contract holds reserves of both assets and has a price function based on the ratio of the reserves. Liquidity providers are issued a token that represents their share of the reserves and fees...

DEX Telegram Channel: https://t.me/+_NeUIJ664Tc1MzIx

https://github.com/scaffold-eth/se-2-challenges/tree/challenge-4-dex


๐Ÿšฉ Challenge 5: ๐Ÿ“บ State Channel Application Challenge

๐Ÿ›ฃ๏ธ The Ethereum blockchain has great decentralization & security properties but these properties come at a price: transaction throughput is low, and transactions can be expensive. This makes many traditional web applications infeasible on a blockchain... or does it? State channels look to solve these problems by allowing participants to securely transact off-chain while keeping interaction with Ethereum Mainnet at a minimum.

State Channels Telegram Channel: https://t.me/+k0eUYngV2H0zYWUx

https://github.com/scaffold-eth/se-2-challenges/tree/challenge-5-state-channels


๐Ÿ’ก Contributing: Guide and Hints to create New Challenges

Check out already migrated Challenges to get a better idea of the structure and how to create new ones.

A quick start guide.

At base-challenge-template branch we will be adding the latest updates from Scaffold ETH 2. We'll also include the learnings we acquire during the Challenges we are adding, as well as the code that may be common to all the Challenges.

2. Edit pages/index.tsx

The main page should have a banner image (ask for it!) + the Challenge description.

{challengeHeroImage}

A {challengeDescription}.

๐ŸŒŸ The final deliverable is an app that {challengeDeliverable}. Deploy your contracts to a testnet then build and upload your app to a public web server. Submit the url on SpeedRunEthereum.com!

3. Implement the Challenge

  • Add the contract(s)
  • Add pages / components as you need (UI following the SpeedRunEthereum.com design vibe)
  • Create the test for the Smart Contract(s). The best starting point is to copy the tests from the SE1 Challenge you are migrating. The "envvar" logic there is used by the autograder, so don't remove them.

4. Adapt Header / MetaHeader component

Update the site title on Header.tsx and title and description of your challenge in MetaHeader.tsx.

5. Image assets for your Challenge

You will need to add the following image assets in packages/nextjs/public folder (ask the designers for it):

  • Thumbnail. thumbnail.png Will be shown in your link previews when shared to others in chat or in social media.
  • Hero image. hero.png It's a wider version of the Thumbnail with SRE logo at the bottom right. Used as README header, and as pages/index.tsx hero image.

6. Edit README adapting the base template

Adapt the base template README using the SE-1 version as a reference.

7. Create a PR against the challenge branch

We can iterate and test there.

se-2-challenges's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

se-2-challenges's Issues

challenge 6: Add toast notification when sending transactions

Description :

Since we are currently doing write transaction using contract instance and not using useTransactor we should show some UI toast / notfication while doing transaction similar to how we get when we use useScaffoldContractWrite

Maybe tweak useTransactor to incorporate contract instances write? (We might also solve this at SE-2 main repo level)

Challenge 2 - Front end error after setting sepolia as targetNetwork

When setting the targetNetwork in packages/nextjs/scaffold.config.ts to sepolia, I started getting a front end error when clicking into the Token Vendor tab. When testing on localhost, below is the pop-up error received.

image

When switching the targetNetwork to hardhat or goerli, there was no pop-up or console errors.

After deploying to vercel an error remained but only in the browser console. The following is that error.

image

I am unsure if this is due to the sepolia RPC acting up or not.

Challenge 0: use different package instead of react-json-view

Description :

It seems that the package we are using to show IPFS upload JSON data on UI seems not be maintained anymore and has some problem with SSR

We got away with the issue of SSR by using next/dynamic import:

const DynamicReactJson = dynamic(import("react-json-view"), { ssr: false });

As it was suggested here -> mac-s-g/react-json-view#121 (comment)

But it seems that in the latest very next version it breaks #89

Alternative which I found : https://viewer.textea.io/ but tells you to add @mui/material @emotion/react @emotion/styled as dependencies :( don't know if its worth it

Challenge 1 Iteration Findings

List of requests/bug findings from running challenge-1-decentralized-staking. These are not set in stone so feel free to discuss.

Feature Request
Is it possible to default the debug tab to land on the Staker.sol contract upon their initial visit?

Feature Request
This is more of a general SE-2 discussion. What about moving the Tx pop-up to be below the top tabs?
image

Feature Request
We need a more clear complete() process. Currently all that changes is the total staked on the Staker UI tab as seen in the screenshot. The old challenge had an atrocious bar that appeared at the top, so let's avoid it being that gross. Possibly something that appears above the main Staker UI box displaying the amount staked?
image

Challenge 4: Broken telegram link?

Hello,

In line 550 of the DEX challenge there is a link that takes you to a discussion on adding 1 wei for that especific calculation, however when I try to open the link it says that I'm not part of that group.

I'm already part of some telegram groups regarding SE-2 and the BuidlGuidl, what group should I join to open the link? or maybe is the link broken?

Thanks for your help

Challenge 0 - Checkpoint 4 deploy to Vercel build error with defaults

Ran into a weird error I'm not sure how to fix when i ran yarn vercel with the defaults

seems to be related to the react-json-view package getting a "ReferenceError: document is not defined"

Sorry to paste so much of the build logs here but are the warnings from [00:38:03.439] - [00:38:57.472] are all normal?

Any ideas on how i can fix this build?

[00:37:56.563] Running build in Washington, D.C., USA (East) โ€“ iad1 (Hive)
[00:37:56.660] Retrieving list of deployment files...
[00:37:57.281] Downloading 110 deployment files...
[00:37:57.293] Previous build caches not available
[00:37:57.831] Running "vercel build"
[00:37:58.357] Vercel CLI 32.2.5
[00:37:58.646] Installing dependencies...
[00:37:58.994] yarn install v1.22.17
[00:37:59.072] info No lockfile found.
[00:37:59.077] [1/4] Resolving packages...
[00:38:03.439] warning kubo-rpc-client > [email protected]: js-IPFS has been deprecated in favour of Helia - please see ipfs/js-ipfs#4336 for details
[00:38:03.766] warning kubo-rpc-client > ipfs-core-utils > [email protected]: js-IPFS has been deprecated in favour of Helia - please see ipfs/js-ipfs#4336 for details
[00:38:17.459] warning vercel > @vercel/remix-builder > @remix-run/dev > cacache > @npmcli/[email protected]: This functionality has been moved to @npmcli/fs
[00:38:17.705] warning vercel > @vercel/remix-builder > @remix-run/dev > @esbuild-plugins/node-modules-polyfill > rollup-plugin-node-polyfills > [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.
[00:38:18.212] warning vercel > @vercel/remix-builder > @remix-run/dev > @esbuild-plugins/node-modules-polyfill > rollup-plugin-node-polyfills > rollup-plugin-inject > magic-string > [email protected]: Please use @jridgewell/sourcemap-codec instead
[00:38:18.241] warning vercel > @vercel/remix-builder > @remix-run/dev > proxy-agent > pac-proxy-agent > pac-resolver > degenerator > [email protected]: The library contains critical security issues and should not be used for production! The maintenance of the project has been discontinued. Consider migrating your code to isolated-vm.
[00:38:18.565] [2/4] Fetching packages...
[00:38:57.431] [3/4] Linking dependencies...
[00:38:57.436] warning "react-hot-toast > [email protected]" has unmet peer dependency "csstype@^3.0.10".
[00:38:57.436] warning " > [email protected]" has incorrect peer dependency "react@^17.0.0 || ^16.3.0 || ^15.5.4".
[00:38:57.437] warning " > [email protected]" has incorrect peer dependency "react-dom@^17.0.0 || ^16.3.0 || ^15.5.4".
[00:38:57.437] warning "react-json-view > [email protected]" has incorrect peer dependency "react@^15.0.2 || ^16.0.0 || ^17.0.0".
[00:38:57.437] warning " > [email protected]" has incorrect peer dependency "typescript@>=5.0.4".
[00:38:57.437] warning "viem > [email protected]" has incorrect peer dependency "typescript@>=5.0.4".
[00:38:57.439] warning " > @typescript-eslint/[email protected]" has unmet peer dependency "@typescript-eslint/parser@^5.0.0".
[00:38:57.472] warning Workspaces can only be enabled in private projects.
[00:39:10.806] [4/4] Building fresh packages...
[00:39:15.603] success Saved lockfile.
[00:39:15.607] Done in 76.62s.
[00:39:15.687] Detected Next.js version: 13.5.1
[00:39:15.689] Running "yarn run build"
[00:39:15.886] yarn run v1.22.17
[00:39:15.910] $ next build
[00:39:16.465] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[00:39:16.465] This information is used to shape Next.js' roadmap and prioritize features.
[00:39:16.466] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[00:39:16.466] https://nextjs.org/telemetry
[00:39:16.466]
[00:39:16.556] Skipping validation of types
[00:39:16.556] Skipping linting
[00:39:16.976] Creating an optimized production build...
[00:39:35.195]
[00:39:35.195] ๏ฟฝ[35m๐ŸŒผ daisyUI 3.7.6๏ฟฝ[0m ๏ฟฝ[0mhttps://daisyui.com
[00:39:35.379] โ•ฐโ•ฎ
[00:39:35.380] โ•ฐโ”€ ๏ฟฝ[32mโœ”๏ธŽ๏ฟฝ[0m ๏ฟฝ[2m[ ๏ฟฝ[0m3๏ฟฝ[2m ]๏ฟฝ[0m themes are enabled. You can add more themes or make your own theme:
[00:39:35.380] https://daisyui.com/docs/themes
[00:39:35.381]
[00:39:35.383] ๏ฟฝ[32m โค๏ธŽ Support daisyUI๏ฟฝ[0m: https://opencollective.com/daisyui๏ฟฝ[0m
[00:39:35.383]
[00:39:46.738] โœ“ Compiled successfully
[00:39:46.739] Collecting page data...
[00:39:47.839] [DEPRECATED] Default export is deprecated. Instead use import { create } from 'zustand'.
[00:39:47.900] [DEPRECATED] Default export is deprecated. Instead use import { create } from 'zustand'.
[00:39:47.942] [DEPRECATED] Default export is deprecated. Instead use import { create } from 'zustand'.
[00:39:49.494] /vercel/path0/node_modules/react-json-view/dist/main.js:1
[00:39:49.497] !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.reactJsonView=t(require("react")):e.reactJsonView=t(e.React)}(this,(function(e){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=48)}([function(t,n){t.exports=e},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){var a=n(26)("wks"),r=n(17),o=n(3).Symbol,i="function"==typeof o;(e.exports=function(e){return a[e]||(a[e]=i&&o[e]||(i?o:r)("Symbol."+e))}).store=a},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){e.exports=!n(8)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var a=n(7),r=n(16);e.exports=n(4)?function(e,t,n){return a.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var a=n(10),r=n(35),o=n(23),i=Object.defineProperty;t.f=n(4)?Object.defineProperty:function(e,t,n){if(a(e),t=o(t,!0),a(n),r)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var a=n(40),r=n(22);e.exports=function(e){return a(r(e))}},function(e,t,n){var a=n(11);e.exports=function(e){if(!a(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t,n){var a=n(39),r=n(27);e.exports=Object.keys||function(e){return a(e,r)}},function(e,t){e.exports=!0},function(e,t,n){var a=n(3),r=n(1),o=n(53),i=n(6),s=n(5),c=function(e,t,n){var l,u,f,p=e&c.F,d=e&c.G,b=e&c.S,h=e&c.P,v=e&c.B,m=e&c.W,y=d?r:r[t]||(r[t]={}),g=y.prototype,E=d?a:b?a[t]:(a[t]||{}).prototype;for(l in d&&(n=t),n)(u=!p&&E&&void 0!==E[l])&&s(y,l)||(f=u?E[l]:n[l],y[l]=d&&"function"!=typeof E[l]?n[l]:v&&u?o(f,a):m&&E[l]==f?function(e){var t=function(t,n,a){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,a)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):h&&"function"==typeof f?o(Function.call,f):f,h&&((y.virtual||(y.virtual={}))[l]=f,e&c.R&&g&&!g[l]&&i(g,l,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){var n=0,a=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+a).toString(36))}},function(e,t,n){var a=n(22);e.exports=function(e){return Object(a(e))}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){"use strict";var a=n(52)(!0);n(34)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=a(t,n),this._i+=e.length,{value:e,done:!1})}))},functio
[00:39:49.500]
[00:39:49.500]
[00:39:49.500] ReferenceError: document is not defined
[00:39:49.501] at Module. (/vercel/path0/node_modules/react-json-view/dist/main.js:1:81443)
[00:39:49.501] at n (/vercel/path0/node_modules/react-json-view/dist/main.js:1:387)
[00:39:49.501] at Object. (/vercel/path0/node_modules/react-json-view/dist/main.js:1:18423)
[00:39:49.501] at n (/vercel/path0/node_modules/react-json-view/dist/main.js:1:387)
[00:39:49.501] at /vercel/path0/node_modules/react-json-view/dist/main.js:1:1186
[00:39:49.501] at /vercel/path0/node_modules/react-json-view/dist/main.js:1:1196
[00:39:49.501] at /vercel/path0/node_modules/react-json-view/dist/main.js:1:81
[00:39:49.501] at Object. (/vercel/path0/node_modules/react-json-view/dist/main.js:1:253)
[00:39:49.501] at Module._compile (node:internal/modules/cjs/loader:1256:14)
[00:39:49.501] at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
[00:39:49.501]
[00:39:49.501] Node.js v18.17.1
[00:39:49.554] Static worker unexpectedly exited with code: 1 and signal: null

Rewrite tests to viem

We need to rewrite test files of migrated challenges to viem too

  • Rewrite tests for Challenge 0
  • Rewrite tests for challenge 1
  • Rewrite tests for challenge 2
  • Rewrite tests for challenge 3
  • Rewrite tests for challenge 4
  • Rewrite tests for challenge 5

Challenge 2 - Updates

  • In the packages/hardhat/deploy/01_deploy_vendor.js file, make a clear distinction between the vendor deploy, token transfer, and transfer of ownership sections.
  • Vendor ETH and Token balances are commented out, with no note in the read me. Either uncomment them or add instructions to the ReadMe.
  • Edit Vendor.sol to not inherit Ownable.sol. Add instructions in the ReadMe to do so, including the code.
  • Uncomment the Buy Events section on the Events tab.
  • Add a Sell Tokens Events section, commented, and have the user uncomment it via ReadMe instructions.
  • The Buy Tokens UI - We should either show it by default, or provide instructions in the ReadMe to uncomment.

Challenge 4: Suggestions for UI/UX

GM maintainers

The DEX challenge inspired me to implement some basic user experience improvements and I'm curious if you might be open to my creating a pull request to implement them on the official branch. You can test drive here

Deposit Interaction

  • Added an additional input for balloon tokens that automatically updates similar to the experience of providing liquidity on uniswap
  • The logic for calling the deposit function remains unchanged so the balloon input is just for show although it does calculate how much ETH would be required to deposit x amount of balloons by mirroring the logic from the DEX contract solution

Withdraw Interaction

  • Replaced the integer input with a daisyui range that allows user to fine tune the amount and prevents trying to withdraw beyond max
Challenge.4._.SpeedRunEthereum.webm

Base template README

While we work on #3 let's update the README with all the things that need to be done when creating new challenges

E.g.

  • Edit README from the base data
  • Update the MetaHeader title / desc
  • thumbnail image
  • Create new pages in a certain way (to avoid a lot of conflicts when updating for the base-template)
  • ... etc

Challenge 4: Potential vulnerability with deposit function

I noticed that the provided solution code for the deposit function is transferring the $BAL tokens after updating the liquidity mapping. I think this may make the contract vulnerable to a reentrancy attack where a user could deposit ETH to be given liquidity without sending any $BAL. The malicious actor could then call the withdraw function and drain liquidity from the pool

image

Challenge 4 - Invalid Inputs

  • The ethToToken, Deposit, and Withdraw inputs will only allow a '.' if you first type in a 0. We should allow them to type something like '.5' instead of forcing '0.5'.

  • The tokenToEth input throws the following error when anything other than a number is entered, including a '.'
    image

This should behave in the same way the other inputs do where if you type a non number or decimal it omits it.

Challenge 4 - Required token allowance when depositing.

Currently when a user is calling deposit, if the ratio of ETH:Balloons isn't 1:1 the amount that needs to be approved is unclear. I believe this has been solved in the past by just approving a large number to get past it.

  • Is this important enough to include in the challenge, or as it fine as is?

If we want to include it there are a couple options:

  1. Build it into the UI to display the required allowance as they enter numbers into the Deposit input field. I believe the front end should have both the numbers and could calculate quickly without contract interaction.
  2. Update the ReadMe to describe how to get the appropriate amount using the price function.

challenge 6: update `backend-local` to use JSON file as db

Description :

Currently, we are storing the backend state in a variable kind of hacky, I think it will be great if we use JSON file as DB.

This won't make much of a difference while doing the challenge locally, but we are planning to connect this repo's challenge 6 backend-local to our box where the prod server will live and it's good to have some kind of persistent storage there.

Some helper libraries :

  1. https://www.npmjs.com/package/node-json-db
  2. https://github.com/typicode/lowdb
  3. https://www.npmjs.com/package/simple-json-db

Migration to Wagmi V1 and Viem

Description :

When we created se-2-challenges repo at that time SE-2 didn't have Wagmi V1 & Viem.

So basically in SE-2 on frontend side we are no more using ethers instead we are using viem. Also there are some minor api changes.

As I see people don't focus on the frontend in initial challenges, so it's kind of ok to have it a bit outdated but I think we should start slowly migrating to the latest changes of SE-2 at least till Wagmi V1 & Viem (also in se-2-challenges we are also kind of pushing them toward frontend a bit).

Because incase of curiosity if people go to wagmi docs they will be seeing V1 docs, also same for daisyUI docs it will take them to V3 docs and in challenges we are using v2 docs (Not that big deal for daisyUI).

Regarding MultiSig Challenge #19 and SVG NFT #20 challenge I think these challenges must for sure use the latest SE-2 changes at least with Wagmi v1, viem, and daisui V3 because at this challenges people start understanding/exploring the scaffold-eth frontend more.

Tasks

Challenge 5 - Deploy & Contract comment cleanup

  • Comments In the 00_deploy_streamer.ts file are messy and mention an incorrect checkpoint. Clean up the code and add extra comment slashes for easy block uncommenting.

  • In Streamer.sol, Checkpoint 4 comments: Remove the bit about sending money to the owner(). They need to send the money to the Guru, not the contract owner.

Challenge 2 - Linting Errors

index.tsx has a few linting and prettier errors/warnings that cause the yarn vercel command to fail unless ignored.

Challenge 5 - Testing File

Currently in Checkpoint 4, the testing file is not checking the Guru's balance when testing the withdrawEarnings() function. It is only tracking the contract balance. If that function withdraws the funds to a different account, it still passes the test file. It would be beneficial for the Auto-grader if it made sure the funds were being sent to the correct address.

Challenge 0

Let's branch from https://github.com/scaffold-eth/se-2-challenges/tree/base-challenge-template and create the Challenge 0 (contracts, UI, README)

SE-1 Challenge 0: https://github.com/scaffold-eth/scaffold-eth-challenges/tree/challenge-0-simple-nft.

This is the first time branching from the base-challenge-template, so let's keep and eye on things that might need to be back-merged into the "base-challenge-template".

  • Contract
  • UI
  • Readme
  • Backmerge to base-template things that might be needed in other challenges.

Challenge 0 - Workaround for users with IPFS blocked

Some users are reporting problems with IPFS requests, although we are implementing try/catch with #150 they may still have issues while minting.

Would be nice to have an alternative / workaround for those users to not get stuck through the challenge workflow.

Error Image from TG chat

IMG_7449

Challenge 1 - UI Updates

Tasks

More ReadMe Consistency Issues

In the top challenge explanations under the banner, challenges 1,2, and 5 are using the '>' vertical line for each paragraph. The others are not and it looks a little better.

  • Remove the '>' formatting from challenge 1,2, and 5 challenge explanations.

Challenge 5 has a "We Will:" section under the explanation that the other challenges do not have. Not sure we need to take any action here as it does work well for that challenge to sum that up beforehand.

This line is inconsistent between challenges, which is better? (It's also not in challenge 0 at all, should it be?)

  • ๐Ÿ‘ฉโ€๐Ÿ’ป Rerun yarn deploy --reset whenever you want to deploy new contracts to the frontend, update your current contracts with changes, or re-deploy it to get a fresh contract address.

  • ๐Ÿ‘ฉโ€๐Ÿ’ป Rerun yarn deploy whenever you want to deploy new contracts to the frontend (run yarn deploy --reset for a completely fresh deploy if you have made no contract changes).

yarn generate and yarn account are flipped in challenges 2 and 5 and the wording is inconsistent between all challenges.

  • Flip the order in challenge 2 and 5
  • Make the wording consistent throughout all challenges.

Is the 'All Staking Events' screenshot necessary in the Deploy checkpoint in Challenge 1?

  • Remove the '>' from challenge 1 "Run yarn deploy to deploy..." line.
  • Add --network sepolia hint to challenges 1, 2, 5
  • Add a note in the blocknumber section about how to obtain that block number.

Contract Verification varies between challenges.

  • Get all challenges consistent.

  • Make sure all challenge have this at the end: ๐Ÿ‘‰ Search this address on Etherscan to get the URL you submit to ๐Ÿƒโ€โ™€๏ธSpeedRunEthereum.com.

  • Add the '>' format in the "Problems, question...' line in challenges 2,4, and both lines in 0. Update emoji in challenge 0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.