Skip to main content

Module utils

Module utils 

Source
Expand description

General utility functions for Neo N3 smart contracts.

For JSON serialization helpers, prefer the canonical functions in crate::storage (read_json, write_json, struct_entry, value_to_json). The functions here are thin wrappers kept for backward compatibility.

Functionsยง

bytes_to_json
Deserializes a NeoByteString as JSON.
json_from_value
Extracts JSON from a NeoValue containing a ByteString.
json_to_bytes
Serializes a value to JSON and returns it as a NeoByteString.
storage_struct
Creates a storage entry struct with key and value fields.