I am trying to call a function from my smart contract using web3 and react. Here is my code.
app.js const project=new web3.eth.Contract(Mycontractabi.abi,networkData.address); const retailer=await project.getretailer.call(); console.log(retailer); contract: address public retailer function getretailer() public view returns (address) { return retailer; } Kindly point out what is wrong as I am not able to get retailer address as desired by the code
console,log(project)see what you are getting