Docs Category: Concepts

token-balance

To Share and +4 nLEARNs Login with NEARToken Balance Examples from our RPC are used. If you want to look at information about archival nodes (more than 2 days ago), please use archival prefix in your URL (e.g. https://archival-rpc.mainnet.near.org) In this article, we always use POST methods to the same URL https://archival-rpc.mainnet.near.org. Body: { “jsonrpc”: …

token-balance Read More »

Common Issues

To Share and +4 nLEARNs Login with NEARIssue 1: Exceeded the prepaid gas failure Let’s consider the following block of code: // Gas needed for common operations. pub const GAS_FOR_COMMON_OPERATIONS: Gas = Gas(30_000_000_000_000); // Gas reserved for the current call. pub const GAS_RESERVED_FOR_CURRENT_CALL: Gas = Gas(20_000_000_000_000); #[ext_contract(ext_storage_management)] pub trait StorageManagement { fn storage_balance_of(&self, account_id: AccountId) …

Common Issues Read More »

Tips

To Share and +4 nLEARNs Login with NEARTip 1: env::prepaid_gas() and env::used_gas() env::prepaid_gas() and env::used_gas() get reset inside each callback. To have a better understanding, check the example below: #[ext_contract(ext_self)] pub trait ExtSelf { fn callback_after_storage_balance_of(); } pub fn check_storage_balance( &mut self, token_id: &AccountId, account_id: &AccountId, ) -> PromiseOrValue<()> { // …………….. // {block of …

Tips Read More »

Storage Staking

To Share and +4 nLEARNs Login with NEAR When you deploy a smart contract to NEAR, you pay for the storage that this contract requires using a mechanism called storage staking. In storage staking (sometimes called state staking), the account that owns a smart contract must stake (or lock) tokens according to the amount of …

Storage Staking Read More »

Transaction

To Share and +4 nLEARNs Login with NEAROverview A transaction is the smallest unit of work that can be assigned to the network. Work in this case means compute (ie. executing a function) or storage (ie. reading / writing data). Transaction Processing Transaction A Transaction is a collection of Actions that describe what should be …

Transaction Read More »

New to NEAR?

To Share and +4 nLEARNs Login with NEARWelcome! This page is your map for getting to know the NEAR platform. If you have questions along the way, join our community on Discord and reach out! We’re here to help. What is NEAR? NEAR Protocol (“NEAR” hereafter) is a decentralized development platform where developers can host …

New to NEAR? Read More »

Scroll to Top
Report a bug👀