-
Notifications
You must be signed in to change notification settings - Fork 5
Description
After looking over the registry implementations again I wonder if we should consider giving clear definitions to the ERC1319 Read API return values for "error" or "no-result" .
I'm worried about this because at the moment we gate-keep some view methods with require checks that return an error reason string. But web3.js doesn't support that for calls - instead it returns un-decoded bytecode strings without throwing.
Do these require statements work as expected for Python's web3?
What are your views about amending the EIP to define a set of null return values which signal that the view request failed? And documenting a canonical way of generating these in Solidity (since their format in Python, JS etc will vary)?
Examples
getAllPackageIds ... returns (bytes32[], uint)
bytes32[] memory ids;
uint256 ptr;
return (ids, ptr); getPackageName...returns (string)
return '';getReleaseId...returns (bytes32)
return bytes32(0); getAllReleaseIds...returns (bytes32[], uint)
bytes32[] memory ids;
uint256 ptr;
return (ids, ptr); generateReleaseId...returns(bytes32)
return bytes32(0);getReleaseData...returns(string, string, string)
return ('','','');numPackageIds...returns(uint)
return 0; numReleaseIds...returns(uint)
return 0;