Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show examples of args formatting for "call" and "view" commands #237

Closed
kcole16 opened this issue Jan 13, 2020 · 1 comment
Closed

Show examples of args formatting for "call" and "view" commands #237

kcole16 opened this issue Jan 13, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@kcole16
Copy link

kcole16 commented Jan 13, 2020

The current --help examples for call and view are unclear re: how to format args. Additionally, they should specify that the --accountId flag is required.

  near call <contractName> <methodName> [args]  schedule smart contract call which can modify state
  near view <contractName> <methodName> [args]  make smart contract call which can view state

Attempts to use [test], ['test'], ["test"], etc all returned an error.

near call studio-g2dknmak9 addMessage [test] --accountId <accountId>

@vgrichina
Copy link
Contributor

re: having --accountId flag as required – I kinda feel that we should either make it optional and instead remember account selected during near login and use it as default. Or we should restructure our commands around the fact that they always require account and have something like this near calling_account_id call contract_name method_name

as for args examples – it is contract-specific what can be accepted (in-theory any arbitrary blob). But we probably can show example of calling some of our sample contracts (like counter).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants