Git Source Author: @mpetersoCode55, @ShaneDuncan602, @TJ-Everett, @VoR0220, @Palmerg4 SPDX-License-Identifier: BUSL-1.1 This contract is intended to be inherited by other contracts that serve as permissioned foreign call contracts for policies. Abstract contract that provides functionality to connect and interact with the Rules Engine. This contract includes methods to set the Rules Engine address and set the foreign call admin role.

State Variables

rulesEngineAddress

Address of the Rules Engine contract
address public rulesEngineAddress;

Functions

setForeignCallAdmin

Sets the admin role for the calling contract in the Rules Engine. This function must be called per function signature. The admin role will be granted for the contract address and signature pair. This function is intended to be overridden by the contract that implements the foreign call and used in conjuction with role based admin controls. This function assigns the admin role for the calling contract to the specified address.
function setForeignCallAdmin(address foreignCallAdmin, bytes4 foreignCallSelector) external virtual;
Parameters
NameTypeDescription
foreignCallAdminaddressThe address to be assigned as the admin for the calling contract.
foreignCallSelectorbytes4selector for the foreign call function to be registered as a permissioned foreign call.

setRulesEngineAddress

Sets the address of the Rules Engine contract. This function should be overridden in inheriting contracts to implement role-based access control.
function setRulesEngineAddress(address rulesEngine) public virtual;
Parameters
NameTypeDescription
rulesEngineaddressThe address of the Rules Engine contract.