`Error fetching rocket status:
Error: could not decode result data (value=”0x”, info={ “method”: “status”, “signature”: “status()” }, code=BAD_DATA, version=6.12.1)
function I am calling-
`const fetchRocketStatus = async () => {
try {
const provider = new ethers.JsonRpcProvider('http://127.0.0.1:8545/');
const signer = await provider.getSigner();
const contract = new Contract(contractAdress, abi, provider);
const rocketStatus = await contract.status();
console.log("Rocket Status: ", rocketStatus);
} catch (error) {
console.error("Error fetching rocket status: ", error);
}
}`
I try to interact with my smartContract
Hardhat is used to deploy contract and ethersjs is used to call function
One thing is shown is log-
WARNING: Calling an account which is not a contractFrom: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
To 0x5fbdb2315678afecb367f032d93f642f64180aa3`
Sahil Kumar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.