Modules§
Macros§
Structs§
- Lock
- A persistent lock, which stores its state (whether it’s locked or unlocked) on-chain, so that the inner value can be accessed depending on the current state of the lock.
- Nested
Prefix - Panic
OnClone - This struct is used as a tool to make it possible to derive borsh
serialization in such a way where serialization can take over a reference
and include it as if it’s owned by the struct/enum being serialized.
The reference can be taken in the function
PanicOnClone::from_ref().
Constants§
- MAX_
JSON_ LENGTH_ RECURSION_ LIMIT - NOTE: The NEAR runtime limits the Wasm operand stack height to 16,384 entries
(
max_stack_heightgenesis parameter). Each recursive call toMaxJsonLength::max_json_length_atconsumes stack entries for params, locals, operand depth, and gas metering overhead — the exact amount depends on the monomorphizedArgstype. Since different trait implementations produce different frame sizes, we use a conservative limit that stays well within budget across all reasonable type nesting. See the NEAR specification on contract preparation for details: https://nomicon.io/RuntimeSpec/Preparation - REFUND_
MEMO - Memo used for refund events.
- TOTAL_
LOG_ LENGTH_ LIMIT - Maximum length of a single log entry in NEAR runtime. See: https://github.com/near/nearcore/blob/v2.5.0/runtime/near-vm-runner/src/logic/logic.rs#L42
Traits§
Functions§
- gas_
left - promise_
result_ checked_ json - promise_
result_ checked_ json_ with_ args - promise_
result_ checked_ json_ with_ len - promise_
result_ checked_ void - Returns
Ok(())if the promise atresult_idxsucceeded with an empty result. This is the expected outcome for void-returning cross-contract calls (e.g.ft_transfer,nft_transfer,mt_batch_transfer).