# Solidity API

# AccessControl

# hasAccess

function hasAccess(bytes16 namespace, bytes16 file, address caller) internal view returns (bool)

Returns true if the caller has access to the namespace or file, false otherwise.

# requireAccess

function requireAccess(bytes16 namespace, bytes16 file, address caller) internal view returns (bytes32 resourceSelector)

Check for access at the given namespace or file. Returns the resourceSelector if the caller has access. Reverts with AccessDenied if the caller has no access.

# requireOwner

function requireOwner(bytes16 namespace, bytes16 file, address caller) internal view returns (bytes32 resourceSelector)

# Call

# withSender

function withSender(address msgSender, address target, bytes funcSelectorAndArgs, bool delegate) internal returns (bytes)

Call a contract with delegatecall/call and append the given msgSender to the calldata. If the call is successfall, return the returndata as bytes memory. Else, forward the error (with a revert)

# ROOT_NAMESPACE_STRING

bytes16 ROOT_NAMESPACE_STRING

# ROOT_FILE_STRING

bytes16 ROOT_FILE_STRING

# ResourceSelector

# from

function from(bytes16 namespace, bytes16 file) internal pure returns (bytes32)

Create a 32-byte resource selector from a namespace and a file.

A ResourceSelector is a 32-byte value that uniquely identifies a resource. The first 16 bytes represent the namespace, the last 16 bytes represent the file.

# from

function from(bytes16 namespace) internal pure returns (bytes32)

Create a 32-byte resource selector from a namespace. The selector points to the namespace's root file.

# from

function from(uint256 tableId) internal pure returns (bytes32)

Create a 32-byte resource selector from a uint256 tableId

# getNamespace

function getNamespace(bytes32 resourceSelector) internal pure returns (bytes16)

Get the namespace of a ResourceSelector.

# getFile

function getFile(bytes32 resourceSelector) internal pure returns (bytes16)

Get the file of a ResourceSelector.

# toString

function toString(bytes32 resourceSelector) internal pure returns (string)

Convert a selector to a string for more readable logs

# toTrimmedString

function toTrimmedString(bytes16 selector) internal pure returns (string)

Convert a selector to a trimmed string (no trailing null ASCII characters)

# toTableId

function toTableId(bytes32 resourceSelector) internal pure returns (uint256)

Convert a resource selector to a tableId

# System

# Resource

enum Resource {
  NONE,
  NAMESPACE,
  TABLE,
  SYSTEM
}

# World

# constructor

constructor() public

# installModule

function installModule(contract IModule module, bytes args) public

Install the given module at the given namespace in the World.

# installRootModule

function installRootModule(contract IModule module, bytes args) public

Install the given root module in the World. Requires the caller to own the root namespace. The module is delegatecalled and installed in the root namespace.

# grantAccess

function grantAccess(bytes16 namespace, address grantee) public virtual

Grant access to the given namespace. Requires the caller to own the namespace.

# grantAccess

function grantAccess(bytes16 namespace, bytes16 file, address grantee) public virtual

Grant access to the resource at the given namespace and file. Requires the caller to own the namespace.

# retractAccess

function retractAccess(bytes16 namespace, bytes16 file, address grantee) public virtual

Retract access from the resource at the given namespace and file.

# setRecord

function setRecord(bytes16 namespace, bytes16 file, bytes32[] key, bytes data) public virtual

Write a record in the table at the given namespace and file. Requires the caller to have access to the namespace or file.

# setField

function setField(bytes16 namespace, bytes16 file, bytes32[] key, uint8 schemaIndex, bytes data) public virtual

Write a field in the table at the given namespace and file. Requires the caller to have access to the namespace or file.

# pushToField

function pushToField(bytes16 namespace, bytes16 file, bytes32[] key, uint8 schemaIndex, bytes dataToPush) public virtual

Push data to the end of a field in the table at the given namespace and file. Requires the caller to have access to the namespace or file.

# deleteRecord

function deleteRecord(bytes16 namespace, bytes16 file, bytes32[] key) public virtual

Delete a record in the table at the given namespace and file. Requires the caller to have access to the namespace or file.

# registerSchema

function registerSchema(uint256 tableId, Schema valueSchema, Schema keySchema) public virtual

Register the given schema for the given table id. This overload exists to conform with the IStore interface. The tableId is converted to a resourceSelector, and access is checked based on the namespace or file.

# setMetadata

function setMetadata(uint256 tableId, string tableName, string[] fieldNames) public virtual

Register metadata (tableName, fieldNames) for the table at the given tableId. This overload exists to conform with the IStore interface. The tableId is converted to a resourceSelector, and access is checked based on the namespace or file.

# registerStoreHook

function registerStoreHook(uint256 tableId, contract IStoreHook hook) public virtual

Register a hook for the table at the given tableId. This overload exists to conform with the IStore interface.

# setRecord

function setRecord(uint256 tableId, bytes32[] key, bytes data) public virtual

Write a record in the table at the given tableId. This overload exists to conform with the IStore interface. The tableId is converted to a resourceSelector, and access is checked based on the namespace or file.

# setField

function setField(uint256 tableId, bytes32[] key, uint8 schemaIndex, bytes data) public virtual

Write a field in the table at the given tableId. This overload exists to conform with the IStore interface. The tableId is converted to a resourceSelector, and access is checked based on the namespace or file.

# pushToField

function pushToField(uint256 tableId, bytes32[] key, uint8 schemaIndex, bytes dataToPush) public

Push data to the end of a field in the table at the given tableId. This overload exists to conform with the IStore interface. The tableId is converted to a resourceSelector, and access is checked based on the namespace or file.

# deleteRecord

function deleteRecord(uint256 tableId, bytes32[] key) public virtual

Delete a record in the table at the given tableId. This overload exists to conform with the IStore interface. The tableId is converted to a resourceSelector, and access is checked based on the namespace or file.

# call

function call(bytes16 namespace, bytes16 file, bytes funcSelectorAndArgs) public virtual returns (bytes)

Call the system at the given namespace and file. If the system is not public, the caller must have access to the namespace or file.

# fallback

fallback() external

Fallback function to call registered function selectors

# WorldContext

# _msgSender

function _msgSender() internal view returns (address sender)

# _world

function _world() internal view returns (address)

# ROOT_NAMESPACE

bytes16 ROOT_NAMESPACE

# ROOT_FILE

bytes16 ROOT_FILE

# CORE_MODULE_NAME

bytes16 CORE_MODULE_NAME

# REGISTRATION_MODULE_NAME

bytes16 REGISTRATION_MODULE_NAME

# REGISTRATION_SYSTEM_NAME

bytes16 REGISTRATION_SYSTEM_NAME

# IErrors

# ResourceExists

error ResourceExists(string resource)

# ResourceNotFound

error ResourceNotFound(string resource)

# AccessDenied

error AccessDenied(string resource, address caller)

# InvalidSelector

error InvalidSelector(string resource)

# SystemExists

error SystemExists(address system)

# FunctionSelectorExists

error FunctionSelectorExists(bytes4 functionSelector)

# FunctionSelectorNotFound

error FunctionSelectorNotFound(bytes4 functionSelector)

# ModuleAlreadyInstalled

error ModuleAlreadyInstalled(string module)

# IModule

# RequiredModuleNotFound

error RequiredModuleNotFound(string resourceSelector)

# getName

function getName() external view returns (bytes16 name)

Return the module name as a bytes16.

# install

function install(bytes args) external

A module expects to be called via the World contract, and therefore installs itself on its msg.sender.

# IRegistrationSystem

# registerNamespace

function registerNamespace(bytes16 namespace) external

# registerTable

function registerTable(bytes16 namespace, bytes16 file, Schema valueSchema, Schema keySchema) external returns (bytes32 resourceSelector)

# setMetadata

function setMetadata(bytes16 namespace, bytes16 file, string tableName, string[] fieldNames) external

# registerHook

function registerHook(bytes16 namespace, bytes16 file, address hook) external

# registerTableHook

function registerTableHook(bytes16 namespace, bytes16 file, contract IStoreHook hook) external

# registerSystemHook

function registerSystemHook(bytes16 namespace, bytes16 file, contract ISystemHook hook) external

# registerSystem

function registerSystem(bytes16 namespace, bytes16 file, contract System system, bool publicAccess) external returns (bytes32 resourceSelector)

# registerFunctionSelector

function registerFunctionSelector(bytes16 namespace, bytes16 file, string systemFunctionName, string systemFunctionArguments) external returns (bytes4 worldFunctionSelector)

# registerRootFunctionSelector

function registerRootFunctionSelector(bytes16 namespace, bytes16 file, bytes4 worldFunctionSelector, bytes4 systemFunctionSelector) external returns (bytes4)

# ISystemHook

# onCallSystem

function onCallSystem(address msgSender, address systemAddress, bytes funcSelectorAndArgs) external

# IWorld

The IWorld interface includes all systems dynamically added to the World during the deploy process.

# IWorldCore

The IWorldCore interfaces includes all World methods with a static function selector. Consumers should use the IWorld interface instead, which includes dynamically registered function selectors (e.g. IRegistrationSystem)

# installModule

function installModule(contract IModule module, bytes args) external

Install the given module at the given namespace in the World.

# installRootModule

function installRootModule(contract IModule module, bytes args) external

Install the given root module in the World. Requires the caller to own the root namespace. The module is delegatecalled and installed in the root namespace.

# grantAccess

function grantAccess(bytes16 namespace, address grantee) external

Grant access to the given namespace. Requires the caller to own the namespace.

# grantAccess

function grantAccess(bytes16 namespace, bytes16 file, address grantee) external

Grant access to the resource at the given namespace and file. Requires the caller to own the namespace.

# retractAccess

function retractAccess(bytes16 namespace, bytes16 file, address grantee) external

Retract access from the resource at the given namespace and file.

# setRecord

function setRecord(bytes16 namespace, bytes16 file, bytes32[] key, bytes data) external

Write a record in the table at the given namespace and file. Requires the caller to have access to the namespace or file.

# setField

function setField(bytes16 namespace, bytes16 file, bytes32[] key, uint8 schemaIndex, bytes data) external

Write a field in the table at the given namespace and file. Requires the caller to have access to the namespace or file.

# pushToField

function pushToField(bytes16 namespace, bytes16 file, bytes32[] key, uint8 schemaIndex, bytes dataToPush) external

Push data to the end of a field in the table at the given namespace and file. Requires the caller to have access to the namespace or file.

# deleteRecord

function deleteRecord(bytes16 namespace, bytes16 file, bytes32[] key) external

Delete a record in the table at the given namespace and file. Requires the caller to have access to the namespace or file.

# call

function call(bytes16 namespace, bytes16 file, bytes funcSelectorAndArgs) external returns (bytes)

Call the system at the given namespace and file. If the system is not public, the caller must have access to the namespace or file.

# CoreModule

The CoreModule registers internal World tables.

Note: This module is required to be delegatecalled via World.registerRootSystem. because otherwise the registration of tables would require the registerTable function selector to already exist on the World, but it is only added in RegistrationModule, which is installed after CoreModule.

# getName

function getName() public pure returns (bytes16)

Return the module name as a bytes16.

# install

function install(bytes) public

# ArrayLib

# includes

function includes(bytes32[] arr, bytes32 element) internal pure returns (bool)

# filter

function filter(bytes32[] arr, bytes32 element) internal pure returns (bytes32[])

# KeysWithValueHook

This is a very naive and inefficient implementation for now. We can optimize this by adding support for setIndexOfField in Store and then replicate logic from solecs's Set.sol. (See https://github.com/latticexyz/mud/issues/444)

# MultipleKeysNotSupported

error MultipleKeysNotSupported()

# onSetRecord

function onSetRecord(uint256 sourceTableId, bytes32[] key, bytes data) public

# onBeforeSetField

function onBeforeSetField(uint256 sourceTableId, bytes32[] key, uint8, bytes) public

# onAfterSetField

function onAfterSetField(uint256 sourceTableId, bytes32[] key, uint8, bytes) public

# onDeleteRecord

function onDeleteRecord(uint256 sourceTableId, bytes32[] key) public

# _requireSingleKey

function _requireSingleKey(bytes32[] key) internal pure

# _removeKeyFromList

function _removeKeyFromList(uint256 targetTableId, bytes32 key, bytes32 valueHash) internal

# KeysWithValueModule

This module deploys a hook that is called when a value is set in the sourceTableId provided in the install methods arguments. The hook keeps track of the keys that map to a given value. from value to list of keys with this value. This mapping is stored in a table registered by the module at the targetTableId provided in the install methods arguments.

Note: for now this module only supports tables with single keys, no composite keys. Support for composite keys can be added by using a parallel array to store the key in the target table.

Note: this module currently expects to be delegatecalled via World.installRootModule. Support for installing it via World.installModule depends on World.callFrom being implemented.

# hook

contract KeysWithValueHook hook

# getName

function getName() public pure returns (bytes16)

Return the module name as a bytes16.

# install

function install(bytes args) public

A module expects to be called via the World contract, and therefore installs itself on its msg.sender.

# MODULE_NAMESPACE

bytes8 MODULE_NAMESPACE

# freeFunction

freeFunction getKeysWithValue(uint256 tableId, bytes value) internal view returns (bytes32[] keysWithValue)

Get a list of keys with the given value.

Note: this util can only be called within the context of a Store (e.g. from a System or Module). For usage outside of a Store, use the overload that takes an explicit store argument.

# freeFunction

freeFunction getKeysWithValue(contract IStore store, uint256 tableId, bytes value) internal view returns (bytes32[] keysWithValue)

Get a list of keys with the given value for the given store.

# freeFunction

freeFunction getTargetTableSelector(uint256 sourceTableId) internal pure returns (bytes32)

Get a deterministic selector for the reverse mapping table for the given source table. The selector is constructed as follows:

  • The first 8 bytes are the module namespace
  • The next 8 bytes are the first 8 bytes of the source table namespace -- This is to avoid collisions between tables with the same name in different namespaces (Note that collisions are still possible if the first 4 bytes of the namespace are the same, in which case installing the module fails)
  • The last 16 bytes are the source table name

# KeysWithValue

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema(uint256 _tableId) internal

Register the table's schema

# registerSchema

function registerSchema(contract IStore _store, uint256 _tableId) internal

Register the table's schema (using the specified store)

# setMetadata

function setMetadata(uint256 _tableId) internal

Set the table's metadata

# setMetadata

function setMetadata(contract IStore _store, uint256 _tableId) internal

Set the table's metadata (using the specified store)

# get

function get(uint256 _tableId, bytes32 valueHash) internal view returns (bytes32[] keysWithValue)

Get keysWithValue

# get

function get(contract IStore _store, uint256 _tableId, bytes32 valueHash) internal view returns (bytes32[] keysWithValue)

Get keysWithValue (using the specified store)

# set

function set(uint256 _tableId, bytes32 valueHash, bytes32[] keysWithValue) internal

Set keysWithValue

# set

function set(contract IStore _store, uint256 _tableId, bytes32 valueHash, bytes32[] keysWithValue) internal

Set keysWithValue (using the specified store)

# push

function push(uint256 _tableId, bytes32 valueHash, bytes32 _element) internal

Push an element to keysWithValue

# push

function push(contract IStore _store, uint256 _tableId, bytes32 valueHash, bytes32 _element) internal

Push an element to keysWithValue (using the specified store)

# encode

function encode(bytes32[] keysWithValue) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(uint256 _tableId, bytes32 valueHash) internal

# deleteRecord

function deleteRecord(contract IStore _store, uint256 _tableId, bytes32 valueHash) internal

# RegistrationModule

The RegistrationModule installs the RegistrationSystem and all required tables and function selectors in the World.

Note: This module is required to be delegatecalled via World.registerRootSystem. because otherwise the table libraries would try to call methods on the World contract that are only registered in this module (e.g. registerTable). If the module is delegatecalled, the StoreCore functions are used directly.

# registrationSystem

address registrationSystem

# getName

function getName() public pure returns (bytes16)

Return the module name as a bytes16.

# install

function install(bytes) public

# RegistrationSystem

# registerNamespace

function registerNamespace(bytes16 namespace) public virtual

Register a new namespace

# registerTable

function registerTable(bytes16 namespace, bytes16 file, Schema valueSchema, Schema keySchema) public virtual returns (bytes32 resourceSelector)

Register a table with given schema in the given namespace

# setMetadata

function setMetadata(bytes16 namespace, bytes16 file, string tableName, string[] fieldNames) public virtual

Register metadata (tableName, fieldNames) for the table at the given namespace and file. Requires the caller to own the namespace.

# registerHook

function registerHook(bytes16 namespace, bytes16 file, address hook) public virtual

Register the given store hook for the table at the given namespace and file. Hooks on table files must implement the IStoreHook interface, and hooks on system files must implement the ISystemHook interface.

# registerTableHook

function registerTableHook(bytes16 namespace, bytes16 file, contract IStoreHook hook) public virtual

Register a hook for the table at the given namepace and file. Requires the caller to own the namespace.

# registerSystemHook

function registerSystemHook(bytes16 namespace, bytes16 file, contract ISystemHook hook) public virtual

Register a hook for the system at the given namespace and file

# registerSystem

function registerSystem(bytes16 namespace, bytes16 file, contract System system, bool publicAccess) public virtual returns (bytes32 resourceSelector)

Register the given system in the given namespace. If the namespace doesn't exist yet, it is registered. The system is granted access to its namespace, so it can write to any table in the same namespace. If publicAccess is true, no access control check is performed for calling the system.

# registerFunctionSelector

function registerFunctionSelector(bytes16 namespace, bytes16 file, string systemFunctionName, string systemFunctionArguments) public returns (bytes4 worldFunctionSelector)

Register a World function selector for the given namespace, file and system function. TODO: instead of mapping to a resource, the function selector could map direcly to a system function, which would save one sload per call, but add some complexity to upgrading systems. TBD. (see https://github.com/latticexyz/mud/issues/444)

# registerRootFunctionSelector

function registerRootFunctionSelector(bytes16 namespace, bytes16 file, bytes4 worldFunctionSelector, bytes4 systemFunctionSelector) public returns (bytes4)

Register a root World function selector (without namespace / file prefix). Requires the caller to own the root namespace. TODO: instead of mapping to a resource, the function selector could map direcly to a system function, which would save one sload per call, but add some complexity to upgrading systems. TBD. (see https://github.com/latticexyz/mud/issues/444)

# _tableId

uint256 _tableId

# ResourceTypeTableId

uint256 ResourceTypeTableId

# ResourceType

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema() internal

Register the table's schema

# setMetadata

function setMetadata() internal

Set the table's metadata

# get

function get(bytes32 resourceSelector) internal view returns (enum Resource resourceType)

Get resourceType

# set

function set(bytes32 resourceSelector, enum Resource resourceType) internal

Set resourceType

# encode

function encode(enum Resource resourceType) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(bytes32 resourceSelector) internal

# _tableId

uint256 _tableId

# SystemRegistryTableId

uint256 SystemRegistryTableId

# SystemRegistry

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema() internal

Register the table's schema

# setMetadata

function setMetadata() internal

Set the table's metadata

# get

function get(address system) internal view returns (bytes32 resourceSelector)

Get resourceSelector

# set

function set(address system, bytes32 resourceSelector) internal

Set resourceSelector

# encode

function encode(bytes32 resourceSelector) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(address system) internal

# AddressArray

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema(uint256 _tableId) internal

Register the table's schema

# registerSchema

function registerSchema(contract IStore _store, uint256 _tableId) internal

Register the table's schema (using the specified store)

# setMetadata

function setMetadata(uint256 _tableId) internal

Set the table's metadata

# setMetadata

function setMetadata(contract IStore _store, uint256 _tableId) internal

Set the table's metadata (using the specified store)

# get

function get(uint256 _tableId, bytes32 key) internal view returns (address[] value)

Get value

# get

function get(contract IStore _store, uint256 _tableId, bytes32 key) internal view returns (address[] value)

Get value (using the specified store)

# set

function set(uint256 _tableId, bytes32 key, address[] value) internal

Set value

# set

function set(contract IStore _store, uint256 _tableId, bytes32 key, address[] value) internal

Set value (using the specified store)

# push

function push(uint256 _tableId, bytes32 key, address _element) internal

Push an element to value

# push

function push(contract IStore _store, uint256 _tableId, bytes32 key, address _element) internal

Push an element to value (using the specified store)

# encode

function encode(address[] value) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(uint256 _tableId, bytes32 key) internal

# deleteRecord

function deleteRecord(contract IStore _store, uint256 _tableId, bytes32 key) internal

# Bool

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema(uint256 _tableId) internal

Register the table's schema

# registerSchema

function registerSchema(contract IStore _store, uint256 _tableId) internal

Register the table's schema (using the specified store)

# setMetadata

function setMetadata(uint256 _tableId) internal

Set the table's metadata

# setMetadata

function setMetadata(contract IStore _store, uint256 _tableId) internal

Set the table's metadata (using the specified store)

# get

function get(uint256 _tableId) internal view returns (bool value)

Get value

# get

function get(contract IStore _store, uint256 _tableId) internal view returns (bool value)

Get value (using the specified store)

# set

function set(uint256 _tableId, bool value) internal

Set value

# set

function set(contract IStore _store, uint256 _tableId, bool value) internal

Set value (using the specified store)

# encode

function encode(bool value) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(uint256 _tableId) internal

# deleteRecord

function deleteRecord(contract IStore _store, uint256 _tableId) internal

# freeFunction

freeFunction _toBool(uint8 value) internal pure returns (bool result)

# _tableId

uint256 _tableId

# FunctionSelectorsTableId

uint256 FunctionSelectorsTableId

# FunctionSelectors

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema() internal

Register the table's schema

# setMetadata

function setMetadata() internal

Set the table's metadata

# getNamespace

function getNamespace(bytes4 functionSelector) internal view returns (bytes16 namespace)

Get namespace

# setNamespace

function setNamespace(bytes4 functionSelector, bytes16 namespace) internal

Set namespace

# getFile

function getFile(bytes4 functionSelector) internal view returns (bytes16 file)

Get file

# setFile

function setFile(bytes4 functionSelector, bytes16 file) internal

Set file

# getSystemFunctionSelector

function getSystemFunctionSelector(bytes4 functionSelector) internal view returns (bytes4 systemFunctionSelector)

Get systemFunctionSelector

# setSystemFunctionSelector

function setSystemFunctionSelector(bytes4 functionSelector, bytes4 systemFunctionSelector) internal

Set systemFunctionSelector

# get

function get(bytes4 functionSelector) internal view returns (bytes16 namespace, bytes16 file, bytes4 systemFunctionSelector)

Get the full data

# set

function set(bytes4 functionSelector, bytes16 namespace, bytes16 file, bytes4 systemFunctionSelector) internal

Set the full data using individual values

# decode

function decode(bytes _blob) internal pure returns (bytes16 namespace, bytes16 file, bytes4 systemFunctionSelector)

Decode the tightly packed blob using this table's schema

# encode

function encode(bytes16 namespace, bytes16 file, bytes4 systemFunctionSelector) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(bytes4 functionSelector) internal

# _tableId

uint256 _tableId

# InstalledModulesTableId

uint256 InstalledModulesTableId

# InstalledModulesData

struct InstalledModulesData {
  address moduleAddress;
}

# InstalledModules

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema() internal

Register the table's schema

# setMetadata

function setMetadata() internal

Set the table's metadata

# getModuleAddress

function getModuleAddress(bytes16 moduleName, bytes32 argumentsHash) internal view returns (address moduleAddress)

Get moduleAddress

# setModuleAddress

function setModuleAddress(bytes16 moduleName, bytes32 argumentsHash, address moduleAddress) internal

Set moduleAddress

# get

function get(bytes16 moduleName, bytes32 argumentsHash) internal view returns (struct InstalledModulesData _table)

Get the full data

# set

function set(bytes16 moduleName, bytes32 argumentsHash, address moduleAddress) internal

Set the full data using individual values

# set

function set(bytes16 moduleName, bytes32 argumentsHash, struct InstalledModulesData _table) internal

Set the full data using the data struct

# decode

function decode(bytes _blob) internal pure returns (struct InstalledModulesData _table)

Decode the tightly packed blob using this table's schema

# encode

function encode(address moduleAddress) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(bytes16 moduleName, bytes32 argumentsHash) internal

# _tableId

uint256 _tableId

# NamespaceOwnerTableId

uint256 NamespaceOwnerTableId

# NamespaceOwner

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema() internal

Register the table's schema

# registerSchema

function registerSchema(contract IStore _store) internal

Register the table's schema (using the specified store)

# setMetadata

function setMetadata() internal

Set the table's metadata

# setMetadata

function setMetadata(contract IStore _store) internal

Set the table's metadata (using the specified store)

# get

function get(bytes16 namespace) internal view returns (address owner)

Get owner

# get

function get(contract IStore _store, bytes16 namespace) internal view returns (address owner)

Get owner (using the specified store)

# set

function set(bytes16 namespace, address owner) internal

Set owner

# set

function set(contract IStore _store, bytes16 namespace, address owner) internal

Set owner (using the specified store)

# encode

function encode(address owner) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(bytes16 namespace) internal

# deleteRecord

function deleteRecord(contract IStore _store, bytes16 namespace) internal

# _tableId

uint256 _tableId

# ResourceAccessTableId

uint256 ResourceAccessTableId

# ResourceAccess

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema() internal

Register the table's schema

# registerSchema

function registerSchema(contract IStore _store) internal

Register the table's schema (using the specified store)

# setMetadata

function setMetadata() internal

Set the table's metadata

# setMetadata

function setMetadata(contract IStore _store) internal

Set the table's metadata (using the specified store)

# get

function get(bytes32 resourceSelector, address caller) internal view returns (bool access)

Get access

# get

function get(contract IStore _store, bytes32 resourceSelector, address caller) internal view returns (bool access)

Get access (using the specified store)

# set

function set(bytes32 resourceSelector, address caller, bool access) internal

Set access

# set

function set(contract IStore _store, bytes32 resourceSelector, address caller, bool access) internal

Set access (using the specified store)

# encode

function encode(bool access) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(bytes32 resourceSelector, address caller) internal

# deleteRecord

function deleteRecord(contract IStore _store, bytes32 resourceSelector, address caller) internal

# freeFunction

freeFunction _toBool(uint8 value) internal pure returns (bool result)

# _tableId

uint256 _tableId

# SystemsTableId

uint256 SystemsTableId

# Systems

# getSchema

function getSchema() internal pure returns (Schema)

Get the table's schema

# getKeySchema

function getKeySchema() internal pure returns (Schema)

# getMetadata

function getMetadata() internal pure returns (string, string[])

Get the table's metadata

# registerSchema

function registerSchema() internal

Register the table's schema

# registerSchema

function registerSchema(contract IStore _store) internal

Register the table's schema (using the specified store)

# setMetadata

function setMetadata() internal

Set the table's metadata

# setMetadata

function setMetadata(contract IStore _store) internal

Set the table's metadata (using the specified store)

# getSystem

function getSystem(bytes32 resourceSelector) internal view returns (address system)

Get system

# getSystem

function getSystem(contract IStore _store, bytes32 resourceSelector) internal view returns (address system)

Get system (using the specified store)

# setSystem

function setSystem(bytes32 resourceSelector, address system) internal

Set system

# setSystem

function setSystem(contract IStore _store, bytes32 resourceSelector, address system) internal

Set system (using the specified store)

# getPublicAccess

function getPublicAccess(bytes32 resourceSelector) internal view returns (bool publicAccess)

Get publicAccess

# getPublicAccess

function getPublicAccess(contract IStore _store, bytes32 resourceSelector) internal view returns (bool publicAccess)

Get publicAccess (using the specified store)

# setPublicAccess

function setPublicAccess(bytes32 resourceSelector, bool publicAccess) internal

Set publicAccess

# setPublicAccess

function setPublicAccess(contract IStore _store, bytes32 resourceSelector, bool publicAccess) internal

Set publicAccess (using the specified store)

# get

function get(bytes32 resourceSelector) internal view returns (address system, bool publicAccess)

Get the full data

# get

function get(contract IStore _store, bytes32 resourceSelector) internal view returns (address system, bool publicAccess)

Get the full data (using the specified store)

# set

function set(bytes32 resourceSelector, address system, bool publicAccess) internal

Set the full data using individual values

# set

function set(contract IStore _store, bytes32 resourceSelector, address system, bool publicAccess) internal

Set the full data using individual values (using the specified store)

# decode

function decode(bytes _blob) internal pure returns (address system, bool publicAccess)

Decode the tightly packed blob using this table's schema

# encode

function encode(address system, bool publicAccess) internal view returns (bytes)

Tightly pack full data using this table's schema

# deleteRecord

function deleteRecord(bytes32 resourceSelector) internal

# deleteRecord

function deleteRecord(contract IStore _store, bytes32 resourceSelector) internal

# freeFunction

freeFunction _toBool(uint8 value) internal pure returns (bool result)