Skip to main content
Git Source Inherits: FacetCommonImports Author: @mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220 This contract is a critical component of the Rules Engine, enabling secure and flexible data management. This contract serves as the data facet for the Rules Engine Foreign Call Components. It provides functionality for managing foreign calls. It enforces role-based access control and ensures that only authorized users can modify or retrieve data. The contract also supports policy cementing to prevent further modifications.

Functions

createForeignCall

Creates a foreign call and stores it in the contract’s storage. Builds a foreign call structure and maps it to the associated policy ID.
Parameters Returns

updateForeignCall

Updates a foreign call in the contract’s storage.
Parameters Returns

deleteForeignCall

Deletes a foreign call from the contract’s storage.
Parameters

getAllForeignCalls

Retrieve Foreign Call Set from storage
Parameters Returns

getForeignCall

Retrieves a foreign call from the contract’s storage.
Parameters Returns

getForeignCallMetadata

retrieves the foreign call metadata
Parameters Returns

_storeForeignCall

Stores a foreign call in the contract’s storage. Ensures the foreign call is properly set before storing it.
Parameters

_incrementForeignCallIndex

Helper function to increment the foreign call index Ensures the foreign call is properly set before storing it.
Parameters

_storeForeignCallData

Helper function to store the foreign call data Ensures the foreign call is properly set before storing it.
Parameters

_storeForeignCallMetadata

Helper function to store the foreign call metadata
Parameters

_isForeignCallPermissioned

Checks if the foreign call is permissioned and if the caller is authorized.
Parameters

addAdminToPermissionList

Adds an admin to the permission list for a foreign call. This function can only be called by an existing foreign call admin.
Parameters

updatePermissionList

Updates the permission list for a foreign call. This function can only be called by an existing foreign call admin.
Parameters

getForeignCallPermissionList

Retrieves the permission list for a foreign call.
Parameters Returns

removeAllFromPermissionList

Removes all addresses from the permission list for a foreign call. This function resets the permission list to only include the foreign call admin. This function can only be called by an existing foreign call admin.
Parameters

removeFromPermissionList

Removes a specific address from the permission list for a foreign call. This function can only be called by an existing foreign call admin.
Parameters

removeForeignCallPermissions

Removes foreign call permissions from the contract address and selector pair. This function can only be called by an existing foreign call admin.
Parameters

getAllPermissionedFCs

Retrieves all permissioned foreign calls.
Returns

_notCemented

Checks that a policy is not cemented.
Parameters

_policyAdminOnly

Checks that the caller is a policy admin
Parameters

_foreignCallAdminOnly

Checks that the caller is a policy admin
Parameters