You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")
No response
Operating System
Windows
Describe the bug
please when i deploy on my local host the Abi and contractAddress are writing to the Abi.json and contractaddress.json files, but when i deploy to sepolia it doesnt write. this is my code
const{ ethers, network }=require("hardhat");constfs=require("fs");constADDRESS_FILE="../nextjslottery/constants/contractAddress.json";constABI_FILE="../nextjslottery/constants/abi.json";module.exports=asyncfunction(){if(process.env.UPDATE_FRONT_END){console.log("updating front end...");updateContractAddress();console.log("updatedd");updateAbi();}};asyncfunctionupdateAbi(){constraffle=awaitethers.getContract("Raffle");console.log(JSON.stringify(raffle.interface.fragments));fs.writeFileSync(ABI_FILE,JSON.stringify(raffle.interface.fragments));}asyncfunctionupdateContractAddress(){constraffle=awaitethers.getContract("Raffle");constchainId=network.config.chainId.toString();console.log("ChainId:",chainId);constcurrentAddress=JSON.parse(fs.readFileSync(ADDRESS_FILE,"utf8"));if(chainIdincurrentAddress){if(!currentAddress[chainId].includes(raffle.target)){currentAddress[chainId].push(raffle.target);}}{currentAddress[chainId]+=[raffle.target];}fs.writeFileSync(ADDRESS_FILE,JSON.stringify(currentAddress));}module.exports.tags=["all","frontend"];
Lesson
Lesson 10
Could you please leave a link to the timestamp in the video where this error occurs? (You can right click a video and "copy video URL at current time")
No response
Operating System
Windows
Describe the bug
please when i deploy on my local host the Abi and contractAddress are writing to the Abi.json and contractaddress.json files, but when i deploy to sepolia it doesnt write. this is my code
this is my hardhat.config.js
The text was updated successfully, but these errors were encountered: