rust-counter | Simple counter in Rust
kandi X-RAY | rust-counter Summary
kandi X-RAY | rust-counter Summary
Counter example in Rust.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rust-counter
rust-counter Key Features
rust-counter Examples and Code Snippets
Community Discussions
Trending Discussions on rust-counter
QUESTION
I just working with the "Quick-start Guide" in the last part "invoking methods" when i try to call any method always see the error:
...ANSWER
Answered 2021-Sep-02 at 04:08I assume you are referring to the Quick-start guide for building smart contracts in Rust?
Let's check a few things to make sure you didn't miss any steps.
Did you create a lib.rs file and copy the contents of this smart contract into that file?
Did you successfully deploy the contract using
near-cli
after you compiled it to WASM?Are you invoking the methods using
near-cli
and replacing YOUR_ACCOUNT_HERE with thetestnet
accountId you just deployed the contract to?
If so, would you be able to share your code / commands so I can help you debug your issue? This tutorial was updated recently (less than a month from today) so it should work, but while I'm waiting for your response I will run through the steps to make sure we don't have a bug on our end. :)
** UPDATE **
Just went through the tutorial and it worked for me. Here was my command using near-cli
:
QUESTION
I try to Call Smart Contract by NEAR Protocol for the first time. Please tell me how can I solve the error as following.
- I have created Testnet NEAR Account.
- I have compiled "Counter" Contract by using this example "https://github.com/near-examples/rust-counter/blob/master/contract/src/lib.rs".
- I have deployed this contract to the testnet by using "near cli", and it have been suceed.
- I call "veiw function" of near cli,Error Returned.
ANSWER
Answered 2021-Jun-13 at 06:37Counter
is not a valid account-id. Uppercase letters in accounts-id are not allowed). You need to pass the proper account-id
.
I would expected your account-id to be something of the form takahashi.testnet
or dev-1623565709996-68004511819798
(if contract was deployed using near dev-deploy
command).
This is how you can deploy to testnet using dev-deploy
, and call view function using near-cli
:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rust-counter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page