Skip to content

the call function is incorrect #11

@spiritmg

Description

@spiritmg

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions