
New to Smart Contract Development?
New to Smart Contract Development?
Do not worry if you don’t know how smart contract blockchains work. As a developer, it is sufficient to understand that NEAR smart contracts:
- Have limited computational resources.
- Interact with other contracts in an asynchronous way.
- Deal with real money, for which security must be a top concern.
Where do contracts live?
Smart contracts are deployed to NEAR accounts. Any NEAR account can hold a contract and must pay for the contract’s code and the data it stores. Once in an account, anyone can interact with the contract. Thanks to the underlying network structure, executing code from a contract is both fast (average finality of 1.2 seconds) and cheap. Read-only operations are free for everyone.Storing 100 KB costs 1 Ⓝ, so deploying a contract generally costs only a few
$NEARs.What can they do?
Smart contracts have complete control over the account and can therefore perform any action on its behalf. For example, contracts can:- Transfer
$NEARtokens - Call methods on other contracts
- Create new accounts and deploy contracts on them
- Update their own code
What contracts cannot do
- Smart contracts cannot access the internet, so they cannot make HTTP requests or access external data
- Smart contracts cannot execute automatically; they must be called by an external account
What are they used for?
Smart contracts are used to create decentralized applications. Common examples include:- Decentralized Autonomous Organizations, where users create and vote on proposals
- Marketplaces, where users create and trade digital artworks
- Decentralized exchanges, where users can trade different currencies
- And many more…
$NEAR. If the goal is met in time, the creator can claim the funds. Otherwise, the backers are refunded.
Supported languages
While our docs focus on the Rust SDK, smart contracts can be written in any language that compiles to WebAssembly. Some members of our community created SDKs for other languages that you can use to build smart contracts:- JavaScript / TypeScript: near-sdk-js
- Python: near-sdk-py
- Go: near-sdk-go