Coder Social home page Coder Social logo

scaffold-eth-typescript-challenges's Introduction

๐Ÿ— Scaffold-ETH

๐Ÿšจ๐Ÿšจ This repository has been archived and is now read-only ๐Ÿšจ๐Ÿšจ

You are still welcome to fork and use as a template but no more changes will be made to this repository.

๐ŸŽ– Scaffold-ETH 2 is the latest version, we recommend you fork: https://github.com/scaffold-eth/scaffold-eth-2


everything you need to build on Ethereum! ๐Ÿš€

๐Ÿงช Quickly experiment with Solidity using a frontend that adapts to your smart contract:

image

๐Ÿ„โ€โ™‚๏ธ Quick Start

Prerequisites: Node (v18 LTS) plus Yarn (v1.x) and Git

๐Ÿšจ If you are using a version < v18 you will need to remove openssl-legacy-provider from the start script in package.json

1๏ธโƒฃ clone/fork ๐Ÿ— scaffold-eth:

git clone https://github.com/scaffold-eth/scaffold-eth.git

2๏ธโƒฃ install and start your ๐Ÿ‘ทโ€ Hardhat chain:

cd scaffold-eth
yarn install
yarn chain

3๏ธโƒฃ in a second terminal window, start your ๐Ÿ“ฑ frontend:

๐Ÿšจ if your contracts are not deployed to localhost, you will need to update the default network in App.jsx to match your default network in hardhat-config.js.

cd scaffold-eth
yarn start

4๏ธโƒฃ in a third terminal window, ๐Ÿ›ฐ deploy your contract:

๐Ÿšจ if you are not deploying to localhost, you will need to run yarn generate first and then fund the deployer account. To view account balances, run yarn account. You will also need to update hardhat-config.js with the correct default network.

cd scaffold-eth
yarn deploy

๐Ÿ” Edit your smart contract YourContract.sol in packages/hardhat/contracts

๐Ÿ“ Edit your frontend App.jsx in packages/react-app/src

๐Ÿ’ผ Edit your deployment scripts in packages/hardhat/deploy

๐Ÿ“ฑ Open http://localhost:3000 to see the app

๐Ÿšจ๐Ÿ“ก To deploy to a public domain, use yarn surge. You will need to have a surge account and have the surge CLI installed. There is also the option to deploy to IPFS using yarn ipfs and yarn s3 to deploy to an AWS bucket ๐Ÿชฃ There are scripts in the packages/react-app/src/scripts folder to help with this.`

๐Ÿ“š Documentation

Documentation, tutorials, challenges, and many more resources, visit: docs.scaffoldeth.io

๐Ÿฆ Other Flavors

๐Ÿ”ญ Learning Solidity

๐Ÿ“• Read the docs: https://docs.soliditylang.org

๐Ÿ“š Go through each topic from solidity by example editing YourContract.sol in ๐Ÿ— scaffold-eth

๐Ÿ“ง Learn the Solidity globals and units

๐Ÿ›  Buidl

Check out all the active branches, open issues, and join/fund the ๐Ÿฐ BuidlGuidl!

๐Ÿ’Œ P.S.

๐ŸŒ You need an RPC key for testnets and production deployments, create an Alchemy account and replace the value of ALCHEMY_KEY = xxx in packages/react-app/src/constants.js with your new key.

๐Ÿ“ฃ Make sure you update the InfuraID before you go to production. Huge thanks to Infura for our special account that fields 7m req/day!

๐Ÿƒ๐Ÿ’จ Speedrun Ethereum

Register as a builder here and start on some of the challenges and build a portfolio.

๐Ÿ’ฌ Support Chat

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


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

Automated with Gitpod

Open in Gitpod

scaffold-eth-typescript-challenges's People

Contributors

codenamejason avatar dvinubius avatar grothem avatar shravansunder avatar shravansunderxero avatar zakgriffith avatar

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

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'

Challenge Submission

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

`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: 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

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.

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

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.