Skip to main content
createCallingFunction(config, rulesEngineComponentContract, policyId, callingFunction, name, encodedValues, confirmationCount): Promise<{ functionId: number; transactionHash: `0x${string}`; }>
Defined in: src/modules/calling-functions.ts:53 Creates a Calling Function in the rules engine component contract. This function parses the provided calling function, maps its arguments to their respective types, and interacts with the smart contract to create the calling function. If the contract interaction fails, it retries with a delay until successful.

Parameters

Returns

Promise<{ functionId: number; transactionHash: `0x${string}`; }> A promise that resolves to the result of the contract interaction, or -1 if unsuccessful.

Throws

Will retry indefinitely on contract interaction failure, with a delay between attempts.