CLI error following tutorial

I am following the Hello Sui tutorial at move-book dot com,

Everything has worked up to the point when the tutorial suggests this command:
$ sui client ptb
–gas-budget 100000000
–assign sender @$MY_ADDRESS
–move-call $PACKAGE_ID::todo_list::new
–assign list
–transfer-objects “[list]” sender

I am using Windows powershell so I tried this:
sui client ptb --gas-budget 100000000 --assign sender @$env:MY_ADDRESS --move-call $env:PACKAGE_ID::todo_list::new --assign list --transfer-objects “[list]” sender

The error is:
Error when processing PTB
╭─[4:1]
3 │ --move-call
4 │ --assign list
· ────┬───
· ╰── Unexpected command ‘–assign’
5 │ --transfer-objects [list] sender
╰────
This is perhaps suggesting it is not capturing the return value from the function call which therefore means that --assign is unexpected?

Many thanks for any help.

I got this working by wrapping some parts in “” (as suggested in the help docs)
PS C:\Users\johnh\OneDrive\sui-smart-contracts\todo_list> sui client ptb --gas-budget 100000000 `

–assign sender “@$env:MY_ADDRESS” --move-call "$env:PACKAGE_ID::todo_list::new"
–assign list `
–transfer-objects “[list]” sender

1 Like