getForeignCall(config, rulesEngineComponentContract, policyId, foreignCallId): Promise<any>

Retrieves the result of a foreign call from the rules engine component contract.

Parameters

ParameterTypeDescription
configConfig-
rulesEngineComponentContractobjectThe contract instance containing the address and ABI for interaction.
rulesEngineComponentContract.abi(object | object | object)[]-
rulesEngineComponentContract.address`0x${string}`-
policyIdnumberThe ID of the policy associated with the foreign call.
foreignCallIdnumberThe ID of the foreign call to retrieve.

Returns

Promise<any>

A promise that resolves to the result of the foreign call, or null if an error occurs.

Throws

Will log an error to the console if the contract interaction fails.

Defined in

src/modules/foreign-calls.ts:218