This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
Interact with JS smart-contract #978
ChaoticTempest
started this conversation in
General
Replies: 2 comments 6 replies
-
@ChaoticTempest why do we need the account ID flag for the view method? |
Beta Was this translation helpful? Give feedback.
2 replies
-
It looks like when u use near js call $JS_CONTRACT set_greeting '["GO TEAM!"]' --accountId $JS_CONTRACT --deposit 0.1 If you try to use the regular way of interacting with the contracts (key value paired), it will throw: near js call $JS_CONTRACT set_greeting '{"message": "GO TEAM!"}' --accountId $JS_CONTRACT --deposit 0.1 which throws:
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Deploy
This will deploy the contract to JS enclave:
DevDeploy
Additionally, there is dev-deploy that doesn't require having an account already:
Call
Call into a contract's call method:
View
Call into a contract's view method:
Remove
This will remove the contract from the JS enclave:
Feedback
As always, let us know where we can improve
Beta Was this translation helpful? Give feedback.
All reactions