Functions#
storage_read#
Reads data from contract storage at the specified slot and index.
Requirements#
storage_write#
Writes data to contract storage at the specified slot and index.
Requirements#
get_balance#
Queries the balance of a specified contract address.
Result value is a 32 octets long little-endian unsigned integer
get_self_balance#
Gets the current contract’s balance, adjusted for the current transaction context. It is following: balance_before_transaction + message.value - value_consumed_by_current_tx
Result value is a 32 octets long little-endian unsigned integer
Requirements#
Contract must be in deterministic mode
gl_call#
Primary GenLayer WASI SDK function handling most intelligent contract operations. Takes serialized Calldata Encoded message buffer and dispatches to various blockchain operations based on message type.
Parameters: request (calldata buffer), request_len (buffer length), result_fd (output file descriptor)
Returns
error_successon successerror_invalfor invalid requestserror_forbiddenfor permission violationserror_inbalancefor insufficient balance
See gl_call Messages for the list of available messages.