The smart contract implements the simplest form of cross-contract calls: it calls the Hello NEAR example to get and set a greeting.
- How to query information from an external contract.
- How to interact with an external contract.
Clone this repository locally or open it in gitpod. Then follow these steps:
npm install
Deploy your contract in a sandbox and simulate interactions from users.
npm test
Build the contract and deploy it in a testnet account
npm run deploy
Ask the contract to perform a cross-contract call to query or change the greeting in Hello NEAR.
# Use near-cli to ask the contract to query te greeting
near call <dev-account> query_greeting --accountId <dev-account>
# Use near-cli to set increment the counter
near call <dev-account> change_greeting '{"new_greeting":"XCC Hi"}' --accountId <dev-account>
- Learn more about the contract through its README.
- Check our documentation.