Docs Category: Contract-structure


To Share and +4 nLEARNs NEAR Wallet near_bindgen The #[near_bindgen] macro is used on a struct and the function implementations to generate the necessary code to be a valid NEAR contract and expose the intended functions to be able to be called externally. For example, on a simple counter contract, the macro will be applied …

near-bindgen Read More »


To Share and +4 nLEARNs NEAR Wallet Collections Nesting Traditional approach for unique prefixes Hardcoded prefixes in the constructor using a short one letter prefix that was converted to a vector of bytes. When using nested collection, the prefix must be constructed manually. use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; use near_sdk::collections::{UnorderedMap, UnorderedSet}; use near_sdk::{near_bindgen, AccountId}; #[near_bindgen] #[derive(BorshDeserialize, …

nesting Read More »


To Share and +4 nLEARNs NEAR Wallet Collections When deciding on data structures to use for the data of the application, it is important to minimize the amount of data read and written to storage but also the amount of data serialized and deserialized to minimize the cost of transactions. It is important to understand …

collections Read More »

Scroll to Top
🕺New partnerships = cool giveaways! 5 lucky winners will get (L)Earners NFTs!🏆
This is default text for notification bar