Skip to content

Cadence suite enabling Hybrid Custody on Flow

License

Notifications You must be signed in to change notification settings

btspoony/hybrid-custody

 
 

Repository files navigation

Hybrid Custody

Tests codecov

NOTE: This contract is still under development, its address is likely to be redeployed to testnet once it is finished

Please see Flow's documentation about account linking for more information and examples.

This repo contains a primary contract for managing ChildAccounts to permit hybrid custody in scenarios where apps only want to share a subset of resources on their accounts with various parents. In many cases, this will be a user's primary wallet outside of the application a child account came from

Apps need assurances that their own resources are safe from malicious actors, so giving out full custody might not be the form of hybrid custody that they want. In this model, the app still maintains control of their managed accounts, but they can:

  1. Share capabilities freely, with a few built-in controls over the types of capabilities that can be returned with some helper contracts (the CapabilityFactory, and CapabilityFilter)
  2. Share additional capabilities (public or private) with a parent account via a CapabilityDelegator resource

Deployment Details

Network Address
Testnet 0x294e44e1ec6993c6
Mainnet 0xd8a7e05a7ac670c0

Hosted CapabilityFactory & CapabilityFilter Implementations

ℹ️ CapabilityFactory.Manager implementations and CapabilityFilter.AllowAllFilter have been deployed to the accounts below for generalized use cases to make account linking as easy as possible. These generalized implementations likely cover most use cases, but you'll want to weigh the decision to use them according to your risk tolerance and specific scenario.

Use Case Testnet Address Mainnet Address
NFT Capability Factories 0x1055970ee34ef4dc 0xee9ff4f07a2d6dad
FT Capability Factories 0x08bed9e8508ed20e 0x410aa603925923d9
NFT + FT Capability Factories 0x1b7fa5972fcb8af5 0x071d382668250606
AllowAllFilter 0xe2664be06bb0fe62 0x78e93a79b05d0d7d

Development

Follow the steps outlined below to set up your development environment.

  1. Initialize and Update Submodules

    This project uses Git submodules. To initialize and update them, run the following command in your terminal:

    git submodule update --init --recursive
  2. Run Flow Emulator

    Kickstart your development by running the flow emulator. Use the following command in your terminal:

    flow emulator start

About

Cadence suite enabling Hybrid Custody on Flow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Cadence 99.5%
  • Shell 0.5%