'NCD.L1.sample--art-demo' command included `[number]` but returned 'unexpected number'

Viewed 19

The Repo is here:
https://github.com/Learn-NEAR/NCD.L1.sample--art-demo

I have set the environment variables as stated in the README.md

However as I tried calling the design() the following error occurred as shown:

The Error

Then I realised the contract might need to be deployed first, but there is no such command for deployment in package.json

package.json

Pls let me know how I could get it to work.

1 Answers

The error is because the seed value you are using in the payload should be either a number without trailing zeroes or a string (wrapped with quotes). Notice the error is that the json parser is failing to convert the input to a json object. From the README I think it should be a number.

Try with:

near call CONTRACT '{"seed": 1}' --accountId ACCOUNT


FYI: This is going to fail, but with a different error. Both CONTRACT and ACCOUNT are invalid account names, so they won't be recognised. This tutorial doesn't contain steps for deploying, but as you pointed out, that is required before you are able to run it by yourself.

Related