deleteForeignCall(config, rulesEngineComponentContract, policyId, foreignCallId): Promise<number>

Deletes a foreign call associated with a specific policy in the rules engine component contract.

Parameters

ParameterTypeDescription
configConfig-
rulesEngineComponentContractobjectThe contract instance containing the address and ABI for interacting with the rules engine component.
rulesEngineComponentContract.abi(object | object | object)[]-
rulesEngineComponentContract.address`0x${string}`-
policyIdnumberThe ID of the policy to which the foreign call belongs.
foreignCallIdnumberThe ID of the foreign call to be deleted.

Returns

Promise<number>

A promise that resolves to a number:

  • 0 if the operation is successful.
  • -1 if an error occurs during the simulation of the contract interaction.

Throws

This function does not explicitly throw errors but will return -1 if an error occurs during the simulation phase.

Defined in

src/modules/foreign-calls.ts:176