nebulasio / neb.py

Nebulas Python API
16 stars 4 forks source link

the call function is incorrect #11

Open spiritmg opened 6 years ago

spiritmg commented 6 years ago

the param type of function call(self, from_addr: str, to_addr: str, value: int, nonce: int, gasprice: int, gaslimit: int, contract=None) in class Api is incorrect. the value must be string the gasprice、geslimit must be string otherwise, i will get error: {"error":"json: cannot unmarshal number into Go value of type string"}

and the example is right in ApiExample.py re = neb.api.call("n1JmhE82GNjdZPNZr6dgUuSfzy2WRwmD9zy", "n1zRenwNRXVwY6akcF4rUNoKhmNWP9bhSq8", "100000", int(re['result']['nonce']) + 1, "200000", "200000", {'function': 'getOrderCount', 'args': ''}).text

yupnano commented 6 years ago

Thanks for your feedback, we will fix it later.