Consensys / Consensys/ethjsonrpc
Integer type must have numerical suffix for uint but not for uint256
- Dominant language
- Python
- Stars
- 160
- Forks
- 100
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
Taking an example ERC20 contract with the following definition:
```javascript
function balanceOf(address _owner) constant returns (uint balance) {
return balances[_owner];
}
```
Executing a call() to the contract with _uint_ var type i got this error:
```python
>>> c.call(contract_addr, 'balanceOf(address)', ['0x00fC8E759f5941F54aD61e7716B7e5163D9CFA83'], ['uint'])
Traceback (most recent call last):
File "", line 1, in
File "ethjsonrpc/client.py", line 120, in call
return decode_abi(result_types, response[2:].decode('hex'))
File "/hidden_path/local/lib/python2.7/site-packages/ethereum/abi.py", line 756, in decode_abi
proctypes = [process_type(typ) for typ in types]
File "/hidden_path/local/lib/python2.7/site-packages/ethereum/abi.py", line 623, in process_type
"Integer type must have numerical suffix"
AssertionError: Integer type must have numerical suffix
```
but passing _uint256_ it works like a charm
```python
>>> c.call(contract_addr, 'balanceOf(address)', ['0x00fC8E759f5941F54aD61e7716B7e5163D9CFA83'], ['uint256'])
[10]
```
BTW: i'm using an [already patched](https://github.com/reiven/ethjsonrpc) version of the lib for 0x prefixes
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.