🎉 The #CandyDrop Futures Challenge is live — join now to share a 6 BTC prize pool!
📢 Post your futures trading experience on Gate Square with the event hashtag — $25 × 20 rewards are waiting!
🎁 $500 in futures trial vouchers up for grabs — 20 standout posts will win!
📅 Event Period: August 1, 2025, 15:00 – August 15, 2025, 19:00 (UTC+8)
👉 Event Link: https://www.gate.com/candy-drop/detail/BTC-98
Dare to trade. Dare to win.
NEAR Testnet Deployment Rust smart contracts Practical Guide
Rust smart contracts development practice: deployment and invocation
This article will introduce how to deploy a simple example smart contract to the NEAR test network, execute the contract, and query the execution results.
Introduction to the NEAR Network
NEAR Protocol, as a protocol, can support multiple independent networks based on it. The three main networks commonly used are as follows:
NEAR CLI Installation
NEAR CLI is a NodeJS command line interface for interacting with the NEAR network. Installation steps:
sudo npm install -g near-cli
near --version
Deploying Contracts on TestNet
Register TestNet account
Log in to NEAR CLI
Execute the following command to log in to your account:
near login
View account information
near state <账户名>
Contract Compilation and Deployment
call contract function
Use the near call command to invoke functions in the smart contracts, for example:
near call '{"parameter":"value"}' --accountId
transaction query
You can query specific transaction details in NEAR Explorer using the transaction ID.
By following the above steps, we have completed the entire process of smart contracts from compilation to deployment and then to invocation. The next step can be to discuss how to write safer smart contracts from a security perspective.