From c86ec0f9db9abc1e2998f039fdab3877e099cb71 Mon Sep 17 00:00:00 2001 From: Xuz Date: Wed, 6 Dec 2023 16:58:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=20=E5=89=8D=E7=AB=AF=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=90=8C=E6=AD=A5=E5=90=88=E7=BA=A6=E9=83=A8=E7=BD=B2?= =?UTF-8?q?goerli=E7=BD=91=E7=BB=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- basic/09-hardhat-react/frontend/src/components/Dapp.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basic/09-hardhat-react/frontend/src/components/Dapp.js b/basic/09-hardhat-react/frontend/src/components/Dapp.js index 9c2e0887c..731e2b270 100644 --- a/basic/09-hardhat-react/frontend/src/components/Dapp.js +++ b/basic/09-hardhat-react/frontend/src/components/Dapp.js @@ -23,7 +23,7 @@ import { NoTokensMessage } from './NoTokensMessage' // This is the Hardhat Network id, you might change it in the hardhat.config.js // Here's a list of network ids https://docs.metamask.io/guide/ethereum-provider.html#properties // to use when deploying to other networks. -const HARDHAT_NETWORK_ID = '42' +const HARDHAT_NETWORK_ID = '5' // This is an error code that indicates that the user canceled a transaction const ERROR_CODE_TX_REJECTED_BY_USER = 4001 @@ -375,7 +375,7 @@ export class Dapp extends React.Component { } this.setState({ - networkError: 'Please connect Metamask to kovan', + networkError: 'Please connect Metamask to goerli', }) return false From af0571a7dd2899e173e45b668259cd73a1eb4535 Mon Sep 17 00:00:00 2001 From: Xuz Date: Thu, 7 Dec 2023 21:39:28 +0800 Subject: [PATCH 2/2] fix: Deploy Contract Error: Network goerli doesn't exist basic/14-chainlink-price-feed: npx hardhat run scripts/01-PriceConsumerV3Deploy.js --network goerli --- basic/14-chainlink-price-feed/hardhat.config.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basic/14-chainlink-price-feed/hardhat.config.js b/basic/14-chainlink-price-feed/hardhat.config.js index 13de0d632..33ab58d18 100644 --- a/basic/14-chainlink-price-feed/hardhat.config.js +++ b/basic/14-chainlink-price-feed/hardhat.config.js @@ -39,10 +39,10 @@ module.exports = { // url: mainnetRpcUrl // } }, - // goerli: { - // url: 'https://goerli.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work) - // accounts: [mnemonic()], - // }, + goerli: { + url: 'https://goerli.infura.io/v3/' + process.env.INFURA_ID, //<---- YOUR INFURA ID! (or it won't work) + accounts: [mnemonic()], + }, }, namedAccounts: { deployer: {