I have a function that requires 2 type arguments. In the PTB CLI I have tried all the below to no avail:
--move-call $PACKAGE::escrow::swap "<$TYPEARG> <$TYPEARG>" @$ESCROW @$KEY @$LOCKED \
--move-call $PACKAGE::escrow::swap "<$TYPEARG>" "<$TYPEARG>" @$ESCROW @$KEY @$LOCKED \
--move-call $PACKAGE::escrow::swap "<$TYPEARG, $TYPEARG>" @$ESCROW @$KEY @$LOCKED \
--move-call $PACKAGE::escrow::swap "<$TYPEARG>", "<$TYPEARG>" @$ESCROW @$KEY @$LOCKED \
Any help please?
1 Like
jangid
December 10, 2025, 9:11am
2
theodoros nikoleris via Sui Developer Forum
notifications@sui.discoursemail.com writes:
I have a function that requires 2 type arguments. In the PTB CLI I have tried all the below to no avail:
--move-call $PACKAGE::escrow::swap "<$TYPEARG> <$TYPEARG>" @$ESCROW @$KEY @$LOCKED \
--move-call $PACKAGE::escrow::swap "<$TYPEARG>" "<$TYPEARG>" @$ESCROW @$KEY @$LOCKED \
--move-call $PACKAGE::escrow::swap "<$TYPEARG, $TYPEARG>" @$ESCROW @$KEY @$LOCKED \
--move-call $PACKAGE::escrow::swap "<$TYPEARG>", "<$TYPEARG>" @$ESCROW @$KEY @$LOCKED \
I think it should be
sui client call --type-args <$TYPEARG> <$TYPEARG> --package $PACKAGE --module escrow --function swap @$ESCROW @$KEY @$LOCKED
Just check with
sui client call --help
plyoteo
December 10, 2025, 10:51am
3
Thank you for your response. This is correct and I have implemented it succesfully. However it applies to the Sui Client CLI and the entire command would be
sui client call --package <...> --module <...> --function <...> --type-args <...> ... <...> --args <...> ... <...>
However, my problem appears when trying to use the Sui Client PTB CLI. For clarity’s shake, my bash script looks like below and it fails at the input of the type arguments:
#!/usr/bin/bash
sui client ptb \
--move-call sui::tx_context::sender \
--assign sender \
--move-call $PACKAGE::escrow::swap "<$TITEM>" "<$TITEM>" @$ESCROW @$KEY @$LOCKED \
--assign escrowed \
--transfer-objects [escrowed] sender
Any ideas?