The smart contract implements the simplest form of cross-contract calls: it calls the Hello NEAR example to get and set a greeting.
Install cargo-near
and run:
cargo near build
cargo test
To deploy manually, install cargo-near
and run:
# Create a new account
cargo near create-dev-account
# Deploy the contract on it
cargo near deploy <account-id>
To interact with the contract through the console, you can use the following commands
# Get message from the hello-near contract
# Replace <account-id> with your account ID
near call <account-id> query_greeting --accountId <account-id>
# Set a new message for the hello-near contract
# Replace <account-id> with your account ID
near call <account-id> change_greeting '{"new_greeting":"XCC Hi"}' --accountId <account-id>
- cargo-near - NEAR smart contract development toolkit for Rust
- near CLI - Interact with NEAR blockchain from command line
- NEAR Rust SDK Documentation
- NEAR Documentation
- NEAR StackOverflow
- NEAR Discord
- NEAR Telegram Developers Community Group
- NEAR DevHub: Telegram, Twitter