Hydro
  • Getting Started
  • Raindrop
    • Raindrop Overview
    • Client Side Raindrop
      • Client-Side Raindrop Overview
      • Handling User Signatures
      • Recognizing Users
      • User Account Management
        • Check if Username is Taken
        • Creating HydroIDs
        • Creating HydroIDs (delegated)
        • Deleting Users
      • Verifying signatures
    • Server Side Raindrop
  • Snowflake
    • Snowflake Overview
      • Setting Up Snowflake
      • Naming Conventions
      • Handling User Signatures
    • Address Management
      • Adding Addresses
      • Removing Addresses
    • Provider Management
      • Add Providers
      • Upgrade Providers
    • Resolver Management
      • Adding Resolvers
      • Adding Resolvers (delegated)
      • Removing Resolvers
    • Allowances in Snowflake
      • User Hydro Balances and the Allowance Structure
      • Allowance management logic
      • Setting Initial DApp Allowances
      • Changing DApp Allowances
      • Change DApp Allowances (Delegated)
    • Payments in Snowflake
      • Self-Initiated Payments
      • Resolver-Initiated Payments
        • EIN - EIN Transfer
        • EIN - Address Withdrawal
      • Resolver-Initiated Via Payments
        • EIN - Via - EIN Transfer
        • EIN - Via - Address Withdrawals
      • Resolver-As-Escrow Payments
        • Resolver - EIN Transfer
        • Resolver - Address Withdrawal
      • Resolver-As-Escrow Via Payments
        • Resolver - Via - EIN Transfer
        • Resolver - Via - Address Withdrawal
    • Building a Resolver
      • Smart Contract
      • React Front-End
    • Building a Via Contract
  • Ice
    • Untitled
  • Tide
    • Untitled
Powered by GitBook
On this page

Was this helpful?

  1. Snowflake
  2. Provider Management

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.

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

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

Last updated 6 years ago

Was this helpful?