GithubHelp home page GithubHelp logo

scaffold-eth-typescript-challenges's Introduction

๐Ÿ—๐Ÿ‘ท๐Ÿพ Scaffold-ETH Challenges

learn how to use ๐Ÿ— scaffold-eth to create decentralized applications on Ethereum. ๐Ÿš€


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

๐ŸŽซ Create a simple NFT to learn 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/scaffold-eth-typescript-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/scaffold-eth-typescript-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/scaffold-eth-typescript-challenges/tree/challenge-2-token-vendor


๐Ÿšฉ 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/scaffold-eth-typescript-challenges/tree/challenge-3-dice-game


๐ŸŽ‰ 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/


โš–๏ธ 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/scaffold-eth-typescript-challenges/tree/challenge-4-dex


๐Ÿ‘› Multisig Wallet Challenge

๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง Using a smart contract as a wallet we can secure assets by requiring multiple accounts to "vote" on transactions. The contract will keep track of transactions in an array of structs and owners will confirm or reject each one. Any transaction with enough confirmations can "execute".

Multisig Telegram Channel: https://t.me/+mkNNF_yHsK8yMTcx

https://github.com/scaffold-eth/scaffold-eth-typescript-challenges/tree/challenge-5-multisig


๐Ÿ’ฌ Support Chat

Join the telegram support chat ๐Ÿ’ฌ to ask questions and find others building with ๐Ÿ— scaffold-eth!


๐Ÿ™ Please check out our Gitcoin grant too!

scaffold-eth-typescript-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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scaffold-eth-typescript-challenges's Issues

`yarn chain` failing with typescript version

After installing all yarn package, I run yarn chain to run the local blokchain but its giving following error. (Happening on both challenge 0 and challenge 1)

PS D:\coding-learning\speedrunethereum\challenge-1-decentralized-staking> yarn chain
yarn run v1.22.19
$ yarn workspace @scaffold-eth/hardhat chain
$ hardhat node --network hardhat --no-deploy
An unexpected error occurred:

hardhat.config.ts:31:5 - error TS2717: Subsequent property declarations must have the same type.  Property 'ethers' must be of type 'typeof import("D:/coding-learning/speedrunethereum/challenge-1-decentralized-staking/node_modules/ethers/lib/ethers") & HardhatEthersHelpers', but here has type 'any'.

31     ethers: TEthers;
       ~~~~~~

  node_modules/@nomiclabs/hardhat-ethers/internal/type-extensions.d.ts:6:9
    6         ethers: typeof ethers & HardhatEthersHelpers;
              ~~~~~~
    'ethers' was also declared here.

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1

I am using Windows 11, VSCode and Powershell 7.5 terminal.

Test for challenge-1-decentralized-staking does not exist

In the vanilla JavaScript version of this challenge there is a file scaffold-eth-challenges/packages/hardhat/test/challenge_1.js. This file is missing in this TypeScript version of the challenge. Instead, there is only a sample test file scaffold-eth-typescript-challenges/packages/hardhat-ts/test/sample_test.ts which does not work due to chai not being installed as a package. It also does not test the challenge code.

In other words:
We need a version of challenge_1.js in this TypeScript version of the challenge. Preferably made into a TypeScript version.

bug: yarn watch is using watch.js

Hi! yarn watch is using watch.js

yarn watch

node:internal/modules/cjs/loader:936
throw err;
^

Error: Cannot find module '/home/scaffold-eth-typescript-challenges/packages/hardhat-ts/scripts/watch.js'

test: Challenge 0 - Simple NFT Example Waiting for confirmation...

HI!

The "Challenge 0 - Simple NFT Example" test does not work for me. It does not go beyond "Waiting for confirmation...".

Do I need to do something else?

yarn test

Challenge 0: ๐ŸŽŸ Simple NFT Example ๐Ÿค“
YourCollectible
โœ“ Should deploy YourCollectible (284ms)
mintItem()
๐Ÿง‘โ€๐Ÿซ Tester Address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266
โš–๏ธ Starting balance: 0
๐Ÿ”จ Minting...
๐Ÿท mint tx: 0x30672a2f684c8d8ed69e88c2661f3890a30d85d909f7b94eba62ace58f4e43d8
โณ Waiting for confirmation...

image

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 21.10
Release: 21.10
Codename: impish

node -v
v16.13.2

Failing test in challenge-1 due to unnecessary contract execute call

This is the second milestone test for challenge-1: Should redeploy Staker, stake, not get enough, and withdraw.
The test calls the execute function - which is required to fail if the threshold has not been reached and therefore cannot be run in the same test as withdraw - which is required to succeed if the threshold has not been reached.
This causes the transaction to revert and the test to fail despite the contract fulfilling the criteria.
Calling execute is not mentioned in the test description so it is either there by mistake or is out of the scope of the test?

Link to relevant code

cannot install packages

I cloned a repo and after switching branch, I tried to install packages with yarn install but it's giving me some weird error

Below is the exact image showing the error in my terminal

Screenshot from 2022-10-26 07-24-31

Challenge Submission

The signature request for submitting a challenge does not work with WalletConnect/Ledger Live

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.