deleteForeignCall(Defined in: src/modules/foreign-calls.ts:322 Deletes a foreign call associated with a specific policy in the rules engine component contract.config
,rulesEngineForeignCallContract
,policyId
,foreignCallId
,confirmationCount
):Promise
<number
>
Parameters
Parameter | Type | Description |
---|---|---|
config | Config | The configuration object containing network and wallet information. |
rulesEngineForeignCallContract | { abi : ({ anonymous : undefined ; inputs : ({ components : undefined ; internalType : string ; name : string ; type : string ; } | { components : ({ components : undefined ; internalType : string ; name : string ; type : string ; } | { components : …[]; internalType : string ; name : string ; type : string ; })[]; internalType : string ; name : string ; type : string ; })[]; name : string ; outputs : object []; stateMutability : string ; type : string ; } | { anonymous : undefined ; inputs : ({ components : undefined ; internalType : string ; name : string ; type : string ; } | { components : ({ components : undefined ; internalType : string ; name : string ; type : string ; } | { components : …[]; internalType : string ; name : string ; type : string ; })[]; internalType : string ; name : string ; type : string ; })[]; name : string ; outputs : object []; stateMutability : string ; type : string ; } | { anonymous : boolean ; inputs : object []; name : string ; outputs : undefined ; stateMutability : undefined ; type : string ; })[]; address : `0x${string}` ; } | The contract instance containing the address and ABI for interacting with the rules engine component. |
rulesEngineForeignCallContract.abi | ({ anonymous : undefined ; inputs : ({ components : undefined ; internalType : string ; name : string ; type : string ; } | { components : ({ components : undefined ; internalType : string ; name : string ; type : string ; } | { components : …[]; internalType : string ; name : string ; type : string ; })[]; internalType : string ; name : string ; type : string ; })[]; name : string ; outputs : object []; stateMutability : string ; type : string ; } | { anonymous : undefined ; inputs : ({ components : undefined ; internalType : string ; name : string ; type : string ; } | { components : ({ components : undefined ; internalType : string ; name : string ; type : string ; } | { components : …[]; internalType : string ; name : string ; type : string ; })[]; internalType : string ; name : string ; type : string ; })[]; name : string ; outputs : object []; stateMutability : string ; type : string ; } | { anonymous : boolean ; inputs : object []; name : string ; outputs : undefined ; stateMutability : undefined ; type : string ; })[] | - |
rulesEngineForeignCallContract.address | `0x${string}` | - |
policyId | number | The ID of the policy to which the foreign call belongs. |
foreignCallId | number | The ID of the foreign call to be deleted. |
confirmationCount | number | - |
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.