# Upgrade Providers

Upgrade Providers lets you remove an existing provider for a user and replace it with a new one. If you've changed functionality for a custom provider for your end users, this is often a useful way to apply that new functionality without disrupting user-flow beyond accepting a new signature from the user.

To upgrade a Provider, call the `upgradeProvidersFor` function on the Snowflake smart contract with the arguments defined below. This function updates the Providers by removing old, unwanted provider addresses and adding new ones for an EIN. Resolvers that appropriately permission function calls based on Provider should continue interacting with the user as normal after this function is called for a user.&#x20;

#### upgradeProviders function

```
function addProviders(uint ein, address[] providers) public;
```

The `upgradeProvider` function should contain:

**ARGUMENTS**

| Parameter               | Type                                   | Description                                               |
| ----------------------- | -------------------------------------- | --------------------------------------------------------- |
| `approvingAddress`      | `address`                              | A current `Associated Address` of the `EIN`.              |
| `newProviders`          | `address ()`                           | Array of new provider `addresses` that are to be added.   |
| `oldProviders`          | `address ()`                           | Array of old provider `addresses` that are to be removed. |
| `r`, `s`, `v` signature | `bytes32[2]`, `bytes32[2]`, `uint8[2]` | Signed message as required in the format below.           |

As this function calls two separate internal functions within Snowflake, two signatures will need to be collected as follows:

```
keccak256(
  abi.encodePacked(
  byte(0x19), byte(0), address(this),
  "I authorize that these Providers be added to my Identity.",
  ein, providers, timestamp
  )
)
```

and&#x20;

```
keccak256(
  abi.encodePacked(
  byte(0x19), byte(0), address(this),
  "I authorize that these Providers be removed from my Identity.",
  ein, providers, timestamp
  )
)
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hydro.gitbook.io/docs/snowflake/provider-management/upgrade-providers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
