8000 GitHub - scaffold-eth/se-2-challenges: SpeedRunEthereum challenges (Powered by Scaffold-ETH 2)
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

scaffold-eth/se-2-challenges

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

21 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ— 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! ๐Ÿš€

Challenge Extension


๐Ÿšฉ 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.

Challenge Extension


๐Ÿšฉ 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.

Challenge Extension


๐Ÿšฉ 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!

Challenge Extension


๐Ÿšฉ 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...

Challenge Extension


๐ŸŽ‰ Checkpoint: Onboarding batches

Dive into end-to-end dApp development, receive mentorship from BuidlGuidl members, and learn how to collaborate with fellow developers in openโ€‘source projects.


๐Ÿšฉ Challenge 5: ๐ŸŒฝ Over-Collateralized Lending

๐Ÿ’ณ Build your own lending and borrowing platform. Let's write a contract that takes collateral and lets you borrow other assets against the value of the collateral. What happens when the collateral changes in value? We will be able to borrow more if it is higher, or if it is lower, we will also build a system for liquidating the debt position.

Challenge Extension


๐Ÿšฉ Challenge 6: ๐Ÿ“ˆ Prediction Markets

๐Ÿ”ฎ Build a prediction market where users can create questions about future outcomes for others to bet on. Users can also participate in existing markets to speculate on event results. ๐Ÿ“Š Outcome shares can be traded, with prices adjusting dynamically based on market belief. This is possible because the smart contract acts as an automated market maker (like in the DEX challenge) and adjusts odds based on supply and demand.

Challenge Extension


๐Ÿšฉ Challenge 7: โšก Deploy to Layer 2

๐Ÿš€ Ethereum L2s make blockchain apps fast and cheap, bringing us closer to mainstream adoption! Most L2s are EVM compatible, meaning your app should work seamlessly across them with little to no changesโ€”just deploy and go! In this challenge, you will deploy an app across multiple chains, including Optimism, Base, and Arbitrum, and experience the snappy, low-cost transactions while exploring how they make building scalable apps and games easier than ever.

Coming soon...


๐Ÿšฉ Challenge 8: Multisig Wallet

๐Ÿ‘ฉโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ง 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".

Challenge Extension


๐Ÿšฉ Challenge 9: SVG NFT

๐ŸŽจ Create a dynamic SVG NFT using a smart contract. Your contract will generate on-chain SVG images and allow users to mint their unique NFTs. โœจ Customize your SVG graphics and metadata directly within the smart contract. ๐Ÿš€ Share the minting URL once your project is live!

Challenge Extension


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

1. Learn about SE-2 Extensions

Go to SE-2 Extensions Documentation and familiarize yourself with the way extensions work by watching the video and reading the overview.

2. Follow the steps to create an extension

  1. Clone the create-eth repo and cd into it.
    git clone https://github.com/scaffold-eth/create-eth
    cd create-eth

Setting up things in externalExtensions:

  1. cd into externalExtensions (if it's not present mkdir externalExtensions && cd externalExtensions)

  2. Clone the base-challenge-template with name of your extension inside externalExtensions:

    git clone -b base-challenge-template https://github.com/scaffold-eth/se-2-challenges.git <my-challenge-name>
  1. cd into <my-challenge-name> dir and create a branch with your challenge name.
    cd <my-challenge-name> && git switch -c <my-challenge-name>
  1. Find all the file comments marked // CHALLENGE-TODO: and follow the instructions to prepare your challenge.

  2. Commit those changes as an initial commit: git add . && git commit -m "fill template"

Commands to be run in create-eth repo:

  1. Build the create-eth cli
    yarn build:dev
  1. Create an instance with same name as the challenge name directory which was created inside externalExtensions:
    yarn cli ../<my-challenge-name> -e <my-challenge-name> --dev
  1. This will create the full instance outside of create-eth repo with

  2. Tinker in that instance, adding any new files your challenge will use and then committing those changes

  3. Run this in create-eth to copy all the changes to you extension:

    yarn create-extension ../<my-challenge-name>

3. Testing your extension

Now that you ran the create-extension command you should see in the terminal all files that were created and any missing template files. Add any missing template files and continue to follow the instructions in the local testing section!

Don't forget to add a README.md to the top level of your extension. It should match what you put in the extraContents variable in extension/README.md.args.mjs.

Iterate as necessary, repeating the steps, to get it just right.

4. Submit a PR

Once you have iterated your challenge to perfection, you can ask a maintainer to add a branch for your challenge and then submit a pull request to that branch. Expect to make a few passes of revisions as we test these challenges extensively.

About

SpeedRunEthereum challenges (Powered by Scaffold-ETH 2)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0