autonity / aut

A command-line RPC client for Autonity
MIT License
11 stars 10 forks source link

`aut contract call` - errors array types passed as arguments #120

Closed cmjc closed 1 year ago

cmjc commented 1 year ago

Context:

Using the command to call a contract function that takes a string array of values as arguments to a set function returns the error: ValueError: cannot convert array type 'string[]' from string.

If calling a get function that returns an array of values, then there is no problem.

Example:

#set errors
$ aut contract call --rpc_endpoint = <CONNECTED_NODE_URI> --address <CONTRACT_ADDRESS> --abi <PATH_TO_CONTRACT_ABI_FILE> setValues ["A", "B", "C", "D"]
ValueError: cannot convert array type 'string[]' from string
# get returns
$ aut contract call --rpc_endpoint = <CONNECTED_NODE_URI> --address <CONTRACT_ADDRESS> --abi <PATH_TO_CONTRACT_ABI_FILE> getValues
["A", "B", "C", "D"]
noandrea commented 1 year ago

depends on https://github.com/autonity/autonity.py/pull/33

noandrea commented 1 year ago

fixed in https://github.com/autonity/aut/pull/118