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
There's no specific error code to this problem other than just simple undefined. The problem could be generated from the Hardhat Local Node and Raffle Contract's ABI.
Hardhat Local Node's accounts are not precisely synchronised with the Metamask wallet in my browser the way I'd have wanted them to be. This is something I should get fixed asap, as it's sort of creating a backlog.
Current deploy scripts for generating abi.json from the Raffle.sol contract is sort of working and again not working as the generated abi format is slightly different.
02-updateUI.ts -
import*asfsfrom'fs';import{DeployFunction}from'hardhat-deploy/types';import{HardhatRuntimeEnvironment}from'hardhat/types';import{stringify}from'querystring';import{FRONT_END_ABI_FILE,FRONT_END_ADDRESSES_FILE,}from'../helper-hardhat-config';constupdateUI: DeployFunction=async(hre: HardhatRuntimeEnvironment)=>{const{ ethers }=hre;constchainId: string='31337';if(process.env.UPDATE_FRONT_END){console.log('Updating Front End...');constraffle=awaitethers.getContract('Raffle');constcontractAddresses=JSON.parse(fs.readFileSync(FRONT_END_ADDRESSES_FILE,'utf8'));if(chainIdincontractAddresses){if(!contractAddresses[chainId].includes(raffle.address)){contractAddresses[chainId].push(raffle.address);}}else{contractAddresses[chainId]=[raffle.address];}fs.writeFileSync(FRONT_END_ABI_FILE,JSON.stringify(raffle.interface)// raffle.interface.format(ethers.utils.FormatTypes.json));fs.writeFileSync(FRONT_END_ADDRESSES_FILE,JSON.stringify(contractAddresses));}};exportdefaultupdateUI;updateUI.tags=['all','frontend'];
The text was updated successfully, but these errors were encountered:
There's no specific error code to this problem other than just simple
undefined
. The problem could be generated from the Hardhat Local Node andRaffle Contract's ABI
.Hardhat Local Node's accounts are not precisely synchronised with the Metamask wallet in my browser the way I'd have wanted them to be. This is something I should get fixed asap, as it's sort of creating a backlog.
Current deploy scripts for generating
abi.json
from theRaffle.sol
contract is sort of working and again not working as the generatedabi
format is slightly different.02-updateUI.ts
-The text was updated successfully, but these errors were encountered: