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
Denying load of chrome-extension://iadokddofjgcgjpjlfhngclhpmaelnli/src/assets/styles.css. Resources must be listed in the web_accessible_resources manifest key in order to be loaded by pages outside the extension.
I'm getting this issue while getting total supply of homes from ipfs
``` error
Error loading blockchain data: Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="totalSupply()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
at Logger.makeError (index.ts:269:1)
at Logger.throwError (index.ts:281:1)
at Interface.decodeFunctionResult (interface.ts:427:1)
at Contract.<anonymous> (index.ts:400:1)
at Generator.next (<anonymous>)
at fulfilled (index.ts:1:1)
App.js:61 Error loading blockchain data: Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="totalSupply()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.7.0)
at Logger.makeError (index.ts:269:1)
at Logger.throwError (index.ts:281:1)
at Interface.decodeFunctionResult (interface.ts:427:1)
at Contract.<anonymous> (index.ts:400:1)
at Generator.next (<anonymous>)
at fulfilled (index.ts:1:1)
Here's my javascript code the app.js
import{useEffect,useState}from'react';import{ethers}from'ethers';// ComponentsimportNavigationfrom'./components/Navigation';importSearchfrom'./components/Search';importHomefrom'./components/Home';// ABIsimportRealEstatefrom'./abis/RealEstate.json'importEscrowfrom'./abis/Escrow.json'// Configimportconfigfrom'./config.json';functionApp(){const[provider,setProvider]=useState(null)const[escrow,setEscrow]=useState(null)const[account,setAccount]=useState(null)const[homes,setHomes]=useState([])const[home,setHome]=useState({})const[toggle,setToggle]=useState(false);constloadBlockchainData=async()=>{try{constprovider=newethers.providers.Web3Provider(window.ethereum);setProvider(provider);constnetwork=awaitprovider.getNetwork();constchainId=network.chainId;constcontractAddresses=config[chainId];if(!contractAddresses){thrownewError(`No contract addresses found for chainId ${chainId}`);}constrealEstate=newethers.Contract(contractAddresses.realEstate.address,RealEstate,provider);consttotalSupply=awaitrealEstate.totalSupply();consthomes=[];for(vari=1;i<=totalSupply;i++){consturi=awaitrealEstate.tokenURI(i);constresponse=awaitfetch(uri);constmetadata=awaitresponse.json();homes.push(metadata);}setHomes(homes)constescrow=newethers.Contract(contractAddresses.escrow.address,Escrow,provider);setEscrow(escrow);window.ethereum.on('accountsChanged',async()=>{constaccounts=awaitwindow.ethereum.request({method: 'eth_requestAccounts'});constaccount=ethers.utils.getAddress(accounts[0])setAccount(account);});}catch(error){console.error("Error loading blockchain data:",error);}};useEffect(()=>{loadBlockchainData()},[])consttogglePop=(home)=>{setHome(home)toggle ? setToggle(false) : setToggle(true);}return(<div><Navigationaccount={account}setAccount={setAccount}/><Search/><divclassName='cards__section'><h3>Homes For You</h3><hr/><divclassName='cards'>{homes.map((home,index)=>(<divclassName='card'key={index}onClick={()=>togglePop(home)}><divclassName='card__image'><imgsrc={home.image}alt="Home"/></div><divclassName='card__info'><h4>{home.attributes[0].value} ETH</h4><p><strong>{home.attributes[2].value}</strong> bds |
<strong>{home.attributes[3].value}</strong> ba |
<strong>{home.attributes[4].value}</strong> sqft
</p><p>{home.address}</p></div></div>))}</div></div>{toggle&&(<Homehome={home}provider={provider}account={account}escrow={escrow}togglePop={togglePop}/>)}</div>);}exportdefaultApp;
The text was updated successfully, but these errors were encountered:
I'm getting this issue while getting total supply of homes from ipfs
Here's my javascript code the app.js
The text was updated successfully, but these errors were encountered: