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
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
For a contract which have a string property but not intialized, the returning value cause an encoding error.
AbiError: Parameter decoding error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the contract you are retrieving data from, requesting data from a block number that does not exist, or querying a node which is not fully synced.
Expected Behavior
Such scenario should return into empty string.
Steps to Reproduce
The solidity contract.
contract MyContract {
string private myAttribute;
function getAttr() public view returns (string memory) {
return myAttribute;
}
}
The web3 code.
let contract = new Contract(MyContractAbi);
contract = await contract.deploy().send(....);
await contract.methods.getAttr().call();
The following scenario can also be reproduced with Greeter.sol contract we have.