Built-in Functions Reference

Chain Object

The Chain object provides blockchain interaction capabilities within smart contracts.

Metadata Management

// Store data in contract storage
Chain.store(key, value);

// Retrieve data from contract storage
const data = Chain.load(key);

// Delete data from contract storage
Chain.del(key);

Example:

// Store user balance
Chain.store('balance_' + userAddress, '1000000');

// Retrieve user balance
const balance = Chain.load('balance_' + userAddress);

Account Query Functions


Transaction Functions

Example:


Contract Operations


Logging and Events

Example:


Built-in Objects


Utils Object

The Utils object provides cryptographic and mathematical utilities.

256-bit Integer Operations

Example:


64-bit Integer Operations


Cryptographic Functions

Example:


Validation Functions


Utility Functions

Example:


Last updated