1

I'm testing the Greeting contract in "workshop--exploring-assemblyscript-contracts" and try to pass parameter to saveMyMessage function but always get error. There maybe problem with quotations marks, I tried with " or '` but nothing succeeds. I'm running it on Windows. This is the suggestion from the code:

near call greeting..testnet saveMyMessage '{"message": "bob? you in there?"}' --account-id .testnet

When I try

near call %ID% saveMyMessage '{"message": "bob? you in there?"}' --account-id %ID%

Or replace " with " or end single quote with ` always get error like this

Unknown argument: bob? you in there?}'

Thao Le
  • 11
  • 2

1 Answers1

0

For starters, it appears you have a syntax error with 2 dots instead of 1 here - greeting..testnet

Have you tried seeing what %ID% is?

I would try the following syntax, but make sure when you set your IDenv variable, that it returns the correct value when you run echo $ID

Once you have your env variables set up correctly, try the following:

near call $ID saveMyMessage '{"message": "bob? you in there?"}' --account-id $ID 
BenTheHumanMan
  • 327
  • 2
  • 11