> ## 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.

# addAdminToPermissionList

> **addAdminToPermissionList**(`config`, `rulesEngineForeignCallContract`, `foreignCallAddress`, `functionSelector`, `policyAdminToAdd`): `Promise`\<`number`>

Adds a new address to the permission list for a foreign call.

## Parameters

| Parameter                                | Type                                  | Description                                                         |
| ---------------------------------------- | ------------------------------------- | ------------------------------------------------------------------- |
| `config`                                 | `Config`                              | The configuration object containing network and wallet information. |
| `rulesEngineForeignCallContract`         | `object`                              | An object representing the Rules Engine Component Contract,         |
| `rulesEngineForeignCallContract.abi`     | (`object` \| `object` \| `object`)\[] | -                                                                   |
| `rulesEngineForeignCallContract.address` | \`0x\$\{string}\`                     | -                                                                   |
| `foreignCallAddress`                     | \`0x\$\{string}\`                     | the address of the contract the foreign call belongs to.            |
| `functionSelector`                       | `string`                              | The selector for the specific foreign call                          |
| `policyAdminToAdd`                       | \`0x\$\{string}\`                     | The address of the admin to add to the list                         |

## 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

Will log an error to the console if the operation fails.

## Defined in

[src/modules/foreign-calls.ts:555](https://github.com/forte-service-company-ltd/forte-rules-engine-sdk/blob/5aad4d7c3c8cc91280e4449c17ac8ea31219fbed/src/modules/foreign-calls.ts#L555)
