[Bug] Error caught when passing str as argument in pgql SuiTransaction.move_call()
Closed this issue · 0 comments
nekohakase commented
An error was found when calling a sui contract function which taking vector as an input:
When calling with, e.g.
txn.move_call(
target=f"{contract_addr}::{module_name}::{mint_func}",
arguments=[minter_cap, "foo_name","foo_description", "ipfs://foo_url", "ipfs://foo_url"]
)
Got
/Users/jingan/Dev/sui_poc/pysui_poc_personal/poc_personal.py:174: DeprecationWarning: Call to deprecated class _SuiTransactionBase. (Transitioning to sui_pgql) -- Deprecated since version 0.54.0.
txn = SuiTransaction(client=client, initial_sender=initial_sender)
Traceback (most recent call last):
File "/Users/jingan/Dev/sui_poc/pysui_poc_personal/poc_personal.py", line 255, in <module>
append_mint_and_transfer_move_calls(txn, CONTRACT_ADDRESS, MINTER_CAP, alice_addr)
File "/Users/jingan/Dev/sui_poc/pysui_poc_personal/poc_personal.py", line 183, in append_mint_and_transfer_move_calls
result = txn.move_call(
^^^^^^^^^^^^^^
File "/Users/jingan/Dev/sui_poc/pysui_poc_personal/venv/lib/python3.11/site-packages/pysui/sui/sui_pgql/pgql_sync_txn.py", line 494, in move_call
parms = ab.build_args(self.client, arguments, ars)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/jingan/Dev/sui_poc/pysui_poc_personal/venv/lib/python3.11/site-packages/pysui/sui/sui_pgql/pgql_txn_argb.py", line 290, in build_args
track.convert_args[aindex] = _argument_validate(
^^^^^^^^^^^^^^^^^^^
File "/Users/jingan/Dev/sui_poc/pysui_poc_personal/venv/lib/python3.11/site-packages/pysui/sui/sui_pgql/pgql_txn_argb.py", line 225, in _argument_validate
raise ValueError("Expected list type argument...")
ValueError: Expected list type argument...
Expected:
python string can be converted to vector when calling move_call()