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:
- Share capabilities freely, with a few built-in controls over the types of capabilities that can be returned with some
helper contracts (the
CapabilityFactory
, andCapabilityFilter
) - Share additional capabilities (public or private) with a parent account via a
CapabilityDelegator
resource
Network | Address |
---|---|
Testnet | 0x294e44e1ec6993c6 |
Mainnet | 0xd8a7e05a7ac670c0 |
Previewnet | 0x28b81f5880d5554e |
ℹ️
CapabilityFactory.Manager
implementations andCapabilityFilter.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 | Previewnet Address |
---|---|---|---|
NFT Capability Factories | 0x1055970ee34ef4dc | 0xee9ff4f07a2d6dad | 0x80340a153332a5fc |
FT Capability Factories | 0x08bed9e8508ed20e | 0x410aa603925923d9 | 0x7207d6fbbbccaf42 |
NFT + FT Capability Factories | 0x1b7fa5972fcb8af5 | 0x071d382668250606 | 0x96606f26aa36af9d |
AllowAllFilter | 0xe2664be06bb0fe62 | 0x78e93a79b05d0d7d | 0x6453b3c822c8a523 |
Follow the steps outlined below to set up your development environment.
-
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
-
Run Flow Emulator
Kickstart your development by running the flow emulator. Use the following command in your terminal:
flow emulator start