> For the complete documentation index, see [llms.txt](https://docs.cryptolegacy.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cryptolegacy.app/documentation/contracts.md).

# Contracts

## Table of Contents

1. [BeneficiaryRegistry](#beneficiaryregistry)
2. [BuildManagerOwnable](#buildmanagerownable)
3. [Create3Factory](#create3factory)
4. [CryptoLegacy](#cryptolegacy)
5. [CryptoLegacyBuildManager](#cryptolegacybuildmanager)
6. [CryptoLegacyDiamondBase](#cryptolegacydiamondbase)
7. [CryptoLegacyExternalLens](#cryptolegacyexternallens)
8. [CryptoLegacyFactory](#cryptolegacyfactory)
9. [CryptoLegacyOwnable](#cryptolegacyownable)
10. [FeeRegistry](#feeregistry)
11. [LegacyMessenger](#legacymessenger)
12. [LifetimeNft](#lifetimenft)
13. [LockChainGate](#lockchaingate)
14. [MultiPermit](#multipermit)
15. [PluginsRegistry](#pluginsregistry)
16. [ProxyBuilder](#proxybuilder)
17. [ProxyBuilderAdmin](#proxybuilderadmin)
18. [SignatureRoleTimelock](#signatureroletimelock)
19. [WethUnwrapIWETH (Interface)](#wethunwrapiweth-interface)
20. [WethUnwrap](#wethunwrap)
21. [ArbSys (Interface)](#arbsys-interface)
22. [Flags (Library)](#flags-library)
23. [IAaveV3Pool (Interface)](#iaavev3pool-interface)
24. [IAaveV3PoolDataProvider (Interface)](#iaavev3pooldataprovider-interface)
25. [IBeneficiaryRegistry (Interface)](#ibeneficiaryregistry-interface)
26. [IBuildManagerOwnable (Interface)](#ibuildmanagerownable-interface)
27. [ICallProxy (Interface)](#icallproxy-interface)
28. [ICryptoLegacy (Interface)](#icryptolegacy-interface)
29. [ICryptoLegacyBuildManager (Interface)](#icryptolegacybuildmanager-interface)
30. [ICryptoLegacyDiamondBase (Interface)](#icryptolegacydiamondbase-interface)
31. [ICryptoLegacyFactory (Interface)](#icryptolegacyfactory-interface)
32. [ICryptoLegacyLens (Interface)](#icryptolegacylens-interface)
33. [ICryptoLegacyOwnable (Interface)](#icryptolegacyownable-interface)
34. [ICryptoLegacyPlugin (Interface)](#icryptolegacyplugin-interface)
35. [ICryptoLegacyUpdaterPlugin (Interface)](#icryptolegacyupdaterplugin-interface)
36. [IDeBridgeGate (Interface)](#idebridgegate-interface)
37. [IDiamondCut (Interface)](#idiamondcut-interface)
38. [IDiamondLoupe (Interface)](#idiamondloupe-interface)
39. [IFeeRegistry (Interface)](#ifeeregistry-interface)
40. [ILockChainGate (Interface)](#ilockchaingate-interface)
41. [ILegacyMessenger (Interface)](#ilegacymessenger-interface)
42. [ILido (Interface)](#ilido-interface)
43. [ILidoWithdrawalQueue (Interface)](#ilidowithdrawalqueue-interface)
44. [ILifetimeNft (Interface)](#ilifetimenft-interface)
45. [IPermit2 (Interface)](#ipermit2-interface)
46. [IPluginsRegistry (Interface)](#ipluginsregistry-interface)
47. [ISafeMinimalMultisig (Interface)](#isafeminimalmultisig-interface)
48. [ISignatureRoleTimelock (Interface)](#isignatureroletimelock-interface)
49. [IStataToken (Interface)](#istatatoken-interface)
50. [IStataTokenFactory (Interface)](#istatatokenfactory-interface)
51. [ITrustedGuardiansPlugin (Interface)](#itrustedguardiansplugin-interface)
52. [IUniversalRouter (Interface)](#iuniversalrouter-interface)
53. [IWETH (Interface)](#iweth-interface)
54. [IWstETH (Interface)](#iwsteth-interface)
55. [DiamondLoupeFacet](#diamondloupefacet)
56. [LibCLUtils (Library)](#libclutils-library)
57. [LibClaimMigrationCore (Library)](#libclaimmigrationcore-library)
58. [LibOneStepClaimMigration (Library)](#libonestepclaimmigration-library)
59. [LibTwoStepClaimMigration (Library)](#libtwostepclaimmigration-library)
60. [LibCreate3 (Library)](#libcreate3-library)
61. [LibCryptoLegacy (Library)](#libcryptolegacy-library)
62. [LibCryptoLegacyDeploy (Library)](#libcryptolegacydeploy-library)
63. [LibCryptoLegacyPlugins (Library)](#libcryptolegacyplugins-library)
64. [LibDiamond (Library)](#libdiamond-library)
65. [LibSafeMinimalBeneficiaryMultisig (Library)](#libsafeminimalbeneficiarymultisig-library)
66. [LibSafeMinimalMultisig (Library)](#libsafeminimalmultisig-library)
67. [LibTrustedGuardiansPlugin (Library)](#libtrustedguardiansplugin-library)
68. [BeneficiaryAaveV3SupplyPlugin](#beneficiaryaavev3supplyplugin)
69. [BeneficiaryLidoStakingPlugin](#beneficiarylidostakingplugin)
70. [BeneficiaryPluginAddRights](#beneficiarypluginaddrights)
71. [BeneficiaryUniswapV4SwapPlugin](#beneficiaryuniswapv4swapplugin)
72. [CryptoLegacyBasePlugin](#cryptolegacybaseplugin)
73. [LegacyRecoveryPlugin](#legacyrecoveryplugin)
74. [LensPlugin](#lensplugin)
75. [NftLegacyPlugin](#nftlegacyplugin)
76. [ReceiveEthPlugin](#receiveethplugin)
77. [TrustedGuardiansPlugin](#trustedguardiansplugin)
78. [UpdateRolePlugin](#updateroleplugin)

## BeneficiaryRegistry

### Purpose

BeneficiaryRegistry maintains role-indexed registries that map hashed participant identifiers to CryptoLegacy contract addresses.

### Inheritance

* `IBeneficiaryRegistry`
* `BuildManagerOwnable`

### Key Methods

* [setCryptoLegacyBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacybeneficiary-br1) - Adds or removes the calling CryptoLegacy from a beneficiary hash index.
* [setCryptoLegacyGuardian(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyguardian-br1) - Adds or removes the calling CryptoLegacy from a guardian hash index.
* [setCryptoLegacyOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyowner-br1) - Adds or removes the calling CryptoLegacy from an owner hash index.
* [setCryptoLegacyRecoveryAddresses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyrecoveryaddresses-br1) - Updates recovery-hash indexes for the calling CryptoLegacy by removing old and adding new hashes.
* [getCryptoLegacyListByBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistbybeneficiary-br1) - Returns CryptoLegacy addresses indexed by a beneficiary hash.
* [getCryptoLegacyListByOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistbyowner-br1) - Returns CryptoLegacy addresses indexed by an owner hash.
* [getCryptoLegacyListByGuardian(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistbyguardian-br1) - Returns CryptoLegacy addresses indexed by a guardian hash.
* [getCryptoLegacyListByRecovery(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistbyrecovery-br1) - Returns CryptoLegacy addresses indexed by a recovery hash.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-br1) - Initializes the registry and transfers ownership to `owner`.
* [\_setBlockNumberChange(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setblocknumberchange-br1) - Records the current L1/L2 block number for the given CryptoLegacy contract.
* [setCryptoLegacyBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacybeneficiary-br1) - Adds or removes the calling CryptoLegacy from a beneficiary hash index.
* [setCryptoLegacyGuardian(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyguardian-br1) - Adds or removes the calling CryptoLegacy from a guardian hash index.
* [setCryptoLegacyOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyowner-br1) - Adds or removes the calling CryptoLegacy from an owner hash index.
* [setCryptoLegacyRecoveryAddresses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyrecoveryaddresses-br1) - Updates recovery-hash indexes for the calling CryptoLegacy by removing old and adding new hashes.
* [getCryptoLegacyListByBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistbybeneficiary-br1) - Returns CryptoLegacy addresses indexed by a beneficiary hash.
* [getCryptoLegacyListByOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistbyowner-br1) - Returns CryptoLegacy addresses indexed by an owner hash.
* [getCryptoLegacyListByGuardian(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistbyguardian-br1) - Returns CryptoLegacy addresses indexed by a guardian hash.
* [getCryptoLegacyListByRecovery(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistbyrecovery-br1) - Returns CryptoLegacy addresses indexed by a recovery hash.
* [getCryptoLegacyBlockNumberChanges(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacyblocknumberchanges-br1) - Returns recorded block numbers when the given CryptoLegacy triggered registry update calls.
* [getAllCryptoLegacyListByRoles(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getallcryptolegacylistbyroles-br1) - Returns all CryptoLegacy lists for a given hash across beneficiary, owner, guardian, and recovery roles.

### Events

* [AddCryptoLegacyForBeneficiary](https://docs.cryptolegacy.app/documentation/events-reference#addcryptolegacyforbeneficiary-ibr1)
* [RemoveCryptoLegacyForBeneficiary](https://docs.cryptolegacy.app/documentation/events-reference#removecryptolegacyforbeneficiary-ibr1)
* [AddCryptoLegacyForGuardian](https://docs.cryptolegacy.app/documentation/events-reference#addcryptolegacyforguardian-ibr1)
* [RemoveCryptoLegacyForGuardian](https://docs.cryptolegacy.app/documentation/events-reference#removecryptolegacyforguardian-ibr1)
* [AddCryptoLegacyForRecovery](https://docs.cryptolegacy.app/documentation/events-reference#addcryptolegacyforrecovery-ibr1)
* [RemoveCryptoLegacyForRecovery](https://docs.cryptolegacy.app/documentation/events-reference#removecryptolegacyforrecovery-ibr1)
* [AddCryptoLegacyForOwner](https://docs.cryptolegacy.app/documentation/events-reference#addcryptolegacyforowner-ibr1)
* [RemoveCryptoLegacyForOwner](https://docs.cryptolegacy.app/documentation/events-reference#removecryptolegacyforowner-ibr1)
* [AddBuildManager](https://docs.cryptolegacy.app/documentation/events-reference#addbuildmanager-ibmo1)
* [RemoveBuildManager](https://docs.cryptolegacy.app/documentation/events-reference#removebuildmanager-ibmo1)

### Errors

* [NotTheOwnerOfCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#nottheownerofcryptolegacy-ibmo1)
* [CryptoLegacyNotRegistered](https://docs.cryptolegacy.app/documentation/errors-reference#cryptolegacynotregistered-ibmo1)
* [BuildManagerNotAdded](https://docs.cryptolegacy.app/documentation/errors-reference#buildmanagernotadded-ibmo1)

### Access / Roles

* `setCryptoLegacyBeneficiary`: registered CryptoLegacy caller with approved build manager (`_checkBuildManagerValid`)
* `setCryptoLegacyGuardian`: registered CryptoLegacy caller with approved build manager (`_checkBuildManagerValid`)
* `setCryptoLegacyOwner`: registered CryptoLegacy caller with approved build manager (`_checkBuildManagerValid`)
* `setCryptoLegacyRecoveryAddresses`: registered CryptoLegacy caller with approved build manager (`_checkBuildManagerValid`)

### Interacts With

* `ArbSys`

### Missing Links

None.

## BuildManagerOwnable

### Purpose

BuildManagerOwnable governs the allowlist of build-manager accounts used to authorize maintenance actions on CryptoLegacy contracts.

### Inheritance

* `IBuildManagerOwnable`
* `Ownable`

### Key Methods

* [setBuildManager(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbuildmanager-bmo1) - Adds or removes a build manager address from the allowed set.
* [getBuildManagerAdded(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getbuildmanageradded-bmo1) - Returns the list of all added build manager addresses.

### All Functions

* [constructor()](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-bmo1) - Initializes ownership state via OpenZeppelin’s `Ownable` base.
* [setBuildManager(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbuildmanager-bmo1) - Adds or removes a build manager address from the allowed set.
* [\_checkBuildManagerValid(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkbuildmanagervalid-bmo1) - Verifies that a given CryptoLegacy contract was built by an added build manager and (optionally) that it has a specific owner.
* [getBuildManagerAdded()](https://docs.cryptolegacy.app/documentation/functions-reference#getbuildmanageradded-bmo1) - Returns the list of all added build manager addresses.

### Events

* [AddBuildManager](https://docs.cryptolegacy.app/documentation/events-reference#addbuildmanager-ibmo1)
* [RemoveBuildManager](https://docs.cryptolegacy.app/documentation/events-reference#removebuildmanager-ibmo1)

### Errors

* [NotTheOwnerOfCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#nottheownerofcryptolegacy-ibmo1)
* [CryptoLegacyNotRegistered](https://docs.cryptolegacy.app/documentation/errors-reference#cryptolegacynotregistered-ibmo1)
* [BuildManagerNotAdded](https://docs.cryptolegacy.app/documentation/errors-reference#buildmanagernotadded-ibmo1)

### Access / Roles

* `setBuildManager`: `onlyOwner`

### Interacts With

* `ICryptoLegacy`
* `ICryptoLegacyBuildManager`

### Missing Links

None.

## Create3Factory

### Purpose

Create3Factory provides deterministic contract deployment using CREATE3 salts with predictable target addresses.

### Inheritance

* `Ownable`

### Key Methods

* [build(...)](https://docs.cryptolegacy.app/documentation/functions-reference#build-c3f1) - Deploys a contract deterministically via CREATE3 using a salt and raw bytecode.
* [computeAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#computeaddress-c3f1) - Predicts the deterministic CREATE3 address for a given salt without deploying.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-c3f1) - Initializes the factory and assigns ownership to the provided `owner`.
* [build(...)](https://docs.cryptolegacy.app/documentation/functions-reference#build-c3f1) - Deploys a contract deterministically via CREATE3 using a salt and raw bytecode.
* [computeAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#computeaddress-c3f1) - Predicts the deterministic CREATE3 address for a given salt without deploying.

### Events

* [Create3Contract](https://docs.cryptolegacy.app/documentation/events-reference#create3contract-c3f1)

### Errors

None.

### Access / Roles

* `build`: `onlyOwner`

### Interacts With

* `LibCreate3`

### Missing Links

None.

## CryptoLegacy

### Purpose

CryptoLegacy is the primary protocol contract that composes protocol plugins and exposes the diamond-based extension surface.

### Inheritance

* `CryptoLegacyDiamondBase`
* `CryptoLegacyOwnable`

### Key Methods

* [replacePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#replaceplugin-cl1) - Replaces an existing set of plugins with a new set.
* [addPluginList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addpluginlist-cl1) - Adds a list of plugins to the contract.
* [removePluginList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removepluginlist-cl1) - Removes a list of plugins from the contract.
* [externalLens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#externallens-cl1) - Returns the address of the external lens configured in the build manager.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-cl1) - Initializes core Diamond storage, sets the build manager and owner, timestamps the deployment, and installs initial plugins.
* [replacePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#replaceplugin-cl1) - Replaces an existing set of plugins with a new set.
* [addPluginList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addpluginlist-cl1) - Adds a list of plugins to the contract.
* [removePluginList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removepluginlist-cl1) - Removes a list of plugins from the contract.
* [externalLens()](https://docs.cryptolegacy.app/documentation/functions-reference#externallens-cl1) - Returns the address of the external lens configured in the build manager.

### Events

* [StaticCallCheck](https://docs.cryptolegacy.app/documentation/events-reference#staticcallcheck-icldb1)
* [OwnershipTransferStarted](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferstarted-iclo1)
* [OwnershipTransferred](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferred-iclo1)

### Errors

* [FunctionNotExists](https://docs.cryptolegacy.app/documentation/errors-reference#functionnotexists-icldb1)
* [NotSelfCall](https://docs.cryptolegacy.app/documentation/errors-reference#notselfcall-icldb1)
* [OwnableUnauthorizedAccount](https://docs.cryptolegacy.app/documentation/errors-reference#ownableunauthorizedaccount-iclo1)

### Access / Roles

* `replacePlugin`: `onlyOwner`
* `addPluginList`: `onlyOwner`
* `removePluginList`: `onlyOwner`

### Interacts With

* `ICryptoLegacy`
* `ICryptoLegacyBuildManager`
* `ICryptoLegacyPlugin`
* `LibCryptoLegacy`
* `LibCryptoLegacyPlugins`
* `LibDiamond`

### Missing Links

None.

## CryptoLegacyBuildManager

### Purpose

CryptoLegacyBuildManager orchestrates protocol-instance deployment, fee collection, and registry wiring for new protocol instances.

### Inheritance

* `ICryptoLegacyBuildManager`
* `IERC721Receiver`
* `Ownable`

### Key Methods

* [setRegistries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setregistries-clbm1) - Owner setter that updates Fee/Plugins/Beneficiary registries.
* [setFactory(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setfactory-clbm1) - Owner setter that updates the deployment factory.
* [setSupplyLimit(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setsupplylimit-clbm1) - Owner setter for the minimum Lifetime NFT supply required to allow mass minting.
* [setExternalLens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setexternallens-clbm1) - Owner setter for a helper "lens" address.
* [withdrawFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdrawfee-clbm1) - Owner can withdraw ETH from the contract to a recipient.
* [payFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payfee-clbm1) - Pays an update fee or, if sufficient, auto-switches to lifetime fee and mints/locks an NFT.
* [payInitialFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payinitialfee-clbm1) - Pays the initial build fee (or lifetime) and optionally locks a Lifetime NFT.
* [payForMultipleLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payformultiplelifetimenft-clbm1) - Mass mints Lifetime NFTs when supply threshold is met.

### All Functions

* [receive()](https://docs.cryptolegacy.app/documentation/functions-reference#receive-clbm1) - Accepts plain ETH transfers to the build manager.
* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-clbm1) - Initializes registries and factory, stores the Lifetime NFT contract, and transfers ownership.
* [setRegistries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setregistries-clbm1) - Owner setter that updates Fee/Plugins/Beneficiary registries.
* [\_setRegistries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setregistries-clbm1) - Internal storage setter for main registries.
* [setFactory(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setfactory-clbm1) - Owner setter that updates the deployment factory.
* [\_setFactory(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setfactory-clbm1) - Internal storage setter for the factory contract.
* [setSupplyLimit(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setsupplylimit-clbm1) - Owner setter for the minimum Lifetime NFT supply required to allow mass minting.
* [setExternalLens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setexternallens-clbm1) - Owner setter for a helper "lens" address.
* [withdrawFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdrawfee-clbm1) - Owner can withdraw ETH from the contract to a recipient.
* [payFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payfee-clbm1) - Pays an update fee or, if sufficient, auto-switches to lifetime fee and mints/locks an NFT.
* [\_payFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_payfee-clbm1) - Internal fee engine for build/update/lifetime fees, handling payment and optional NFT mint/lock.
* [\_returnFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_returnfee-clbm1) - Refund helper to return surplus ETH to the caller.
* [\_checkFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkfee-clbm1) - Validates that `value` covers `fee`.
* [\_mintAndLockLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_mintandlocklifetimenft-clbm1) - Mints a Lifetime NFT to this contract, approves the registry, and locks it cross-chain.
* [payInitialFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payinitialfee-clbm1) - Pays the initial build fee (or lifetime) and optionally locks a Lifetime NFT.
* [payForMultipleLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payformultiplelifetimenft-clbm1) - Mass mints Lifetime NFTs when supply threshold is met.
* [createCustomRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcustomref-clbm1) - Creates a custom referral code and optionally locks it cross-chain; refunds any surplus.
* [\_createCustomRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_createcustomref-clbm1) - Internal custom-ref creation with cross-chain fee handling.
* [createRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createref-clbm1) - Creates a short referral code and optionally locks it cross-chain; refunds surplus.
* [\_createRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_createref-clbm1) - Internal short-ref creation with cross-chain fee handling.
* [updateCrossChainsRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updatecrosschainsref-clbm1) - Updates chain coverage for the caller’s referral code.
* [\_createRefAndPayForBuild(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_createrefandpayforbuild-clbm1) - Internal helper to optionally create a referral and then obtain/pay the build fee.
* [buildCryptoLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#buildcryptolegacy-clbm1) - Deploys and initializes a new CryptoLegacy instance after handling referral creation and fees.
* [\_checkBuildArgs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkbuildargs-clbm1) - Validates required default timeouts in build arguments.
* [\_getAndPayBuildFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getandpaybuildfee-clbm1) - Retrieves (and optionally pays) the initial build fee and always returns the update fee.
* [getUpdateFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getupdatefee-clbm1) - Returns the configured update fee for a referral code.
* [getAndPayBuildFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getandpaybuildfee-clbm1) - Convenience entry point to fetch build/update fees and optionally pay if ETH is sent.
* [transferStuckNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transferstucknft-clbm1) - Owner rescue function to transfer out an ERC721 token held by this contract.
* [onERC721Received(...)](https://docs.cryptolegacy.app/documentation/functions-reference#onerc721received-clbm1) - ERC721 safe-transfer hook confirming receipt.
* [calculateCrossChainCreateRefFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#calculatecrosschaincreatereffee-clbm1) - Computes the total native fee needed to create/lock a referral across chains.
* [getFactoryAddress()](https://docs.cryptolegacy.app/documentation/functions-reference#getfactoryaddress-clbm1) - Returns the currently configured factory address.
* [isLifetimeNftLocked(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimenftlocked-clbm1) - Checks whether a Lifetime NFT is locked for `owner`.
* [isLifetimeNftLockedAndUpdate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimenftlockedandupdate-clbm1) - For a calling CryptoLegacy, verifies ownership and then checks/updates the Lifetime NFT lock status.
* [isPluginRegistered(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispluginregistered-clbm1) - Checks if a plugin is registered in the plugin registry.
* [isCryptoLegacyBuilt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#iscryptolegacybuilt-clbm1) - Returns whether a given CryptoLegacy address was deployed by this manager.

### Events

* [SetRegistries](https://docs.cryptolegacy.app/documentation/events-reference#setregistries-iclbm1)
* [SetFactory](https://docs.cryptolegacy.app/documentation/events-reference#setfactory-iclbm1)
* [SetSupplyLimit](https://docs.cryptolegacy.app/documentation/events-reference#setsupplylimit-iclbm1)
* [SetExternalLens](https://docs.cryptolegacy.app/documentation/events-reference#setexternallens-iclbm1)
* [WithdrawFee](https://docs.cryptolegacy.app/documentation/events-reference#withdrawfee-iclbm1)
* [PaidForMint](https://docs.cryptolegacy.app/documentation/events-reference#paidformint-iclbm1)
* [PaidForMultipleNft](https://docs.cryptolegacy.app/documentation/events-reference#paidformultiplenft-iclbm1)
* [CreateCustomRef](https://docs.cryptolegacy.app/documentation/events-reference#createcustomref-iclbm1)
* [CreateRef](https://docs.cryptolegacy.app/documentation/events-reference#createref-iclbm1)
* [SetCrossChainsRef](https://docs.cryptolegacy.app/documentation/events-reference#setcrosschainsref-iclbm1)
* [Build](https://docs.cryptolegacy.app/documentation/events-reference#build-iclbm1)

### Errors

* [AlreadyLifetime](https://docs.cryptolegacy.app/documentation/errors-reference#alreadylifetime-iclbm1)
* [WithdrawFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#withdrawfeefailed-iclbm1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-iclbm1)
* [IncorrectFee](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfee-iclbm1)
* [BelowMinimumSupply](https://docs.cryptolegacy.app/documentation/errors-reference#belowminimumsupply-iclbm1)
* [NotValidTimeout](https://docs.cryptolegacy.app/documentation/errors-reference#notvalidtimeout-iclbm1)
* [NotRegisteredCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#notregisteredcryptolegacy-iclbm1)
* [NotOwnerOfCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#notownerofcryptolegacy-iclbm1)

### Access / Roles

* `setRegistries`: `onlyOwner`
* `setFactory`: `onlyOwner`
* `setSupplyLimit`: `onlyOwner`
* `setExternalLens`: `onlyOwner`
* `withdrawFee`: `onlyOwner`
* `transferStuckNft`: `onlyOwner`

### Interacts With

* `IBeneficiaryRegistry`
* `ICryptoLegacy`
* `ICryptoLegacyFactory`
* `IFeeRegistry`
* `ILockChainGate`
* `ILifetimeNft`
* `IPluginsRegistry`
* `CryptoLegacyBasePlugin`

### Missing Links

None.

## CryptoLegacyDiamondBase

### Purpose

CryptoLegacyDiamondBase provides shared diamond base behavior, including selector checks and static-call validation helpers.

### Inheritance

* `ICryptoLegacyDiamondBase`
* `DiamondLoupeFacet`

### Key Methods

* [staticCallChecker(...)](https://docs.cryptolegacy.app/documentation/functions-reference#staticcallchecker-cldb1) - Self-call probe used by the fallback to detect whether the current context is a static call.

### All Functions

* [staticCallChecker()](https://docs.cryptolegacy.app/documentation/functions-reference#staticcallchecker-cldb1) - Self-call probe used by the fallback to detect whether the current context is a static call.
* [fallback()](https://docs.cryptolegacy.app/documentation/functions-reference#fallback-cldb1) - Diamond fallback that routes unknown selectors to the correct facet via `delegatecall`, caching the facet address on non-static calls.

### Events

* [StaticCallCheck](https://docs.cryptolegacy.app/documentation/events-reference#staticcallcheck-icldb1)

### Errors

* [NotSelfCall](https://docs.cryptolegacy.app/documentation/errors-reference#notselfcall-icldb1)
* [FunctionNotExists](https://docs.cryptolegacy.app/documentation/errors-reference#functionnotexists-icldb1)

### Access / Roles

* `staticCallChecker`: self-call only (`msg.sender == address(this)`)

### Interacts With

* `ICryptoLegacy`
* `LibCryptoLegacy`
* `LibCryptoLegacyPlugins`
* `LibDiamond`

### Missing Links

None.

## CryptoLegacyExternalLens

### Purpose

CryptoLegacyExternalLens aggregates read-only status and portfolio views across CryptoLegacy-related components.

### Inheritance

None.

### Key Methods

* [isLifetimeActive(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimeactive-clexl1) - Forwarder that reports whether lifetime mode is active on a target CryptoLegacy.
* [isPaused(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispaused-clexl1) - Forwarder that reports whether the target CryptoLegacy is paused.
* [buildManager(...)](https://docs.cryptolegacy.app/documentation/functions-reference#buildmanager-clexl1) - Returns the build manager address of the target CryptoLegacy.
* [owner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#owner-clexl1) - Returns the owner of the target CryptoLegacy.
* [updateInterval(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updateinterval-clexl1) - Returns the update interval of the target.
* [challengeTimeout(...)](https://docs.cryptolegacy.app/documentation/functions-reference#challengetimeout-clexl1) - Returns the challenge timeout of the target.
* [distributionStartAt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#distributionstartat-clexl1) - Returns the distribution start timestamp.
* [lastFeePaidAt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lastfeepaidat-clexl1) - Returns the timestamp of the last fee payment.

### All Functions

* [isLifetimeActive(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimeactive-clexl1) - Forwarder that reports whether lifetime mode is active on a target CryptoLegacy.
* [isPaused(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispaused-clexl1) - Forwarder that reports whether the target CryptoLegacy is paused.
* [buildManager(...)](https://docs.cryptolegacy.app/documentation/functions-reference#buildmanager-clexl1) - Returns the build manager address of the target CryptoLegacy.
* [owner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#owner-clexl1) - Returns the owner of the target CryptoLegacy.
* [\_baseData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_basedata-clexl1) - Internal helper that fetches base lens data from the target.
* [\_listTokensData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_listtokensdata-clexl1) - Internal helper that fetches list data for specified tokens.
* [updateInterval(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updateinterval-clexl1) - Returns the update interval of the target.
* [challengeTimeout(...)](https://docs.cryptolegacy.app/documentation/functions-reference#challengetimeout-clexl1) - Returns the challenge timeout of the target.
* [distributionStartAt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#distributionstartat-clexl1) - Returns the distribution start timestamp.
* [lastFeePaidAt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lastfeepaidat-clexl1) - Returns the timestamp of the last fee payment.
* [lastUpdateAt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lastupdateat-clexl1) - Returns the timestamp of the last update.
* [initialFeeToPay(...)](https://docs.cryptolegacy.app/documentation/functions-reference#initialfeetopay-clexl1) - Returns the initial fee required by the target.
* [updateFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updatefee-clexl1) - Returns the update fee required by the target.
* [invitedByRefCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#invitedbyrefcode-clexl1) - Returns the referral code associated with the target.
* [getBeneficiaries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getbeneficiaries-clexl1) - Returns beneficiaries and their configs from the target.
* [getTokensDistribution(...)](https://docs.cryptolegacy.app/documentation/functions-reference#gettokensdistribution-clexl1) - Returns token distribution info for a token list.
* [getCryptoLegacyBaseData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacybasedata-clexl1) - Returns consolidated base data for the target.
* [getCryptoLegacyListData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistdata-clexl1) - Returns aggregated list data for specified tokens.
* [getMessagesBlockNumbersByRecipient(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmessagesblocknumbersbyrecipient-clexl1) - Returns message block numbers for a recipient hash.
* [getTransferBlockNumbers(...)](https://docs.cryptolegacy.app/documentation/functions-reference#gettransferblocknumbers-clexl1) - Returns block numbers where transfers occurred.
* [getVestedAndClaimedData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getvestedandclaimeddata-clexl1) - Returns vesting/claimed data for a beneficiary across tokens.
* [getPluginInfoList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getplugininfolist-clexl1) - Returns plugin metadata installed on the target.
* [getCryptoLegacyListWithStatuses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistwithstatuses-clexl1) - Returns CryptoLegacy addresses for all roles tied to a hash plus default-guardian status per beneficiary entry.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

* `IBeneficiaryRegistry`
* `ICryptoLegacy`
* `ICryptoLegacyLens`
* `ITrustedGuardiansPlugin`
* `CryptoLegacyBasePlugin`
* `LensPlugin`

### Missing Links

None.

## CryptoLegacyFactory

### Purpose

CryptoLegacyFactory creates new CryptoLegacy instances and controls which operators can trigger deployments.

### Inheritance

* `ICryptoLegacyFactory`
* `Ownable`

### Key Methods

* [setBuildOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbuildoperator-clf1) - Adds or removes an authorized build operator.
* [createCryptoLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcryptolegacy-clf1) - Deploys a new `CryptoLegacy` contract at a deterministic address using CREATE3.
* [cryptoLegacyBytecode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#cryptolegacybytecode-clf1) - Returns the full constructor bytecode for a `CryptoLegacy` deployment.
* [computeAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#computeaddress-clf1) - Computes the deterministic address for a future `CryptoLegacy` deployment.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-clf1) - Initializes the factory and sets the initial owner.
* [setBuildOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbuildoperator-clf1) - Adds or removes an authorized build operator.
* [createCryptoLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcryptolegacy-clf1) - Deploys a new `CryptoLegacy` contract at a deterministic address using CREATE3.
* [cryptoLegacyBytecode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#cryptolegacybytecode-clf1) - Returns the full constructor bytecode for a `CryptoLegacy` deployment.
* [computeAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#computeaddress-clf1) - Computes the deterministic address for a future `CryptoLegacy` deployment.

### Events

* [AddBuildOperator](https://docs.cryptolegacy.app/documentation/events-reference#addbuildoperator-iclf1)
* [RemoveBuildOperator](https://docs.cryptolegacy.app/documentation/events-reference#removebuildoperator-iclf1)

### Errors

* [NotBuildOperator](https://docs.cryptolegacy.app/documentation/errors-reference#notbuildoperator-iclf1)

### Access / Roles

* `setBuildOperator`: `onlyOwner`

### Interacts With

* `LibCryptoLegacyDeploy`

### Missing Links

None.

## CryptoLegacyOwnable

### Purpose

CryptoLegacyOwnable implements ownership-transfer and pause controls shared by protocol contracts.

### Inheritance

* `ICryptoLegacyOwnable`

### Key Methods

* [acceptOwnership(...)](https://docs.cryptolegacy.app/documentation/functions-reference#acceptownership-clo1) - Completes the two-step ownership transfer by moving ownership to `msg.sender`.
* [setPause(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setpause-clo1) - Sets the pause flag for the CryptoLegacy contract.
* [pendingOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#pendingowner-clo1) - Returns the current `pendingOwner`.

### All Functions

* [\_transferOwnership(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_transferownership-clo1) - Starts a two-step ownership transfer by setting `pendingOwner` and emitting the start event.
* [acceptOwnership()](https://docs.cryptolegacy.app/documentation/functions-reference#acceptownership-clo1) - Completes the two-step ownership transfer by moving ownership to `msg.sender`.
* [setPause(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setpause-clo1) - Sets the pause flag for the CryptoLegacy contract.
* [pendingOwner()](https://docs.cryptolegacy.app/documentation/functions-reference#pendingowner-clo1) - Returns the current `pendingOwner`.

### Events

* [OwnershipTransferStarted](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferstarted-iclo1)
* [OwnershipTransferred](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferred-iclo1)

### Errors

* [OwnableUnauthorizedAccount](https://docs.cryptolegacy.app/documentation/errors-reference#ownableunauthorizedaccount-iclo1)
* [ZeroAddress](https://docs.cryptolegacy.app/documentation/errors-reference#zeroaddress-icl1)

### Access / Roles

* `setPause`: `onlyOwner`
* `acceptOwnership`: `pendingOwner` only

### Interacts With

* `ICryptoLegacy`
* `LibCryptoLegacy`
* `LibDiamond`

### Missing Links

None.

## FeeRegistry

### Purpose

FeeRegistry stores referral code metadata, fee percentages, and beneficiary split configuration for payment flows.

### Inheritance

* `LockChainGate`
* `IFeeRegistry`

### Key Methods

* [initialize(...)](https://docs.cryptolegacy.app/documentation/functions-reference#initialize-fr1) - Initializes default percentages and the cross-chain gate configuration.
* [setCodeOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcodeoperator-fr1) - Adds or removes an authorized referral-code operator.
* [setSupportedRefCodeInChains(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setsupportedrefcodeinchains-fr1) - Adds or removes supported chain IDs for referral codes.
* [setFeeBeneficiaries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setfeebeneficiaries-fr1) - Sets protocol fee beneficiaries and their shares.
* [setDefaultPct(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setdefaultpct-fr1) - Updates global default discount/share percentages.
* [setRefererSpecificPct(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setrefererspecificpct-fr1) - Sets custom discount/share percentages for a referrer’s code.
* [setContractCaseFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcontractcasefee-fr1) - Sets the fee amount for a (contract, case) pair.
* [takeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#takefee-fr1) - Charges a fee for a contract case and distributes referrer share.

### All Functions

* [constructor()](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-fr1) - Deploy-time constructor that disables initializers and sets the initial owner.
* [lockFeeRegistryStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#lockfeeregistrystorage-fr1) - Returns a namespaced storage pointer for FeeRegistry state.
* [initialize(...)](https://docs.cryptolegacy.app/documentation/functions-reference#initialize-fr1) - Initializes default percentages and the cross-chain gate configuration.
* [setCodeOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcodeoperator-fr1) - Adds or removes an authorized referral-code operator.
* [setSupportedRefCodeInChains(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setsupportedrefcodeinchains-fr1) - Adds or removes supported chain IDs for referral codes.
* [setFeeBeneficiaries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setfeebeneficiaries-fr1) - Sets protocol fee beneficiaries and their shares.
* [setDefaultPct(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setdefaultpct-fr1) - Updates global default discount/share percentages.
* [\_setDefaultPct(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setdefaultpct-fr1) - Internal setter for default discount/share percentages.
* [setRefererSpecificPct(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setrefererspecificpct-fr1) - Sets custom discount/share percentages for a referrer’s code.
* [setContractCaseFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcontractcasefee-fr1) - Sets the fee amount for a (contract, case) pair.
* [takeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#takefee-fr1) - Charges a fee for a contract case and distributes referrer share.
* [withdrawAccumulatedFee()](https://docs.cryptolegacy.app/documentation/functions-reference#withdrawaccumulatedfee-fr1) - Distributes accumulated protocol fees to configured beneficiaries.
* [withdrawReferralAccumulatedFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdrawreferralaccumulatedfee-fr1) - Pays out a referrer’s accumulated unpaid share.
* [\_setCustomCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setcustomcode-fr1) - Internal writer for a custom referral code’s ownership, recipient, and percentages.
* [\_createCustomCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_createcustomcode-fr1) - Internal creator for a new custom referral code.
* [\_checkCodeNotZero(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkcodenotzero-fr1) - Validates that a referral code is non-zero.
* [\_checkSenderIsOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checksenderisoperator-fr1) - Ensures caller is an authorized code operator.
* [createCustomCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcustomcode-fr1) - Creates a **custom** referral code and optionally propagates it cross‑chain.
* [createCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcode-fr1) - Creates a **generated** referral code and optionally propagates it cross‑chain.
* [\_setCrossChainsRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setcrosschainsref-fr1) - Internal helper to (create/update) code data across chains.
* [updateCrossChainsRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updatecrosschainsref-fr1) - Updates cross-chain parameters for an existing referrer's code.
* [crossCreateCustomCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#crosscreatecustomcode-fr1) - Cross-chain entry to create a custom code.
* [crossUpdateCustomCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#crossupdatecustomcode-fr1) - Cross-chain entry to update code data.
* [\_encodeCrossCreateCustomCodeCommand(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_encodecrosscreatecustomcodecommand-fr1) - Encodes the cross-chain create code command payload.
* [\_encodeCrossUpdateCustomCodeCommand(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_encodecrossupdatecustomcodecommand-fr1) - Encodes the cross-chain update code command payload.
* [\_checkSenderIsReferrer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checksenderisreferrer-fr1) - Ensures the caller owns the specified referral code.
* [\_checkNewOwnerIsNotReferrer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checknewownerisnotreferrer-fr1) - Prevents assigning a code to an address that already has one.
* [changeCodeReferrer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#changecodereferrer-fr1) - Transfers code ownership to a new referrer and optionally updates cross‑chain.
* [changeRecipientReferrer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#changerecipientreferrer-fr1) - Updates the payout recipient for a referral code and optionally propagates cross-chain.
* [getCodeOperatorsList()](https://docs.cryptolegacy.app/documentation/functions-reference#getcodeoperatorslist-fr1) - Returns the list of authorized code operators.
* [isCodeOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#iscodeoperator-fr1) - Checks whether an address is an authorized code operator.
* [getSupportedRefInChainsList()](https://docs.cryptolegacy.app/documentation/functions-reference#getsupportedrefinchainslist-fr1) - Lists chain IDs where referral codes are supported.
* [isSupportedRefInChain(...)](https://docs.cryptolegacy.app/documentation/functions-reference#issupportedrefinchain-fr1) - Checks whether a chain ID supports referral codes.
* [getFeeBeneficiaries()](https://docs.cryptolegacy.app/documentation/functions-reference#getfeebeneficiaries-fr1) - Returns protocol fee beneficiaries.
* [getCodePct(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcodepct-fr1) - Returns effective discount/share percentages for a code.
* [\_getCodePct(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getcodepct-fr1) - Internal resolver for a code’s effective percentages.
* [calculateFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#calculatefee-fr1) - Computes discount, share, and final fee for a code and base fee.
* [\_calculateFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_calculatefee-fr1) - Internal computation of discount/share/fee for a code and base amount.
* [getContractCaseFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcontractcasefee-fr1) - Retrieves the stored fee for a (contract, case) pair.
* [getContractCaseFeeForCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcontractcasefeeforcode-fr1) - Retrieves the effective fee for a (contract, case) after applying a code’s discount.
* [getReferrerByAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getreferrerbyaddress-fr1) - Returns referrer metadata by referrer address.
* [\_getReferrerByAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getreferrerbyaddress-fr1) - Internal resolver for referrer by address.
* [getReferrerByCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getreferrerbycode-fr1) - Returns referrer metadata by code.
* [\_getReferrerByCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getreferrerbycode-fr1) - Internal resolver for referrer by code.
* [defaultSharePct()](https://docs.cryptolegacy.app/documentation/functions-reference#defaultsharepct-fr1) - Returns the default share percentage.
* [defaultDiscountPct()](https://docs.cryptolegacy.app/documentation/functions-reference#defaultdiscountpct-fr1) - Returns the default discount percentage.
* [refererByCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#refererbycode-fr1) - Returns raw referrer record for a code (without effective pcts).
* [codeByReferrer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#codebyreferrer-fr1) - Returns the code associated with a referrer address.
* [accumulatedFee()](https://docs.cryptolegacy.app/documentation/functions-reference#accumulatedfee-fr1) - Returns the accumulated protocol fee balance.

### Events

* [AddLockOperator](https://docs.cryptolegacy.app/documentation/events-reference#addlockoperator-ilcg1)
* [RemoveLockOperator](https://docs.cryptolegacy.app/documentation/events-reference#removelockoperator-ilcg1)
* [SetDestinationChainContract](https://docs.cryptolegacy.app/documentation/events-reference#setdestinationchaincontract-ilcg1)
* [SetSourceChainContract](https://docs.cryptolegacy.app/documentation/events-reference#setsourcechaincontract-ilcg1)
* [SetDeBridgeGate](https://docs.cryptolegacy.app/documentation/events-reference#setdebridgegate-ilcg1)
* [SetDeBridgeNativeFee](https://docs.cryptolegacy.app/documentation/events-reference#setdebridgenativefee-ilcg1)
* [SetLockPeriodConfig](https://docs.cryptolegacy.app/documentation/events-reference#setlockperiodconfig-ilcg1)
* [SendToChain](https://docs.cryptolegacy.app/documentation/events-reference#sendtochain-ilcg1)
* [LockNft](https://docs.cryptolegacy.app/documentation/events-reference#locknft-ilcg1)
* [UnlockNft](https://docs.cryptolegacy.app/documentation/events-reference#unlocknft-ilcg1)
* [ApproveNft](https://docs.cryptolegacy.app/documentation/events-reference#approvenft-ilcg1)
* [TransferNft](https://docs.cryptolegacy.app/documentation/events-reference#transfernft-ilcg1)
* [LockToChain](https://docs.cryptolegacy.app/documentation/events-reference#locktochain-ilcg1)
* [UpdateLockToChain](https://docs.cryptolegacy.app/documentation/events-reference#updatelocktochain-ilcg1)
* [Update](https://docs.cryptolegacy.app/documentation/events-reference#update-ilcg1)
* [UnlockFromChain](https://docs.cryptolegacy.app/documentation/events-reference#unlockfromchain-ilcg1)
* [CrossLockNft](https://docs.cryptolegacy.app/documentation/events-reference#crosslocknft-ilcg1)
* [CrossUnlockNft](https://docs.cryptolegacy.app/documentation/events-reference#crossunlocknft-ilcg1)
* [CrossUpdateNftOwner](https://docs.cryptolegacy.app/documentation/events-reference#crossupdatenftowner-ilcg1)
* [SetReferralCode](https://docs.cryptolegacy.app/documentation/events-reference#setreferralcode-ilcg1)
* [SetCustomChainId](https://docs.cryptolegacy.app/documentation/events-reference#setcustomchainid-ilcg1)
* [AddCodeOperator](https://docs.cryptolegacy.app/documentation/events-reference#addcodeoperator-ifr1)
* [RemoveCodeOperator](https://docs.cryptolegacy.app/documentation/events-reference#removecodeoperator-ifr1)
* [SetDefaultPct](https://docs.cryptolegacy.app/documentation/events-reference#setdefaultpct-ifr1)
* [SetRefererSpecificPct](https://docs.cryptolegacy.app/documentation/events-reference#setrefererspecificpct-ifr1)
* [SetContractCaseFee](https://docs.cryptolegacy.app/documentation/events-reference#setcontractcasefee-ifr1)
* [TakeFee](https://docs.cryptolegacy.app/documentation/events-reference#takefee-ifr1)
* [SentFee](https://docs.cryptolegacy.app/documentation/events-reference#sentfee-ifr1)
* [AccumulateFee](https://docs.cryptolegacy.app/documentation/events-reference#accumulatefee-ifr1)
* [CreateCode](https://docs.cryptolegacy.app/documentation/events-reference#createcode-ifr1)
* [UpdateCode](https://docs.cryptolegacy.app/documentation/events-reference#updatecode-ifr1)
* [ChangeCode](https://docs.cryptolegacy.app/documentation/events-reference#changecode-ifr1)
* [ChangeRecipient](https://docs.cryptolegacy.app/documentation/events-reference#changerecipient-ifr1)
* [SetCrossChainsRef](https://docs.cryptolegacy.app/documentation/events-reference#setcrosschainsref-ifr1)
* [SetFeeBeneficiaries](https://docs.cryptolegacy.app/documentation/events-reference#setfeebeneficiaries-ifr1)
* [AddSupportedRefCodeInChain](https://docs.cryptolegacy.app/documentation/events-reference#addsupportedrefcodeinchain-ifr1)
* [RemoveSupportedRefCodeInChain](https://docs.cryptolegacy.app/documentation/events-reference#removesupportedrefcodeinchain-ifr1)
* [WithdrawFee](https://docs.cryptolegacy.app/documentation/events-reference#withdrawfee-ifr1)
* [WithdrawRefFee](https://docs.cryptolegacy.app/documentation/events-reference#withdrawreffee-ifr1)

### Errors

* [ArrayLengthMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#arraylengthmismatch-ilcg1)
* [AlreadyLocked](https://docs.cryptolegacy.app/documentation/errors-reference#alreadylocked-ilcg1)
* [LockedToChains](https://docs.cryptolegacy.app/documentation/errors-reference#lockedtochains-ilcg1)
* [CrossChainLock](https://docs.cryptolegacy.app/documentation/errors-reference#crosschainlock-ilcg1)
* [TooEarly](https://docs.cryptolegacy.app/documentation/errors-reference#tooearly-ilcg1)
* [DestinationChainNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#destinationchainnotspecified-ilcg1)
* [TokenNotLocked](https://docs.cryptolegacy.app/documentation/errors-reference#tokennotlocked-ilcg1)
* [TokenIdMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#tokenidmismatch-ilcg1)
* [AlreadyLockedToChain](https://docs.cryptolegacy.app/documentation/errors-reference#alreadylockedtochain-ilcg1)
* [SourceNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#sourcenotspecified-ilcg1)
* [NotLockedByChain](https://docs.cryptolegacy.app/documentation/errors-reference#notlockedbychain-ilcg1)
* [DestinationNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#destinationnotspecified-ilcg1)
* [NotAvailable](https://docs.cryptolegacy.app/documentation/errors-reference#notavailable-ilcg1)
* [IncorrectFee](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfee-ilcg1)
* [SameAddress](https://docs.cryptolegacy.app/documentation/errors-reference#sameaddress-ilcg1)
* [RecipientLocked](https://docs.cryptolegacy.app/documentation/errors-reference#recipientlocked-ilcg1)
* [TransferLockTimeout](https://docs.cryptolegacy.app/documentation/errors-reference#transferlocktimeout-ilcg1)
* [NotCallProxy](https://docs.cryptolegacy.app/documentation/errors-reference#notcallproxy-ilcg1)
* [ChainIdMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#chainidmismatch-ilcg1)
* [NotValidSender](https://docs.cryptolegacy.app/documentation/errors-reference#notvalidsender-ilcg1)
* [NotAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#notallowed-ilcg1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-ilcg1)
* [WithdrawAccumulatedFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#withdrawaccumulatedfeefailed-ifr1)
* [PctSumDoesntMatchBase](https://docs.cryptolegacy.app/documentation/errors-reference#pctsumdoesntmatchbase-ifr1)
* [TooBigPct](https://docs.cryptolegacy.app/documentation/errors-reference#toobigpct-ifr1)
* [RefAlreadyCreated](https://docs.cryptolegacy.app/documentation/errors-reference#refalreadycreated-ifr1)
* [ZeroCode](https://docs.cryptolegacy.app/documentation/errors-reference#zerocode-ifr1)
* [NotOperator](https://docs.cryptolegacy.app/documentation/errors-reference#notoperator-ifr1)
* [NotReferrer](https://docs.cryptolegacy.app/documentation/errors-reference#notreferrer-ifr1)
* [AlreadyReferrer](https://docs.cryptolegacy.app/documentation/errors-reference#alreadyreferrer-ifr1)
* [CodeNotCreated](https://docs.cryptolegacy.app/documentation/errors-reference#codenotcreated-ifr1)

### Access / Roles

* `initialize`: `initializer`
* `setCodeOperator`: `onlyOwner`
* `setSupportedRefCodeInChains`: `onlyOwner`
* `setFeeBeneficiaries`: `onlyOwner`
* `setDefaultPct`: `onlyOwner`
* `setRefererSpecificPct`: `onlyOwner`
* `setContractCaseFee`: `onlyOwner`
* `takeFee`: `nonReentrant`
* `withdrawAccumulatedFee`: `nonReentrant`
* `withdrawReferralAccumulatedFee`: `nonReentrant`
* `createCustomCode`: `nonReentrant`
* `createCode`: `nonReentrant`
* `updateCrossChainsRef`: `nonReentrant`
* `crossCreateCustomCode`: `nonReentrant`
* `crossUpdateCustomCode`: `nonReentrant`
* `changeCodeReferrer`: `nonReentrant`
* `changeRecipientReferrer`: `nonReentrant`

### Interacts With

* `ILifetimeNft`

### Missing Links

None.

## LegacyMessenger

### Purpose

LegacyMessenger records recipient-linked legacy messages and emits block-indexed message events for off-chain tracking.

### Inheritance

* `ILegacyMessenger`
* `BuildManagerOwnable`

### Key Methods

* [sendMessagesTo(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sendmessagesto-lm1) - Emits per‑recipient message events and records the block number for each recipient.
* [getMessagesBlockNumbersByRecipient(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmessagesblocknumbersbyrecipient-lm1) - Returns the list of block numbers when a given recipient received messages.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-lm1) - Initializes the messenger and sets the contract owner.
* [sendMessagesTo(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sendmessagesto-lm1) - Emits per‑recipient message events and records the block number for each recipient.
* [getMessagesBlockNumbersByRecipient(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmessagesblocknumbersbyrecipient-lm1) - Returns the list of block numbers when a given recipient received messages.

### Events

* [LegacyMessage](https://docs.cryptolegacy.app/documentation/events-reference#legacymessage-ilm1)
* [LegacyMessageCheck](https://docs.cryptolegacy.app/documentation/events-reference#legacymessagecheck-ilm1)
* [AddBuildManager](https://docs.cryptolegacy.app/documentation/events-reference#addbuildmanager-ibmo1)
* [RemoveBuildManager](https://docs.cryptolegacy.app/documentation/events-reference#removebuildmanager-ibmo1)

### Errors

* [NotTheOwnerOfCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#nottheownerofcryptolegacy-ibmo1)
* [CryptoLegacyNotRegistered](https://docs.cryptolegacy.app/documentation/errors-reference#cryptolegacynotregistered-ibmo1)
* [BuildManagerNotAdded](https://docs.cryptolegacy.app/documentation/errors-reference#buildmanagernotadded-ibmo1)

### Access / Roles

* `sendMessagesTo`: registered CryptoLegacy caller with approved build manager (`_checkBuildManagerValid`)

### Interacts With

* `ArbSys`

### Missing Links

None.

## LifetimeNft

### Purpose

LifetimeNft implements the protocol NFT with controlled minting and configurable metadata base URI.

### Inheritance

* `ILifetimeNft`
* `ERC721Enumerable`
* `Ownable`

### Key Methods

* [setBaseUri(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbaseuri-ln1) - Updates the collection-wide base URI.
* [setMinterOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setminteroperator-ln1) - Grants or revokes minting permission for an address.
* [mint(...)](https://docs.cryptolegacy.app/documentation/functions-reference#mint-ln1) - Mints a new token to the specified owner.
* [tokensOfOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#tokensofowner-ln1) - Enumerates all token IDs owned by the given address.
* [getTier(...)](https://docs.cryptolegacy.app/documentation/functions-reference#gettier-ln1) - Computes the tier for a given token ID.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-ln1) - Initializes the ERC721 token with name, symbol, base URI, and owner.
* [setBaseUri(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbaseuri-ln1) - Updates the collection-wide base URI.
* [\_setBaseUri(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setbaseuri-ln1) - Internal helper to set the base URI and emit an event.
* [setMinterOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setminteroperator-ln1) - Grants or revokes minting permission for an address.
* [mint(...)](https://docs.cryptolegacy.app/documentation/functions-reference#mint-ln1) - Mints a new token to the specified owner.
* [\_baseURI()](https://docs.cryptolegacy.app/documentation/functions-reference#_baseuri-ln1) - Returns the stored base URI for metadata composition.
* [tokensOfOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#tokensofowner-ln1) - Enumerates all token IDs owned by the given address.
* [getTier(...)](https://docs.cryptolegacy.app/documentation/functions-reference#gettier-ln1) - Computes the tier for a given token ID.

### Events

* [SetBaseURI](https://docs.cryptolegacy.app/documentation/events-reference#setbaseuri-ln1)
* [SetMinterOperator](https://docs.cryptolegacy.app/documentation/events-reference#setminteroperator-ln1)

### Errors

* [NotTheMinter](https://docs.cryptolegacy.app/documentation/errors-reference#nottheminter-iln1)

### Access / Roles

* `setBaseUri`: `onlyOwner`
* `setMinterOperator`: `onlyOwner`

### Interacts With

None.

### Missing Links

None.

## LockChainGate

### Purpose

LockChainGate manages lifetime-NFT lock/unlock flows and cross-chain routing parameters for bridge operations.

### Inheritance

* `Ownable`
* `ReentrancyGuardUpgradeable`
* `ILockChainGate`

### Key Methods

* [setLockOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setlockoperator-lcg1) - Adds or removes an address from the lock operators set.
* [setDebridgeGate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setdebridgegate-lcg1) - Sets the deBridgeGate contract used for cross-chain messages.
* [setDebridgeNativeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setdebridgenativefee-lcg1) - Sets the per-chain native fee used when sending cross-chain messages.
* [setDestinationChainContract(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setdestinationchaincontract-lcg1) - Public setter for the destination chain contract mapping.
* [setSourceChainContract(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setsourcechaincontract-lcg1) - Public setter for the source chain contract mapping.
* [setSourceAndDestinationChainContract(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setsourceanddestinationchaincontract-lcg1) - Sets both source and destination contract addresses for a chain.
* [setLockPeriod(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setlockperiod-lcg1) - Updates the NFT lock period and transfer timeout.
* [setReferralCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setreferralcode-lcg1) - Sets deBridge referral code used in messages.

### All Functions

* [constructor()](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-lcg1) - Deploy-time constructor that disables initializers and sets the Ownable owner.
* [lockChainGateStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#lockchaingatestorage-lcg1) - Returns the storage pointer for the LockChainGate storage struct.
* [\_initializeLockChainGate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_initializelockchaingate-lcg1) - Internal initializer to set Lifetime NFT address, lock config, owner, and reentrancy guard.
* [setLockOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setlockoperator-lcg1) - Adds or removes an address from the lock operators set.
* [setDebridgeGate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setdebridgegate-lcg1) - Sets the deBridgeGate contract used for cross-chain messages.
* [setDebridgeNativeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setdebridgenativefee-lcg1) - Sets the per-chain native fee used when sending cross-chain messages.
* [\_setDestinationChainContract(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setdestinationchaincontract-lcg1) - Internal setter for the destination chain contract mapping.
* [setDestinationChainContract(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setdestinationchaincontract-lcg1) - Public setter for the destination chain contract mapping.
* [\_setSourceChainContract(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setsourcechaincontract-lcg1) - Internal setter for source chain contract mapping.
* [setSourceChainContract(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setsourcechaincontract-lcg1) - Public setter for the source chain contract mapping.
* [setSourceAndDestinationChainContract(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setsourceanddestinationchaincontract-lcg1) - Sets both source and destination contract addresses for a chain.
* [setLockPeriod(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setlockperiod-lcg1) - Updates the NFT lock period and transfer timeout.
* [setReferralCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setreferralcode-lcg1) - Sets deBridge referral code used in messages.
* [setCustomChainId(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcustomchainid-lcg1) - Overrides the auto-detected chainId with a custom value.
* [\_writeLockLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_writelocklifetimenft-lcg1) - Records a newly locked NFT for a holder.
* [lockLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#locklifetimenft-lcg1) - Locks a Lifetime NFT and optionally mirrors the lock on specified chains.
* [\_calcAndReturnFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_calcandreturnfee-lcg1) - Computes surplus ETH after fees and returns it to caller.
* [\_returnFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_returnfee-lcg1) - Sends ETH back to `msg.sender` if `_returnValue > 0`.
* [crossLockLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#crosslocklifetimenft-lcg1) - Handles cross-chain lock message to record a lock from a source chain.
* [\_lockLifetimeNftToChains(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_locklifetimenfttochains-lcg1) - Locks a token to multiple chains by sending cross-chain messages.
* [\_checkFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkfee-lcg1) - Validates that `msg.value` matches the required fee within tolerance.
* [lockLifetimeNftToChains(...)](https://docs.cryptolegacy.app/documentation/functions-reference#locklifetimenfttochains-lcg1) - Mirrors the caller’s existing lock to additional chains.
* [\_lockLifetimeNftToChain(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_locklifetimenfttochain-lcg1) - Sends a cross-chain lock message to a single chain and records mirroring.
* [unlockLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#unlocklifetimenft-lcg1) - Unlocks a locally locked NFT back to the caller if conditions are satisfied.
* [unlockLifetimeNftFromChain(...)](https://docs.cryptolegacy.app/documentation/functions-reference#unlocklifetimenftfromchain-lcg1) - Initiates cross-chain unlock to the source chain and clears local lock.
* [crossUnlockLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#crossunlocklifetimenft-lcg1) - Handles cross-chain unlock completion from a source chain.
* [crossUpdateNftOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#crossupdatenftowner-lcg1) - Updates owner mapping based on cross-chain transfer message.
* [\_deleteTokenData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_deletetokendata-lcg1) - Clears all lock-related mappings for a token and holder.
* [\_onlyCrossChain(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_onlycrosschain-lcg1) - Ensures the function is called by deBridge CallProxy from the expected source chain and contract.
* [\_send(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_send-lcg1) - Sends a cross-chain message via deBridge with flags set.
* [approveLifetimeNftTo(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approvelifetimenftto-lcg1) - Approves an address to unlock or transfer a locked NFT.
* [\_transferLifetimeNftTo(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_transferlifetimenftto-lcg1) - Internal mapping-only transfer of a locked NFT between holders.
* [transferLifetimeNftTo(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transferlifetimenftto-lcg1) - Transfers a locked NFT to a new holder locally and updates remote chains.
* [updateNftOwnerOnChainList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updatenftowneronchainlist-lcg1) - Sends owner-update messages for the caller’s locked NFT to specified chains.
* [\_updateNftOwnerOnChainList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_updatenftowneronchainlist-lcg1) - Internal routine to update NFT owner on a list of chains.
* [\_updateLifetimeNftOwnerOnChain(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_updatelifetimenftowneronchain-lcg1) - Sends owner-update for a single chain and records mirroring.
* [\_encodeCrossLockCommand(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_encodecrosslockcommand-lcg1) - Encodes the cross-chain lock command calldata.
* [\_encodeCrossUnlockCommand(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_encodecrossunlockcommand-lcg1) - Encodes the cross-chain unlock command calldata.
* [\_encodeCrossUpdateOwnerCommand(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_encodecrossupdateownercommand-lcg1) - Encodes the cross-chain update-owner command calldata.
* [\_checkDestinationLockedChain(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkdestinationlockedchain-lcg1) - Ensures destination chain contract is configured.
* [\_checkTokenLocked(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checktokenlocked-lcg1) - Validates that a holder currently has a locked token and returns its id.
* [\_checkCrossChainLock(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkcrosschainlock-lcg1) - Ensures the token is not currently locked via cross-chain lock source id.
* [\_checkTooEarly(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checktooearly-lcg1) - Enforces that the lock period has elapsed for a holder.
* [\_checkSource(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checksource-lcg1) - Ensures source chain contract is configured.
* [\_checkHolderTokenLock(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkholdertokenlock-lcg1) - Verifies that `_holder` is recorded as the holder of `_tokenId`.
* [getLockedToChainsIdsOfAccount(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getlockedtochainsidsofaccount-lcg1) - Returns destination chain ids where the account’s token is mirrored.
* [\_getLockedToChainsIdsOfAccount(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getlockedtochainsidsofaccount-lcg1) - Internal getter for mirrored chain IDs of `_holder`.
* [getLockedUntil(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getlockeduntil-lcg1) - Returns the timestamp when `_holder` can unlock.
* [\_getLockedUntil(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getlockeduntil-lcg1) - Internal computation of unlock timestamp.
* [getLockedToChainsIds(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getlockedtochainsids-lcg1) - Returns mirrored chain ids for a given token id.
* [lockPeriod()](https://docs.cryptolegacy.app/documentation/functions-reference#lockperiod-lcg1) - Getter for current lock period.
* [transferTimeout()](https://docs.cryptolegacy.app/documentation/functions-reference#transfertimeout-lcg1) - Getter for transfer timeout.
* [referralCode()](https://docs.cryptolegacy.app/documentation/functions-reference#referralcode-lcg1) - Getter for deBridge referral code.
* [ownerOfTokenId(...)](https://docs.cryptolegacy.app/documentation/functions-reference#owneroftokenid-lcg1) - Returns owner address recorded for a locked token.
* [lockedNftFromChainId(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lockednftfromchainid-lcg1) - Returns the source chain id that locked a token, if any.
* [lockedNftApprovedTo(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lockednftapprovedto-lcg1) - Returns the address approved for a locked NFT.
* [lockedNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lockednft-lcg1) - Returns the [`LockedNft`](https://docs.cryptolegacy.app/documentation/data-structures-reference#lockednft-ilcg1-s2) record for a holder.
* [getDeBridgeChainNativeFeeAndCheck(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getdebridgechainnativefeeandcheck-lcg1) - Returns required native fee for a chain and verifies `msg.value` matches policy.
* [\_getDeBridgeChainNativeFeeAndCheck(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getdebridgechainnativefeeandcheck-lcg1) - Internal compute-and-check fee helper.
* [getDeBridgeChainNativeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getdebridgechainnativefee-lcg1) - View function to compute native fee for a chain.
* [\_getDeBridgeChainNativeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getdebridgechainnativefee-lcg1) - Internal fee computation for a chain.
* [deBridgeGate()](https://docs.cryptolegacy.app/documentation/functions-reference#debridgegate-lcg1) - Returns the configured deBridgeGate address.
* [lifetimeNft()](https://docs.cryptolegacy.app/documentation/functions-reference#lifetimenft-lcg1) - Returns the associated LifetimeNft address.
* [deBridgeChainConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#debridgechainconfig-lcg1) - Returns cross-chain configuration for a chain id.
* [getLockOperatorsList()](https://docs.cryptolegacy.app/documentation/functions-reference#getlockoperatorslist-lcg1) - Returns all lock operator addresses.
* [isLockOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islockoperator-lcg1) - Checks whether an address is a lock operator.
* [calculateCrossChainCreateRefNativeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#calculatecrosschaincreaterefnativefee-lcg1) - Computes total native fee for cross-chain referral creation.
* [isNftLocked(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isnftlocked-lcg1) - Returns whether a holder has a locked NFT.
* [\_isNftLocked(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_isnftlocked-lcg1) - Internal check if a holder has a locked token id.
* [isNftLockedAndUpdate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isnftlockedandupdate-lcg1) - Returns whether the holder has a locked NFT and refreshes lock time if expired.
* [getChainId()](https://docs.cryptolegacy.app/documentation/functions-reference#getchainid-lcg1) - Returns the effective chain id (custom or EVM).
* [\_getChainId(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getchainid-lcg1) - Internal effective chain id getter.

### Events

* [SetLockPeriodConfig](https://docs.cryptolegacy.app/documentation/events-reference#setlockperiodconfig-ilcg1)
* [AddLockOperator](https://docs.cryptolegacy.app/documentation/events-reference#addlockoperator-ilcg1)
* [RemoveLockOperator](https://docs.cryptolegacy.app/documentation/events-reference#removelockoperator-ilcg1)
* [SetDeBridgeGate](https://docs.cryptolegacy.app/documentation/events-reference#setdebridgegate-ilcg1)
* [SetDeBridgeNativeFee](https://docs.cryptolegacy.app/documentation/events-reference#setdebridgenativefee-ilcg1)
* [SetDestinationChainContract](https://docs.cryptolegacy.app/documentation/events-reference#setdestinationchaincontract-ilcg1)
* [SetSourceChainContract](https://docs.cryptolegacy.app/documentation/events-reference#setsourcechaincontract-ilcg1)
* [SetReferralCode](https://docs.cryptolegacy.app/documentation/events-reference#setreferralcode-ilcg1)
* [SetCustomChainId](https://docs.cryptolegacy.app/documentation/events-reference#setcustomchainid-ilcg1)
* [LockNft](https://docs.cryptolegacy.app/documentation/events-reference#locknft-ilcg1)
* [CrossLockNft](https://docs.cryptolegacy.app/documentation/events-reference#crosslocknft-ilcg1)
* [LockToChain](https://docs.cryptolegacy.app/documentation/events-reference#locktochain-ilcg1)
* [UnlockNft](https://docs.cryptolegacy.app/documentation/events-reference#unlocknft-ilcg1)
* [UnlockFromChain](https://docs.cryptolegacy.app/documentation/events-reference#unlockfromchain-ilcg1)
* [CrossUnlockNft](https://docs.cryptolegacy.app/documentation/events-reference#crossunlocknft-ilcg1)
* [CrossUpdateNftOwner](https://docs.cryptolegacy.app/documentation/events-reference#crossupdatenftowner-ilcg1)
* [SendToChain](https://docs.cryptolegacy.app/documentation/events-reference#sendtochain-ilcg1)
* [ApproveNft](https://docs.cryptolegacy.app/documentation/events-reference#approvenft-ilcg1)
* [TransferNft](https://docs.cryptolegacy.app/documentation/events-reference#transfernft-ilcg1)
* [UpdateLockToChain](https://docs.cryptolegacy.app/documentation/events-reference#updatelocktochain-ilcg1)
* [Update](https://docs.cryptolegacy.app/documentation/events-reference#update-ilcg1)

### Errors

* [AlreadyLocked](https://docs.cryptolegacy.app/documentation/errors-reference#alreadylocked-ilcg1)
* [ArrayLengthMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#arraylengthmismatch-ilcg1)
* [IncorrectFee](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfee-ilcg1)
* [AlreadyLockedToChain](https://docs.cryptolegacy.app/documentation/errors-reference#alreadylockedtochain-ilcg1)
* [NotAvailable](https://docs.cryptolegacy.app/documentation/errors-reference#notavailable-ilcg1)
* [LockedToChains](https://docs.cryptolegacy.app/documentation/errors-reference#lockedtochains-ilcg1)
* [NotLockedByChain](https://docs.cryptolegacy.app/documentation/errors-reference#notlockedbychain-ilcg1)
* [DestinationNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#destinationnotspecified-ilcg1)
* [NotCallProxy](https://docs.cryptolegacy.app/documentation/errors-reference#notcallproxy-ilcg1)
* [ChainIdMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#chainidmismatch-ilcg1)
* [NotValidSender](https://docs.cryptolegacy.app/documentation/errors-reference#notvalidsender-ilcg1)
* [SameAddress](https://docs.cryptolegacy.app/documentation/errors-reference#sameaddress-ilcg1)
* [RecipientLocked](https://docs.cryptolegacy.app/documentation/errors-reference#recipientlocked-ilcg1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-ilcg1)
* [TransferLockTimeout](https://docs.cryptolegacy.app/documentation/errors-reference#transferlocktimeout-ilcg1)
* [TokenIdMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#tokenidmismatch-ilcg1)
* [DestinationChainNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#destinationchainnotspecified-ilcg1)
* [TokenNotLocked](https://docs.cryptolegacy.app/documentation/errors-reference#tokennotlocked-ilcg1)
* [CrossChainLock](https://docs.cryptolegacy.app/documentation/errors-reference#crosschainlock-ilcg1)
* [TooEarly](https://docs.cryptolegacy.app/documentation/errors-reference#tooearly-ilcg1)
* [SourceNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#sourcenotspecified-ilcg1)
* [NotAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#notallowed-ilcg1)

### Access / Roles

* `_initializeLockChainGate`: `initializer`
* `setLockOperator`: `onlyOwner`
* `setDebridgeGate`: `onlyOwner`
* `setDebridgeNativeFee`: `onlyOwner`
* `setDestinationChainContract`: `onlyOwner`
* `setSourceChainContract`: `onlyOwner`
* `setSourceAndDestinationChainContract`: `onlyOwner`
* `setLockPeriod`: `onlyOwner`
* `setReferralCode`: `onlyOwner`
* `setCustomChainId`: `onlyOwner`
* `lockLifetimeNft`: `nonReentrant`
* `crossLockLifetimeNft`: `nonReentrant`
* `lockLifetimeNftToChains`: `nonReentrant`
* `unlockLifetimeNft`: `nonReentrant`
* `unlockLifetimeNftFromChain`: `nonReentrant`
* `crossUnlockLifetimeNft`: `nonReentrant`
* `crossUpdateNftOwner`: `nonReentrant`
* `approveLifetimeNftTo`: `nonReentrant`
* `transferLifetimeNftTo`: `nonReentrant`
* `updateNftOwnerOnChainList`: `nonReentrant`

### Interacts With

* `Flags`
* `ICallProxy`
* `IDeBridgeGate`
* `ILifetimeNft`

### Missing Links

None.

## MultiPermit

### Purpose

MultiPermit batches token permit and approval calls to reduce transaction overhead for treasury flows.

### Inheritance

None.

### Key Methods

* [approveTreasuryTokensToLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approvetreasurytokenstolegacy-mp1) - Executes multiple ERC‑2612 `permit` approvals in a single transaction.

### All Functions

* [constructor()](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-mp1) - Deploys the MultiPermit helper contract.
* [approveTreasuryTokensToLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approvetreasurytokenstolegacy-mp1) - Executes multiple ERC‑2612 `permit` approvals in a single transaction.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## PluginsRegistry

### Purpose

PluginsRegistry tracks approved plugins and versioned plugin metadata used by protocol composition logic.

### Inheritance

* `IPluginsRegistry`
* `Ownable`

### Key Methods

* [addPlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addplugin-pr1) - Registers a plugin and records a description block number, then emits `AddPlugin`.
* [addPluginDescription(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addplugindescription-pr1) - Appends a new description block number for an existing plugin and emits `AddPluginDescription`.
* [removePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removeplugin-pr1) - Unregisters a plugin and emits `RemovePlugin`.
* [isPluginRegistered(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispluginregistered-pr1) - Returns whether `_plugin` is currently registered.
* [getPluginMetadata(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginmetadata-pr1) - Reads a plugin’s `name`, `version`, and its description block numbers.
* [getPluginDescriptionBlockNumbers(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getplugindescriptionblocknumbers-pr1) - Returns the full array of description block numbers for `_plugin`.
* [getPluginAddressList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginaddresslist-pr1) - Returns an array of all registered plugin addresses.
* [getPluginInfoList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getplugininfolist-pr1) - Aggregates metadata for all registered plugins into an array of [`PluginInfo`](https://docs.cryptolegacy.app/documentation/data-structures-reference#plugininfo-ipr1-s1).

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-pr1) - Initializes ownership and sets the provided `_owner` as the contract owner.
* [addPlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addplugin-pr1) - Registers a plugin and records a description block number, then emits `AddPlugin`.
* [addPluginDescription(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addplugindescription-pr1) - Appends a new description block number for an existing plugin and emits `AddPluginDescription`.
* [removePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removeplugin-pr1) - Unregisters a plugin and emits `RemovePlugin`.
* [isPluginRegistered(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispluginregistered-pr1) - Returns whether `_plugin` is currently registered.
* [getPluginMetadata(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginmetadata-pr1) - Reads a plugin’s `name`, `version`, and its description block numbers.
* [getPluginDescriptionBlockNumbers(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getplugindescriptionblocknumbers-pr1) - Returns the full array of description block numbers for `_plugin`.
* [getPluginAddressList()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginaddresslist-pr1) - Returns an array of all registered plugin addresses.
* [getPluginInfoList()](https://docs.cryptolegacy.app/documentation/functions-reference#getplugininfolist-pr1) - Aggregates metadata for all registered plugins into an array of [`PluginInfo`](https://docs.cryptolegacy.app/documentation/data-structures-reference#plugininfo-ipr1-s1).

### Events

* [AddPlugin](https://docs.cryptolegacy.app/documentation/events-reference#addplugin-ipr1)
* [AddPluginDescription](https://docs.cryptolegacy.app/documentation/events-reference#addplugindescription-ipr1)
* [RemovePlugin](https://docs.cryptolegacy.app/documentation/events-reference#removeplugin-ipr1)

### Errors

None.

### Access / Roles

* `addPlugin`: `onlyOwner`
* `addPluginDescription`: `onlyOwner`
* `removePlugin`: `onlyOwner`

### Interacts With

* `ArbSys`
* `ICryptoLegacyPlugin`

### Missing Links

None.

## ProxyBuilder

### Purpose

ProxyBuilder deploys proxy instances and binds them to the configured proxy-admin authority.

### Inheritance

* `Ownable`

### Key Methods

* [setProxyAdmin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setproxyadmin-pb1) - Updates the ProxyAdmin controller address.
* [build(...)](https://docs.cryptolegacy.app/documentation/functions-reference#build-pb1) - Deploys a `TransparentUpgradeableProxy` deterministically via CREATE3.
* [proxyBytecode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#proxybytecode-pb1) - Produces creation bytecode for `TransparentUpgradeableProxy`.
* [computeAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#computeaddress-pb1) - Computes the deterministic CREATE3 address for a given salt.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-pb1) - Initializes the builder with an optional ProxyAdmin and sets the owner.
* [setProxyAdmin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setproxyadmin-pb1) - Updates the ProxyAdmin controller address.
* [build(...)](https://docs.cryptolegacy.app/documentation/functions-reference#build-pb1) - Deploys a `TransparentUpgradeableProxy` deterministically via CREATE3.
* [proxyBytecode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#proxybytecode-pb1) - Produces creation bytecode for `TransparentUpgradeableProxy`.
* [computeAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#computeaddress-pb1) - Computes the deterministic CREATE3 address for a given salt.

### Events

* [Build](https://docs.cryptolegacy.app/documentation/events-reference#build-pb1)
* [SetProxyAdmin](https://docs.cryptolegacy.app/documentation/events-reference#setproxyadmin-pb1)

### Errors

* [AdminAlreadyCreated](https://docs.cryptolegacy.app/documentation/errors-reference#adminalreadycreated-pb1)
* [AddressMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#addressmismatch-pb1)

### Access / Roles

* `setProxyAdmin`: `onlyOwner`
* `build`: `onlyOwner`

### Interacts With

* `LibCreate3`

### Missing Links

None.

## ProxyBuilderAdmin

### Purpose

ProxyBuilderAdmin centralizes administrative controls for deployed beneficiary proxies in the protocol deployment stack.

### Inheritance

* `ProxyAdmin`

### Key Methods

None.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-pba1) - Initializes the ProxyBuilderAdmin and sets the initial owner.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## SignatureRoleTimelock

### Purpose

SignatureRoleTimelock enforces role-based timelocks and scheduled execution for restricted function calls.

### Inheritance

* `ISignatureRoleTimelock`
* `AccessControl`
* `ReentrancyGuard`

### Key Methods

* [setMaxExecutionPeriod(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setmaxexecutionperiod-srt1) - Updates the maximum allowed execution window after timelock expiry.
* [setRoleAccounts(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setroleaccounts-srt1) - Batch adds, removes, or replaces role accounts.
* [renounceRole(...)](https://docs.cryptolegacy.app/documentation/functions-reference#renouncerole-srt1) - Disabled AccessControl function; always reverts.
* [addSignatureRoleList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addsignaturerolelist-srt1) - Batch-assigns signature roles to target functions.
* [removeSignatureRoleList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removesignaturerolelist-srt1) - Batch-removes signature role bindings.
* [scheduleCallList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#schedulecalllist-srt1) - Schedules a batch of authorized calls with per-signature timelocks.
* [executeCallList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#executecalllist-srt1) - Executes a batch of scheduled calls after their timelocks expire.
* [cancelCallList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#cancelcalllist-srt1) - Cancels pending scheduled calls (admin-only).

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-srt1) - Initializes admin role, seeds role accounts, and installs initial signature roles with timelocks.
* [setMaxExecutionPeriod(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setmaxexecutionperiod-srt1) - Updates the maximum allowed execution window after timelock expiry.
* [setRoleAccounts(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setroleaccounts-srt1) - Batch adds, removes, or replaces role accounts.
* [\_addRoleAccount(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_addroleaccount-srt1) - Adds an account to a role and grants it in AccessControl.
* [\_getAddressIndex(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getaddressindex-srt1) - Finds index of address in array or returns `type(uint256).max`.
* [\_getBytes4Index(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getbytes4index-srt1) - Finds index of bytes4 selector in array or returns `type(uint256).max`.
* [\_removeRoleAccount(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_removeroleaccount-srt1) - Removes an account from a role and revokes it in AccessControl.
* [renounceRole(...)](https://docs.cryptolegacy.app/documentation/functions-reference#renouncerole-srt1) - Disabled AccessControl function; always reverts.
* [addSignatureRoleList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addsignaturerolelist-srt1) - Batch-assigns signature roles to target functions.
* [\_addSignatureRole(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_addsignaturerole-srt1) - Adds a single `(target, selector)` signature role binding.
* [removeSignatureRoleList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removesignaturerolelist-srt1) - Batch-removes signature role bindings.
* [\_removeSignatureRole(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_removesignaturerole-srt1) - Removes a single `(target, selector)` signature role binding.
* [scheduleCallList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#schedulecalllist-srt1) - Schedules a batch of authorized calls with per-signature timelocks.
* [\_checkRole(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkrole-srt1) - AccessControl hook override to enforce role checks with custom error.
* [\_scheduleCall(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_schedulecall-srt1) - Schedules a single authorized call with timelock and execution window.
* [executeCallList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#executecalllist-srt1) - Executes a batch of scheduled calls after their timelocks expire.
* [\_executeCall(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_executecall-srt1) - Executes an individual scheduled call when permitted by time window.
* [cancelCallList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#cancelcalllist-srt1) - Cancels pending scheduled calls (admin-only).
* [\_cancelCall(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_cancelcall-srt1) - Cancels a single scheduled call if still pending.
* [getRoleAccounts(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getroleaccounts-srt1) - Returns accounts that hold a given role.
* [getTargets()](https://docs.cryptolegacy.app/documentation/functions-reference#gettargets-srt1) - Lists all targets that have signature role bindings.
* [getTargetSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#gettargetsigs-srt1) - Returns signature role details for a given target.
* [getCallId(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcallid-srt1) - Computes a deterministic call ID for a pending call.
* [getCall(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcall-srt1) - Returns details of a scheduled call.
* [getCallsList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcallslist-srt1) - Paginates scheduled call IDs and their details.
* [getCallIds()](https://docs.cryptolegacy.app/documentation/functions-reference#getcallids-srt1) - Returns all scheduled call IDs.
* [getCallsLength()](https://docs.cryptolegacy.app/documentation/functions-reference#getcallslength-srt1) - Returns the number of scheduled calls.

### Events

* [SetMaxExecutionPeriod](https://docs.cryptolegacy.app/documentation/events-reference#setmaxexecutionperiod-isrt1)
* [AddRoleAccount](https://docs.cryptolegacy.app/documentation/events-reference#addroleaccount-isrt1)
* [RemoveRoleAccount](https://docs.cryptolegacy.app/documentation/events-reference#removeroleaccount-isrt1)
* [AddTarget](https://docs.cryptolegacy.app/documentation/events-reference#addtarget-isrt1)
* [AddSignatureRole](https://docs.cryptolegacy.app/documentation/events-reference#addsignaturerole-isrt1)
* [RemoveTarget](https://docs.cryptolegacy.app/documentation/events-reference#removetarget-isrt1)
* [RemoveSignatureRole](https://docs.cryptolegacy.app/documentation/events-reference#removesignaturerole-isrt1)
* [CallScheduled](https://docs.cryptolegacy.app/documentation/events-reference#callscheduled-isrt1)
* [CallExecuted](https://docs.cryptolegacy.app/documentation/events-reference#callexecuted-isrt1)
* [CallCanceled](https://docs.cryptolegacy.app/documentation/events-reference#callcanceled-isrt1)

### Errors

* [CallerNotCurrentAddress](https://docs.cryptolegacy.app/documentation/errors-reference#callernotcurrentaddress-isrt1)
* [OutOfMaxExecutionPeriodBounds](https://docs.cryptolegacy.app/documentation/errors-reference#outofmaxexecutionperiodbounds-isrt1)
* [AlreadyHaveRole](https://docs.cryptolegacy.app/documentation/errors-reference#alreadyhaverole-isrt1)
* [DoesntHaveRole](https://docs.cryptolegacy.app/documentation/errors-reference#doesnthaverole-isrt1)
* [IncorrectRoleIndex](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectroleindex-isrt1)
* [DisabledFunction](https://docs.cryptolegacy.app/documentation/errors-reference#disabledfunction-isrt1)
* [RoleDontExist](https://docs.cryptolegacy.app/documentation/errors-reference#roledontexist-isrt1)
* [SignatureAlreadyExists](https://docs.cryptolegacy.app/documentation/errors-reference#signaturealreadyexists-isrt1)
* [OutOfTimelockBounds](https://docs.cryptolegacy.app/documentation/errors-reference#outoftimelockbounds-isrt1)
* [IncorrectSignatureIndex](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectsignatureindex-isrt1)
* [CallerHaveNoRequiredRole](https://docs.cryptolegacy.app/documentation/errors-reference#callerhavenorequiredrole-isrt1)
* [SignatureTimeLockNotSet](https://docs.cryptolegacy.app/documentation/errors-reference#signaturetimelocknotset-isrt1)
* [CallAlreadyScheduled](https://docs.cryptolegacy.app/documentation/errors-reference#callalreadyscheduled-isrt1)
* [CallNotScheduled](https://docs.cryptolegacy.app/documentation/errors-reference#callnotscheduled-isrt1)
* [NotPending](https://docs.cryptolegacy.app/documentation/errors-reference#notpending-isrt1)
* [TimelockActive](https://docs.cryptolegacy.app/documentation/errors-reference#timelockactive-isrt1)
* [TimelockExpired](https://docs.cryptolegacy.app/documentation/errors-reference#timelockexpired-isrt1)
* [CallFailed](https://docs.cryptolegacy.app/documentation/errors-reference#callfailed-isrt1)

### Access / Roles

* `setMaxExecutionPeriod`: `onlyCurrentAddress`
* `setRoleAccounts`: `onlyCurrentAddress`
* `addSignatureRoleList`: `onlyCurrentAddress`
* `removeSignatureRoleList`: `onlyCurrentAddress`
* `scheduleCallList`: `nonReentrant`
* `executeCallList`: `nonReentrant`
* `cancelCallList`: `nonReentrant, onlyRole`

### Interacts With

None.

### Missing Links

None.

## WethUnwrapIWETH (Interface)

### Purpose

WethUnwrapIWETH defines the minimal WETH transfer and withdrawal calls required by the `WethUnwrap` helper contract.

### Inheritance

None.

### Key Methods

* [transferFrom(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transferfrom-wui1) - Transfers WETH from one address to another.
* [withdraw(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdraw-wui1) - Burns WETH and releases the same amount of native ETH.

### All Functions

* [transferFrom(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transferfrom-wui1) - Transfers WETH from one address to another.
* [withdraw(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdraw-wui1) - Burns WETH and releases the same amount of native ETH.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## WethUnwrap

### Purpose

WethUnwrap is a helper contract that pulls WETH from the caller, unwraps it into native ETH, and forwards the ETH back to the caller through a callback payload. It exists to support plugin flows that need native ETH for downstream protocol actions while keeping the unwrap logic isolated.

### Inheritance

None.

### Key Methods

* [unwrap\_weth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#unwrap_weth-wu1) - Pulls WETH from the caller, unwraps it to ETH, and immediately forwards the ETH back with callback calldata.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-wu1) - Stores the canonical WETH contract address used for unwrap operations.
* [unwrap\_weth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#unwrap_weth-wu1) - Pulls WETH from the caller, unwraps it to ETH, and immediately forwards the ETH back with callback calldata.
* [receive(...)](https://docs.cryptolegacy.app/documentation/functions-reference#receive-wu1) - Accepts native ETH released by the WETH contract during an unwrap.

### Events

None.

### Errors

* [CallbackCallFailed](https://docs.cryptolegacy.app/documentation/errors-reference#callbackcallfailed-wu1)

### Access / Roles

None.

### Interacts With

* `WethUnwrapIWETH`

### Missing Links

None.

## ArbSys (Interface)

### Purpose

ArbSys defines the Arbitrum system interface used for chain-specific context queries.

### Inheritance

None.

### Key Methods

* [arbBlockNumber(...)](https://docs.cryptolegacy.app/documentation/functions-reference#arbblocknumber-as1) - Returns the current Arbitrum L2 block number.

### All Functions

* [arbBlockNumber()](https://docs.cryptolegacy.app/documentation/functions-reference#arbblocknumber-as1) - Returns the current Arbitrum L2 block number.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## Flags (Library)

### Purpose

Flags centralizes bit-flag read/write helpers used by storage-efficient modules.

### Inheritance

None.

### Key Methods

* [getFlag(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getflag-flg1) - Tests whether a specific bit is enabled inside a packed flags word.
* [setFlag(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setflag-flg1) - Returns a new flags word with a specific bit set or cleared.

### All Functions

* [getFlag(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getflag-flg1) - Tests whether a specific bit is enabled inside a packed flags word.
* [setFlag(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setflag-flg1) - Returns a new flags word with a specific bit set or cleared.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IAaveV3Pool (Interface)

### Purpose

IAaveV3Pool defines the subset of Aave V3 pool calls used by the beneficiary-supply plugin for supply, withdrawal, and reserve-data access.

### Inheritance

None.

### Key Methods

* [supply(...)](https://docs.cryptolegacy.app/documentation/functions-reference#supply-iav3p1) - Supplies an asset into the Aave V3 pool on behalf of a target account.
* [withdraw(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdraw-iav3p1) - Withdraws a reserve asset from Aave V3 to a recipient address.

### All Functions

* [supply(...)](https://docs.cryptolegacy.app/documentation/functions-reference#supply-iav3p1) - Supplies an asset into the Aave V3 pool on behalf of a target account.
* [withdraw(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdraw-iav3p1) - Withdraws a reserve asset from Aave V3 to a recipient address.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IAaveV3PoolDataProvider (Interface)

### Purpose

IAaveV3PoolDataProvider exposes reserve-token metadata used by the Aave beneficiary-supply plugin to discover the aToken corresponding to an underlying asset.

### Inheritance

None.

### Key Methods

* [getReserveTokensAddresses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getreservetokensaddresses-iav3pdp1) - Returns the token-contract addresses associated with an Aave reserve.

### All Functions

* [getReserveTokensAddresses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getreservetokensaddresses-iav3pdp1) - Returns the token-contract addresses associated with an Aave reserve.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IBeneficiaryRegistry (Interface)

### Purpose

IBeneficiaryRegistry specifies the external registry API for beneficiary/owner/guardian/recovery indexing.

### Inheritance

None.

### Key Methods

* [setCryptoLegacyBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacybeneficiary-ibr1) - Registers or removes a CryptoLegacy contract for a beneficiary hash.
* [setCryptoLegacyOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyowner-ibr1) - Registers or removes a CryptoLegacy contract for an owner hash.
* [setCryptoLegacyGuardian(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyguardian-ibr1) - Toggles guardian-role membership for a CryptoLegacy contract.
* [setCryptoLegacyRecoveryAddresses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyrecoveryaddresses-ibr1) - Batch updates recovery-role mappings for a CryptoLegacy contract.
* [getAllCryptoLegacyListByRoles(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getallcryptolegacylistbyroles-ibr1) - Returns all CryptoLegacy addresses associated with a hash across roles.

### All Functions

* [setCryptoLegacyBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacybeneficiary-ibr1) - Registers or removes a CryptoLegacy contract for a beneficiary hash.
* [setCryptoLegacyOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyowner-ibr1) - Registers or removes a CryptoLegacy contract for an owner hash.
* [setCryptoLegacyGuardian(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyguardian-ibr1) - Toggles guardian-role membership for a CryptoLegacy contract.
* [setCryptoLegacyRecoveryAddresses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcryptolegacyrecoveryaddresses-ibr1) - Batch updates recovery-role mappings for a CryptoLegacy contract.
* [getAllCryptoLegacyListByRoles(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getallcryptolegacylistbyroles-ibr1) - Returns all CryptoLegacy addresses associated with a hash across roles.

### Events

* [AddCryptoLegacyForBeneficiary](https://docs.cryptolegacy.app/documentation/events-reference#addcryptolegacyforbeneficiary-ibr1)
* [RemoveCryptoLegacyForBeneficiary](https://docs.cryptolegacy.app/documentation/events-reference#removecryptolegacyforbeneficiary-ibr1)
* [AddCryptoLegacyForGuardian](https://docs.cryptolegacy.app/documentation/events-reference#addcryptolegacyforguardian-ibr1)
* [RemoveCryptoLegacyForGuardian](https://docs.cryptolegacy.app/documentation/events-reference#removecryptolegacyforguardian-ibr1)
* [AddCryptoLegacyForRecovery](https://docs.cryptolegacy.app/documentation/events-reference#addcryptolegacyforrecovery-ibr1)
* [RemoveCryptoLegacyForRecovery](https://docs.cryptolegacy.app/documentation/events-reference#removecryptolegacyforrecovery-ibr1)
* [AddCryptoLegacyForOwner](https://docs.cryptolegacy.app/documentation/events-reference#addcryptolegacyforowner-ibr1)
* [RemoveCryptoLegacyForOwner](https://docs.cryptolegacy.app/documentation/events-reference#removecryptolegacyforowner-ibr1)

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IBuildManagerOwnable (Interface)

### Purpose

IBuildManagerOwnable defines owner-controlled build-manager allowlist operations.

### Inheritance

None.

### Key Methods

None.

### All Functions

None.

### Events

* [AddBuildManager](https://docs.cryptolegacy.app/documentation/events-reference#addbuildmanager-ibmo1)
* [RemoveBuildManager](https://docs.cryptolegacy.app/documentation/events-reference#removebuildmanager-ibmo1)

### Errors

* [NotTheOwnerOfCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#nottheownerofcryptolegacy-ibmo1)
* [CryptoLegacyNotRegistered](https://docs.cryptolegacy.app/documentation/errors-reference#cryptolegacynotregistered-ibmo1)
* [BuildManagerNotAdded](https://docs.cryptolegacy.app/documentation/errors-reference#buildmanagernotadded-ibmo1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICallProxy (Interface)

### Purpose

ICallProxy defines the cross-chain call relay interface and sender-submission metadata accessors.

### Inheritance

None.

### Key Methods

* [submissionChainIdFrom(...)](https://docs.cryptolegacy.app/documentation/functions-reference#submissionchainidfrom-icp1) - Returns the source chain ID for the current cross-chain submission.
* [submissionNativeSender(...)](https://docs.cryptolegacy.app/documentation/functions-reference#submissionnativesender-icp1) - Returns the original sender (encoded as bytes) of the cross-chain submission.
* [call(...)](https://docs.cryptolegacy.app/documentation/functions-reference#call-icp1) - Executes a cross-chain call with optional native asset transfer.
* [callERC20(...)](https://docs.cryptolegacy.app/documentation/functions-reference#callerc20-icp1) - Executes a cross-chain call that also transfers ERC20 tokens.

### All Functions

* [submissionChainIdFrom()](https://docs.cryptolegacy.app/documentation/functions-reference#submissionchainidfrom-icp1) - Returns the source chain ID for the current cross-chain submission.
* [submissionNativeSender()](https://docs.cryptolegacy.app/documentation/functions-reference#submissionnativesender-icp1) - Returns the original sender (encoded as bytes) of the cross-chain submission.
* [call(...)](https://docs.cryptolegacy.app/documentation/functions-reference#call-icp1) - Executes a cross-chain call with optional native asset transfer.
* [callERC20(...)](https://docs.cryptolegacy.app/documentation/functions-reference#callerc20-icp1) - Executes a cross-chain call that also transfers ERC20 tokens.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICryptoLegacy (Interface)

### Purpose

ICryptoLegacy defines the primary protocol storage and operational interface consumed by plugins and managers.

### Inheritance

None.

### Key Methods

* [buildManager(...)](https://docs.cryptolegacy.app/documentation/functions-reference#buildmanager-icl1) - Returns the build manager contract associated with the CryptoLegacy instance.
* [owner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#owner-icl1) - Returns the current diamond owner address.

### All Functions

* [buildManager()](https://docs.cryptolegacy.app/documentation/functions-reference#buildmanager-icl1) - Returns the build manager contract associated with the CryptoLegacy instance.
* [owner()](https://docs.cryptolegacy.app/documentation/functions-reference#owner-icl1) - Returns the current diamond owner address.

### Events

* [PauseSet](https://docs.cryptolegacy.app/documentation/events-reference#pauseset-icl1)
* [Update](https://docs.cryptolegacy.app/documentation/events-reference#update-icl1)
* [FeePaidByLifetime](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbylifetime-icl1)
* [FeePaidByDefault](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbydefault-icl1)
* [FeePaidByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbytransfer-icl1)
* [FeeSentToRefByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#feesenttorefbytransfer-icl1)
* [BeneficiaryClaim](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryclaim-icl1)
* [BeneficiaryClaimAmountDecrease](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryclaimamountdecrease-icl1)
* [TransferTreasuryTokensToLegacy](https://docs.cryptolegacy.app/documentation/events-reference#transfertreasurytokenstolegacy-icl1)
* [TransferTokensFromLegacy](https://docs.cryptolegacy.app/documentation/events-reference#transfertokensfromlegacy-icl1)
* [SetGasLimitMultiplier](https://docs.cryptolegacy.app/documentation/events-reference#setgaslimitmultiplier-icl1)
* [AddFunctions](https://docs.cryptolegacy.app/documentation/events-reference#addfunctions-icl1)
* [RemoveFunctions](https://docs.cryptolegacy.app/documentation/events-reference#removefunctions-icl1)
* [SkipSendFeeByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#skipsendfeebytransfer-icl1)
* [IsLifetimeNftLockedAndUpdateCatch](https://docs.cryptolegacy.app/documentation/events-reference#islifetimenftlockedandupdatecatch-icl1)
* [GetUpdateFeeCatch](https://docs.cryptolegacy.app/documentation/events-reference#getupdatefeecatch-icl1)
* [PayFeeCatch](https://docs.cryptolegacy.app/documentation/events-reference#payfeecatch-icl1)
* [SetCryptoLegacyOwnerCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyownercatch-icl1)
* [SetCryptoLegacyBeneficiaryCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacybeneficiarycatch-icl1)
* [SetCryptoLegacyGuardianCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyguardiancatch-icl1)
* [SetCryptoLegacyRecoveryAddressesCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyrecoveryaddressescatch-icl1)
* [BeneficiaryRegistryCatch](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryregistrycatch-icl1)
* [BeneficiaryRegistryNotDefined](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryregistrynotdefined-icl1)

### Errors

* [BeneficiarySwitchTimelock](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiaryswitchtimelock-icl1)
* [ArrayLengthMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#arraylengthmismatch-icl1)
* [DisabledFunc](https://docs.cryptolegacy.app/documentation/errors-reference#disabledfunc-icl1)
* [NotTheOwner](https://docs.cryptolegacy.app/documentation/errors-reference#nottheowner-icl1)
* [NotTheBeneficiary](https://docs.cryptolegacy.app/documentation/errors-reference#notthebeneficiary-icl1)
* [BeneficiaryNotExist](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiarynotexist-icl1)
* [TooEarly](https://docs.cryptolegacy.app/documentation/errors-reference#tooearly-icl1)
* [IncorrectRefShare](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectrefshare-icl1)
* [NoValueAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#novalueallowed-icl1)
* [TooLongArray](https://docs.cryptolegacy.app/documentation/errors-reference#toolongarray-icl1)
* [IncorrectFee](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfee-icl1)
* [ZeroAddress](https://docs.cryptolegacy.app/documentation/errors-reference#zeroaddress-icl1)
* [ZeroTokens](https://docs.cryptolegacy.app/documentation/errors-reference#zerotokens-icl1)
* [InitialFeeNotPaid](https://docs.cryptolegacy.app/documentation/errors-reference#initialfeenotpaid-icl1)
* [InitialFeeAlreadyPaid](https://docs.cryptolegacy.app/documentation/errors-reference#initialfeealreadypaid-icl1)
* [NotBuildManager](https://docs.cryptolegacy.app/documentation/errors-reference#notbuildmanager-icl1)
* [LengthMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#lengthmismatch-icl1)
* [ShareSumDoesntMatchBase](https://docs.cryptolegacy.app/documentation/errors-reference#sharesumdoesntmatchbase-icl1)
* [OriginalHashDuplicate](https://docs.cryptolegacy.app/documentation/errors-reference#originalhashduplicate-icl1)
* [DistributionStarted](https://docs.cryptolegacy.app/documentation/errors-reference#distributionstarted-icl1)
* [DistributionStartAlreadySet](https://docs.cryptolegacy.app/documentation/errors-reference#distributionstartalreadyset-icl1)
* [DistributionDelay](https://docs.cryptolegacy.app/documentation/errors-reference#distributiondelay-icl1)
* [ChallengePeriodStarted](https://docs.cryptolegacy.app/documentation/errors-reference#challengeperiodstarted-icl1)
* [AlreadySet](https://docs.cryptolegacy.app/documentation/errors-reference#alreadyset-icl1)
* [BeneficiaryNotSet](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiarynotset-icl1)
* [Pause](https://docs.cryptolegacy.app/documentation/errors-reference#pause-icl1)
* [IncorrectFacetCutAction](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfacetcutaction-icl1)
* [NotContractOwner](https://docs.cryptolegacy.app/documentation/errors-reference#notcontractowner-icl1)
* [FacetNotFound](https://docs.cryptolegacy.app/documentation/errors-reference#facetnotfound-icl1)
* [FacetHasNoCode](https://docs.cryptolegacy.app/documentation/errors-reference#facethasnocode-icl1)
* [NoSelectorsInFacetToCut](https://docs.cryptolegacy.app/documentation/errors-reference#noselectorsinfacettocut-icl1)
* [FacetCantBeZero](https://docs.cryptolegacy.app/documentation/errors-reference#facetcantbezero-icl1)
* [CantRemoveImmutableFunctions](https://docs.cryptolegacy.app/documentation/errors-reference#cantremoveimmutablefunctions-icl1)
* [CantAddFunctionThatAlreadyExists](https://docs.cryptolegacy.app/documentation/errors-reference#cantaddfunctionthatalreadyexists-icl1)
* [CantReplaceFunctionWithSameFunction](https://docs.cryptolegacy.app/documentation/errors-reference#cantreplacefunctionwithsamefunction-icl1)
* [InitFunctionReverted](https://docs.cryptolegacy.app/documentation/errors-reference#initfunctionreverted-icl1)
* [InitAddressZeroButCalldataIsNot](https://docs.cryptolegacy.app/documentation/errors-reference#initaddresszerobutcalldataisnot-icl1)
* [InitCalldataZeroButAddressIsNot](https://docs.cryptolegacy.app/documentation/errors-reference#initcalldatazerobutaddressisnot-icl1)
* [PluginNotRegistered](https://docs.cryptolegacy.app/documentation/errors-reference#pluginnotregistered-icl1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-icl1)
* [TooBigMultiplier](https://docs.cryptolegacy.app/documentation/errors-reference#toobigmultiplier-icl1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICryptoLegacyBuildManager (Interface)

### Purpose

ICryptoLegacyBuildManager defines the deployment, fee-payment, and registry setup interface for protocol-instance creation.

### Inheritance

None.

### Key Methods

* [payInitialFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payinitialfee-iclbm1) - Collects the initial protocol fee when a CryptoLegacy instance is created.
* [payFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payfee-iclbm1) - Processes ongoing registry update fees for an existing CryptoLegacy.
* [getUpdateFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getupdatefee-iclbm1) - Returns the configured update fee for a referral code.
* [isLifetimeNftLocked(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimenftlocked-iclbm1) - Checks whether the owner’s lifetime NFT is locked.
* [isLifetimeNftLockedAndUpdate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimenftlockedandupdate-iclbm1) - Checks and updates lifetime NFT lock status in a single call.
* [isPluginRegistered(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispluginregistered-iclbm1) - Returns whether a plugin address is approved by the build manager.
* [isCryptoLegacyBuilt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#iscryptolegacybuilt-iclbm1) - Indicates whether a CryptoLegacy address was deployed via the build manager.
* [pluginsRegistry(...)](https://docs.cryptolegacy.app/documentation/functions-reference#pluginsregistry-iclbm1) - Returns the plugins registry contract address.

### All Functions

* [payInitialFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payinitialfee-iclbm1) - Collects the initial protocol fee when a CryptoLegacy instance is created.
* [payFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payfee-iclbm1) - Processes ongoing registry update fees for an existing CryptoLegacy.
* [getUpdateFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getupdatefee-iclbm1) - Returns the configured update fee for a referral code.
* [isLifetimeNftLocked(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimenftlocked-iclbm1) - Checks whether the owner’s lifetime NFT is locked.
* [isLifetimeNftLockedAndUpdate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimenftlockedandupdate-iclbm1) - Checks and updates lifetime NFT lock status in a single call.
* [isPluginRegistered(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispluginregistered-iclbm1) - Returns whether a plugin address is approved by the build manager.
* [isCryptoLegacyBuilt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#iscryptolegacybuilt-iclbm1) - Indicates whether a CryptoLegacy address was deployed via the build manager.
* [pluginsRegistry()](https://docs.cryptolegacy.app/documentation/functions-reference#pluginsregistry-iclbm1) - Returns the plugins registry contract address.
* [getFactoryAddress()](https://docs.cryptolegacy.app/documentation/functions-reference#getfactoryaddress-iclbm1) - Returns the configured factory contract address.
* [beneficiaryRegistry()](https://docs.cryptolegacy.app/documentation/functions-reference#beneficiaryregistry-iclbm1) - Returns the beneficiary registry address used by the build manager.
* [externalLens()](https://docs.cryptolegacy.app/documentation/functions-reference#externallens-iclbm1) - Returns the external lens contract used for off-chain queries.

### Events

* [CreateRef](https://docs.cryptolegacy.app/documentation/events-reference#createref-iclbm1)
* [CreateCustomRef](https://docs.cryptolegacy.app/documentation/events-reference#createcustomref-iclbm1)
* [SetCrossChainsRef](https://docs.cryptolegacy.app/documentation/events-reference#setcrosschainsref-iclbm1)
* [WithdrawFee](https://docs.cryptolegacy.app/documentation/events-reference#withdrawfee-iclbm1)
* [SetRegistries](https://docs.cryptolegacy.app/documentation/events-reference#setregistries-iclbm1)
* [SetFactory](https://docs.cryptolegacy.app/documentation/events-reference#setfactory-iclbm1)
* [SetSupplyLimit](https://docs.cryptolegacy.app/documentation/events-reference#setsupplylimit-iclbm1)
* [SetExternalLens](https://docs.cryptolegacy.app/documentation/events-reference#setexternallens-iclbm1)
* [PaidForMint](https://docs.cryptolegacy.app/documentation/events-reference#paidformint-iclbm1)
* [PaidForMultipleNft](https://docs.cryptolegacy.app/documentation/events-reference#paidformultiplenft-iclbm1)
* [Build](https://docs.cryptolegacy.app/documentation/events-reference#build-iclbm1)

### Errors

* [AlreadyLifetime](https://docs.cryptolegacy.app/documentation/errors-reference#alreadylifetime-iclbm1)
* [WithdrawFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#withdrawfeefailed-iclbm1)
* [NotValidTimeout](https://docs.cryptolegacy.app/documentation/errors-reference#notvalidtimeout-iclbm1)
* [IncorrectFee](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfee-iclbm1)
* [BelowMinimumSupply](https://docs.cryptolegacy.app/documentation/errors-reference#belowminimumsupply-iclbm1)
* [NotRegisteredCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#notregisteredcryptolegacy-iclbm1)
* [NotOwnerOfCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#notownerofcryptolegacy-iclbm1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-iclbm1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICryptoLegacyDiamondBase (Interface)

### Purpose

ICryptoLegacyDiamondBase defines base diamond helper calls shared by core protocol contracts.

### Inheritance

None.

### Key Methods

None.

### All Functions

None.

### Events

* [StaticCallCheck](https://docs.cryptolegacy.app/documentation/events-reference#staticcallcheck-icldb1)

### Errors

* [FunctionNotExists](https://docs.cryptolegacy.app/documentation/errors-reference#functionnotexists-icldb1)
* [NotSelfCall](https://docs.cryptolegacy.app/documentation/errors-reference#notselfcall-icldb1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICryptoLegacyFactory (Interface)

### Purpose

ICryptoLegacyFactory defines protocol-instance deployment and build-operator management functions.

### Inheritance

None.

### Key Methods

* [createCryptoLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcryptolegacy-iclf1) - Deploys a new CryptoLegacy diamond with the supplied owner, plugin list, and optional CREATE2 parameters.
* [setBuildOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbuildoperator-iclf1) - Grants or revokes build-operator permissions for the factory.

### All Functions

* [createCryptoLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcryptolegacy-iclf1) - Deploys a new CryptoLegacy diamond with the supplied owner, plugin list, and optional CREATE2 parameters.
* [setBuildOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbuildoperator-iclf1) - Grants or revokes build-operator permissions for the factory.

### Events

* [AddBuildOperator](https://docs.cryptolegacy.app/documentation/events-reference#addbuildoperator-iclf1)
* [RemoveBuildOperator](https://docs.cryptolegacy.app/documentation/events-reference#removebuildoperator-iclf1)

### Errors

* [NotBuildOperator](https://docs.cryptolegacy.app/documentation/errors-reference#notbuildoperator-iclf1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICryptoLegacyLens (Interface)

### Purpose

ICryptoLegacyLens defines read-only lens calls for protocol status, messages, and beneficiary data.

### Inheritance

None.

### Key Methods

* [getMessagesBlockNumbersByRecipient(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmessagesblocknumbersbyrecipient-icll1) - Returns the message block numbers recorded for a recipient hash.
* [getVestedAndClaimedData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getvestedandclaimeddata-icll1) - Returns per-token vested and claimed data for a beneficiary.
* [getCryptoLegacyBaseData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacybasedata-icll1) - Returns the core configuration snapshot for a CryptoLegacy.
* [getCryptoLegacyListData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistdata-icll1) - Returns aggregated beneficiaries, transfers, plugins, and token distribution data.

### All Functions

* [getMessagesBlockNumbersByRecipient(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmessagesblocknumbersbyrecipient-icll1) - Returns the message block numbers recorded for a recipient hash.
* [getVestedAndClaimedData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getvestedandclaimeddata-icll1) - Returns per-token vested and claimed data for a beneficiary.
* [getCryptoLegacyBaseData()](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacybasedata-icll1) - Returns the core configuration snapshot for a CryptoLegacy.
* [getCryptoLegacyListData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistdata-icll1) - Returns aggregated beneficiaries, transfers, plugins, and token distribution data.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICryptoLegacyOwnable (Interface)

### Purpose

ICryptoLegacyOwnable defines ownership and pause control calls for CryptoLegacy-compatible modules.

### Inheritance

None.

### Key Methods

None.

### All Functions

None.

### Events

* [OwnershipTransferStarted](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferstarted-iclo1)
* [OwnershipTransferred](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferred-iclo1)

### Errors

* [OwnableUnauthorizedAccount](https://docs.cryptolegacy.app/documentation/errors-reference#ownableunauthorizedaccount-iclo1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICryptoLegacyPlugin (Interface)

### Purpose

ICryptoLegacyPlugin defines the plugin ABI for selectors, setup hooks, and plugin metadata.

### Inheritance

None.

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-iclp1) - Returns the function selectors supported by the plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-iclp1) - Returns the setup selectors required when installing the plugin.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-iclp1) - Returns the human-readable plugin name.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-iclp1) - Returns the plugin version number.

### All Functions

* [getSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-iclp1) - Returns the function selectors supported by the plugin.
* [getSetupSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-iclp1) - Returns the setup selectors required when installing the plugin.
* [getPluginName()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-iclp1) - Returns the human-readable plugin name.
* [getPluginVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-iclp1) - Returns the plugin version number.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ICryptoLegacyUpdaterPlugin (Interface)

### Purpose

ICryptoLegacyUpdaterPlugin defines updater-plugin behavior for role and state migration operations.

### Inheritance

None.

### Key Methods

None.

### All Functions

None.

### Events

* [AddUpdater](https://docs.cryptolegacy.app/documentation/events-reference#addupdater-iclup1)
* [RemoveUpdater](https://docs.cryptolegacy.app/documentation/events-reference#removeupdater-iclup1)

### Errors

* [NotTheUpdater](https://docs.cryptolegacy.app/documentation/errors-reference#nottheupdater-iclup1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IDeBridgeGate (Interface)

### Purpose

IDeBridgeGate defines bridge-gateway calls for message delivery and token movement across chains.

### Inheritance

None.

### Key Methods

* [isSubmissionUsed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#issubmissionused-idbg1) - Reports whether a deBridge submission has already been claimed.
* [getNativeInfo(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getnativeinfo-idbg1) - Returns the origin chain metadata for a wrapped asset.
* [callProxy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#callproxy-idbg1) - Exposes the call proxy contract used to execute bridged payloads on the destination chain.
* [globalFixedNativeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#globalfixednativefee-idbg1) - Returns the global base native fee charged for bridging operations.
* [globalTransferFeeBps(...)](https://docs.cryptolegacy.app/documentation/functions-reference#globaltransferfeebps-idbg1) - Returns the global percentage fee (in basis points) applied to bridged transfers.
* [sendMessage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sendmessageuint256bytesbytes-idbg1) - Submits a cross-chain message to a destination contract without transferring assets.
* [sendMessage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sendmessageuint256bytesbytesuint256uint32-idbg1) - Submits a cross-chain message with explicit flags and referral code.
* [send(...)](https://docs.cryptolegacy.app/documentation/functions-reference#send-idbg1) - Bridges assets from the native chain to a destination chain.

### All Functions

* [isSubmissionUsed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#issubmissionused-idbg1) - Reports whether a deBridge submission has already been claimed.
* [getNativeInfo(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getnativeinfo-idbg1) - Returns the origin chain metadata for a wrapped asset.
* [callProxy()](https://docs.cryptolegacy.app/documentation/functions-reference#callproxy-idbg1) - Exposes the call proxy contract used to execute bridged payloads on the destination chain.
* [globalFixedNativeFee()](https://docs.cryptolegacy.app/documentation/functions-reference#globalfixednativefee-idbg1) - Returns the global base native fee charged for bridging operations.
* [globalTransferFeeBps()](https://docs.cryptolegacy.app/documentation/functions-reference#globaltransferfeebps-idbg1) - Returns the global percentage fee (in basis points) applied to bridged transfers.
* [sendMessage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sendmessageuint256bytesbytes-idbg1) - Submits a cross-chain message to a destination contract without transferring assets.
* [sendMessage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sendmessageuint256bytesbytesuint256uint32-idbg1) - Submits a cross-chain message with explicit flags and referral code.
* [send(...)](https://docs.cryptolegacy.app/documentation/functions-reference#send-idbg1) - Bridges assets from the native chain to a destination chain.
* [claim(...)](https://docs.cryptolegacy.app/documentation/functions-reference#claim-idbg1) - Claims bridged assets on the destination chain.
* [withdrawFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdrawfee-idbg1) - Withdraws accumulated protocol fees for an asset.
* [getDebridgeChainAssetFixedFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getdebridgechainassetfixedfee-idbg1) - Returns the fixed native fee for an asset on a specific chain.

### Events

* [Sent](https://docs.cryptolegacy.app/documentation/events-reference#sent-idbg1)
* [Claimed](https://docs.cryptolegacy.app/documentation/events-reference#claimed-idbg1)
* [PairAdded](https://docs.cryptolegacy.app/documentation/events-reference#pairadded-idbg1)
* [MonitoringSendEvent](https://docs.cryptolegacy.app/documentation/events-reference#monitoringsendevent-idbg1)
* [MonitoringClaimEvent](https://docs.cryptolegacy.app/documentation/events-reference#monitoringclaimevent-idbg1)
* [ChainSupportUpdated](https://docs.cryptolegacy.app/documentation/events-reference#chainsupportupdated-idbg1)
* [ChainsSupportUpdated](https://docs.cryptolegacy.app/documentation/events-reference#chainssupportupdated-idbg1)
* [CallProxyUpdated](https://docs.cryptolegacy.app/documentation/events-reference#callproxyupdated-idbg1)
* [AutoRequestExecuted](https://docs.cryptolegacy.app/documentation/events-reference#autorequestexecuted-idbg1)
* [Blocked](https://docs.cryptolegacy.app/documentation/events-reference#blocked-idbg1)
* [Unblocked](https://docs.cryptolegacy.app/documentation/events-reference#unblocked-idbg1)
* [WithdrawnFee](https://docs.cryptolegacy.app/documentation/events-reference#withdrawnfee-idbg1)
* [FixedNativeFeeUpdated](https://docs.cryptolegacy.app/documentation/events-reference#fixednativefeeupdated-idbg1)
* [FixedNativeFeeAutoUpdated](https://docs.cryptolegacy.app/documentation/events-reference#fixednativefeeautoupdated-idbg1)

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IDiamondCut (Interface)

### Purpose

IDiamondCut defines facet-cut structures and upgrade entrypoints for the diamond proxy standard.

### Inheritance

None.

### Key Methods

* [diamondCut(...)](https://docs.cryptolegacy.app/documentation/functions-reference#diamondcut-idc1) - External entry point for applying diamond facet cuts with optional initialization.

### All Functions

* [diamondCut(...)](https://docs.cryptolegacy.app/documentation/functions-reference#diamondcut-idc1) - External entry point for applying diamond facet cuts with optional initialization.

### Events

* [DiamondCut](https://docs.cryptolegacy.app/documentation/events-reference#diamondcut-idc1)

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IDiamondLoupe (Interface)

### Purpose

IDiamondLoupe defines introspection views for facets, selectors, and interface support.

### Inheritance

None.

### Key Methods

* [facets(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facets-idl1) - Returns the full list of facet addresses together with their selectors.
* [facetFunctionSelectors(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetfunctionselectors-idl1) - Returns the selector list exposed by a specific facet.
* [facetAddresses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetaddresses-idl1) - Lists every facet address installed on the diamond.
* [facetAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetaddress-idl1) - Resolves which facet implements a given selector.

### All Functions

* [facets()](https://docs.cryptolegacy.app/documentation/functions-reference#facets-idl1) - Returns the full list of facet addresses together with their selectors.
* [facetFunctionSelectors(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetfunctionselectors-idl1) - Returns the selector list exposed by a specific facet.
* [facetAddresses()](https://docs.cryptolegacy.app/documentation/functions-reference#facetaddresses-idl1) - Lists every facet address installed on the diamond.
* [facetAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetaddress-idl1) - Resolves which facet implements a given selector.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IFeeRegistry (Interface)

### Purpose

IFeeRegistry defines referral and fee lookup APIs used by builders and plugins.

### Inheritance

None.

### Key Methods

* [getContractCaseFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcontractcasefee-ifr1) - Returns the configured base fee for a specific contract-case combination.
* [getContractCaseFeeForCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcontractcasefeeforcode-ifr1) - Returns the effective fee for a contract-case after applying a referral code’s discount.
* [takeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#takefee-ifr1) - Charges the calculated fee for a contract-case and processes referral payouts.
* [createCustomCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcustomcode-ifr1) - Creates a specific referral code and optionally pushes it to other chains.
* [createCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcode-ifr1) - Generates a new referral code and optionally propagates it cross-chain.
* [updateCrossChainsRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updatecrosschainsref-ifr1) - Updates cross-chain propagation settings for an existing referral code.
* [accumulatedFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#accumulatedfee-ifr1) - Returns the protocol fee balance awaiting distribution.
* [getSupportedRefInChainsList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsupportedrefinchainslist-ifr1) - Lists the chain IDs where referral codes are currently supported.

### All Functions

* [getContractCaseFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcontractcasefee-ifr1) - Returns the configured base fee for a specific contract-case combination.
* [getContractCaseFeeForCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcontractcasefeeforcode-ifr1) - Returns the effective fee for a contract-case after applying a referral code’s discount.
* [takeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#takefee-ifr1) - Charges the calculated fee for a contract-case and processes referral payouts.
* [createCustomCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcustomcode-ifr1) - Creates a specific referral code and optionally pushes it to other chains.
* [createCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createcode-ifr1) - Generates a new referral code and optionally propagates it cross-chain.
* [updateCrossChainsRef(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updatecrosschainsref-ifr1) - Updates cross-chain propagation settings for an existing referral code.
* [accumulatedFee()](https://docs.cryptolegacy.app/documentation/functions-reference#accumulatedfee-ifr1) - Returns the protocol fee balance awaiting distribution.
* [getSupportedRefInChainsList()](https://docs.cryptolegacy.app/documentation/functions-reference#getsupportedrefinchainslist-ifr1) - Lists the chain IDs where referral codes are currently supported.

### Events

* [AddCodeOperator](https://docs.cryptolegacy.app/documentation/events-reference#addcodeoperator-ifr1)
* [RemoveCodeOperator](https://docs.cryptolegacy.app/documentation/events-reference#removecodeoperator-ifr1)
* [SetDefaultPct](https://docs.cryptolegacy.app/documentation/events-reference#setdefaultpct-ifr1)
* [SetRefererSpecificPct](https://docs.cryptolegacy.app/documentation/events-reference#setrefererspecificpct-ifr1)
* [SetContractCaseFee](https://docs.cryptolegacy.app/documentation/events-reference#setcontractcasefee-ifr1)
* [TakeFee](https://docs.cryptolegacy.app/documentation/events-reference#takefee-ifr1)
* [SentFee](https://docs.cryptolegacy.app/documentation/events-reference#sentfee-ifr1)
* [AccumulateFee](https://docs.cryptolegacy.app/documentation/events-reference#accumulatefee-ifr1)
* [CreateCode](https://docs.cryptolegacy.app/documentation/events-reference#createcode-ifr1)
* [UpdateCode](https://docs.cryptolegacy.app/documentation/events-reference#updatecode-ifr1)
* [ChangeCode](https://docs.cryptolegacy.app/documentation/events-reference#changecode-ifr1)
* [ChangeRecipient](https://docs.cryptolegacy.app/documentation/events-reference#changerecipient-ifr1)
* [SetCrossChainsRef](https://docs.cryptolegacy.app/documentation/events-reference#setcrosschainsref-ifr1)
* [SetFeeBeneficiaries](https://docs.cryptolegacy.app/documentation/events-reference#setfeebeneficiaries-ifr1)
* [AddSupportedRefCodeInChain](https://docs.cryptolegacy.app/documentation/events-reference#addsupportedrefcodeinchain-ifr1)
* [RemoveSupportedRefCodeInChain](https://docs.cryptolegacy.app/documentation/events-reference#removesupportedrefcodeinchain-ifr1)
* [WithdrawFee](https://docs.cryptolegacy.app/documentation/events-reference#withdrawfee-ifr1)
* [WithdrawRefFee](https://docs.cryptolegacy.app/documentation/events-reference#withdrawreffee-ifr1)

### Errors

* [WithdrawAccumulatedFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#withdrawaccumulatedfeefailed-ifr1)
* [PctSumDoesntMatchBase](https://docs.cryptolegacy.app/documentation/errors-reference#pctsumdoesntmatchbase-ifr1)
* [TooBigPct](https://docs.cryptolegacy.app/documentation/errors-reference#toobigpct-ifr1)
* [RefAlreadyCreated](https://docs.cryptolegacy.app/documentation/errors-reference#refalreadycreated-ifr1)
* [ZeroCode](https://docs.cryptolegacy.app/documentation/errors-reference#zerocode-ifr1)
* [NotOperator](https://docs.cryptolegacy.app/documentation/errors-reference#notoperator-ifr1)
* [NotReferrer](https://docs.cryptolegacy.app/documentation/errors-reference#notreferrer-ifr1)
* [AlreadyReferrer](https://docs.cryptolegacy.app/documentation/errors-reference#alreadyreferrer-ifr1)
* [CodeNotCreated](https://docs.cryptolegacy.app/documentation/errors-reference#codenotcreated-ifr1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ILockChainGate (Interface)

### Purpose

ILockChainGate defines lock-gate operations for locking, unlocking, and bridge-synchronized NFT state.

### Inheritance

None.

### Key Methods

* [lockLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#locklifetimenft-ilcg1) - Locks a lifetime NFT and optionally propagates the lock across chains.
* [isNftLocked(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isnftlocked-ilcg1) - Reports whether the owner has an active lifetime NFT lock.
* [isNftLockedAndUpdate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isnftlockedandupdate-ilcg1) - Checks lock status and updates timing when required.
* [calculateCrossChainCreateRefNativeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#calculatecrosschaincreaterefnativefee-ilcg1) - Computes the total native fee required for cross-chain referral creation.

### All Functions

* [lockLifetimeNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#locklifetimenft-ilcg1) - Locks a lifetime NFT and optionally propagates the lock across chains.
* [isNftLocked(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isnftlocked-ilcg1) - Reports whether the owner has an active lifetime NFT lock.
* [isNftLockedAndUpdate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isnftlockedandupdate-ilcg1) - Checks lock status and updates timing when required.
* [calculateCrossChainCreateRefNativeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#calculatecrosschaincreaterefnativefee-ilcg1) - Computes the total native fee required for cross-chain referral creation.

### Events

* [AddLockOperator](https://docs.cryptolegacy.app/documentation/events-reference#addlockoperator-ilcg1)
* [RemoveLockOperator](https://docs.cryptolegacy.app/documentation/events-reference#removelockoperator-ilcg1)
* [SetDestinationChainContract](https://docs.cryptolegacy.app/documentation/events-reference#setdestinationchaincontract-ilcg1)
* [SetSourceChainContract](https://docs.cryptolegacy.app/documentation/events-reference#setsourcechaincontract-ilcg1)
* [SetDeBridgeGate](https://docs.cryptolegacy.app/documentation/events-reference#setdebridgegate-ilcg1)
* [SetDeBridgeNativeFee](https://docs.cryptolegacy.app/documentation/events-reference#setdebridgenativefee-ilcg1)
* [SetLockPeriodConfig](https://docs.cryptolegacy.app/documentation/events-reference#setlockperiodconfig-ilcg1)
* [SendToChain](https://docs.cryptolegacy.app/documentation/events-reference#sendtochain-ilcg1)
* [LockNft](https://docs.cryptolegacy.app/documentation/events-reference#locknft-ilcg1)
* [UnlockNft](https://docs.cryptolegacy.app/documentation/events-reference#unlocknft-ilcg1)
* [ApproveNft](https://docs.cryptolegacy.app/documentation/events-reference#approvenft-ilcg1)
* [TransferNft](https://docs.cryptolegacy.app/documentation/events-reference#transfernft-ilcg1)
* [LockToChain](https://docs.cryptolegacy.app/documentation/events-reference#locktochain-ilcg1)
* [UpdateLockToChain](https://docs.cryptolegacy.app/documentation/events-reference#updatelocktochain-ilcg1)
* [Update](https://docs.cryptolegacy.app/documentation/events-reference#update-ilcg1)
* [UnlockFromChain](https://docs.cryptolegacy.app/documentation/events-reference#unlockfromchain-ilcg1)
* [CrossLockNft](https://docs.cryptolegacy.app/documentation/events-reference#crosslocknft-ilcg1)
* [CrossUnlockNft](https://docs.cryptolegacy.app/documentation/events-reference#crossunlocknft-ilcg1)
* [CrossUpdateNftOwner](https://docs.cryptolegacy.app/documentation/events-reference#crossupdatenftowner-ilcg1)
* [SetReferralCode](https://docs.cryptolegacy.app/documentation/events-reference#setreferralcode-ilcg1)
* [SetCustomChainId](https://docs.cryptolegacy.app/documentation/events-reference#setcustomchainid-ilcg1)

### Errors

* [ArrayLengthMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#arraylengthmismatch-ilcg1)
* [AlreadyLocked](https://docs.cryptolegacy.app/documentation/errors-reference#alreadylocked-ilcg1)
* [LockedToChains](https://docs.cryptolegacy.app/documentation/errors-reference#lockedtochains-ilcg1)
* [CrossChainLock](https://docs.cryptolegacy.app/documentation/errors-reference#crosschainlock-ilcg1)
* [TooEarly](https://docs.cryptolegacy.app/documentation/errors-reference#tooearly-ilcg1)
* [DestinationChainNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#destinationchainnotspecified-ilcg1)
* [TokenNotLocked](https://docs.cryptolegacy.app/documentation/errors-reference#tokennotlocked-ilcg1)
* [TokenIdMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#tokenidmismatch-ilcg1)
* [AlreadyLockedToChain](https://docs.cryptolegacy.app/documentation/errors-reference#alreadylockedtochain-ilcg1)
* [SourceNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#sourcenotspecified-ilcg1)
* [NotLockedByChain](https://docs.cryptolegacy.app/documentation/errors-reference#notlockedbychain-ilcg1)
* [DestinationNotSpecified](https://docs.cryptolegacy.app/documentation/errors-reference#destinationnotspecified-ilcg1)
* [NotAvailable](https://docs.cryptolegacy.app/documentation/errors-reference#notavailable-ilcg1)
* [IncorrectFee](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfee-ilcg1)
* [SameAddress](https://docs.cryptolegacy.app/documentation/errors-reference#sameaddress-ilcg1)
* [RecipientLocked](https://docs.cryptolegacy.app/documentation/errors-reference#recipientlocked-ilcg1)
* [TransferLockTimeout](https://docs.cryptolegacy.app/documentation/errors-reference#transferlocktimeout-ilcg1)
* [NotCallProxy](https://docs.cryptolegacy.app/documentation/errors-reference#notcallproxy-ilcg1)
* [ChainIdMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#chainidmismatch-ilcg1)
* [NotValidSender](https://docs.cryptolegacy.app/documentation/errors-reference#notvalidsender-ilcg1)
* [NotAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#notallowed-ilcg1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-ilcg1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ILegacyMessenger (Interface)

### Purpose

ILegacyMessenger defines message-sending and retrieval calls for legacy communication records.

### Inheritance

None.

### Key Methods

None.

### All Functions

None.

### Events

* [LegacyMessage](https://docs.cryptolegacy.app/documentation/events-reference#legacymessage-ilm1)
* [LegacyMessageCheck](https://docs.cryptolegacy.app/documentation/events-reference#legacymessagecheck-ilm1)

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ILido (Interface)

### Purpose

ILido defines the subset of Lido staking and share-transfer calls required by integrations.

### Inheritance

None.

### Key Methods

* [submit(...)](https://docs.cryptolegacy.app/documentation/functions-reference#submit-ild1) - Stakes ETH into Lido and mints stETH, crediting the caller.
* [transferShares(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transfershares-ild1) - Transfers a specified amount of Lido shares to another address.
* [transferSharesFrom(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transfersharesfrom-ild1) - Transfers Lido shares from one address to another using allowance semantics.
* [sharesOf(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sharesof-ild1) - Returns the number of Lido shares owned by an account.

### All Functions

* [submit(...)](https://docs.cryptolegacy.app/documentation/functions-reference#submit-ild1) - Stakes ETH into Lido and mints stETH, crediting the caller.
* [transferShares(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transfershares-ild1) - Transfers a specified amount of Lido shares to another address.
* [transferSharesFrom(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transfersharesfrom-ild1) - Transfers Lido shares from one address to another using allowance semantics.
* [sharesOf(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sharesof-ild1) - Returns the number of Lido shares owned by an account.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ILidoWithdrawalQueue (Interface)

### Purpose

ILidoWithdrawalQueue defines the withdrawal-request and claim calls used by the Lido staking beneficiary plugin. It standardizes request and claim entry points so Lido-side exits can be orchestrated through a stable interface.

### Inheritance

None.

### Key Methods

* [requestWithdrawals(...)](https://docs.cryptolegacy.app/documentation/functions-reference#requestwithdrawals-ilwq1) - Requests ETH withdrawals for stETH amounts through Lido's withdrawal queue.
* [requestWithdrawalsWstETH(...)](https://docs.cryptolegacy.app/documentation/functions-reference#requestwithdrawalswsteth-ilwq1) - Requests ETH withdrawals for wstETH amounts through the Lido queue.
* [claimWithdrawals(...)](https://docs.cryptolegacy.app/documentation/functions-reference#claimwithdrawals-ilwq1) - Claims finalized Lido withdrawals for previously created request IDs.

### All Functions

* [requestWithdrawals(...)](https://docs.cryptolegacy.app/documentation/functions-reference#requestwithdrawals-ilwq1) - Requests ETH withdrawals for stETH amounts through Lido's withdrawal queue.
* [requestWithdrawalsWstETH(...)](https://docs.cryptolegacy.app/documentation/functions-reference#requestwithdrawalswsteth-ilwq1) - Requests ETH withdrawals for wstETH amounts through the Lido queue.
* [claimWithdrawals(...)](https://docs.cryptolegacy.app/documentation/functions-reference#claimwithdrawals-ilwq1) - Claims finalized Lido withdrawals for previously created request IDs.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ILifetimeNft (Interface)

### Purpose

ILifetimeNft defines NFT minting and metadata administration calls required by protocol modules.

### Inheritance

* `IERC721Enumerable`

### Key Methods

* [mint(...)](https://docs.cryptolegacy.app/documentation/functions-reference#mint-iln1) - Mints a new Lifetime NFT to the specified owner.
* [setMinterOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setminteroperator-iln1) - Grants or revokes minting permission for an address.
* [setBaseUri(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbaseuri-iln1) - Updates the base metadata URI used for token metadata.

### All Functions

* [mint(...)](https://docs.cryptolegacy.app/documentation/functions-reference#mint-iln1) - Mints a new Lifetime NFT to the specified owner.
* [setMinterOperator(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setminteroperator-iln1) - Grants or revokes minting permission for an address.
* [setBaseUri(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbaseuri-iln1) - Updates the base metadata URI used for token metadata.

### Events

None.

### Errors

* [NotTheMinter](https://docs.cryptolegacy.app/documentation/errors-reference#nottheminter-iln1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IPermit2 (Interface)

### Purpose

IPermit2 defines the token-allowance approval call used by the Uniswap V4 beneficiary-swap plugin before handing control to the Universal Router.

### Inheritance

None.

### Key Methods

* [approve(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approve-ipm21) - Grants a spender an ERC20 transfer allowance through Permit2.

### All Functions

* [approve(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approve-ipm21) - Grants a spender an ERC20 transfer allowance through Permit2.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IPluginsRegistry (Interface)

### Purpose

IPluginsRegistry defines plugin registration and plugin-metadata query functions.

### Inheritance

None.

### Key Methods

* [getPluginDescriptionBlockNumbers(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getplugindescriptionblocknumbers-ipr1) - Returns the history of description update block numbers for a plugin.
* [isPluginRegistered(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispluginregistered-ipr1) - Indicates whether a plugin is registered in the registry.
* [addPlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addplugin-ipr1) - Registers a new plugin address with an accompanying description.
* [addPluginDescription(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addplugindescription-ipr1) - Appends an additional description entry for an existing plugin.
* [removePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removeplugin-ipr1) - Deregisters a plugin and removes it from the registry list.

### All Functions

* [getPluginDescriptionBlockNumbers(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getplugindescriptionblocknumbers-ipr1) - Returns the history of description update block numbers for a plugin.
* [isPluginRegistered(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispluginregistered-ipr1) - Indicates whether a plugin is registered in the registry.
* [addPlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addplugin-ipr1) - Registers a new plugin address with an accompanying description.
* [addPluginDescription(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addplugindescription-ipr1) - Appends an additional description entry for an existing plugin.
* [removePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removeplugin-ipr1) - Deregisters a plugin and removes it from the registry list.

### Events

* [AddPlugin](https://docs.cryptolegacy.app/documentation/events-reference#addplugin-ipr1)
* [AddPluginDescription](https://docs.cryptolegacy.app/documentation/events-reference#addplugindescription-ipr1)
* [RemovePlugin](https://docs.cryptolegacy.app/documentation/events-reference#removeplugin-ipr1)

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ISafeMinimalMultisig (Interface)

### Purpose

ISafeMinimalMultisig defines proposal lifecycle and signature-voting structures for multisig flows.

### Inheritance

None.

### Key Methods

None.

### All Functions

None.

### Events

* [CreateSafeMinimalMultisigProposal](https://docs.cryptolegacy.app/documentation/events-reference#createsafeminimalmultisigproposal-ism1)
* [CancelSafeMinimalMultisigProposal](https://docs.cryptolegacy.app/documentation/events-reference#cancelsafeminimalmultisigproposal-ism1)
* [ConfirmSafeMinimalMultisigProposal](https://docs.cryptolegacy.app/documentation/events-reference#confirmsafeminimalmultisigproposal-ism1)
* [ExecuteSafeMinimalMultisigProposal](https://docs.cryptolegacy.app/documentation/events-reference#executesafeminimalmultisigproposal-ism1)
* [SetVotersAndConfirmations](https://docs.cryptolegacy.app/documentation/events-reference#setvotersandconfirmations-ism1)
* [SetConfirmations](https://docs.cryptolegacy.app/documentation/events-reference#setconfirmations-ism1)
* [AddHeldEth](https://docs.cryptolegacy.app/documentation/events-reference#addheldeth-ism1)
* [WithdrawHeldEth](https://docs.cryptolegacy.app/documentation/events-reference#withdrawheldeth-ism1)

### Errors

* [MultisigProposalNotPending](https://docs.cryptolegacy.app/documentation/errors-reference#multisigproposalnotpending-ism1)
* [MultisigNotConfirmed](https://docs.cryptolegacy.app/documentation/errors-reference#multisignotconfirmed-ism1)
* [MultisigExecutionFailed](https://docs.cryptolegacy.app/documentation/errors-reference#multisigexecutionfailed-ism1)
* [MultisigMethodNotAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#multisigmethodnotallowed-ism1)
* [MultisigVoterNotAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#multisigvoternotallowed-ism1)
* [MultisigOnlyExecutor](https://docs.cryptolegacy.app/documentation/errors-reference#multisigonlyexecutor-ism1)
* [MultisigIncorrectRequiredConfirmations](https://docs.cryptolegacy.app/documentation/errors-reference#multisigincorrectrequiredconfirmations-ism1)
* [MultisigNothingToWithdraw](https://docs.cryptolegacy.app/documentation/errors-reference#multisignothingtowithdraw-ism1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-ism1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ISignatureRoleTimelock (Interface)

### Purpose

ISignatureRoleTimelock defines role assignment, signature mapping, and scheduled-call state for timelocked execution.

### Inheritance

None.

### Key Methods

None.

### All Functions

None.

### Events

* [SetMaxExecutionPeriod](https://docs.cryptolegacy.app/documentation/events-reference#setmaxexecutionperiod-isrt1)
* [AddRoleAccount](https://docs.cryptolegacy.app/documentation/events-reference#addroleaccount-isrt1)
* [RemoveRoleAccount](https://docs.cryptolegacy.app/documentation/events-reference#removeroleaccount-isrt1)
* [AddSignatureRole](https://docs.cryptolegacy.app/documentation/events-reference#addsignaturerole-isrt1)
* [RemoveSignatureRole](https://docs.cryptolegacy.app/documentation/events-reference#removesignaturerole-isrt1)
* [AddTarget](https://docs.cryptolegacy.app/documentation/events-reference#addtarget-isrt1)
* [RemoveTarget](https://docs.cryptolegacy.app/documentation/events-reference#removetarget-isrt1)
* [CallScheduled](https://docs.cryptolegacy.app/documentation/events-reference#callscheduled-isrt1)
* [CallExecuted](https://docs.cryptolegacy.app/documentation/events-reference#callexecuted-isrt1)
* [CallCanceled](https://docs.cryptolegacy.app/documentation/events-reference#callcanceled-isrt1)

### Errors

* [DisabledFunction](https://docs.cryptolegacy.app/documentation/errors-reference#disabledfunction-isrt1)
* [AlreadyHaveRole](https://docs.cryptolegacy.app/documentation/errors-reference#alreadyhaverole-isrt1)
* [DoesntHaveRole](https://docs.cryptolegacy.app/documentation/errors-reference#doesnthaverole-isrt1)
* [RoleDontExist](https://docs.cryptolegacy.app/documentation/errors-reference#roledontexist-isrt1)
* [CallerNotCurrentAddress](https://docs.cryptolegacy.app/documentation/errors-reference#callernotcurrentaddress-isrt1)
* [IncorrectSignatureIndex](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectsignatureindex-isrt1)
* [IncorrectRoleIndex](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectroleindex-isrt1)
* [CallFailed](https://docs.cryptolegacy.app/documentation/errors-reference#callfailed-isrt1)
* [CallNotScheduled](https://docs.cryptolegacy.app/documentation/errors-reference#callnotscheduled-isrt1)
* [NotPending](https://docs.cryptolegacy.app/documentation/errors-reference#notpending-isrt1)
* [TimelockActive](https://docs.cryptolegacy.app/documentation/errors-reference#timelockactive-isrt1)
* [TimelockExpired](https://docs.cryptolegacy.app/documentation/errors-reference#timelockexpired-isrt1)
* [CallerHaveNoRequiredRole](https://docs.cryptolegacy.app/documentation/errors-reference#callerhavenorequiredrole-isrt1)
* [CallAlreadyScheduled](https://docs.cryptolegacy.app/documentation/errors-reference#callalreadyscheduled-isrt1)
* [SignatureAlreadyExists](https://docs.cryptolegacy.app/documentation/errors-reference#signaturealreadyexists-isrt1)
* [SignatureTimeLockNotSet](https://docs.cryptolegacy.app/documentation/errors-reference#signaturetimelocknotset-isrt1)
* [OutOfTimelockBounds](https://docs.cryptolegacy.app/documentation/errors-reference#outoftimelockbounds-isrt1)
* [OutOfMaxExecutionPeriodBounds](https://docs.cryptolegacy.app/documentation/errors-reference#outofmaxexecutionperiodbounds-isrt1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IStataToken (Interface)

### Purpose

IStataToken defines the wrapped-aToken interface used by the Aave beneficiary plugin for minting and redeeming Stata positions.

### Inheritance

None.

### Key Methods

* [deposit(...)](https://docs.cryptolegacy.app/documentation/functions-reference#deposit-ista1) - Deposits reserve assets into a StataToken vault and mints shares.
* [redeem(...)](https://docs.cryptolegacy.app/documentation/functions-reference#redeem-ista1) - Redeems StataToken shares for the underlying reserve asset.
* [depositATokens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#depositatokens-ista1) - Deposits aTokens into the StataToken vault and mints shares.
* [redeemATokens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#redeematokens-ista1) - Redeems StataToken shares directly into aTokens.

### All Functions

* [deposit(...)](https://docs.cryptolegacy.app/documentation/functions-reference#deposit-ista1) - Deposits reserve assets into a StataToken vault and mints shares.
* [redeem(...)](https://docs.cryptolegacy.app/documentation/functions-reference#redeem-ista1) - Redeems StataToken shares for the underlying reserve asset.
* [depositATokens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#depositatokens-ista1) - Deposits aTokens into the StataToken vault and mints shares.
* [redeemATokens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#redeematokens-ista1) - Redeems StataToken shares directly into aTokens.
* [asset(...)](https://docs.cryptolegacy.app/documentation/functions-reference#asset-ista1) - Returns the underlying reserve asset tracked by the StataToken vault.
* [balanceOf(...)](https://docs.cryptolegacy.app/documentation/functions-reference#balanceof-ista1) - Returns the StataToken share balance held by an account.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IStataTokenFactory (Interface)

### Purpose

IStataTokenFactory defines the lookup and deployment interface for Stata token wrappers that the Aave beneficiary plugin uses when converting between aTokens and wrapped positions.

### Inheritance

None.

### Key Methods

* [getStataToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getstatatoken-istf1) - Resolves the StataToken vault address for an underlying reserve asset.
* [createStataTokens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createstatatokens-istf1) - Deploys StataToken vaults for one or more underlying reserve assets.

### All Functions

* [getStataToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getstatatoken-istf1) - Resolves the StataToken vault address for an underlying reserve asset.
* [createStataTokens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#createstatatokens-istf1) - Deploys StataToken vaults for one or more underlying reserve assets.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## ITrustedGuardiansPlugin (Interface)

### Purpose

ITrustedGuardiansPlugin defines guardian-plugin state checks used by integrations and plugins.

### Inheritance

None.

### Key Methods

* [isGuardiansInitialized(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isguardiansinitialized-itgp1) - Reports whether the guardian configuration has been fully initialised.

### All Functions

* [isGuardiansInitialized()](https://docs.cryptolegacy.app/documentation/functions-reference#isguardiansinitialized-itgp1) - Reports whether the guardian configuration has been fully initialised.

### Events

* [SetGuardian](https://docs.cryptolegacy.app/documentation/events-reference#setguardian-itgp1)
* [GuardiansVoteForDistribution](https://docs.cryptolegacy.app/documentation/events-reference#guardiansvotefordistribution-itgp1)
* [GuardiansDistributionStartSet](https://docs.cryptolegacy.app/documentation/events-reference#guardiansdistributionstartset-itgp1)
* [SetGuardiansConfig](https://docs.cryptolegacy.app/documentation/events-reference#setguardiansconfig-itgp1)
* [ResetGuardiansVoting](https://docs.cryptolegacy.app/documentation/events-reference#resetguardiansvoting-itgp1)
* [ClearGuardiansVoted](https://docs.cryptolegacy.app/documentation/events-reference#clearguardiansvoted-itgp1)

### Errors

* [NotGuardian](https://docs.cryptolegacy.app/documentation/errors-reference#notguardian-itgp1)
* [ZeroGuardian](https://docs.cryptolegacy.app/documentation/errors-reference#zeroguardian-itgp1)
* [ThresholdDontMet](https://docs.cryptolegacy.app/documentation/errors-reference#thresholddontmet-itgp1)
* [ThresholdTooBig](https://docs.cryptolegacy.app/documentation/errors-reference#thresholdtoobig-itgp1)
* [GuardianAlreadyVoted](https://docs.cryptolegacy.app/documentation/errors-reference#guardianalreadyvoted-itgp1)
* [GuardiansTimeoutCantBeZero](https://docs.cryptolegacy.app/documentation/errors-reference#guardianstimeoutcantbezero-itgp1)
* [MaxGuardiansTimeout](https://docs.cryptolegacy.app/documentation/errors-reference#maxguardianstimeout-itgp1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IUniversalRouter (Interface)

### Purpose

IUniversalRouter defines the command-batch execution surface used by the Uniswap V4 beneficiary plugin to route exact-input swaps.

### Inheritance

None.

### Key Methods

* [execute(...)](https://docs.cryptolegacy.app/documentation/functions-reference#execute-iur1) - Executes a Universal Router command bundle before the deadline expires.

### All Functions

* [execute(...)](https://docs.cryptolegacy.app/documentation/functions-reference#execute-iur1) - Executes a Universal Router command bundle before the deadline expires.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IWETH (Interface)

### Purpose

IWETH defines the wrapped-ETH mint, burn, approval, and balance calls used by helper contracts and plugins that bridge between native ETH and ERC-20 WETH.

### Inheritance

None.

### Key Methods

* [deposit(...)](https://docs.cryptolegacy.app/documentation/functions-reference#deposit-iweth1) - Wraps native ETH into WETH.
* [withdraw(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdraw-iweth1) - Unwraps WETH back into native ETH.
* [approve(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approve-iweth1) - Approves a spender to transfer WETH on the caller's behalf.

### All Functions

* [deposit(...)](https://docs.cryptolegacy.app/documentation/functions-reference#deposit-iweth1) - Wraps native ETH into WETH.
* [withdraw(...)](https://docs.cryptolegacy.app/documentation/functions-reference#withdraw-iweth1) - Unwraps WETH back into native ETH.
* [approve(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approve-iweth1) - Approves a spender to transfer WETH on the caller's behalf.
* [balanceOf(...)](https://docs.cryptolegacy.app/documentation/functions-reference#balanceof-iweth1) - Returns the WETH token balance held by an address.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## IWstETH (Interface)

### Purpose

IWstETH defines wrapped-stETH conversion calls used by the Lido beneficiary plugin when moving between stETH and wstETH positions.

### Inheritance

None.

### Key Methods

* [wrap(...)](https://docs.cryptolegacy.app/documentation/functions-reference#wrap-iwsteth1) - Wraps stETH into non-rebasing wstETH shares.
* [unwrap(...)](https://docs.cryptolegacy.app/documentation/functions-reference#unwrap-iwsteth1) - Unwraps wstETH into rebasing stETH.

### All Functions

* [wrap(...)](https://docs.cryptolegacy.app/documentation/functions-reference#wrap-iwsteth1) - Wraps stETH into non-rebasing wstETH shares.
* [unwrap(...)](https://docs.cryptolegacy.app/documentation/functions-reference#unwrap-iwsteth1) - Unwraps wstETH into rebasing stETH.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## DiamondLoupeFacet

### Purpose

DiamondLoupeFacet implements EIP-2535 loupe views for facet discovery and selector introspection.

### Inheritance

* `IDiamondLoupe`
* `IERC165`

### Key Methods

* [facets(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facets-dlf1) - Lists every facet installed on the diamond along with their selectors.
* [facetFunctionSelectors(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetfunctionselectors-dlf1) - Returns the selectors exposed by a single facet.
* [facetAddresses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetaddresses-dlf1) - Returns the ordered list of facet addresses in the diamond.
* [facetAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetaddress-dlf1) - Resolves the facet address implementing a given selector, with plugin-aware fallback.
* [storageFacetAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#storagefacetaddress-dlf1) - Reads the raw facet address mapped to a selector without plugin fallback.
* [supportsInterface(...)](https://docs.cryptolegacy.app/documentation/functions-reference#supportsinterface-dlf1) - Reports ERC-165 interface support flags for the diamond.

### All Functions

* [facets()](https://docs.cryptolegacy.app/documentation/functions-reference#facets-dlf1) - Lists every facet installed on the diamond along with their selectors.
* [facetFunctionSelectors(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetfunctionselectors-dlf1) - Returns the selectors exposed by a single facet.
* [facetAddresses()](https://docs.cryptolegacy.app/documentation/functions-reference#facetaddresses-dlf1) - Returns the ordered list of facet addresses in the diamond.
* [facetAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#facetaddress-dlf1) - Resolves the facet address implementing a given selector, with plugin-aware fallback.
* [storageFacetAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#storagefacetaddress-dlf1) - Reads the raw facet address mapped to a selector without plugin fallback.
* [supportsInterface(...)](https://docs.cryptolegacy.app/documentation/functions-reference#supportsinterface-dlf1) - Reports ERC-165 interface support flags for the diamond.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

* `ICryptoLegacyPlugin`
* `LibCryptoLegacyPlugins`
* `LibDiamond`

### Missing Links

None.

## LibCLUtils (Library)

### Purpose

LibCLUtils provides shared ERC-20 approval helpers used by migration and plugin flows. It centralizes the low-level approval call so callers can handle failures consistently.

### Inheritance

None.

### Key Methods

* [approveToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approvetoken-lclu1) - Performs a low-level ERC-20 approval call and normalizes non-standard return behavior.

### All Functions

* [approveToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#approvetoken-lclu1) - Performs a low-level ERC-20 approval call and normalizes non-standard return behavior.

### Events

None.

### Errors

* [ApprovalFailed](https://docs.cryptolegacy.app/documentation/errors-reference#approvalfailed-lclu1)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## LibClaimMigrationCore (Library)

### Purpose

LibClaimMigrationCore provides the fixed-point math and shared distribution-sync helpers used by both one-step and two-step beneficiary claim migrations.

### Inheritance

None.

### Key Methods

* [calculateFractionAndRatio(...)](https://docs.cryptolegacy.app/documentation/functions-reference#calculatefractionandratio-lcmc1) - Calculates the migration fraction and exchange ratio for a conversion step.
* [applyMigrationFormula(...)](https://docs.cryptolegacy.app/documentation/functions-reference#applymigrationformula-lcmc1) - Reallocates one beneficiary's claimed balances across a migration boundary.
* [syncDistributions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#syncdistributions-lcmc1) - Updates distribution totals and last-balance snapshots after a migration.

### All Functions

* [calculateFractionAndRatio(...)](https://docs.cryptolegacy.app/documentation/functions-reference#calculatefractionandratio-lcmc1) - Calculates the migration fraction and exchange ratio for a conversion step.
* [applyMigrationFormula(...)](https://docs.cryptolegacy.app/documentation/functions-reference#applymigrationformula-lcmc1) - Reallocates one beneficiary's claimed balances across a migration boundary.
* [syncDistributions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#syncdistributions-lcmc1) - Updates distribution totals and last-balance snapshots after a migration.

### Events

None.

### Errors

* [MigrationInvalidDelta](https://docs.cryptolegacy.app/documentation/errors-reference#migrationinvaliddelta-lcmc1)
* [MigrationAmountTooSmall](https://docs.cryptolegacy.app/documentation/errors-reference#migrationamounttoosmall-lcmc1)

### Access / Roles

None.

### Interacts With

* `ICryptoLegacy`

### Missing Links

None.

## LibOneStepClaimMigration (Library)

### Purpose

LibOneStepClaimMigration provides the immediate claim-migration path that updates beneficiary accounting in a single execution flow.

### Inheritance

None.

### Key Methods

* [migrate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#migrate-loscm1) - Migrates beneficiary claim accounting for an atomic token conversion.
* [\_migrateClaims(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_migrateclaims-loscm1) - Applies the migration formula to every beneficiary in the current CryptoLegacy set.

### All Functions

* [migrate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#migrate-loscm1) - Migrates beneficiary claim accounting for an atomic token conversion.
* [\_migrateClaims(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_migrateclaims-loscm1) - Applies the migration formula to every beneficiary in the current CryptoLegacy set.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

* `ICryptoLegacy`
* `LibClaimMigrationCore`

### Missing Links

None.

## LibTwoStepClaimMigration (Library)

### Purpose

LibTwoStepClaimMigration provides the delayed claim-migration flow that stages pending state, finalizes migrations later, or abandons them when necessary.

### Inheritance

None.

### Key Methods

* [start(...)](https://docs.cryptolegacy.app/documentation/functions-reference#start-ltscm1) - Starts a delayed claim migration when the source token leaves before the destination token arrives.
* [complete(...)](https://docs.cryptolegacy.app/documentation/functions-reference#complete-ltscm1) - Completes a delayed migration after the destination token arrives.
* [abandon(...)](https://docs.cryptolegacy.app/documentation/functions-reference#abandon-ltscm1) - Abandons an active pending migration and restores cached claim state.

### All Functions

* [isActive(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isactive-ltscm1) - Returns whether a pending two-step migration is currently active.
* [getPendingTokens(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpendingtokens-ltscm1) - Returns the token pair involved in the active pending migration.
* [start(...)](https://docs.cryptolegacy.app/documentation/functions-reference#start-ltscm1) - Starts a delayed claim migration when the source token leaves before the destination token arrives.
* [complete(...)](https://docs.cryptolegacy.app/documentation/functions-reference#complete-ltscm1) - Completes a delayed migration after the destination token arrives.
* [abandon(...)](https://docs.cryptolegacy.app/documentation/functions-reference#abandon-ltscm1) - Abandons an active pending migration and restores cached claim state.
* [\_applyPendingMigration(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_applypendingmigration-ltscm1) - Applies the cached pending-migration snapshot to all beneficiaries.

### Events

None.

### Errors

* [NoPendingMigration](https://docs.cryptolegacy.app/documentation/errors-reference#nopendingmigration-ltscm1)
* [PendingMigrationAlreadyExists](https://docs.cryptolegacy.app/documentation/errors-reference#pendingmigrationalreadyexists-ltscm1)
* [TokenAlreadyLocked](https://docs.cryptolegacy.app/documentation/errors-reference#tokenalreadylocked-ltscm1)

### Access / Roles

None.

### Interacts With

* `ICryptoLegacy`
* `LibClaimMigrationCore`

### Missing Links

None.

## LibCreate3 (Library)

### Purpose

LibCreate3 provides low-level CREATE3 deployment primitives and deterministic address derivation helpers.

### Inheritance

None.

### Key Methods

* [codeSize(...)](https://docs.cryptolegacy.app/documentation/functions-reference#codesize-lc31) - Returns the bytecode size at a target address.
* [create3(...)](https://docs.cryptolegacy.app/documentation/functions-reference#create3bytes32bytes-lc31) - Deploys bytecode deterministically with CREATE3 forwarding zero ether.
* [create3(...)](https://docs.cryptolegacy.app/documentation/functions-reference#create3bytes32bytesuint256-lc31) - Deterministically deploys contracts using the CREATE3 pattern, optionally forwarding ETH.
* [addressOf(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addressof-lc31) - Computes the deterministic address yielded by CREATE3 for a given salt.

### All Functions

* [codeSize(...)](https://docs.cryptolegacy.app/documentation/functions-reference#codesize-lc31) - Returns the bytecode size at a target address.
* [create3(...)](https://docs.cryptolegacy.app/documentation/functions-reference#create3bytes32bytes-lc31) - Deploys bytecode deterministically with CREATE3 forwarding zero ether.
* [create3(...)](https://docs.cryptolegacy.app/documentation/functions-reference#create3bytes32bytesuint256-lc31) - Deterministically deploys contracts using the CREATE3 pattern, optionally forwarding ETH.
* [addressOf(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addressof-lc31) - Computes the deterministic address yielded by CREATE3 for a given salt.

### Events

None.

### Errors

* [ErrorCreatingProxy](https://docs.cryptolegacy.app/documentation/errors-reference#errorcreatingproxy-lc31)
* [ErrorCreatingContract](https://docs.cryptolegacy.app/documentation/errors-reference#errorcreatingcontract-lc31)
* [TargetAlreadyExists](https://docs.cryptolegacy.app/documentation/errors-reference#targetalreadyexists-lc31)

### Access / Roles

None.

### Interacts With

None.

### Missing Links

None.

## LibCryptoLegacy (Library)

### Purpose

LibCryptoLegacy provides shared storage accessors and validation checks for core protocol logic.

### Inheritance

None.

### Key Methods

* [getCryptoLegacyStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacystorage-lcl1) - Returns the storage slot backing the CryptoLegacy diamond data.
* [\_checkDisabledFunc(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkdisabledfunc-lcl1) - Ensures a flagged core function is not disabled by configuration.
* [\_checkDistributionStart(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkdistributionstart-lcl1) - Guards flows that must execute before distribution begins.
* [\_isDistributionStarted(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_isdistributionstarted-lcl1) - Reports whether the distribution window is active.
* [\_checkOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkowner-lcl1) - Enforces that the caller is the diamond owner and the initial fee was paid.
* [\_checkSenderOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checksenderowner-lcl1) - Validates that `msg.sender` matches the diamond owner.
* [\_checkPause(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkpause-lcl1) - Blocks execution when the CryptoLegacy contract is paused.
* [\_setPause(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setpause-lcl1) - Updates the pause flag while distribution is inactive.

### All Functions

* [getCryptoLegacyStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacystorage-lcl1) - Returns the storage slot backing the CryptoLegacy diamond data.
* [\_checkDisabledFunc(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkdisabledfunc-lcl1) - Ensures a flagged core function is not disabled by configuration.
* [\_checkDistributionStart(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkdistributionstart-lcl1) - Guards flows that must execute before distribution begins.
* [\_isDistributionStarted(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_isdistributionstarted-lcl1) - Reports whether the distribution window is active.
* [\_checkOwner()](https://docs.cryptolegacy.app/documentation/functions-reference#_checkowner-lcl1) - Enforces that the caller is the diamond owner and the initial fee was paid.
* [\_checkSenderOwner()](https://docs.cryptolegacy.app/documentation/functions-reference#_checksenderowner-lcl1) - Validates that `msg.sender` matches the diamond owner.
* [\_checkPause(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkpause-lcl1) - Blocks execution when the CryptoLegacy contract is paused.
* [\_setPause(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setpause-lcl1) - Updates the pause flag while distribution is inactive.
* [\_getPause(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getpause-lcl1) - Reads the pause status from storage.
* [\_checkAddressIsBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkaddressisbeneficiary-lcl1) - Verifies that an address corresponds to a registered beneficiary.
* [\_checkDistributionReadyForBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkdistributionreadyforbeneficiary-lcl1) - Ensures the caller is a registered beneficiary and distribution is active.
* [\_checkDistributionReady(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkdistributionready-lcl1) - Validates that the distribution window is open.
* [\_getBeneficiariesCount(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getbeneficiariescount-lcl1) - Returns the number of registered beneficiaries.
* [\_isLifetimeActiveAndUpdate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_islifetimeactiveandupdate-lcl1) - Queries the build manager to determine if a lifetime NFT is locked and updates state accordingly.
* [\_takeFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_takefee-lcl1) - Core fee processing routine covering lifetime, build-manager, and manual transfer paths.
* [\_checkFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkfee-lcl1) - Validates a fee payment matches expectations.
* [\_checkNoFee()](https://docs.cryptolegacy.app/documentation/functions-reference#_checknofee-lcl1) - Reverts when `msg.value` is non-zero.
* [\_sendFeeByTransfer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_sendfeebytransfer-lcl1) - Pays fees via direct ETH transfers, optionally splitting referral amounts.
* [\_transferFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_transferfee-lcl1) - Performs a low-level ETH transfer with a configurable gas stipend.
* [\_tokenPrepareToDistribute(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_tokenpreparetodistribute-lcl1) - Reconciles token distribution state with the contract’s current ERC20 balance.
* [\_getBeneficiaryClaimed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getbeneficiaryclaimed-lcl1) - Reads the claimed amount for a beneficiary/token pair.
* [\_setBeneficiaryClaimed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setbeneficiaryclaimed-lcl1) - Updates the claimed amount for a beneficiary/token pair.
* [\_getTotalClaimed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_gettotalclaimed-lcl1) - Aggregates claimed amounts for a token across all beneficiaries.
* [\_getStartAndEndDate(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getstartandenddate-lcl1) - Calculates a beneficiary’s vesting window based on distribution start.
* [\_getVestedAndClaimedAmount(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getvestedandclaimedamount-lcl1) - Computes vesting progress and claimable amounts for a beneficiary/token pair.
* [\_getBeneficiaryConfigAndVesting(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getbeneficiaryconfigandvesting-lcl1) - Retrieves config and vesting storage for a beneficiary, enforcing existence.
* [\_setCryptoLegacyToBeneficiaryRegistry(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setcryptolegacytobeneficiaryregistry-lcl1) - Adds or removes a single entity from the external BeneficiaryRegistry.
* [\_setCryptoLegacyListToBeneficiaryRegistry(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setcryptolegacylisttobeneficiaryregistry-lcl1) - Updates recovery address lists in the BeneficiaryRegistry.
* [\_getBeneficiaryRegistry(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getbeneficiaryregistry-lcl1) - Retrieves the BeneficiaryRegistry from the build manager, swallowing errors.
* [\_gasBySelector(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_gasbyselector-lcl1) - Computes the gas stipend for an external call, applying the configured multiplier.
* [\_gasWithoutMultiplierBySelector(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_gaswithoutmultiplierbyselector-lcl1) - Provides base gas estimates for known external calls.
* [\_updateOwnerInBeneficiaryRegistry(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_updateownerinbeneficiaryregistry-lcl1) - Swaps the owner entry in the BeneficiaryRegistry.
* [\_transferTreasuryTokensToLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_transfertreasurytokenstolegacy-lcl1) - Moves ERC20 balances from guardians/holders into the CryptoLegacy contract.
* [\_transferTokensFromLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_transfertokensfromlegacy-lcl1) - Sends ERC20 tokens from the CryptoLegacy contract to specified recipients.
* [\_addressToHash(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_addresstohash-lcl1) - Returns the keccak256 hash of an address.
* [\_addressWithSaltToHash(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_addresswithsalttohash-lcl1) - Hashes an address together with an additional salt.

### Events

* [PauseSet](https://docs.cryptolegacy.app/documentation/events-reference#pauseset-icl1)
* [FeePaidByLifetime](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbylifetime-icl1)
* [FeePaidByDefault](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbydefault-icl1)
* [FeePaidByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbytransfer-icl1)
* [FeeSentToRefByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#feesenttorefbytransfer-icl1)
* [TransferTreasuryTokensToLegacy](https://docs.cryptolegacy.app/documentation/events-reference#transfertreasurytokenstolegacy-icl1)
* [TransferTokensFromLegacy](https://docs.cryptolegacy.app/documentation/events-reference#transfertokensfromlegacy-icl1)
* [SkipSendFeeByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#skipsendfeebytransfer-icl1)
* [IsLifetimeNftLockedAndUpdateCatch](https://docs.cryptolegacy.app/documentation/events-reference#islifetimenftlockedandupdatecatch-icl1)
* [GetUpdateFeeCatch](https://docs.cryptolegacy.app/documentation/events-reference#getupdatefeecatch-icl1)
* [PayFeeCatch](https://docs.cryptolegacy.app/documentation/events-reference#payfeecatch-icl1)
* [SetCryptoLegacyOwnerCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyownercatch-icl1)
* [SetCryptoLegacyBeneficiaryCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacybeneficiarycatch-icl1)
* [SetCryptoLegacyGuardianCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyguardiancatch-icl1)
* [SetCryptoLegacyRecoveryAddressesCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyrecoveryaddressescatch-icl1)
* [BeneficiaryRegistryCatch](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryregistrycatch-icl1)
* [BeneficiaryRegistryNotDefined](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryregistrynotdefined-icl1)

### Errors

* [BeneficiaryNotExist](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiarynotexist-icl1)
* [ChallengePeriodStarted](https://docs.cryptolegacy.app/documentation/errors-reference#challengeperiodstarted-icl1)
* [DisabledFunc](https://docs.cryptolegacy.app/documentation/errors-reference#disabledfunc-icl1)
* [DistributionStarted](https://docs.cryptolegacy.app/documentation/errors-reference#distributionstarted-icl1)
* [IncorrectFee](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfee-icl1)
* [IncorrectRefShare](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectrefshare-icl1)
* [InitialFeeNotPaid](https://docs.cryptolegacy.app/documentation/errors-reference#initialfeenotpaid-icl1)
* [NoValueAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#novalueallowed-icl1)
* [NotOwnerOfCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#notownerofcryptolegacy-iclbm1)
* [NotRegisteredCryptoLegacy](https://docs.cryptolegacy.app/documentation/errors-reference#notregisteredcryptolegacy-iclbm1)
* [NotTheBeneficiary](https://docs.cryptolegacy.app/documentation/errors-reference#notthebeneficiary-icl1)
* [NotTheOwner](https://docs.cryptolegacy.app/documentation/errors-reference#nottheowner-icl1)
* [Pause](https://docs.cryptolegacy.app/documentation/errors-reference#pause-icl1)
* [TooEarly](https://docs.cryptolegacy.app/documentation/errors-reference#tooearly-icl1)
* [TooLongArray](https://docs.cryptolegacy.app/documentation/errors-reference#toolongarray-icl1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-icl1)

### Access / Roles

None.

### Interacts With

* `ArbSys`
* `IBeneficiaryRegistry`
* `ICryptoLegacy`
* `ICryptoLegacyBuildManager`
* `ILockChainGate`
* `LibDiamond`

### Missing Links

None.

## LibCryptoLegacyDeploy (Library)

### Purpose

LibCryptoLegacyDeploy encapsulates deployment helpers and deterministic-salt derivation for protocol-instance creation paths.

### Inheritance

None.

### Key Methods

* [\_deployByCreate3(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_deploybycreate3-lcld1) - Deterministically deploys a contract via CREATE3 and records the deployment event.
* [\_getContractOwnerSalt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getcontractownersalt-lcld1) - Derives an owner-specific salt for CREATE3 deployments.
* [\_computeAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_computeaddress-lcld1) - Predicts the deterministic CREATE3 deployment address.

### All Functions

* [\_deployByCreate3(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_deploybycreate3-lcld1) - Deterministically deploys a contract via CREATE3 and records the deployment event.
* [\_getContractOwnerSalt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getcontractownersalt-lcld1) - Derives an owner-specific salt for CREATE3 deployments.
* [\_computeAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_computeaddress-lcld1) - Predicts the deterministic CREATE3 deployment address.

### Events

* [CryptoLegacyCreation](https://docs.cryptolegacy.app/documentation/events-reference#cryptolegacycreation-lcld1)

### Errors

* [BytecodeEmpty](https://docs.cryptolegacy.app/documentation/errors-reference#bytecodeempty-lcld1)
* [AddressMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#addressmismatch-lcld1)
* [Create3Failed](https://docs.cryptolegacy.app/documentation/errors-reference#create3failed-lcld1)

### Access / Roles

None.

### Interacts With

* `LibCreate3`

### Missing Links

None.

## LibCryptoLegacyPlugins (Library)

### Purpose

LibCryptoLegacyPlugins provides plugin validation, selector registration, and plugin lifecycle helpers.

### Inheritance

None.

### Key Methods

* [\_validatePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_validateplugin-lclp1) - Ensures a plugin address is approved by the build manager.
* [\_addPluginList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_addpluginlist-lclp1) - Wires a batch of plugins into the diamond.
* [\_removePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_removeplugin-lclp1) - Removes a plugin’s selectors from the diamond.
* [\_getFacetAddressPosition(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getfacetaddressposition-lclp1) - Locates a facet’s index within diamond storage.
* [\_addFacetAddressIfNotExists(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_addfacetaddressifnotexists-lclp1) - Appends a new facet address to storage when necessary.
* [\_removeFacetAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_removefacetaddress-lclp1) - Removes a facet address from storage using swap-and-pop.
* [addFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addfunctions-lclp1) - Registers selectors from a facet in diamond storage.
* [removeFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removefunctions-lclp1) - Unregisters selectors associated with a facet.

### All Functions

* [\_validatePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_validateplugin-lclp1) - Ensures a plugin address is approved by the build manager.
* [\_addPluginList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_addpluginlist-lclp1) - Wires a batch of plugins into the diamond.
* [\_removePlugin(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_removeplugin-lclp1) - Removes a plugin’s selectors from the diamond.
* [\_getFacetAddressPosition(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getfacetaddressposition-lclp1) - Locates a facet’s index within diamond storage.
* [\_addFacetAddressIfNotExists(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_addfacetaddressifnotexists-lclp1) - Appends a new facet address to storage when necessary.
* [\_removeFacetAddress(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_removefacetaddress-lclp1) - Removes a facet address from storage using swap-and-pop.
* [addFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addfunctions-lclp1) - Registers selectors from a facet in diamond storage.
* [removeFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removefunctions-lclp1) - Unregisters selectors associated with a facet.
* [\_findFacetBySelector(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_findfacetbyselector-lclp1) - Searches installed plugins for a selector match.

### Events

* [AddFunctions](https://docs.cryptolegacy.app/documentation/events-reference#addfunctions-icl1)
* [RemoveFunctions](https://docs.cryptolegacy.app/documentation/events-reference#removefunctions-icl1)

### Errors

* [CantAddFunctionThatAlreadyExists](https://docs.cryptolegacy.app/documentation/errors-reference#cantaddfunctionthatalreadyexists-icl1)
* [CantRemoveImmutableFunctions](https://docs.cryptolegacy.app/documentation/errors-reference#cantremoveimmutablefunctions-icl1)
* [FacetCantBeZero](https://docs.cryptolegacy.app/documentation/errors-reference#facetcantbezero-icl1)
* [FacetNotFound](https://docs.cryptolegacy.app/documentation/errors-reference#facetnotfound-icl1)
* [PluginNotRegistered](https://docs.cryptolegacy.app/documentation/errors-reference#pluginnotregistered-icl1)

### Access / Roles

None.

### Interacts With

* `ICryptoLegacy`
* `ICryptoLegacyPlugin`
* `LibDiamond`

### Missing Links

None.

## LibDiamond (Library)

### Purpose

LibDiamond centralizes EIP-2535 storage layout and facet-cut execution helpers.

### Inheritance

None.

### Key Methods

* [diamondStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#diamondstorage-ld1) - Returns the Diamond storage struct anchored at the EIP-2535 slot.
* [setContractOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcontractowner-ld1) - Updates the diamond owner and emits the ownership transfer event.
* [contractOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#contractowner-ld1) - Reads the current diamond owner from storage.
* [enforceIsContractOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#enforceiscontractowner-ld1) - Reverts unless the caller is the diamond owner.
* [diamondCut(...)](https://docs.cryptolegacy.app/documentation/functions-reference#diamondcut-ld1) - Applies a batch of facet modifications and optionally executes initialization logic.
* [addFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addfunctions-ld1) - Adds new selectors for a facet during a diamond cut.
* [replaceFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#replacefunctions-ld1) - Swaps existing selectors to point at a new facet implementation.
* [removeFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removefunctions-ld1) - Removes selectors from the diamond’s routing table.

### All Functions

* [diamondStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#diamondstorage-ld1) - Returns the Diamond storage struct anchored at the EIP-2535 slot.
* [setContractOwner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setcontractowner-ld1) - Updates the diamond owner and emits the ownership transfer event.
* [contractOwner()](https://docs.cryptolegacy.app/documentation/functions-reference#contractowner-ld1) - Reads the current diamond owner from storage.
* [enforceIsContractOwner()](https://docs.cryptolegacy.app/documentation/functions-reference#enforceiscontractowner-ld1) - Reverts unless the caller is the diamond owner.
* [diamondCut(...)](https://docs.cryptolegacy.app/documentation/functions-reference#diamondcut-ld1) - Applies a batch of facet modifications and optionally executes initialization logic.
* [addFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addfunctions-ld1) - Adds new selectors for a facet during a diamond cut.
* [replaceFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#replacefunctions-ld1) - Swaps existing selectors to point at a new facet implementation.
* [removeFunctions(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removefunctions-ld1) - Removes selectors from the diamond’s routing table.
* [addFacet(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addfacet-ld1) - Registers a facet address in diamond storage.
* [addFunction(...)](https://docs.cryptolegacy.app/documentation/functions-reference#addfunction-ld1) - Records a selector → facet mapping within diamond storage.
* [removeFunction(...)](https://docs.cryptolegacy.app/documentation/functions-reference#removefunction-ld1) - Deletes a selector mapping and tidies facet metadata.
* [initializeDiamondCut(...)](https://docs.cryptolegacy.app/documentation/functions-reference#initializediamondcut-ld1) - Runs optional initialization logic after a diamond cut.
* [enforceHasContractCode(...)](https://docs.cryptolegacy.app/documentation/functions-reference#enforcehascontractcode-ld1) - Asserts that a target address contains contract bytecode.

### Events

* [OwnershipTransferred](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferred-ld1)
* [DiamondCut](https://docs.cryptolegacy.app/documentation/events-reference#diamondcut-ld1)

### Errors

* [InitializationFunctionReverted](https://docs.cryptolegacy.app/documentation/errors-reference#initializationfunctionreverted-ld1)

### Access / Roles

None.

### Interacts With

* `IDiamondCut`

### Missing Links

None.

## LibSafeMinimalBeneficiaryMultisig (Library)

### Purpose

LibSafeMinimalBeneficiaryMultisig provides beneficiary-oriented multisig validation and proposal-state helpers.

### Inheritance

None.

### Key Methods

* [\_checkIsMultisigExecutor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkismultisigexecutor-lsmb1) - Verifies that the caller is the multisig executor (the contract itself).
* [\_initializationStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_initializationstatus-lsmb1) - Reports whether multisig storage has been fully initialised.
* [\_getVotersAndConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getvotersandconfirmations-lsmb1) - Returns the beneficiary voter list and active confirmation threshold.
* [\_getProposalListWithStatuses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getproposallistwithstatuses-lsmb1) - Builds a list of all multisig proposals along with confirmation metadata.
* [\_getProposalWithStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getproposalwithstatus-lsmb1) - Returns a single proposal enriched with confirmation flags and derived metadata.
* [\_getRequiredConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getrequiredconfirmations-lsmb1) - Derives the confirmation threshold, applying defaults and clamping.
* [\_getVoters(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getvoters-lsmb1) - Retrieves the current beneficiary voter identifiers.
* [\_getDefaultRequiredConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getdefaultrequiredconfirmations-lsmb1) - Computes the default confirmation threshold for the current beneficiary set.

### All Functions

* [\_checkIsMultisigExecutor()](https://docs.cryptolegacy.app/documentation/functions-reference#_checkismultisigexecutor-lsmb1) - Verifies that the caller is the multisig executor (the contract itself).
* [\_initializationStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_initializationstatus-lsmb1) - Reports whether multisig storage has been fully initialised.
* [\_getVotersAndConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getvotersandconfirmations-lsmb1) - Returns the beneficiary voter list and active confirmation threshold.
* [\_getProposalListWithStatuses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getproposallistwithstatuses-lsmb1) - Builds a list of all multisig proposals along with confirmation metadata.
* [\_getProposalWithStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getproposalwithstatus-lsmb1) - Returns a single proposal enriched with confirmation flags and derived metadata.
* [\_getRequiredConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getrequiredconfirmations-lsmb1) - Derives the confirmation threshold, applying defaults and clamping.
* [\_getVoters(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getvoters-lsmb1) - Retrieves the current beneficiary voter identifiers.
* [\_getDefaultRequiredConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getdefaultrequiredconfirmations-lsmb1) - Computes the default confirmation threshold for the current beneficiary set.
* [\_setConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setconfirmations-lsmb1) - Persists an explicit confirmation threshold for the current voter set.
* [\_initializeIfNot(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_initializeifnot-lsmb1) - Lazily initialises multisig settings when first needed.
* [\_propose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_propose-lsmb1) - Creates a multisig proposal on behalf of the caller.
* [\_confirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_confirm-lsmb1) - Records a beneficiary confirmation for a proposal.
* [\_cancel(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_cancel-lsmb1) - Allows a voter to withdraw their confirmation (and potentially cancel the proposal).
* [\_withdrawHeldEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_withdrawheldeth-lsmb1) - Transfers accumulated ETH credits for a voter to a recipient.

### Events

* [SetConfirmations](https://docs.cryptolegacy.app/documentation/events-reference#setconfirmations-ism1)

### Errors

* [MultisigIncorrectRequiredConfirmations](https://docs.cryptolegacy.app/documentation/errors-reference#multisigincorrectrequiredconfirmations-ism1)

### Access / Roles

None.

### Interacts With

* `ICryptoLegacy`
* `ISafeMinimalMultisig`
* `LibCryptoLegacy`
* `LibSafeMinimalMultisig`

### Missing Links

None.

## LibSafeMinimalMultisig (Library)

### Purpose

LibSafeMinimalMultisig provides generic proposal, signature, and quorum helpers for minimal multisig flows.

### Inheritance

None.

### Key Methods

* [\_checkIsMultisigExecutor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkismultisigexecutor-lsm1) - Rejects calls from anything other than the multisig executor contract.
* [\_checkIsSenderAllowed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkissenderallowed-lsm1) - Authenticates the caller against the allowed voter list.
* [\_setVotersAndConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setvotersandconfirmations-lsm1) - Stores the authoritative voter list and quorum threshold.
* [\_initializationStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_initializationstatus-lsm1) - Indicates whether multisig storage has been initialised.
* [\_calcDefaultConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_calcdefaultconfirmations-lsm1) - Computes a majority quorum for a given voter count.
* [\_isMethodAllowed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_ismethodallowed-lsm1) - Checks whether a selector is permitted for multisig execution.
* [\_isVoterAllowed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_isvoterallowed-lsm1) - Determines whether a voter hash exists in the authorised set.
* [\_getConfirmedCount(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getconfirmedcount-lsm1) - Counts confirmations recorded for a proposal.

### All Functions

* [\_checkIsMultisigExecutor()](https://docs.cryptolegacy.app/documentation/functions-reference#_checkismultisigexecutor-lsm1) - Rejects calls from anything other than the multisig executor contract.
* [\_checkIsSenderAllowed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkissenderallowed-lsm1) - Authenticates the caller against the allowed voter list.
* [\_setVotersAndConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setvotersandconfirmations-lsm1) - Stores the authoritative voter list and quorum threshold.
* [\_initializationStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_initializationstatus-lsm1) - Indicates whether multisig storage has been initialised.
* [\_calcDefaultConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_calcdefaultconfirmations-lsm1) - Computes a majority quorum for a given voter count.
* [\_isMethodAllowed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_ismethodallowed-lsm1) - Checks whether a selector is permitted for multisig execution.
* [\_isVoterAllowed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_isvoterallowed-lsm1) - Determines whether a voter hash exists in the authorised set.
* [\_getConfirmedCount(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getconfirmedcount-lsm1) - Counts confirmations recorded for a proposal.
* [\_getProposalListWithStatusesAndStorageVoters(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getproposallistwithstatusesandstoragevoters-lsm1) - Returns every proposal alongside stored voter metadata.
* [\_getProposalWithStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getproposalwithstatus-lsm1) - Derives a proposal’s confirmation status relative to a voter set.
* [\_propose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_propose-lsm1) - Creates a proposal and records the proposer’s confirmation.
* [\_getPendingProposalForVoter(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getpendingproposalforvoter-lsm1) - Fetches a proposal and authenticated voter, ensuring it is still pending.
* [\_cancel(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_cancel-lsm1) - Removes a voter’s confirmation and cancels the proposal if no approvals remain.
* [\_confirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_confirm-lsm1) - Records a voter’s confirmation and executes the proposal upon quorum.
* [\_execute(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_execute-lsm1) - Performs the proposal’s target call once quorum is achieved.
* [\_updateHeldEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_updateheldeth-lsm1) - Credits any leftover ETH from proposal execution to a voter.
* [\_withdrawHeldEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_withdrawheldeth-lsm1) - Withdraws a voter’s accumulated ETH balance to a recipient.

### Events

* [CreateSafeMinimalMultisigProposal](https://docs.cryptolegacy.app/documentation/events-reference#createsafeminimalmultisigproposal-ism1)
* [CancelSafeMinimalMultisigProposal](https://docs.cryptolegacy.app/documentation/events-reference#cancelsafeminimalmultisigproposal-ism1)
* [ConfirmSafeMinimalMultisigProposal](https://docs.cryptolegacy.app/documentation/events-reference#confirmsafeminimalmultisigproposal-ism1)
* [ExecuteSafeMinimalMultisigProposal](https://docs.cryptolegacy.app/documentation/events-reference#executesafeminimalmultisigproposal-ism1)
* [SetVotersAndConfirmations](https://docs.cryptolegacy.app/documentation/events-reference#setvotersandconfirmations-ism1)
* [AddHeldEth](https://docs.cryptolegacy.app/documentation/events-reference#addheldeth-ism1)
* [WithdrawHeldEth](https://docs.cryptolegacy.app/documentation/events-reference#withdrawheldeth-ism1)

### Errors

* [MultisigExecutionFailed](https://docs.cryptolegacy.app/documentation/errors-reference#multisigexecutionfailed-ism1)
* [MultisigIncorrectRequiredConfirmations](https://docs.cryptolegacy.app/documentation/errors-reference#multisigincorrectrequiredconfirmations-ism1)
* [MultisigMethodNotAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#multisigmethodnotallowed-ism1)
* [MultisigNotConfirmed](https://docs.cryptolegacy.app/documentation/errors-reference#multisignotconfirmed-ism1)
* [MultisigNothingToWithdraw](https://docs.cryptolegacy.app/documentation/errors-reference#multisignothingtowithdraw-ism1)
* [MultisigOnlyExecutor](https://docs.cryptolegacy.app/documentation/errors-reference#multisigonlyexecutor-ism1)
* [MultisigProposalNotPending](https://docs.cryptolegacy.app/documentation/errors-reference#multisigproposalnotpending-ism1)
* [MultisigVoterNotAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#multisigvoternotallowed-ism1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-ism1)

### Access / Roles

None.

### Interacts With

* `ISafeMinimalMultisig`
* `LibCryptoLegacy`

### Missing Links

None.

## LibTrustedGuardiansPlugin (Library)

### Purpose

LibTrustedGuardiansPlugin provides storage and vote-state helpers for guardian-based plugin logic.

### Inheritance

None.

### Key Methods

* [getPluginStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginstorage-ltgp1) - Provides typed storage access for the Trusted Guardians plugin.
* [\_resetGuardianVoting(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_resetguardianvoting-ltgp1) - Clears guardian voting state and resets the distribution schedule.

### All Functions

* [getPluginStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginstorage-ltgp1) - Provides typed storage access for the Trusted Guardians plugin.
* [\_resetGuardianVoting(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_resetguardianvoting-ltgp1) - Clears guardian voting state and resets the distribution schedule.

### Events

* [ResetGuardiansVoting](https://docs.cryptolegacy.app/documentation/events-reference#resetguardiansvoting-itgp1)

### Errors

None.

### Access / Roles

None.

### Interacts With

* `ICryptoLegacy`
* `ITrustedGuardiansPlugin`
* `LibCryptoLegacy`
* `LibDiamond`

### Missing Links

None.

## BeneficiaryAaveV3SupplyPlugin

### Purpose

BeneficiaryAaveV3SupplyPlugin routes beneficiary-approved Aave V3 supply, withdrawal, and Stata-token conversion flows through the plugin multisig.

### Inheritance

* `ICryptoLegacyPlugin`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [baavesSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavessetmultisigconfig-balp1) - Updates the beneficiary multisig confirmation threshold for the plugin.
* [baavesSupply(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavessupply-balp1) - Supplies a reserve asset into Aave V3 and migrates beneficiary claims into the corresponding aToken.
* [baavesWithdraw(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baaveswithdraw-balp1) - Withdraws a reserve asset from Aave V3 and migrates beneficiary claims from the aToken back into the reserve asset.
* [baavesWrapATokenToStataToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baaveswrapatokentostatatoken-balp1) - Wraps rebasing aTokens into non-rebasing StataToken shares.
* [baavesRedeemFromStataToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesredeemfromstatatoken-balp1) - Redeems StataToken shares directly into the reserve asset in one step.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-balp1) - Stores the Aave V3 and StataToken integration addresses used by the beneficiary plugin.
* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-balp1) - Returns the selectors exposed by the Aave beneficiary plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-balp1) - Returns the setup-time selectors required by the Aave beneficiary plugin.
* [getMultisigAllowedMethods(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmultisigallowedmethods-balp1) - Lists selectors that beneficiary multisig proposals are allowed to execute.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-balp1) - Returns the unique plugin name string.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-balp1) - Returns the semantic version for the Aave beneficiary plugin.
* [modifier onlyDistributionReady](https://docs.cryptolegacy.app/documentation/functions-reference#modifier-onlydistributionready-balp1) - Restricts execution to phases where beneficiary distribution is already active.
* [getPluginMultisigStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginmultisigstorage-balp1) - Retrieves the plugin-specific multisig storage slot.
* [baavesSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavessetmultisigconfig-balp1) - Updates the beneficiary multisig confirmation threshold for the plugin.
* [baavesPropose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavespropose-balp1) - Creates a multisig proposal for an allowed Aave beneficiary action.
* [baavesConfirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesconfirm-balp1) - Confirms an existing plugin proposal and executes it once quorum is reached.
* [baavesCancel(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavescancel-balp1) - Removes the caller's confirmation from a pending plugin proposal.
* [baavesGetInitializationStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesgetinitializationstatus-balp1) - Reports whether the plugin's multisig configuration has been initialized.
* [baavesGetVotersAndConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesgetvotersandconfirmations-balp1) - Returns the beneficiary voter list and current confirmation threshold.
* [baavesGetProposalWithStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesgetproposalwithstatus-balp1) - Returns a single multisig proposal together with its derived execution status.
* [baavesGetProposalListWithStatuses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesgetproposallistwithstatuses-balp1) - Returns the full plugin proposal list with derived statuses.
* [baavesSupply(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavessupply-balp1) - Supplies a reserve asset into Aave V3 and migrates beneficiary claims into the corresponding aToken.
* [baavesWithdraw(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baaveswithdraw-balp1) - Withdraws a reserve asset from Aave V3 and migrates beneficiary claims from the aToken back into the reserve asset.
* [baavesWrapATokenToStataToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baaveswrapatokentostatatoken-balp1) - Wraps rebasing aTokens into non-rebasing StataToken shares.
* [baavesUnwrapStataTokenToAToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesunwrapstatatokentoatoken-balp1) - Redeems StataToken shares back into rebasing aTokens.
* [baavesDepositToStataToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesdeposittostatatoken-balp1) - Deposits a reserve asset directly into its StataToken wrapper in one step.
* [baavesRedeemFromStataToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baavesredeemfromstatatoken-balp1) - Redeems StataToken shares directly into the reserve asset in one step.
* [\_getAToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getatoken-balp1) - Resolves the aToken address for a given reserve asset.
* [\_getStataToken(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getstatatoken-balp1) - Resolves the StataToken wrapper address for a given reserve asset.

### Events

* [AaveSupply](https://docs.cryptolegacy.app/documentation/events-reference#aavesupply-balp1)
* [AaveWithdraw](https://docs.cryptolegacy.app/documentation/events-reference#aavewithdraw-balp1)
* [WrapATokenToStataToken](https://docs.cryptolegacy.app/documentation/events-reference#wrapatokentostatatoken-balp1)
* [UnwrapStataTokenToAToken](https://docs.cryptolegacy.app/documentation/events-reference#unwrapstatatokentoatoken-balp1)
* [DepositToStataToken](https://docs.cryptolegacy.app/documentation/events-reference#deposittostatatoken-balp1)
* [RedeemFromStataToken](https://docs.cryptolegacy.app/documentation/events-reference#redeemfromstatatoken-balp1)

### Errors

* [ZeroAmount](https://docs.cryptolegacy.app/documentation/errors-reference#zeroamount-balp1)
* [ATokenNotFound](https://docs.cryptolegacy.app/documentation/errors-reference#atokennotfound-balp1)
* [StataTokenNotFound](https://docs.cryptolegacy.app/documentation/errors-reference#statatokennotfound-balp1)

### Access / Roles

* `baaves*` state-changing execution methods require `onlyDistributionReady`; proposal lifecycle also enforces beneficiary multisig confirmation rules.

### Interacts With

* `IAaveV3Pool`
* `IAaveV3PoolDataProvider`
* `IStataToken`
* `IStataTokenFactory`
* `ISafeMinimalMultisig`
* `LibCryptoLegacy`
* `LibSafeMinimalBeneficiaryMultisig`

### Missing Links

None.

## BeneficiaryLidoStakingPlugin

### Purpose

BeneficiaryLidoStakingPlugin gates beneficiary-approved Lido staking, wrapping, withdrawal-request, and migration flows behind the plugin multisig.

### Inheritance

* `ICryptoLegacyPlugin`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [blsSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blssetmultisigconfig-blsp1) - Updates the beneficiary multisig confirmation threshold for the Lido plugin.
* [blsLidoStakeWethToStEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidostakewethtosteth-blsp1) - Unwraps WETH and stakes the resulting ETH into Lido, minting stETH.
* [blsLidoRequestStEthWithdrawal(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidorequeststethwithdrawal-blsp1) - Requests stETH withdrawals from the Lido withdrawal queue and starts a pending migration to WETH.
* [blsLidoClaimWithdrawals(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidoclaimwithdrawals-blsp1) - Claims finalized Lido withdrawals, wraps the received ETH into WETH, and completes the pending migration.
* [blsLidoAbandonMigration(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidoabandonmigration-blsp1) - Abandons the active Lido two-step migration and restores claim state.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-blsp1) - Stores the helper contract used to unwrap WETH into native ETH for the Lido flows.
* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-blsp1) - Returns the selectors exposed by the Lido beneficiary plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-blsp1) - Returns the setup-time selectors required by the Lido beneficiary plugin.
* [getMultisigAllowedMethods(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmultisigallowedmethods-blsp1) - Lists selectors that beneficiary multisig proposals are allowed to execute.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-blsp1) - Returns the unique plugin name string.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-blsp1) - Returns the semantic version for the Lido beneficiary plugin.
* [modifier onlyDistributionReady](https://docs.cryptolegacy.app/documentation/functions-reference#modifier-onlydistributionready-blsp1) - Restricts execution to phases where beneficiary distribution is already active.
* [getPluginMultisigStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginmultisigstorage-blsp1) - Retrieves the plugin-specific multisig storage slot.
* [getPendingMigrationStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpendingmigrationstorage-blsp1) - Retrieves the plugin-local storage slot that holds the active two-step migration state.
* [getLidoWithdrawalStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getlidowithdrawalstorage-blsp1) - Retrieves the plugin-local storage slot that caches pending Lido withdrawal request IDs.
* [getBeneficiarySwitchGuardStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getbeneficiaryswitchguardstorage-blsp1) - Retrieves the plugin-local guard storage that freezes beneficiary switching while migration is pending.
* [blsSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blssetmultisigconfig-blsp1) - Updates the beneficiary multisig confirmation threshold for the Lido plugin.
* [blsPropose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blspropose-blsp1) - Creates a multisig proposal for an allowed Lido beneficiary action.
* [blsConfirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blsconfirm-blsp1) - Confirms an existing Lido plugin proposal and executes it once quorum is reached.
* [blsCancel(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blscancel-blsp1) - Removes the caller's confirmation from a pending Lido multisig proposal.
* [blsGetInitializationStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blsgetinitializationstatus-blsp1) - Reports whether the plugin multisig configuration has been initialized.
* [blsGetVotersAndConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blsgetvotersandconfirmations-blsp1) - Returns the current multisig voter list and confirmation threshold for the Lido plugin.
* [blsGetProposalWithStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blsgetproposalwithstatus-blsp1) - Fetches a single proposal and its per-voter confirmation flags.
* [blsGetProposalListWithStatuses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blsgetproposallistwithstatuses-blsp1) - Returns all plugin proposals with confirmation metadata.
* [blsLidoGetPendingRequestIds(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidogetpendingrequestids-blsp1) - Returns the currently cached Lido withdrawal request IDs used by the fair-claim path.
* [blsLidoGetPendingMigration(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidogetpendingmigration-blsp1) - Returns the details of the currently pending two-step migration.
* [blsLidoStakeWethToStEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidostakewethtosteth-blsp1) - Unwraps WETH and stakes the resulting ETH into Lido, minting stETH.
* [blsLidoWrapWethToWstEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidowrapwethtowsteth-blsp1) - Unwraps WETH and wraps the resulting ETH directly into wstETH.
* [blsLidoRequestStEthWithdrawal(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidorequeststethwithdrawal-blsp1) - Requests stETH withdrawals from the Lido withdrawal queue and starts a pending migration to WETH.
* [blsLidoRequestWstEthWithdrawal(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidorequestwstethwithdrawal-blsp1) - Requests wstETH withdrawals from the Lido withdrawal queue and starts a pending migration to WETH.
* [blsLidoClaimWithdrawals(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidoclaimwithdrawals-blsp1) - Claims finalized Lido withdrawals, wraps the received ETH into WETH, and completes the pending migration.
* [blsLidoUnsafeClaimWithdrawals(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidounsafeclaimwithdrawals-blsp1) - Claims finalized Lido withdrawals without completing claim-migration reconciliation.
* [blsLidoAbandonMigration(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidoabandonmigration-blsp1) - Abandons the active Lido two-step migration and restores claim state.
* [blsLidoWrapStEthToWstEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidowrapstethtowsteth-blsp1) - Wraps rebasing stETH into non-rebasing wstETH and migrates claim accounting in one step.
* [blsLidoUnwrapWstEthToStEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#blslidounwrapwstethtosteth-blsp1) - Unwraps wstETH into stETH and migrates claim accounting in one step.
* [\_storeLidoRequestIds(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_storelidorequestids-blsp1) - Replaces the cached pending-request list with the request IDs returned by Lido.
* [\_activateBeneficiarySwitchGuard(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_activatebeneficiaryswitchguard-blsp1) - Freezes beneficiary switching while a delayed migration is pending.
* [\_releaseBeneficiarySwitchGuard(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_releasebeneficiaryswitchguard-blsp1) - Restores beneficiary-switch timelocks and clears the migration guard snapshot.
* [\_setTokenBeneficiaryClaimsToZero(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_settokenbeneficiaryclaimstozero-blsp1) - Clears every beneficiary's claimed balance for a given token.

### Events

* [StakeWethToStEth](https://docs.cryptolegacy.app/documentation/events-reference#stakewethtosteth-blsp1)
* [WrapWethToWstEth](https://docs.cryptolegacy.app/documentation/events-reference#wrapwethtowsteth-blsp1)
* [RequestStEthWithdrawal](https://docs.cryptolegacy.app/documentation/events-reference#requeststethwithdrawal-blsp1)
* [RequestWstEthWithdrawal](https://docs.cryptolegacy.app/documentation/events-reference#requestwstethwithdrawal-blsp1)
* [ClaimWithdrawals](https://docs.cryptolegacy.app/documentation/events-reference#claimwithdrawals-blsp1)
* [UnsafeClaimWithdrawals](https://docs.cryptolegacy.app/documentation/events-reference#unsafeclaimwithdrawals-blsp1)
* [AbandonMigration](https://docs.cryptolegacy.app/documentation/events-reference#abandonmigration-blsp1)

### Errors

* [ZeroStEthAmount](https://docs.cryptolegacy.app/documentation/errors-reference#zerostethamount-blsp1)
* [ZeroWethAmount](https://docs.cryptolegacy.app/documentation/errors-reference#zerowethamount-blsp1)
* [ZeroWstEthAmount](https://docs.cryptolegacy.app/documentation/errors-reference#zerowstethamount-blsp1)
* [InsufficientStEth](https://docs.cryptolegacy.app/documentation/errors-reference#insufficientsteth-blsp1)
* [InsufficientWstEth](https://docs.cryptolegacy.app/documentation/errors-reference#insufficientwsteth-blsp1)
* [LidoRequestIdsEmpty](https://docs.cryptolegacy.app/documentation/errors-reference#lidorequestidsempty-blsp1)
* [WethUnwrapAmountMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#wethunwrapamountmismatch-blsp1)
* [WstEthWrapFailed](https://docs.cryptolegacy.app/documentation/errors-reference#wstethwrapfailed-blsp1)
* [EmptyWithdrawalAmounts](https://docs.cryptolegacy.app/documentation/errors-reference#emptywithdrawalamounts-blsp1)
* [PendingMigrationActive](https://docs.cryptolegacy.app/documentation/errors-reference#pendingmigrationactive-blsp1)
* [BeneficiarySwitchGuardAlreadyActive](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiaryswitchguardalreadyactive-blsp1)

### Access / Roles

* `bls*` state-changing execution methods require `onlyDistributionReady`; proposal lifecycle also enforces beneficiary multisig confirmation rules.

### Interacts With

* `ILido`
* `IWstETH`
* `ILidoWithdrawalQueue`
* `WethUnwrap`
* `ISafeMinimalMultisig`
* `LibCryptoLegacy`
* `LibSafeMinimalBeneficiaryMultisig`
* `LibTwoStepClaimMigration`

### Missing Links

None.

## BeneficiaryPluginAddRights

### Purpose

BeneficiaryPluginAddRights lets the beneficiary multisig approve and execute additional plugin-list installs for the CryptoLegacy diamond after distribution begins.

### Inheritance

* `ICryptoLegacyPlugin`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-bpar1) - Lists the external function selectors exposed by this plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-bpar1) - Reports setup-time selectors required by the plugin.
* [getMultisigAllowedMethods(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmultisigallowedmethods-bpar1) - Lists selectors that multisig proposals are permitted to execute.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-bpar1) - Returns the human-readable plugin identifier.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-bpar1) - Reports the semantic version number for the plugin.
* [barSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#barsetmultisigconfig-bpar1) - Updates multisig confirmation thresholds for beneficiary actions.
* [barPropose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#barpropose-bpar1) - Creates a multisig proposal for an allowed beneficiary action.
* [barConfirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#barconfirm-bpar1) - Confirms an existing multisig proposal and executes it once quorum is reached.

### All Functions

* [getSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-bpar1) - Lists the external function selectors exposed by this plugin.
* [getSetupSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-bpar1) - Reports setup-time selectors required by the plugin.
* [getMultisigAllowedMethods()](https://docs.cryptolegacy.app/documentation/functions-reference#getmultisigallowedmethods-bpar1) - Lists selectors that multisig proposals are permitted to execute.
* [getPluginName()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-bpar1) - Returns the human-readable plugin identifier.
* [getPluginVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-bpar1) - Reports the semantic version number for the plugin.
* [getPluginMultisigStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginmultisigstorage-bpar1) - Retrieves the plugin-specific multisig storage slot.
* [barSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#barsetmultisigconfig-bpar1) - Updates multisig confirmation thresholds for beneficiary actions.
* [barPropose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#barpropose-bpar1) - Creates a multisig proposal for an allowed beneficiary action.
* [barConfirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#barconfirm-bpar1) - Confirms an existing multisig proposal and executes it once quorum is reached.
* [barCancel(...)](https://docs.cryptolegacy.app/documentation/functions-reference#barcancel-bpar1) - Removes the caller’s confirmation from a pending multisig proposal.
* [barAddPluginList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#baraddpluginlist-bpar1) - Executes the approved plugin-addition proposal.
* [barWithdrawHeldEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#barwithdrawheldeth-bpar1) - Allows a voter to withdraw ETH accrued during proposal execution.
* [barGetHeldEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bargetheldeth-bpar1) - Returns the held ETH balance for a beneficiary voter.
* [barGetInitializationStatus()](https://docs.cryptolegacy.app/documentation/functions-reference#bargetinitializationstatus-bpar1) - Reports whether the multisig configuration has been initialized.
* [barGetVotersAndConfirmations()](https://docs.cryptolegacy.app/documentation/functions-reference#bargetvotersandconfirmations-bpar1) - Returns the current multisig voter list and confirmation threshold.
* [barGetProposalWithStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bargetproposalwithstatus-bpar1) - Fetches a single proposal and its per-voter confirmation flags.
* [barGetProposalListWithStatuses()](https://docs.cryptolegacy.app/documentation/functions-reference#bargetproposallistwithstatuses-bpar1) - Returns all multisig proposals with confirmation metadata.

### Events

None.

### Errors

None.

### Access / Roles

* `barSetMultisigConfig`: `owner` only, or `address(this)` when distribution is ready
* `barPropose`: `nonReentrant, onlyDistributionReady`
* `barConfirm`: `nonReentrant, onlyDistributionReady`
* `barCancel`: `nonReentrant, onlyDistributionReady`
* `barAddPluginList`: `onlyDistributionReady`
* `barWithdrawHeldEth`: `nonReentrant`

### Interacts With

* `ICryptoLegacy`
* `ISafeMinimalMultisig`
* `LibCryptoLegacy`
* `LibCryptoLegacyPlugins`
* `LibSafeMinimalBeneficiaryMultisig`

### Missing Links

None.

## BeneficiaryUniswapV4SwapPlugin

### Purpose

BeneficiaryUniswapV4SwapPlugin executes beneficiary-approved Uniswap V4 exact-input swaps through the plugin multisig and the Universal Router dispatcher.

### Inheritance

* `ICryptoLegacyPlugin`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [bunisSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunissetmultisigconfig-bu4sp1) - Updates the beneficiary multisig confirmation threshold for the swap plugin.
* [bunisSwapExactInputSingle(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisswapexactinputsingle-bu4sp1) - Executes a single-hop exact-input Uniswap V4 swap and migrates claims into the output token.
* [bunisSwapExactInput(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisswapexactinput-bu4sp1) - Executes a multi-hop exact-input Uniswap V4 swap and migrates claims into the final output token.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-bu4sp1) - Stores the Universal Router and Permit2 addresses used by the plugin.
* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-bu4sp1) - Returns the selectors exposed by the Uniswap V4 beneficiary plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-bu4sp1) - Returns setup-time selectors required by the Uniswap V4 beneficiary plugin.
* [getMultisigAllowedMethods(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmultisigallowedmethods-bu4sp1) - Lists selectors that beneficiary multisig proposals are allowed to execute.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-bu4sp1) - Returns the unique plugin name string.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-bu4sp1) - Returns the semantic version for the Uniswap V4 beneficiary plugin.
* [modifier onlyDistributionReady](https://docs.cryptolegacy.app/documentation/functions-reference#modifier-onlydistributionready-bu4sp1) - Restricts execution to phases where beneficiary distribution is already active.
* [getPluginMultisigStorage(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginmultisigstorage-bu4sp1) - Retrieves the plugin-specific multisig storage slot.
* [bunisSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunissetmultisigconfig-bu4sp1) - Updates the beneficiary multisig confirmation threshold for the swap plugin.
* [bunisPropose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunispropose-bu4sp1) - Creates a multisig proposal for an allowed Uniswap V4 beneficiary action.
* [bunisConfirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisconfirm-bu4sp1) - Confirms an existing plugin proposal and executes it once quorum is reached.
* [bunisCancel(...)](https://docs.cryptolegacy.app/documentation/functions-reference#buniscancel-bu4sp1) - Removes the caller's confirmation from a pending plugin proposal.
* [bunisGetInitializationStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisgetinitializationstatus-bu4sp1) - Reports whether the plugin's multisig configuration has been initialized.
* [bunisGetVotersAndConfirmations(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisgetvotersandconfirmations-bu4sp1) - Returns the beneficiary voter list and current confirmation threshold.
* [bunisGetProposalWithStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisgetproposalwithstatus-bu4sp1) - Returns a single multisig proposal together with its derived execution status.
* [bunisGetProposalListWithStatuses(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisgetproposallistwithstatuses-bu4sp1) - Returns the full plugin proposal list with derived statuses.
* [bunisSwapExactInputSingle(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisswapexactinputsingle-bu4sp1) - Executes a single-hop exact-input Uniswap V4 swap and migrates claims into the output token.
* [bunisSwapExactInput(...)](https://docs.cryptolegacy.app/documentation/functions-reference#bunisswapexactinput-bu4sp1) - Executes a multi-hop exact-input Uniswap V4 swap and migrates claims into the final output token.
* [\_executeExactInputSingleRouter(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_executeexactinputsinglerouter-bu4sp1) - Encodes and submits the single-hop exact-input swap command sequence to the Universal Router.
* [\_executeExactInputRouter(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_executeexactinputrouter-bu4sp1) - Encodes and submits the multi-hop exact-input swap command sequence to the Universal Router.

### Events

* [UniswapV4SwapExactInputSingle](https://docs.cryptolegacy.app/documentation/events-reference#uniswapv4swapexactinputsingle-bu4sp1)
* [UniswapV4SwapExactInput](https://docs.cryptolegacy.app/documentation/events-reference#uniswapv4swapexactinput-bu4sp1)

### Errors

* [ZeroAmount](https://docs.cryptolegacy.app/documentation/errors-reference#zeroamount-bu4sp1)
* [EmptyPath](https://docs.cryptolegacy.app/documentation/errors-reference#emptypath-bu4sp1)

### Access / Roles

* `bunis*` state-changing execution methods require `onlyDistributionReady`; proposal lifecycle also enforces beneficiary multisig confirmation rules.

### Interacts With

* `IPermit2`
* `IUniversalRouter`
* `ISafeMinimalMultisig`
* `LibCryptoLegacy`
* `LibSafeMinimalBeneficiaryMultisig`

### Missing Links

None.

## CryptoLegacyBasePlugin

### Purpose

CryptoLegacyBasePlugin implements core legacy distribution and claim workflows reused across protocol instances.

### Inheritance

* `ICryptoLegacy`
* `CryptoLegacyOwnable`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-clbp1) - Lists the primary external selectors exposed by the base plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-clbp1) - Lists view selectors needed during plugin setup.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-clbp1) - Returns the canonical plugin name.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-clbp1) - Returns the plugin’s semantic version.
* [getCryptoLegacyVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacyver-clbp1) - Returns the base CryptoLegacy protocol version.
* [initializeByBuildManager(...)](https://docs.cryptolegacy.app/documentation/functions-reference#initializebybuildmanager-clbp1) - Initializes core storage via the authorized build manager.
* [owner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#owner-clbp1) - Returns the current contract owner.
* [isPaused(...)](https://docs.cryptolegacy.app/documentation/functions-reference#ispaused-clbp1) - Returns whether the contract is currently paused.

### All Functions

* [getSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-clbp1) - Lists the primary external selectors exposed by the base plugin.
* [getSetupSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-clbp1) - Lists view selectors needed during plugin setup.
* [getPluginName()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-clbp1) - Returns the canonical plugin name.
* [getPluginVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-clbp1) - Returns the plugin’s semantic version.
* [getCryptoLegacyVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacyver-clbp1) - Returns the base CryptoLegacy protocol version.
* [constructor()](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-clbp1) - Empty constructor for upgradeable deployment pattern.
* [initializeByBuildManager(...)](https://docs.cryptolegacy.app/documentation/functions-reference#initializebybuildmanager-clbp1) - Initializes core storage via the authorized build manager.
* [owner()](https://docs.cryptolegacy.app/documentation/functions-reference#owner-clbp1) - Returns the current contract owner.
* [isPaused()](https://docs.cryptolegacy.app/documentation/functions-reference#ispaused-clbp1) - Returns whether the contract is currently paused.
* [buildManager()](https://docs.cryptolegacy.app/documentation/functions-reference#buildmanager-clbp1) - Returns the associated build manager contract.
* [transferOwnership(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transferownership-clbp1) - Begins the two-step ownership transfer process.
* [payInitialFee(...)](https://docs.cryptolegacy.app/documentation/functions-reference#payinitialfee-clbp1) - Pays the one-time initial fee and unpauses the contract.
* [setBeneficiaries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setbeneficiaries-clbp1) - Updates beneficiary list and configs under owner control.
* [\_setBeneficiaries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setbeneficiaries-clbp1) - Internal routine to add, update, or remove beneficiary records.
* [update(...)](https://docs.cryptolegacy.app/documentation/functions-reference#update-clbp1) - Periodic upkeep that charges update fees and resets the distribution timer.
* [setGasLimitMultiplier(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setgaslimitmultiplier-clbp1) - Adjusts the gas multiplier used for fee-related calls.
* [initiateChallenge()](https://docs.cryptolegacy.app/documentation/functions-reference#initiatechallenge-clbp1) - Starts the challenge window when upkeep is overdue.
* [transferTreasuryTokensToLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transfertreasurytokenstolegacy-clbp1) - Pulls treasury tokens from holders into the legacy contract for distribution.
* [\_claimTokenWithVesting(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_claimtokenwithvesting-clbp1) - Internal helper to distribute vested ERC20 tokens.
* [beneficiaryClaim(...)](https://docs.cryptolegacy.app/documentation/functions-reference#beneficiaryclaim-clbp1) - Enables a beneficiary to claim vested ERC20 tokens.
* [beneficiarySwitch(...)](https://docs.cryptolegacy.app/documentation/functions-reference#beneficiaryswitch-clbp1) - Allows a beneficiary to switch their identifier hash.
* [sendMessagesToBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#sendmessagestobeneficiary-clbp1) - Owner broadcast of off-chain messages to beneficiaries.
* [isLifetimeActive()](https://docs.cryptolegacy.app/documentation/functions-reference#islifetimeactive-clbp1) - Checks if the owner’s lifetime NFT is locked.
* [getGasBySelector(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getgasbyselector-clbp1) - Returns the stored gas hint for a selector.

### Events

* [SetBeneficiary](https://docs.cryptolegacy.app/documentation/events-reference#setbeneficiary-clbp1)
* [SwitchBeneficiary](https://docs.cryptolegacy.app/documentation/events-reference#switchbeneficiary-clbp1)
* [ChallengeInitiate](https://docs.cryptolegacy.app/documentation/events-reference#challengeinitiate-clbp1)
* [BeneficiaryMessage](https://docs.cryptolegacy.app/documentation/events-reference#beneficiarymessage-clbp1)
* [BeneficiaryMessageCheck](https://docs.cryptolegacy.app/documentation/events-reference#beneficiarymessagecheck-clbp1)
* [PauseSet](https://docs.cryptolegacy.app/documentation/events-reference#pauseset-icl1)
* [Update](https://docs.cryptolegacy.app/documentation/events-reference#update-icl1)
* [FeePaidByLifetime](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbylifetime-icl1)
* [FeePaidByDefault](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbydefault-icl1)
* [FeePaidByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#feepaidbytransfer-icl1)
* [FeeSentToRefByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#feesenttorefbytransfer-icl1)
* [BeneficiaryClaim](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryclaim-icl1)
* [BeneficiaryClaimAmountDecrease](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryclaimamountdecrease-icl1)
* [TransferTreasuryTokensToLegacy](https://docs.cryptolegacy.app/documentation/events-reference#transfertreasurytokenstolegacy-icl1)
* [TransferTokensFromLegacy](https://docs.cryptolegacy.app/documentation/events-reference#transfertokensfromlegacy-icl1)
* [SetGasLimitMultiplier](https://docs.cryptolegacy.app/documentation/events-reference#setgaslimitmultiplier-icl1)
* [AddFunctions](https://docs.cryptolegacy.app/documentation/events-reference#addfunctions-icl1)
* [RemoveFunctions](https://docs.cryptolegacy.app/documentation/events-reference#removefunctions-icl1)
* [SkipSendFeeByTransfer](https://docs.cryptolegacy.app/documentation/events-reference#skipsendfeebytransfer-icl1)
* [IsLifetimeNftLockedAndUpdateCatch](https://docs.cryptolegacy.app/documentation/events-reference#islifetimenftlockedandupdatecatch-icl1)
* [GetUpdateFeeCatch](https://docs.cryptolegacy.app/documentation/events-reference#getupdatefeecatch-icl1)
* [PayFeeCatch](https://docs.cryptolegacy.app/documentation/events-reference#payfeecatch-icl1)
* [SetCryptoLegacyOwnerCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyownercatch-icl1)
* [SetCryptoLegacyBeneficiaryCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacybeneficiarycatch-icl1)
* [SetCryptoLegacyGuardianCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyguardiancatch-icl1)
* [SetCryptoLegacyRecoveryAddressesCatch](https://docs.cryptolegacy.app/documentation/events-reference#setcryptolegacyrecoveryaddressescatch-icl1)
* [BeneficiaryRegistryCatch](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryregistrycatch-icl1)
* [BeneficiaryRegistryNotDefined](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryregistrynotdefined-icl1)
* [OwnershipTransferStarted](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferstarted-iclo1)
* [OwnershipTransferred](https://docs.cryptolegacy.app/documentation/events-reference#ownershiptransferred-iclo1)

### Errors

* [BeneficiarySwitchTimelock](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiaryswitchtimelock-icl1)
* [ArrayLengthMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#arraylengthmismatch-icl1)
* [DisabledFunc](https://docs.cryptolegacy.app/documentation/errors-reference#disabledfunc-icl1)
* [NotTheOwner](https://docs.cryptolegacy.app/documentation/errors-reference#nottheowner-icl1)
* [NotTheBeneficiary](https://docs.cryptolegacy.app/documentation/errors-reference#notthebeneficiary-icl1)
* [BeneficiaryNotExist](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiarynotexist-icl1)
* [TooEarly](https://docs.cryptolegacy.app/documentation/errors-reference#tooearly-icl1)
* [IncorrectRefShare](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectrefshare-icl1)
* [NoValueAllowed](https://docs.cryptolegacy.app/documentation/errors-reference#novalueallowed-icl1)
* [TooLongArray](https://docs.cryptolegacy.app/documentation/errors-reference#toolongarray-icl1)
* [IncorrectFee](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfee-icl1)
* [ZeroAddress](https://docs.cryptolegacy.app/documentation/errors-reference#zeroaddress-icl1)
* [ZeroTokens](https://docs.cryptolegacy.app/documentation/errors-reference#zerotokens-icl1)
* [InitialFeeNotPaid](https://docs.cryptolegacy.app/documentation/errors-reference#initialfeenotpaid-icl1)
* [InitialFeeAlreadyPaid](https://docs.cryptolegacy.app/documentation/errors-reference#initialfeealreadypaid-icl1)
* [NotBuildManager](https://docs.cryptolegacy.app/documentation/errors-reference#notbuildmanager-icl1)
* [LengthMismatch](https://docs.cryptolegacy.app/documentation/errors-reference#lengthmismatch-icl1)
* [ShareSumDoesntMatchBase](https://docs.cryptolegacy.app/documentation/errors-reference#sharesumdoesntmatchbase-icl1)
* [OriginalHashDuplicate](https://docs.cryptolegacy.app/documentation/errors-reference#originalhashduplicate-icl1)
* [DistributionStarted](https://docs.cryptolegacy.app/documentation/errors-reference#distributionstarted-icl1)
* [DistributionStartAlreadySet](https://docs.cryptolegacy.app/documentation/errors-reference#distributionstartalreadyset-icl1)
* [DistributionDelay](https://docs.cryptolegacy.app/documentation/errors-reference#distributiondelay-icl1)
* [ChallengePeriodStarted](https://docs.cryptolegacy.app/documentation/errors-reference#challengeperiodstarted-icl1)
* [AlreadySet](https://docs.cryptolegacy.app/documentation/errors-reference#alreadyset-icl1)
* [BeneficiaryNotSet](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiarynotset-icl1)
* [Pause](https://docs.cryptolegacy.app/documentation/errors-reference#pause-icl1)
* [IncorrectFacetCutAction](https://docs.cryptolegacy.app/documentation/errors-reference#incorrectfacetcutaction-icl1)
* [NotContractOwner](https://docs.cryptolegacy.app/documentation/errors-reference#notcontractowner-icl1)
* [FacetNotFound](https://docs.cryptolegacy.app/documentation/errors-reference#facetnotfound-icl1)
* [FacetHasNoCode](https://docs.cryptolegacy.app/documentation/errors-reference#facethasnocode-icl1)
* [NoSelectorsInFacetToCut](https://docs.cryptolegacy.app/documentation/errors-reference#noselectorsinfacettocut-icl1)
* [FacetCantBeZero](https://docs.cryptolegacy.app/documentation/errors-reference#facetcantbezero-icl1)
* [CantRemoveImmutableFunctions](https://docs.cryptolegacy.app/documentation/errors-reference#cantremoveimmutablefunctions-icl1)
* [CantAddFunctionThatAlreadyExists](https://docs.cryptolegacy.app/documentation/errors-reference#cantaddfunctionthatalreadyexists-icl1)
* [CantReplaceFunctionWithSameFunction](https://docs.cryptolegacy.app/documentation/errors-reference#cantreplacefunctionwithsamefunction-icl1)
* [InitFunctionReverted](https://docs.cryptolegacy.app/documentation/errors-reference#initfunctionreverted-icl1)
* [InitAddressZeroButCalldataIsNot](https://docs.cryptolegacy.app/documentation/errors-reference#initaddresszerobutcalldataisnot-icl1)
* [InitCalldataZeroButAddressIsNot](https://docs.cryptolegacy.app/documentation/errors-reference#initcalldatazerobutaddressisnot-icl1)
* [PluginNotRegistered](https://docs.cryptolegacy.app/documentation/errors-reference#pluginnotregistered-icl1)
* [TransferFeeFailed](https://docs.cryptolegacy.app/documentation/errors-reference#transferfeefailed-icl1)
* [TooBigMultiplier](https://docs.cryptolegacy.app/documentation/errors-reference#toobigmultiplier-icl1)
* [OwnableUnauthorizedAccount](https://docs.cryptolegacy.app/documentation/errors-reference#ownableunauthorizedaccount-iclo1)

### Access / Roles

* `initializeByBuildManager`: `initializer`; `buildManager` only caller
* `transferOwnership`: `onlyOwner`
* `payInitialFee`: `nonReentrant`
* `setBeneficiaries`: `onlyOwner`
* `update`: `nonReentrant, onlyOwner`
* `setGasLimitMultiplier`: `nonReentrant, onlyOwner`
* `transferTreasuryTokensToLegacy`: `nonReentrant`
* `beneficiaryClaim`: `nonReentrant`
* `sendMessagesToBeneficiary`: `onlyOwner`

### Interacts With

* `ArbSys`
* `IBeneficiaryRegistry`
* `LibCryptoLegacy`
* `LibDiamond`

### Missing Links

None.

## LegacyRecoveryPlugin

### Purpose

LegacyRecoveryPlugin implements recovery-governance flows for regaining control through proposal-based execution.

### Inheritance

* `ICryptoLegacyPlugin`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-lrp1) - Lists the public selectors exposed by the recovery plugin facet.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-lrp1) - Reports selectors required during plugin setup.
* [getMultisigAllowedMethods(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmultisigallowedmethods-lrp1) - Enumerates selectors that recovery multisig proposals may execute.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-lrp1) - Returns the canonical plugin identifier.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-lrp1) - Reports the plugin version.
* [lrSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrsetmultisigconfig-lrp1) - Owner-only configuration of recovery multisig voters and threshold.
* [lrPropose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrpropose-lrp1) - Submits a new recovery multisig proposal.
* [lrConfirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrconfirm-lrp1) - Confirms a recovery proposal and executes it when quorum is met.

### All Functions

* [getSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-lrp1) - Lists the public selectors exposed by the recovery plugin facet.
* [getSetupSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-lrp1) - Reports selectors required during plugin setup.
* [getMultisigAllowedMethods()](https://docs.cryptolegacy.app/documentation/functions-reference#getmultisigallowedmethods-lrp1) - Enumerates selectors that recovery multisig proposals may execute.
* [getPluginName()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-lrp1) - Returns the canonical plugin identifier.
* [getPluginVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-lrp1) - Reports the plugin version.
* [getPluginMultisigStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginmultisigstorage-lrp1) - Retrieves plugin-specific multisig storage.
* [lrSetMultisigConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrsetmultisigconfig-lrp1) - Owner-only configuration of recovery multisig voters and threshold.
* [lrPropose(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrpropose-lrp1) - Submits a new recovery multisig proposal.
* [lrConfirm(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrconfirm-lrp1) - Confirms a recovery proposal and executes it when quorum is met.
* [lrCancel(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrcancel-lrp1) - Removes the caller’s confirmation from a pending recovery proposal.
* [lrTransferTreasuryTokensToLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrtransfertreasurytokenstolegacy-lrp1) - Multisig-executor action to pull treasury ERC20 tokens into the legacy contract.
* [lrWithdrawTokensFromLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrwithdrawtokensfromlegacy-lrp1) - Multisig-executor withdrawal of tokens from the legacy contract to designated recipients.
* [lrResetGuardianVoting()](https://docs.cryptolegacy.app/documentation/functions-reference#lrresetguardianvoting-lrp1) - Multisig-executor action to reset guardian voting state and distribution start timestamp.
* [lrWithdrawHeldEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrwithdrawheldeth-lrp1) - Allows a voter to withdraw ETH accumulated during proposal execution.
* [lrGetHeldEth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrgetheldeth-lrp1) - Returns the held ETH balance for a given voter hash.
* [lrGetInitializationStatus()](https://docs.cryptolegacy.app/documentation/functions-reference#lrgetinitializationstatus-lrp1) - Indicates whether the recovery multisig has been initialized.
* [lrGetProposalWithStatus(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lrgetproposalwithstatus-lrp1) - Retrieves a specific proposal and its confirmation status.
* [lrGetProposalListWithStatuses()](https://docs.cryptolegacy.app/documentation/functions-reference#lrgetproposallistwithstatuses-lrp1) - Returns all recovery proposals with confirmation metadata.

### Events

None.

### Errors

None.

### Access / Roles

* `lrSetMultisigConfig`: `onlyOwner`
* `lrTransferTreasuryTokensToLegacy`: `nonReentrant`
* `lrWithdrawTokensFromLegacy`: `nonReentrant`
* `lrResetGuardianVoting`: `nonReentrant`
* `lrWithdrawHeldEth`: `nonReentrant`

### Interacts With

* `IBeneficiaryRegistry`
* `ICryptoLegacy`
* `ISafeMinimalMultisig`
* `LibCryptoLegacy`
* `LibSafeMinimalMultisig`
* `LibTrustedGuardiansPlugin`

### Missing Links

None.

## LensPlugin

### Purpose

LensPlugin exposes read-only protocol views to aggregate operational and beneficiary-related state.

### Inheritance

* `ICryptoLegacyPlugin`
* `ICryptoLegacyLens`

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-lp1) - Enumerates every externally exposed selector for the Lens plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-lp1) - Reports setup-time selectors required by the Lens plugin.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-lp1) - Reveals the human-readable name of the plugin.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-lp1) - Returns the semantic version of the Lens plugin.
* [updateInterval(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updateinterval-lp1) - Reads the configured update interval for the CryptoLegacy instance.
* [challengeTimeout(...)](https://docs.cryptolegacy.app/documentation/functions-reference#challengetimeout-lp1) - Exposes the challenge timeout value.
* [distributionStartAt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#distributionstartat-lp1) - Returns when beneficiary distribution began.
* [lastFeePaidAt(...)](https://docs.cryptolegacy.app/documentation/functions-reference#lastfeepaidat-lp1) - Reports the block timestamp of the last paid maintenance fee.

### All Functions

* [getSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-lp1) - Enumerates every externally exposed selector for the Lens plugin.
* [getSetupSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-lp1) - Reports setup-time selectors required by the Lens plugin.
* [getPluginName()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-lp1) - Reveals the human-readable name of the plugin.
* [getPluginVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-lp1) - Returns the semantic version of the Lens plugin.
* [updateInterval()](https://docs.cryptolegacy.app/documentation/functions-reference#updateinterval-lp1) - Reads the configured update interval for the CryptoLegacy instance.
* [challengeTimeout()](https://docs.cryptolegacy.app/documentation/functions-reference#challengetimeout-lp1) - Exposes the challenge timeout value.
* [distributionStartAt()](https://docs.cryptolegacy.app/documentation/functions-reference#distributionstartat-lp1) - Returns when beneficiary distribution began.
* [lastFeePaidAt()](https://docs.cryptolegacy.app/documentation/functions-reference#lastfeepaidat-lp1) - Reports the block timestamp of the last paid maintenance fee.
* [lastUpdateAt()](https://docs.cryptolegacy.app/documentation/functions-reference#lastupdateat-lp1) - Exposes the timestamp of the most recent `update()` call.
* [initialFeeToPay()](https://docs.cryptolegacy.app/documentation/functions-reference#initialfeetopay-lp1) - Provides the initial fee amount required when activating a CryptoLegacy instance.
* [updateFee()](https://docs.cryptolegacy.app/documentation/functions-reference#updatefee-lp1) - Returns the recurring fee charged per update interval.
* [invitedByRefCode()](https://docs.cryptolegacy.app/documentation/functions-reference#invitedbyrefcode-lp1) - Exposes the referral code associated with the CryptoLegacy instance.
* [getBeneficiaryClaimed(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getbeneficiaryclaimed-lp1) - Returns how much of a given token a beneficiary has already claimed.
* [getOriginalBeneficiaryHash(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getoriginalbeneficiaryhash-lp1) - Reveals the original beneficiary hash mapped to a derived hash.
* [getBeneficiaryConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getbeneficiaryconfig-lp1) - Retrieves the vesting configuration for a beneficiary hash.
* [getBeneficiaries()](https://docs.cryptolegacy.app/documentation/functions-reference#getbeneficiaries-lp1) - Lists all beneficiaries, their original hashes, and configurations.
* [\_getBeneficiaries(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getbeneficiaries-lp1) - Internal helper that assembles beneficiary hashes, originals, and configs.
* [getTransferBlockNumbers()](https://docs.cryptolegacy.app/documentation/functions-reference#gettransferblocknumbers-lp1) - Returns the block numbers recorded for asset movements involving the CryptoLegacy contract.
* [getTokensDistribution(...)](https://docs.cryptolegacy.app/documentation/functions-reference#gettokensdistribution-lp1) - Summarises distribution totals for a token list.
* [\_getTokensDistribution(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_gettokensdistribution-lp1) - Internal aggregator that builds per-token distribution data.
* [getCryptoLegacyBaseData()](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacybasedata-lp1) - Returns a snapshot of the core CryptoLegacy configuration.
* [getCryptoLegacyListData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getcryptolegacylistdata-lp1) - Provides a comprehensive snapshot including beneficiaries, plugins, and token distributions.
* [getMessagesBlockNumbersByRecipient(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getmessagesblocknumbersbyrecipient-lp1) - Lists when messages were received for a beneficiary.
* [getVestedAndClaimedData(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getvestedandclaimeddata-lp1) - Calculates vested, claimable, and claimed token amounts for a beneficiary.
* [\_getPluginInfoList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getplugininfolist-lp1) - Internal helper that compiles plugin metadata for all installed facets.
* [\_getPluginMetadata(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getpluginmetadata-lp1) - Fetches metadata for a specific plugin address.
* [getPluginInfoList()](https://docs.cryptolegacy.app/documentation/functions-reference#getplugininfolist-lp1) - Exposes metadata for all plugins attached to the CryptoLegacy instance.
* [getPluginMetadata(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginmetadata-lp1) - Returns metadata for a specific plugin address through the lens facet.

### Events

None.

### Errors

None.

### Access / Roles

None.

### Interacts With

* `ICryptoLegacy`
* `LibCryptoLegacy`
* `LibDiamond`

### Missing Links

None.

## NftLegacyPlugin

### Purpose

NftLegacyPlugin implements NFT-oriented legacy management and related beneficiary operations.

### Inheritance

* `ICryptoLegacyPlugin`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-nlp1) - Lists the externally callable selectors for the NFT inheritance facet.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-nlp1) - Reports any setup-time selectors required by the NFT plugin.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-nlp1) - Returns the human-readable identifier for the NFT plugin.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-nlp1) - Provides the semantic version of the NFT plugin.
* [setNftBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setnftbeneficiary-nlp1) - Assigns a beneficiary hash and claim delay to multiple NFTs.
* [transferNftTokensToLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transfernfttokenstolegacy-nlp1) - Pulls configured NFTs into the CryptoLegacy contract once distribution is ready.
* [beneficiaryClaimNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#beneficiaryclaimnft-nlp1) - Lets the designated beneficiary withdraw NFTs after the claim delay.

### All Functions

* [getSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-nlp1) - Lists the externally callable selectors for the NFT inheritance facet.
* [getSetupSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-nlp1) - Reports any setup-time selectors required by the NFT plugin.
* [getPluginName()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-nlp1) - Returns the human-readable identifier for the NFT plugin.
* [getPluginVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-nlp1) - Provides the semantic version of the NFT plugin.
* [getPluginStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginstorage-nlp1) - Returns the plugin’s dedicated storage slot.
* [setNftBeneficiary(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setnftbeneficiary-nlp1) - Assigns a beneficiary hash and claim delay to multiple NFTs.
* [transferNftTokensToLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#transfernfttokenstolegacy-nlp1) - Pulls configured NFTs into the CryptoLegacy contract once distribution is ready.
* [beneficiaryClaimNft(...)](https://docs.cryptolegacy.app/documentation/functions-reference#beneficiaryclaimnft-nlp1) - Lets the designated beneficiary withdraw NFTs after the claim delay.

### Events

* [SetNftBeneficiary](https://docs.cryptolegacy.app/documentation/events-reference#setnftbeneficiary-nlp1)
* [BeneficiaryClaimNft](https://docs.cryptolegacy.app/documentation/events-reference#beneficiaryclaimnft-nlp1)
* [TransferNftToCryptoLegacy](https://docs.cryptolegacy.app/documentation/events-reference#transfernfttocryptolegacy-nlp1)

### Errors

* [BeneficiaryNotSet](https://docs.cryptolegacy.app/documentation/errors-reference#beneficiarynotset-icl1)
* [DistributionDelay](https://docs.cryptolegacy.app/documentation/errors-reference#distributiondelay-icl1)
* [NotTheBeneficiary](https://docs.cryptolegacy.app/documentation/errors-reference#notthebeneficiary-icl1)
* [ZeroTokens](https://docs.cryptolegacy.app/documentation/errors-reference#zerotokens-icl1)

### Access / Roles

* `setNftBeneficiary`: `onlyOwner`
* `transferNftTokensToLegacy`: `nonReentrant`
* `beneficiaryClaimNft`: `nonReentrant`

### Interacts With

* `ICryptoLegacy`
* `LibCryptoLegacy`

### Missing Links

None.

## ReceiveEthPlugin

### Purpose

ReceiveEthPlugin enables a CryptoLegacy instance to accept plain ETH transfers and wrap the accumulated ETH into WETH when a beneficiary triggers the wrapping flow.

### Inheritance

* `ICryptoLegacyPlugin`

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-rep1) - Returns the selectors exposed by the receive-ETH plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-rep1) - Returns setup-time selectors required for the receive-ETH plugin.
* [wrapEthToWeth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#wrapethtoweth-rep1) - Wraps all ETH currently held by the CryptoLegacy diamond into WETH.

### All Functions

* [constructor(...)](https://docs.cryptolegacy.app/documentation/functions-reference#constructor-rep1) - Stores the WETH contract address used when wrapping received ETH.
* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-rep1) - Returns the selectors exposed by the receive-ETH plugin.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-rep1) - Returns setup-time selectors required for the receive-ETH plugin.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-rep1) - Returns the unique plugin name string.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-rep1) - Returns the semantic version for the receive-ETH plugin.
* [wrapEthToWeth(...)](https://docs.cryptolegacy.app/documentation/functions-reference#wrapethtoweth-rep1) - Wraps all ETH currently held by the CryptoLegacy diamond into WETH.
* [receive(...)](https://docs.cryptolegacy.app/documentation/functions-reference#receive-rep1) - Accepts plain ETH transfers routed into the facet by the diamond.

### Events

* [WrapEthToWeth](https://docs.cryptolegacy.app/documentation/events-reference#wrapethtoweth-rep1)

### Errors

* [NoEthToWrap](https://docs.cryptolegacy.app/documentation/errors-reference#noethtowrap-rep1)

### Access / Roles

* `wrapEthToWeth`: beneficiary caller after the distribution-ready checks enforced by `LibCryptoLegacy`
* `receive`: open plain-ETH entry point

### Interacts With

* `ICryptoLegacy`
* `IWETH`
* `LibCryptoLegacy`

### Missing Links

None.

## TrustedGuardiansPlugin

### Purpose

TrustedGuardiansPlugin implements guardian-voting logic for distribution and safety-critical transitions.

### Inheritance

* `ICryptoLegacyPlugin`
* `ITrustedGuardiansPlugin`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-tgp1) - Enumerates every externally exposed selector for guardian management.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-tgp1) - Reports setup-time selectors that the facet expects during installation.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-tgp1) - Returns the facet’s human-readable identifier.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-tgp1) - Exposes the semantic version of the guardians facet.
* [initializeGuardians(...)](https://docs.cryptolegacy.app/documentation/functions-reference#initializeguardians-tgp1) - Configures the guardian roster, threshold, and challenge timeout in a single owner call.
* [setGuardians(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setguardians-tgp1) - Updates the guardian membership without touching threshold configuration.
* [setGuardiansConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setguardiansconfig-tgp1) - Updates guardian quorum configuration while preserving the existing guardian list.
* [guardiansVoteForDistribution(...)](https://docs.cryptolegacy.app/documentation/functions-reference#guardiansvotefordistribution-tgp1) - Records a guardian vote and optionally accelerates distribution start.

### All Functions

* [getSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-tgp1) - Enumerates every externally exposed selector for guardian management.
* [getSetupSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-tgp1) - Reports setup-time selectors that the facet expects during installation.
* [getPluginName()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-tgp1) - Returns the facet’s human-readable identifier.
* [getPluginVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-tgp1) - Exposes the semantic version of the guardians facet.
* [\_isGuardianVoted(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_isguardianvoted-tgp1) - Checks whether a guardian hash already appears in the vote ledger.
* [\_checkGuardianAndRemoveInvalid(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_checkguardianandremoveinvalid-tgp1) - Validates a stored guardian vote and prunes it if the guardian is no longer recognised.
* [\_checkGuardian()](https://docs.cryptolegacy.app/documentation/functions-reference#_checkguardian-tgp1) - Ensures the caller is a registered guardian and the contract has paid its initial fee.
* [\_checkGuardianNotVoted()](https://docs.cryptolegacy.app/documentation/functions-reference#_checkguardiannotvoted-tgp1) - Validates that the caller is an authorised guardian who has not yet voted.
* [\_getGuardians(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getguardians-tgp1) - Resolves the active guardian set, falling back to beneficiaries when no explicit list exists.
* [\_getGuardiansThreshold(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getguardiansthreshold-tgp1) - Computes the effective vote threshold for guardians.
* [\_getGuardiansChallengeTimeout(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_getguardianschallengetimeout-tgp1) - Retrieves the challenge timeout applied once guardians reach quorum.
* [initializeGuardians(...)](https://docs.cryptolegacy.app/documentation/functions-reference#initializeguardians-tgp1) - Configures the guardian roster, threshold, and challenge timeout in a single owner call.
* [setGuardians(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setguardians-tgp1) - Updates the guardian membership without touching threshold configuration.
* [\_setGuardians(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setguardians-tgp1) - Internal helper that mutates the guardian set and beneficiary registry.
* [setGuardiansConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setguardiansconfig-tgp1) - Updates guardian quorum configuration while preserving the existing guardian list.
* [\_setGuardiansConfig(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_setguardiansconfig-tgp1) - Writes guardian threshold and timeout parameters with validation.
* [\_afterGuardiansSet(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_afterguardiansset-tgp1) - Validates quorum bounds and clears guardian vote progress.
* [guardiansVoteForDistribution()](https://docs.cryptolegacy.app/documentation/functions-reference#guardiansvotefordistribution-tgp1) - Records a guardian vote and optionally accelerates distribution start.
* [guardiansTransferTreasuryTokensToLegacy(...)](https://docs.cryptolegacy.app/documentation/functions-reference#guardianstransfertreasurytokenstolegacy-tgp1) - Allows guardians to move treasury ERC20 balances into the CryptoLegacy contract once distribution is live.
* [resetGuardianVoting()](https://docs.cryptolegacy.app/documentation/functions-reference#resetguardianvoting-tgp1) - Owner-controlled reset that clears guardian votes, resets distribution start, and processes the upkeep fee.
* [\_isGuardiansInitialized(...)](https://docs.cryptolegacy.app/documentation/functions-reference#_isguardiansinitialized-tgp1) - Indicates whether a dedicated guardian set is stored.
* [isGuardiansInitialized()](https://docs.cryptolegacy.app/documentation/functions-reference#isguardiansinitialized-tgp1) - Public getter indicating whether guardians have been explicitly set.
* [getGuardiansData()](https://docs.cryptolegacy.app/documentation/functions-reference#getguardiansdata-tgp1) - Provides a snapshot of guardian hashes, votes, quorum, and timeout.
* [checkGuardiansVotedAndGetGuardiansData()](https://docs.cryptolegacy.app/documentation/functions-reference#checkguardiansvotedandgetguardiansdata-tgp1) - Guardian-only getter that also reports whether the caller has voted.

### Events

* [SetGuardian](https://docs.cryptolegacy.app/documentation/events-reference#setguardian-itgp1)
* [SetGuardiansConfig](https://docs.cryptolegacy.app/documentation/events-reference#setguardiansconfig-itgp1)
* [ClearGuardiansVoted](https://docs.cryptolegacy.app/documentation/events-reference#clearguardiansvoted-itgp1)
* [GuardiansDistributionStartSet](https://docs.cryptolegacy.app/documentation/events-reference#guardiansdistributionstartset-itgp1)
* [GuardiansVoteForDistribution](https://docs.cryptolegacy.app/documentation/events-reference#guardiansvotefordistribution-itgp1)
* [ResetGuardiansVoting](https://docs.cryptolegacy.app/documentation/events-reference#resetguardiansvoting-itgp1)

### Errors

* [NotGuardian](https://docs.cryptolegacy.app/documentation/errors-reference#notguardian-itgp1)
* [GuardianAlreadyVoted](https://docs.cryptolegacy.app/documentation/errors-reference#guardianalreadyvoted-itgp1)
* [ZeroGuardian](https://docs.cryptolegacy.app/documentation/errors-reference#zeroguardian-itgp1)
* [MaxGuardiansTimeout](https://docs.cryptolegacy.app/documentation/errors-reference#maxguardianstimeout-itgp1)
* [GuardiansTimeoutCantBeZero](https://docs.cryptolegacy.app/documentation/errors-reference#guardianstimeoutcantbezero-itgp1)
* [ThresholdDontMet](https://docs.cryptolegacy.app/documentation/errors-reference#thresholddontmet-itgp1)
* [ThresholdTooBig](https://docs.cryptolegacy.app/documentation/errors-reference#thresholdtoobig-itgp1)
* [InitialFeeNotPaid](https://docs.cryptolegacy.app/documentation/errors-reference#initialfeenotpaid-icl1)

### Access / Roles

* `initializeGuardians`: `nonReentrant, onlyOwner`
* `setGuardians`: `nonReentrant, onlyOwner`
* `setGuardiansConfig`: `nonReentrant, onlyOwner`
* `guardiansVoteForDistribution`: `nonReentrant`
* `guardiansTransferTreasuryTokensToLegacy`: `nonReentrant`
* `resetGuardianVoting`: `nonReentrant, onlyOwner`

### Interacts With

* `IBeneficiaryRegistry`
* `ICryptoLegacy`
* `LibCryptoLegacy`
* `LibSafeMinimalMultisig`
* `LibTrustedGuardiansPlugin`

### Missing Links

None.

## UpdateRolePlugin

### Purpose

UpdateRolePlugin implements controlled updates of beneficiary, guardian, and related role assignments.

### Inheritance

* `ICryptoLegacyPlugin`
* `ReentrancyGuardUpgradeable`

### Key Methods

* [getSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-urp1) - Lists external selectors provided by the updater role facet.
* [getSetupSigs(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-urp1) - Reports setup selectors required during facet installation.
* [getPluginName(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-urp1) - Returns the human-readable name of the updater facet.
* [getPluginVer(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-urp1) - Reveals the semantic version for the updater role facet.
* [owner(...)](https://docs.cryptolegacy.app/documentation/functions-reference#owner-urp1) - Returns the current diamond owner address.
* [getUpdaterList(...)](https://docs.cryptolegacy.app/documentation/functions-reference#getupdaterlist-urp1) - Returns the full set of updater addresses.
* [isUpdater(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isupdater-urp1) - Checks whether a given address currently has update permissions.
* [setUpdater(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setupdater-urp1) - Adds or removes authorised updaters.

### All Functions

* [getSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsigs-urp1) - Lists external selectors provided by the updater role facet.
* [getSetupSigs()](https://docs.cryptolegacy.app/documentation/functions-reference#getsetupsigs-urp1) - Reports setup selectors required during facet installation.
* [getPluginName()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginname-urp1) - Returns the human-readable name of the updater facet.
* [getPluginVer()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginver-urp1) - Reveals the semantic version for the updater role facet.
* [getPluginStorage()](https://docs.cryptolegacy.app/documentation/functions-reference#getpluginstorage-urp1) - Returns the plugin-specific storage slot used for updater data.
* [owner()](https://docs.cryptolegacy.app/documentation/functions-reference#owner-urp1) - Returns the current diamond owner address.
* [getUpdaterList()](https://docs.cryptolegacy.app/documentation/functions-reference#getupdaterlist-urp1) - Returns the full set of updater addresses.
* [isUpdater(...)](https://docs.cryptolegacy.app/documentation/functions-reference#isupdater-urp1) - Checks whether a given address currently has update permissions.
* [setUpdater(...)](https://docs.cryptolegacy.app/documentation/functions-reference#setupdater-urp1) - Adds or removes authorised updaters.
* [updateByUpdater(...)](https://docs.cryptolegacy.app/documentation/functions-reference#updatebyupdater-urp1) - Lets authorised updaters execute the `update` flow while paying required fees before distribution begins.

### Events

* [AddUpdater](https://docs.cryptolegacy.app/documentation/events-reference#addupdater-iclup1)
* [RemoveUpdater](https://docs.cryptolegacy.app/documentation/events-reference#removeupdater-iclup1)
* [Update](https://docs.cryptolegacy.app/documentation/events-reference#update-icl1)

### Errors

* [NotTheUpdater](https://docs.cryptolegacy.app/documentation/errors-reference#nottheupdater-iclup1)

### Access / Roles

* `setUpdater`: `nonReentrant, onlyOwner`
* `updateByUpdater`: `nonReentrant, onlyUpdater`

### Interacts With

* `ICryptoLegacy`
* `ICryptoLegacyUpdaterPlugin`
* `LibCryptoLegacy`
* `LibDiamond`

### Missing Links

None.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cryptolegacy.app/documentation/contracts.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
