LEARN · DOCUMENTATION
Documentation
Pages from 3 sources, kept in sync: the official NEAR documentation, documentation from teams building on NEAR, and readmes from their code. Search all of it, or start from a path below.
483pages
synced 4h ago3 sources
Official
Financial Transaction
Financial Transaction Suppose Alice wants to transfer 100 tokens to Bob. In this case we are talking about native Near Protocol tokens, oppose to user-defined tokens implemented …
Nov 2, 2026
Official
Cross-ContractCall
…"{\"city\": \"Venice\", \"date\": 20191201}", gas: 1000000, tokens: 100, }) ], } Here the public key corresponds to the full access key of alice_near account. All other fields in T…
Nov 2, 2026
Official
Data Types
… type Balance = u128 Balance is type for storing amounts of tokens. Gas = u64 Gas is a type for storing amount of gas.
Nov 2, 2026
Official
Actions
Actions There are a several action types in Near: #![allow(unused)] fn main() { pub enum Action { CreateAccount(CreateAccountAction), DeployContract(DeployContractAction), Function…
Nov 2, 2026
Official
Applying chunk
Applying chunk Inputs and outputs Runtime.apply takes following inputs: • trie and current state root • validator_accounts_update • incoming_receipts • transactions and produces fo…
Nov 2, 2026
Official
Runtime Crate
Runtime crate Runtime crate encapsulates the logic of how transactions and receipts should be handled. If it encounters a smart contract call within a transaction or a receipt it c…
Nov 2, 2026
Official
Economics API
… before the contract execution starts; • prepaid_gas -- the tokens attached to the call that can be used to pay for the gas; • used_gas -- the gas that was already burnt during the…
Nov 2, 2026
Official
Block and Block Header
Block and Block Header The data structures for block and block headers are #![allow(unused)] fn main() { pub struct Block { /// Block Header pub header: BlockHeader, /// Headers of…
Nov 2, 2026
Official
Accounts
Accounts Account ID NEAR Protocol has an account names system. Account ID is similar to a username. Account IDs have to follow the rules. Account ID Rules • minimum length is 2 • m…
Nov 2, 2026
Official
Refunds
Refunds When execution of a receipt fails or there is some unused amount of prepaid gas left after a function call, the Runtime generates refund receipts. The are 2 types of refund…
Nov 2, 2026
Official
Access Keys
…ion on the account. This includes DeployContract , Transfer tokens, call functions FunctionCall , Stake and even permission to delete the account DeleteAccountAction . FunctionCall…
Nov 2, 2026
Official
Selecting Chunk and Block Producers
…lgorithms: • Larger stakes should be preferred (more staked tokens means more security) • The frequency with whic
Nov 2, 2026
Showing 12 of 12Search all sources →