Smart Contract

Smart contracts are simple programs that live in a NEAR network. As any modern application, smart contracts store data and expose methods to interact with them.

NFT standard :

NEP-171 is the standard for creating and managing NFTs on the NEAR blockchain. It specifies the data structure and smart contract interface for NFTs, allowing developers to create and manage NFTs in a consistent and interoperable way.

Rust Language :

The NEAR Pathway utilizes AssemblyScript as the primary programming language for its smart contracts, which are then compiled to WebAssembly (WASM) for execution on the blockchain.

However, NEAR also supports the use of Rust, a language that is particularly well-suited for server applications and has gained popularity for its built-in safety checks and testing infrastructure.

The NEAR team highly recommends the use of Rust for any smart contracts of a financial nature.

Smart contract scaffolding :

which is a framework of how Dapps work

use near_sdk::{near_bindgen,
borsh::{self, BorshDeserialize, BorshSerialize}
};
near_sdk::setup_alloc!();
#[near_bindgen]
#[derive(BorshDeserialize, BorshDeserialize)]
pub struct Contract {}
#[near_bindgen]
impl Contract {}

Last updated