FCT_Runner

FCT_Runners are contracts that executes call requests from the FCT_Engine as a part of an FCT activation.

Executes its own FCTs calls, static calls and delegate calls (according to the from field in a call)

FCT Runners also approves fuel payments when requested by the FCT_Actuator.

Any contract that implements the IFCT_Runner interface is able to execute FCTs

Kirobo's on-chain-wallet (FCT Vault) implemented the IFCT_Runner interface in order to be able to execute FCTs.

Interface

fctCall

function fctCall(
        bytes32 funcID,
        bytes32 messageHash,
        CallData calldata callData,
        address[] calldata signers
) external returns (bool success, bytes memory result)

A call request. "funcId" is the Id of the calling engine. "messageHash" is the hash of the signed EIP712 message that holds the entire FCT. "callData" holds data for the specific call including: target contract/EOA, data in bytes to send to the target, ens hash, attached value for that call in ETH, etc. "signers" are all the signers of the running FCT (internal and external)

Returns if the call succeed or reverted and the data returned from that call (error mesage in case of a revert, function return value in case of success)

This function is being called by the FCT_Engine

fctCallBatch

function fctCallBatch(
        bytes32 funcID,
        bytes32 messageHash,
        CallData[] calldata callData,
        address[] calldata signers
) external returns (bool[] memory success, bytes[] memory results)

A multi-call request The only difference between fctCall and fctCallBatch is that "callData" is a array of requests and the returned values are arrays accordingly.

This function is being called by the FCT_Engine

fctPaymentApproval

function fctPaymentApproval(
        bytes32 funcId,
        address tokenomics
) external view

A request to approve a payment for executing the FCT by the activator. "funcId" is the Id of the calling engine. "tokenomics" is the address of the tokenomics contract being used to determine the payment amount.

This function is being called by the FCT_Actuator

Last updated