> ## Documentation Index
> Fetch the complete documentation index at: https://thrackle.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# updatePolicy

> **updatePolicy**(`config`, `rulesEnginePolicyContract`, `policyId`, `signatures`, `ids`, `ruleIds`): `Promise`\<`number`>

Updates an existing policy in the Rules Engine.

## Parameters

| Parameter                           | Type                      | Description                                                         |
| ----------------------------------- | ------------------------- | ------------------------------------------------------------------- |
| `config`                            | `Config`                  | The configuration object containing network and wallet information. |
| `rulesEnginePolicyContract`         | `object`                  | The contract instance for interacting with the Rules Engine Policy. |
| `rulesEnginePolicyContract.abi`     | (`object` \| `object`)\[] | -                                                                   |
| `rulesEnginePolicyContract.address` | \`0x\$\{string}\`         | -                                                                   |
| `policyId`                          | `number`                  | The ID of the policy to update.                                     |
| `signatures`                        | `any`\[]                  | The function signatures associated with the policy.                 |
| `ids`                               | `number`\[]               | The IDs of the rules associated with the policy.                    |
| `ruleIds`                           | `any`\[]                  | The mapping of rules to calling functions.                          |

## Returns

`Promise`\<`number`>

The result of the policy update if successful, or -1 if an error occurs.

## Defined in

[src/modules/policy.ts:286](https://github.com/forte-service-company-ltd/forte-rules-engine-sdk/blob/5aad4d7c3c8cc91280e4449c17ac8ea31219fbed/src/modules/policy.ts#L286)
