GithubHelp home page GithubHelp logo

scaffold-eth-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-challenges's People

Contributors

0xsama avatar alifelivedfully avatar arturgontijo avatar austintgriffith avatar azf20 avatar btogzhan2000 avatar calvbore avatar carletex avatar changoman avatar clacladev avatar codenamejason avatar dantehemerson avatar forshtat avatar ghostffcode avatar hodlplus2021 avatar ironsoul0 avatar j2r5m3 avatar jacobwillemsma avatar pabloruiz55 avatar shravansunder avatar smartcontracts avatar swellander avatar taldenv avatar thesuperb1 avatar tomafc330 avatar tomafrench avatar xalava avatar xjjda22 avatar yutingzhao1991 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar

scaffold-eth-challenges's Issues

help me!

Can’t automatically merge. Don’t worry, you can still create the pull request.

Challenge 2 - Contract verification on etherscan fails

Code error : Failed to verify contract on Etherscan NomicLabsHardhatPluginError: The constru
ctor for contracts/Vendor.sol:Vendor has 1 parameters
but 0 arguments were provided instead.

Fix : await run("verify:verify", {
address: vendor.address,

    constructorArguments: [yourToken.address],
  });

replace contract arguments with constructor arguments

[Challenge 1] does the modifier notCompleted make sense?

In the it's a trap section:
image

is the notCompleted modifier really meant to protect execute and withdraw?
Don't we instead just want to protect stake to prevent more funds from being locked in?
Otherwise this seems to let people add in more funds, but then can't call execute nor withdraw anymore.

Challenge 1: Call to stake being made from owner instead of secondAccount signer

There is a bug at line 114 where the the call to stake is being made from the owner signer instead of secondAccount.

const stakeResult = await stakerContract.stake({value: ethers.utils.parseEther("0.001")});

This line needs to be :

const stakeResult = await stakerContract.connect(secondAccount).stake({value: ethers.utils.parseEther("0.001")});

Without this change, the test case cannot pass since secondAccount's balance never changes and the assertion of equality on line 144 will never be true.

expect(endingBalance).to.equal(startingBalance.add(ethers.utils.parseEther("0.001")));

NOTE: This entire test case probably needs to be redone due to changes in the withdraw method signature included in #88. If withdraw is intended to work without specifying an address, the comparison on line 144 will have to account not only for the difference in the stake being returned after the call to withdraw but also the gas used in calling the transaction. The withdraw method would also have to be called on the contract returned from stakerContract.connect(secondAccount) also.

module keytar

During node install of challenge-0-simple-nft got error:

warning Error running install script for optional dependency: "/home/devl/gitcoin/scaffold-directory/challenge-0-simple-nft/node_modules/keytar: Command failed. Exit code: 1 Command: prebuild-install || node-gyp rebuild Arguments: Directory: /home/devl/gitcoin/scaffold-directory/challenge-0-simple-nft/node_modules/keytar Output: prebuild-install WARN install No prebuilt binaries found (target=16.13.1 runtime=node arch=x64 libc= platform=linux)

Node 16.13.1 Ubuntu 18.04.4

An optional dependency, but was a concern.

Installing Ubuntu module libsecret-1-dev apparently solves it.

Challenge 0: Invalid Etherscan API Key

Description

Branch: challenge-0-simple-nft

Checkpoint 5: πŸ“œ Contract Verification

When verifying a contract with a newly created API key from etherscan users might encounter the following error when running yarn verify since it can take roughly 5 minutes for the API key to become active.

contract YourCollectible failed to submit : "NOTOK" : "Invalid API Key" [object Object]

Steps to Reproduce

Note: The speed with which you complete these steps will impact the outcome.

  1. Create a new API key on etherscan
  2. Add the API key to the yarn verify script in packages/hardhat/package.json
  3. Run yarn verify (with the --network of your choice)
  4. The console logs an "Invalid API Key" error

Resolution

Perhaps a small note could be added to the Contract Verification section explaining that it might take a few minutes for the Etherscan API key to become active.

TypeError: `transferOwnership` is not a function in challenge 2

I was doint the challenge-2 and following the instructions. I came to transfer ownership step and uncommented the code at this line. I have provided my frontend address but somehow it's giving me this error:

yarn run v1.22.19
$ yarn workspace @scaffold-eth/hardhat deploy --reset
$ hardhat deploy --export-all ../react-app/src/contracts/hardhat_contracts.json --reset
Nothing to compile
deploying "YourToken" (tx: 0xe5375d58ee48aa8b33b3b97b79d503eb3d7a3c92b90ac312a2d386209a16ff1b)...: deployed at 0x5FbDB2315678afecb367f032d93F642f64180aa3 with 637479 gas
deploying "Vendor" (tx: 0x2df0779ea222307500ecc0e0201255f2bf84c3f53e9810c588b3aeb5b3b92ec0)...: deployed at 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512 with 331303 gas

 🏡  Sending all 1000 tokens to the vendor...


    βœ… confirming...


 🀹  Sending ownership to frontend address...

An unexpected error occurred:

Error: ERROR processing /home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/deploy/01_deploy_vendor.js:
TypeError: vendor.transferOwnership is not a function
    at Object.module.exports [as func] (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/deploy/01_deploy_vendor.js:33:45)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at DeploymentsManager.executeDeployScripts (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1055:22)
    at DeploymentsManager.runDeploy (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat-deploy/src/DeploymentsManager.ts:891:5)
    at Environment._runTaskDefinition (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
    at Environment.run (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
    at SimpleTaskDefinition.action (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat-deploy/src/index.ts:528:32)
    at Environment._runTaskDefinition (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
    at Environment.run (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
    at SimpleTaskDefinition.action (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat-deploy/src/index.ts:605:5)
    at DeploymentsManager.executeDeployScripts (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat-deploy/src/DeploymentsManager.ts:1058:19)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at DeploymentsManager.runDeploy (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat-deploy/src/DeploymentsManager.ts:891:5)
    at Environment._runTaskDefinition (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
    at Environment.run (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
    at SimpleTaskDefinition.action (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat-deploy/src/index.ts:528:32)
    at Environment._runTaskDefinition (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
    at Environment.run (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:129:14)
    at SimpleTaskDefinition.action (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat-deploy/src/index.ts:605:5)
    at Environment._runTaskDefinition (/home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat/node_modules/hardhat/src/internal/core/runtime-environment.ts:217:14)
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
Command: /usr/bin/node
Arguments: /usr/lib/node_modules/yarn/lib/cli.js deploy --reset
Directory: /home/rishabh/Documents/practice/solidity-practice/challenge-2-token-vendor/packages/hardhat
Output:

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

I am struggling for two days to solve this issue but can't find any solution. May anyone look into this what's the issue. The Vendor contract is inheriting Ownable from openzepplin.

bug: deposit logic: incorrect check for the need for approval

Approval is needed if expected token amount exceeds allowance.

The current logic doesn't take into account the expected token amount. Instead it compares allowance to the ethValuePlusExtra:

Screenshot 2022-01-05 at 23 46 00
)

The expected token amount is
(ethValue.mul(dexTokenBalance).div(dexEthBalance)).add(1),
according to the smart contract logic:

Screenshot 2022-01-05 at 23 57 19

So we don't need ethValuePlusExtra at all, instead we should check for smth like

dexApproval.gte(expectedTokenAmount)

Challenge 0: Getting Error on Yarn Deploy

I am getting this error when I run yarn deploy. I tried different solutions but not working.
does anyone also having this issue?

TypeError: ethers.getContract is not a function

image

Challenge 3 - Dice Game - Roll unit test missing await keyword

The it("Should not call DiceGame for a roll greater than 2") test is missing an await in front an expect assertion.
Without it, when it fails, the test has a race condition that makes it look another test is causing the failure.

File location is: challenge-3-dice-game/packages/hardhat/test/challenge_3.js)

Fix needs to be:
await expect(riggedRoll.riggedRoll()).to.reverted;

Cannot install - 404 error on URL

Tried installing challenge-1-decentralized-staking using yarn and then using npm, both failed

Yarn install fails.
Looks like it is the missing content at https://codeload.github.com/hugomrdias/concat-stream/tar.gz/057bc7b5d6d8df26c8cf00a3f151b6721a0a8034

Here are some details:

Yarn version:
1.22.19

Node version:
18.17.1

Platform:
linux x64

Trace:
Error: https://codeload.github.com/hugomrdias/concat-stream/tar.gz/057bc7b5d6d8df26c8cf00a3f151b6721a0a8034: Request failed "404 Not Found"
at ResponseError.ExtendableBuiltin (/<local_path>/.nvm/versions/node/v18.17.1/lib/node_modules/yarn/lib/cli.js:696:66)
at new ResponseError (/<local_path>/.nvm/versions/node/v18.17.1/lib/node_modules/yarn/lib/cli.js:802:124)
at Request. (<local_path>/.nvm/versions/node/v18.17.1/lib/node_modules/yarn/lib/cli.js:66215:16)
at Request.emit (node:events:514:28)
at module.exports.Request.onRequestResponse (<local_path>/.nvm/versions/node/v18.17.1/lib/node_modules/yarn/lib/cli.js:141767:10)
at ClientRequest.emit (node:events:514:28)
at HTTPParser.parserOnIncomingClient (node:_http_client:700:27)
at HTTPParser.parserOnHeadersComplete (node:_http_common:119:17)
at TLSSocket.socketOnData (node:_http_client:541:22)
at TLSSocket.emit (node:events:514:28)

npm fails
Here are the details:

/<local_path>/.npm/_logs/2023-08-31T13_14_33_660Z-debug-0.log

npm resolution error report

While resolving: @scaffold-eth/[email protected]
Found: @testing-library/[email protected]
node_modules/@testing-library/dom
dev @testing-library/dom@"^6.12.2" from @scaffold-eth/[email protected]
packages/react-app
@scaffold-eth/[email protected]
node_modules/@scaffold-eth/react-app
workspace packages/react-app from the root project

Could not resolve dependency:
peer @testing-library/dom@">=7.21.4" from @testing-library/[email protected]
node_modules/@testing-library/user-event
@testing-library/user-event@"^12.1.8" from @scaffold-eth/[email protected]
packages/react-app
@scaffold-eth/[email protected]
node_modules/@scaffold-eth/react-app
workspace packages/react-app from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

Challenge 0: Open Sea Side Quest Import Instructions

Description

Branch: challenge-0-simple-nft

βš”οΈ Side Quests > 🐟 Open Sea

The user interface on the Open Sea collections page has been updated. The instructions and screenshots in the side quest no longer correspond with what is shown on the Open Sea website.

Steps to Reproduce

  1. Navigate to the opensea collections screen as instructed in the side quest
  2. Click the vertical ellipsis
  3. Validate that the "Import an existing smart contract" option is no longer available

Resolution

The side quest instructions and screenshots to create a collection for an existing smart contract on Open Sea should be updated to correspond with the new user interface.

[Challenge 0] Gitpod Ports and CORS don't like hardhat chain requests from the application

Description

The gitpod environment serves ports at specific urls, instead of on a single served URL. While this usually isn't an issue, because the react application is at a served port 3000, URL requests to a different port URL don't pass a CORs check. This causes breaks in the application when making requests to the localhost chain, making it unusable.

How to Reproduce

  1. Navigate to https://gitpod.id/#https://github.com/scaffold-eth/scaffold-eth-challenges/tree/challenge-0-simple-nft
  2. When the application and tasks are fully loaded, open the browser preview at port 3000. The application should appear.
  3. After a few seconds you should see the error seen in the screenshot below.

Error Information

Access to fetch at 'https://8545-amethyst-condor-919k7bwb.ws-us25.gitpod.io/' from origin 'https://3000-amethyst-condor-919k7bwb.ws-us25.gitpod.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Screen Shot 2022-01-10 at 9 57 52 PM

Considerations

  • This might be a security hole since the test application now has a public port open. I would recommend allowing it for users that want to get through the challenge, but make it clear its open in the README.
  • Is anyone really supporting gitpod?

Running yarn install reports an error

[4/4] Building fresh packages...
[-/21] ⠁ waiting...
[15/21] ⠁ ursa-optional
[16/21] ⠁ keytar
[-/21] ⠁ waiting...
warning Error running install script for optional dependency: "/root/challenge-1-decentralized-staking/node_modules/keytar: Command failed.
Exit code: 1
Command: prebuild-install || node-gyp rebuild
Arguments:
Directory: /root/challenge-1-decentralized-staking/node_modules/keytar
Output:
prebuild-install WARN install No prebuilt binaries found (target=16.17.0 runtime=node arch=x64 libc= platform=linux)
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | x64
gyp info find Python using Python version 3.7.3 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/root/challenge-1-decentralized-staking/node_modules/keytar/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/root/.cache/node-gyp/16.17.0/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.17.0',
gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.17.0/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/root/challenge-1-decentralized-staking/node_modules/keytar',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.'
gyp info spawn args ]
/bin/sh: 1: pkg-config: not found
gyp: Call to 'pkg-config --cflags libsecret-1' returned exit status 127 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:284:16)
gyp ERR! stack at ChildProcess.emit (node:events:513:28)
gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 4.19.0-20-amd64
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /root/challenge-1-decentralized-staking/node_modules/keytar
success Saved lockfile.
Done in 399.39s.

Challenge 2 - node module import errors

Problem

The vscode settings file is pointing to the wrong directory for the solidity node modules, right now it is "solidity.packageDefaultDependenciesDirectory": "packages/hardhat-ts/node_modules". The problem here is that the hardhat-ts folder does not exist.

Possible Solution

change "solidity.packageDefaultDependenciesDirectory": "packages/hardhat-ts/node_modules" to "solidity.packageDefaultDependenciesDirectory": "packages/hardhat/node_modules"

Unhandled Rejection (Error): missing response

Hello, I recently followed the steps on this repository to run the Ethereum app for the NFT challenge. My problem comes after I run the command yarn start.
From the terminal, there is no error message, and the localhost page GUI loads successfully. However, after about 5 seconds, it crashes and shows me the following error:
Ethereum App Error screenshot

Even after the error, the terminal does not show anything wrong, but if I run yarn deploy from another window, it fails because it cannot connect to the network localhost.

It is worth noting that I run this code successfully just about 1 or two weeks ago. I did not change anything. I simply ran the same commands. I'm using Ubuntu 20.04 and Firefox. Additionally, I am not very familiar with internet communication protocols, which seem to be the problem here.
Is there a simple thing that I should pay attention to? It is confusing to me because this was working before and now it is not. Thanks for the help in advance.

Exit code: 9 with Yarn Start.

$ hardhat run scripts/publish.js
βœ… Published contracts to the subgraph package.
Done in 6.05s.
gitpod /workspace/scaffold-eth-challenges (challenge-0-simple-nft) $ yarn start
yarn run v1.22.19
$ yarn workspace @scaffold-eth/react-app start
warning package.json: No license field
$ node ./scripts/create_contracts.js
$ react-scripts --openssl-legacy-provider start
/home/gitpod/.nvm/versions/node/v16.19.0/bin/node: bad option: --openssl-legacy-provider
error Command failed with exit code 9.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 9
Command: /home/gitpod/.nvm/versions/node/v16.19.0/bin/node
Arguments: /home/gitpod/.nvm/versions/node/v16.19.0/lib/node_modules/yarn/lib/cli.js start
Directory: /workspace/scaffold-eth-challenges/packages/react-app
Output:

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

I wasn't able to get through the first checkpoint with this error.

I tired on VS code on my machine and with gitpod.io

Challenge 0: Unhandled rejection (Error)

Occasionally the app will crash and require the user to refresh the browser.

To recreate the Error:

Spin up challenge-0-simple-nft with yarn, wait, and the app should crash.

Error message:

Unhandled Rejection (Error): call revert exception (method="getReserves()", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.4.0)

Logger.makeError
/Users/mojo/projects/eth/challenge-0-simple-nft/packages/src.ts/index.ts:213
Logger.throwError
/Users/mojo/projects/eth/challenge-0-simple-nft/packages/src.ts/index.ts:225
Interface.decodeFunctionResult
/Users/mojo/projects/eth/challenge-0-simple-nft/packages/src.ts/interface.ts:425
422 | const value = values[index];
423 | if (param.indexed) {
424 | if (param.type === "string") {
> 425 | topics.push(id(value));
| ^ 426 | }
427 | else if (param.type === "bytes") {
428 | topics.push(keccak256(value));
View compiled
Contract.
/Users/mojo/projects/eth/challenge-0-simple-nft/packages/src.ts/index.ts:332
fulfilled
http://localhost:3000/static/js/0.chunk.js:78806:24

Error HH100: Network goerli doesn't exist

Getting error message, when I run npx hardhat run script/deploy.js --network goerli

Terminal error response:Error HH100: Network goerli doesn't exist

For more info go to https://hardhat.org/HH100 or run Hardhat with --show-stack-traces

require("@nomicfoundation/hardhat-toolbox");
require("dotenv").config();
require("@nomiclabs/hardhat-ethers");

/** @type import('hardhat/config').HardhatUserConfig */

module.exports = {
solidity: "0.8.7",
Network:{
hardhat: {
Goerli: {
url: process.env.RPC_URL,
account: [process.env.PRIVATE_KEY],
},
},
},
etherscan: {
apiKey: process.env.ETHERSCAN_KEY,
},
};

Error HH100: Network georli doesn't exist

On the Checkpoint 3: πŸ’Ύ Deploy it! πŸ›° of 🚩 Challenge 0: 🎟 Simple NFT Example - TYPESCRIPT

When I'm running the command yarn run generate it throw error:

Error HH100: Network georli doesn't exist

image

evm_increaseTime in test function of challenge 1 is flaky

I have to update the test code to

        await network.provider.send("evm_increaseTime", [28])

to pass the test, otherwise, it generates error
ProviderError: Error: VM Exception while processing transaction: reverted with panic code 0x11 (Arithmetic operation underflowed or overflowed outside of an unchecked block)
at HttpProvider.request (node_modules/hardhat/src/internal/core/providers/http.ts:49:19)
at GanacheGasMultiplierProvider.request (node_modules/hardhat/src/internal/core/providers/gas-providers.ts:297:34)
at processTicksAndRejections (node:internal/process/task_queues:96:5)

Error HH604: Error running JSON-RPC server: error:0308010C:digital envelope routines::unsupported

I get this error after run yarn chain and when i run yarn start

  • I got this error:
Logger.makeError
/home/arnaud/challenge-1-decentralized-staking/packages/src.ts/index.ts:213
Logger.throwError
/home/arnaud/challenge-1-decentralized-staking/packages/src.ts/index.ts:225
(anonymous function)
/home/arnaud/challenge-1-decentralized-staking/packages/src.ts/index.ts:234
rejected
http://localhost:3000/static/js/0.chunk.js:94577:32
This screen is visible only in development. It will not appear if the app crashes in production.
Open your browser’s developer console to further inspect this error.  Click the 'X' or hit ESC to dismiss this message.```

Address Input Error

When you paste an address into the AddressInput you cannot delete and paste another or type one in.

Challenge 0 issue: hardhat.config.js instructions not correct

In "Checkpoint 3: Deploy it!", the hardhat.config.js file instruction does not show the correct explanation for changing to a different network. When changing the network to rinkeby, the correct code should read const defaultNetwork = 'rinkeby';

The image below shows what the current instructions on the site show - const defaultNetwork = 'NETWORKS.rinkeby'; which leads to an error in the console.

Screen Shot 2021-12-18 at 9 59 23 PM

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.