Contracts Functions. Part 2.

Below is a clear overview of each major CryptoLegacy contract function: purpose, inputs, outputs, key logic, events, and external interactions.

Table of Contents

  1. Flags (FLAGS)

    • constructor (FLAGS)

    • publicFunction (FLAGS)

    • externalFunction (FLAGS)

    • getFlag (FLAGS)

    • setFlag (FLAGS)

    • privateFunction (FLAGS)

  2. IBeneficiaryRegistry (IBR)

    • constructor (IBR)

    • publicFunction (IBR)

    • setCryptoLegacyBeneficiary (IBR)

    • setCryptoLegacyOwner (IBR)

    • setCryptoLegacyGuardian (IBR)

    • setCryptoLegacyRecoveryAddresses (IBR)

    • getAllCryptoLegacyListByRoles (IBR)

    • privateFunction (IBR)

  3. IBuildManagerOwnable (IBMO)

    • constructor (IBMO)

    • publicFunction (IBMO)

    • externalFunction (IBMO)

    • privateFunction (IBMO)

  4. ICallProxy (ICPR)

    • constructor (ICPR)

    • publicFunction (ICPR)

    • call (ICPR)

    • callERC20 (ICPR)

    • privateFunction (ICPR)

  5. ICryptoLegacy (ICL)

    • constructor (ICL)

    • publicFunction (ICL)

    • buildManager (ICL)

    • owner (ICL)

    • privateFunction (ICL)

  6. ICryptoLegacyBuildManager (ICLBM)

    • constructor (ICLBM)

    • payInitialFee (ICLBM)

    • payFee (ICLBM)

    • getUpdateFee (ICLBM)

    • isLifetimeNftLocked (ICLBM)

    • isLifetimeNftLockedAndUpdate (ICLBM)

    • isPluginRegistered (ICLBM)

    • isCryptoLegacyBuilt (ICLBM)

    • pluginsRegistry (ICLBM)

    • getFactoryAddress (ICLBM)

    • beneficiaryRegistry (ICLBM)

    • externalLens (ICLBM)

    • privateFunction (ICLBM)

  7. ICryptoLegacyDiamondBase (ICLDB)

    • constructor (ICLDB)

    • publicFunction (ICLDB)

    • externalFunction (ICLDB)

    • privateFunction (ICLDB)

  8. ICryptoLegacyFactory (ICLF)

    • constructor (ICLF)

    • createCryptoLegacy (ICLF)

    • setBuildOperator (ICLF)

    • privateFunction (ICLF)

  9. ICryptoLegacyLens (ICLL)

    • constructor (ICLL)

    • publicFunction (ICLL)

    • externalFunction (ICLL)

    • getMessagesBlockNumbersByRecipient (ICLL)

    • getVestedAndClaimedData (ICLL)

    • getCryptoLegacyBaseData (ICLL)

    • getCryptoLegacyListData (ICLL)

    • privateFunction (ICLL)

  10. ICryptoLegacyOwnable (ICLO)

    • constructor (ICLO)

    • publicFunction (ICLO)

    • externalFunction (ICLO)

    • privateFunction (ICLO)

  11. ICryptoLegacyPlugin (ICLP)

    • constructor (ICLP)

    • getSigs (ICLP)

    • getSetupSigs (ICLP)

    • getPluginName (ICLP)

    • getPluginVer (ICLP)

    • privateFunction (ICLP)

  12. ICryptoLegacyUpdaterPlugin (ICLUP)

    • constructor (ICLUP)

    • publicFunction (ICLUP)

    • externalFunction (ICLUP)

    • privateFunction (ICLUP)

  13. IDeBridgeGate (IDBG)

    • constructor (IDBG)

    • publicFunction (IDBG)

    • sendMessage (IDBG)

    • claim (IDBG)

    • withdrawFee (IDBG)

    • getDebridgeChainAssetFixedFee (IDBG)

    • privateFunction (IDBG)

  14. IDiamondCut (IDC)

    • constructor (IDC)

    • diamondCut (IDC)

    • privateFunction (IDC)

  15. IDiamondLoupe (IDL)

    • constructor (IDL)

    • facets (IDL)

    • facetFunctionSelectors (IDL)

    • facetAddresses (IDL)

    • facetAddress (IDL)

    • privateFunction (IDL)

  16. IFeeRegistry (IFR)

    • constructor (IFR)

    • getContractCaseFee (IFR)

    • getContractCaseFeeForCode (IFR)

    • takeFee (IFR)

    • createCustomCode (IFR)

    • createCode (IFR)

    • updateCrossChainsRef (IFR)

    • accumulatedFee (IFR)

    • getSupportedRefInChainsList (IFR)

    • privateFunction (IFR)

  17. ILockChainGate (ILCG)

    • constructor (ILCG)

    • lockLifetimeNft (ILCG)

    • isNftLocked (ILCG)

    • isNftLockedAndUpdate (ILCG)

    • calculateCrossChainCreateRefNativeFee (ILCG)

    • privateFunction (ILCG)

  18. ILegacyMessenger (ILM)

    • constructor (ILM)

    • publicFunction (ILM)

    • externalFunction (ILM)

    • privateFunction (ILM)

  19. ILido (ILID)

    • constructor (ILID)

    • submit (ILID)

    • transferShares (ILID)

    • transferSharesFrom (ILID)

    • sharesOf (ILID)

    • privateFunction (ILID)

  20. ILifetimeNft (ILN)

    • constructor (ILN)

    • mint (ILN)

    • setMinterOperator (ILN)

    • privateFunction (ILN)

  21. IPluginsRegistry (IPLR)

    • constructor (IPLR)

    • getPluginDescriptionBlockNumbers (IPLR)

    • isPluginRegistered (IPLR)

    • privateFunction (IPLR)

  22. ISafeMinimalMultisig (ISMMS)

    • constructor (ISMMS)

    • publicFunction (ISMMS)

    • externalFunction (ISMMS)

    • privateFunction (ISMMS)

  23. ISignatureRoleTimelock (ISRT)

    • constructor (ISRT)

    • publicFunction (ISRT)

    • externalFunction (ISRT)

    • privateFunction (ISRT)

  24. ITrustedGuardiansPlugin (ITGP)

    • constructor (ITGP)

    • isGuardiansInitialized (ITGP)

    • privateFunction (ITGP)

  25. DiamondLoupeFacet (DLF)

    • constructor (DLF)

    • facets (DLF)

    • facetFunctionSelectors (DLF)

    • facetAddresses (DLF)

    • facetAddress (DLF)

    • storageFacetAddress (DLF)

    • supportsInterface (DLF)

    • privateFunction (DLF)

  26. LibCreate2Deploy (L2D)

    • constructor (L2D)

    • internalFunction (L2D)

    • internalFunction (L2D)

    • privateFunction (L2D)

  27. LibCryptoLegacy (LCL)

    • constructor (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • internalFunction (LCL)

    • privateFunction (LCL)

  28. LibCryptoLegacyPlugins (LCLP)

    • constructor (LCLP)

    • internalFunction (LCLP)

    • internalFunction (LCLP)

    • internalFunction (LCLP)

    • internalFunction (LCLP)

    • internalFunction (LCLP)

    • internalFunction (LCLP)

    • addFunctions (LCLP)

    • removeFunctions (LCLP)

    • internalFunction (LCLP)

    • privateFunction (LCLP)

  29. LibDiamond (LD)

    • constructor (LD)

    • diamondStorage (LD)

    • setContractOwner (LD)

    • contractOwner (LD)

    • setPause (LD)

    • getPause (LD)

    • enforceIsContractOwner (LD)

    • diamondCut (LD)

    • addFunctions (LD)

    • replaceFunctions (LD)

    • removeFunctions (LD)

    • removeFunction (LD)

    • initializeDiamondCut (LD)

    • enforceHasContractCode (LD)

    • privateFunction (LD)

  30. LibSafeMinimalBeneficiaryMultisig (LSMBM)

    • constructor (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • internalFunction (LSMBM)

    • privateFunction (LSMBM)

  31. LibSafeMinimalMultisig (LSMM)

    • constructor (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • internalFunction (LSMM)

    • privateFunction (LSMM)

  32. LibTrustedGuardiansPlugin (LTGP)

    • constructor (LTGP)

    • internalFunction (LTGP)

    • privateFunction (LTGP)

  33. BeneficiaryPluginAddRights (BPAR)

    • constructor (BPAR)

    • getSigs (BPAR)

    • getSetupSigs (BPAR)

    • getPluginName (BPAR)

    • getPluginVer (BPAR)

    • barSetMultisigConfig (BPAR)

    • barPropose (BPAR)

    • barConfirm (BPAR)

    • barAddPluginList (BPAR)

    • barGetInitializationStatus (BPAR)

    • barGetVotersAndConfirmations (BPAR)

    • barGetProposalWithStatus (BPAR)

    • barGetProposalListWithStatuses (BPAR)

    • privateFunction (BPAR)

  34. CryptoLegacyBasePlugin (CLBP)

    • constructor (CLBP)

    • getSigs (CLBP)

    • getSetupSigs (CLBP)

    • getPluginName (CLBP)

    • getPluginVer (CLBP)

    • initializeByBuildManager (CLBP)

    • owner (CLBP)

    • isPaused (CLBP)

    • buildManager (CLBP)

    • renounceOwnership (CLBP)

    • transferOwnership (CLBP)

    • payInitialFee (CLBP)

    • setBeneficiaries (CLBP)

    • update (CLBP)

    • initiateChallenge (CLBP)

    • transferTreasuryTokensToLegacy (CLBP)

    • beneficiaryClaim (CLBP)

    • beneficiarySwitch (CLBP)

    • sendMessagesToBeneficiary (CLBP)

    • isLifetimeActive (CLBP)

    • privateFunction (CLBP)

  35. LegacyRecoveryPlugin (LRP)

    • constructor (LRP)

    • getSigs (LRP)

    • getSetupSigs (LRP)

    • getPluginName (LRP)

    • getPluginVer (LRP)

    • lrSetMultisigConfig (LRP)

    • lrPropose (LRP)

    • lrConfirm (LRP)

    • lrTransferTreasuryTokensToLegacy (LRP)

    • lrWithdrawTokensFromLegacy (LRP)

    • lrResetGuardianVoting (LRP)

    • lrGetInitializationStatus (LRP)

    • lrGetProposalWithStatus (LRP)

    • lrGetProposalListWithStatuses (LRP)

    • privateFunction (LRP)

  36. LensPlugin (LP)

    • constructor (LP)

    • getSigs (LP)

    • getSetupSigs (LP)

    • getPluginName (LP)

    • getPluginVer (LP)

    • updateInterval (LP)

    • challengeTimeout (LP)

    • distributionStartAt (LP)

    • lastFeePaidAt (LP)

    • lastUpdateAt (LP)

    • initialFeeToPay (LP)

    • updateFee (LP)

    • invitedByRefCode (LP)

    • getBeneficiaryVesting (LP)

    • getOriginalBeneficiaryHash (LP)

    • getBeneficiaryConfig (LP)

    • getBeneficiaries (LP)

    • getTransferBlockNumbers (LP)

    • getTokensDistribution (LP)

    • getMessagesBlockNumbersByRecipient (LP)

    • getVestedAndClaimedData (LP)

    • getPluginInfoList (LP)

    • getPluginMetadata (LP)

    • getCryptoLegacyBaseData (LP)

    • getCryptoLegacyListData (LP)

    • privateFunction (LP)

  37. NftLegacyPlugin (NLP)

    • constructor (NLP)

    • getSigs (NLP)

    • getSetupSigs (NLP)

    • getPluginName (NLP)

    • getPluginVer (NLP)

    • setNftBeneficiary (NLP)

    • transferNftTokensToLegacy (NLP)

    • beneficiaryClaimNft (NLP)

    • privateFunction (NLP)

  38. TrustedGuardiansPlugin (TGP)

    • constructor (TGP)

    • getSigs (TGP)

    • getSetupSigs (TGP)

    • getPluginName (TGP)

    • getPluginVer (TGP)

    • initializeGuardians (TGP)

    • setGuardians (TGP)

    • setGuardiansConfig (TGP)

    • guardiansVoteForDistribution (TGP)

    • guardiansTransferTreasuryTokensToLegacy (TGP)

    • resetGuardianVoting (TGP)

    • isGuardiansInitialized (TGP)

    • getGuardiansData (TGP)

    • privateFunction (TGP)

  39. UpdateRolePlugin (URLP)

    • constructor (URLP)

    • getSigs (URLP)

    • getSetupSigs (URLP)

    • getPluginName (URLP)

    • getPluginVer (URLP)

    • owner (URLP)

    • isUpdater (URLP)

    • getUpdaterList (URLP)

    • setUpdater (URLP)

    • updateByUpdater (URLP)

    • privateFunction (URLP)


Flags (FLAGS)

constructor (FLAGS)

None

publicFunction (FLAGS)

None

externalFunction (FLAGS)

None

getFlag (FLAGS)

Library: Flags Description: Returns true if a particular flag is set in the packed flags.

Parameters:

  • _packedFlags (uint256): The packed flags value.

  • _flag (uint256): The specific flag position to check.

Returns:

  • bool: True if the specified flag is set, false otherwise.

Modifiers:

  • internal

  • pure

setFlag (FLAGS)

Library: Flags Description: Sets or unsets a particular flag within the packed flags.

Parameters:

  • _packedFlags (uint256): The packed flags value.

  • _flag (uint256): The flag position.

  • _value (bool): True to set the flag, false to unset it.

Returns:

  • uint256: The updated packed flags value.

Modifiers:

  • internal

  • pure

privateFunction (FLAGS)

None


IBeneficiaryRegistry (IBR)

constructor (IBR)

None

publicFunction (IBR)

None

setCryptoLegacyBeneficiary (IBR)

Interface: IBeneficiaryRegistry Description: Adds or removes a CryptoLegacy contract for a beneficiary role.

Parameters:

  • _beneficiary (bytes32): Beneficiary identifier (hash).

  • _isAdd (bool): True to add, false to remove.

Returns:

  • None

Modifiers:

  • external

setCryptoLegacyOwner (IBR)

Interface: IBeneficiaryRegistry Description: Adds or removes a CryptoLegacy contract for an owner role.

Parameters:

  • _owner (bytes32): Owner identifier (hash).

  • _isAdd (bool): True to add, false to remove.

Returns:

  • None

Modifiers:

  • external

setCryptoLegacyGuardian (IBR)

Interface: IBeneficiaryRegistry Description: Adds or removes a CryptoLegacy contract for a guardian role.

Parameters:

  • _guardian (bytes32): Guardian identifier (hash).

  • _isAdd (bool): True to add, false to remove.

Returns:

  • None

Modifiers:

  • external

setCryptoLegacyRecoveryAddresses (IBR)

Interface: IBeneficiaryRegistry Description: Adds or removes a list of CryptoLegacy contracts for a recovery role.

Parameters:

  • _oldRecoveryAddresses (bytes32[]): Array of old recovery identifiers.

  • _newRecoveryAddresses (bytes32[]): Array of new recovery identifiers.

Returns:

  • None

Modifiers:

  • external

getAllCryptoLegacyListByRoles (IBR)

Interface: IBeneficiaryRegistry Description: Retrieves arrays of CryptoLegacy addresses by each possible role.

Parameters:

  • _hash (bytes32): Hash of the entity to look up.

Returns:

  • listByBeneficiary (address[]): List of addresses with beneficiary role.

  • listByOwner (address[]): List of addresses with owner role.

  • listByGuardian (address[]): List of addresses with guardian role.

  • listByRecovery (address[]): List of addresses with recovery role.

Modifiers:

  • external

  • view

privateFunction (IBR)

None


IBuildManagerOwnable (IBMO)

constructor (IBMO)

None

publicFunction (IBMO)

None

externalFunction (IBMO)

None

privateFunction (IBMO)

None


ICallProxy (ICPR)

constructor (ICPR)

None

publicFunction (ICPR)

None

call (ICPR)

Interface: ICallProxy Description: Performs a call that may transfer native Ether alongside.

Parameters:

  • _reserveAddress (address): Address that receives tokens if the call fails.

  • _receiver (address): Target contract to call.

  • _data (bytes): Call data.

  • _flags (uint256): Flags controlling the function’s behavior.

  • _nativeSender (bytes): Encoded sender address from the origin chain.

  • _chainIdFrom (uint256): ID of the origin chain.

Returns:

  • bool: True if the call succeeded, false otherwise.

Modifiers:

  • external

  • payable

callERC20 (ICPR)

Interface: ICallProxy Description: Performs a call that involves transferring an ERC20 token.

Parameters:

  • _token (address): The ERC20 asset address.

  • _reserveAddress (address): Address that receives tokens if the call fails.

  • _receiver (address): Target contract to call.

  • _data (bytes): Call data.

  • _flags (uint256): Flags controlling the function’s behavior.

  • _nativeSender (bytes): Encoded sender address from the origin chain.

  • _chainIdFrom (uint256): ID of the origin chain.

Returns:

  • bool: True if the call succeeded, false otherwise.

Modifiers:

  • external

privateFunction (ICPR)

None


ICryptoLegacy (ICL)

constructor (ICL)

None

publicFunction (ICL)

None

buildManager (ICL)

Interface: ICryptoLegacy Description: Returns the current build manager instance controlling this legacy contract.

Parameters: None

Returns:

  • ICryptoLegacyBuildManager: The build manager reference.

Modifiers:

  • external

  • view

owner (ICL)

Interface: ICryptoLegacy Description: Returns the address identified as the owner of the CryptoLegacy contract.

Parameters: None

Returns:

  • address: The owner address.

Modifiers:

  • external

  • view

privateFunction (ICL)

None


ICryptoLegacyBuildManager (ICLBM)

constructor (ICLBM)

None

payInitialFee (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Pays the initial fee for a newly created CryptoLegacy contract.

Parameters:

  • _code (bytes8): Referral code.

  • _toHolder (address): Address that may receive certain benefits (like NFT).

  • _lockToChainIds (uint256[]): Array of chain IDs to lock cross-chain references.

  • _crossChainFees (uint256[]): Corresponding cross-chain fees.

Returns:

  • None

Modifiers:

  • external

  • payable

payFee (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Pays a recurring or update fee.

Parameters:

  • _code (bytes8): Referral code.

  • _toHolder (address): Holder address.

  • _mul (uint256): Fee multiplier.

  • _lockToChainIds (uint256[]): Chain IDs for cross-chain fee locking.

  • _crossChainFees (uint256[]): Corresponding cross-chain fees.

Returns:

  • None

Modifiers:

  • external

  • payable

getUpdateFee (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Gets the current update fee based on a referral code.

Parameters:

  • _refCode (bytes8): The referral code.

Returns:

  • uint256: The fee amount.

Modifiers:

  • external

isLifetimeNftLocked (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Checks if the lifetime NFT is locked for the given owner address.

Parameters:

  • _owner (address): Address to check.

Returns:

  • bool: True if locked, false otherwise.

Modifiers:

  • external

  • view

isLifetimeNftLockedAndUpdate (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Similar to isLifetimeNftLocked but may update state as needed.

Parameters:

  • _owner (address): Address to check.

Returns:

  • bool: True if locked, false otherwise.

Modifiers:

  • external

isPluginRegistered (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Determines if a plugin address is registered.

Parameters:

  • _plugin (address): Plugin contract address.

Returns:

  • bool: True if plugin is registered, false otherwise.

Modifiers:

  • external

  • view

isCryptoLegacyBuilt (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Checks if a particular CryptoLegacy address is recognized (built) by this manager.

Parameters:

  • _cryptoLegacy (address): Contract address to check.

Returns:

  • bool: True if recognized, false otherwise.

Modifiers:

  • external

  • view

pluginsRegistry (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Returns the IPluginsRegistry reference.

Parameters: None

Returns:

  • IPluginsRegistry: The plugins registry interface.

Modifiers:

  • external

  • view

getFactoryAddress (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Returns the factory address used to create CryptoLegacy contracts.

Parameters: None

Returns:

  • address: The factory contract address.

Modifiers:

  • external

  • view

beneficiaryRegistry (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Returns the beneficiary registry instance.

Parameters: None

Returns:

  • IBeneficiaryRegistry: The registry interface.

Modifiers:

  • external

  • view

externalLens (ICLBM)

Interface: ICryptoLegacyBuildManager Description: Returns the external lens address for cross-contract views.

Parameters: None

Returns:

  • address: The external lens address.

Modifiers:

  • external

  • view

privateFunction (ICLBM)

None


ICryptoLegacyDiamondBase (ICLDB)

constructor (ICLDB)

None

publicFunction (ICLDB)

None

externalFunction (ICLDB)

None

privateFunction (ICLDB)

None


ICryptoLegacyFactory (ICLF)

constructor (ICLF)

None

createCryptoLegacy (ICLF)

Interface: ICryptoLegacyFactory Description: Deploys a new CryptoLegacy contract using optional Create2 arguments.

Parameters:

  • _owner (address): The owner of the new contract.

  • _plugins (address[]): An array of plugins to add.

  • _create2Args (Create2Args): Struct with create2Address & create2Salt info.

Returns:

  • address payable: The deployed CryptoLegacy contract address.

Modifiers:

  • external

setBuildOperator (ICLF)

Interface: ICryptoLegacyFactory Description: Adds or removes a build operator.

Parameters:

  • _operator (address): Operator address.

  • _isAdd (bool): True to add, false to remove.

Returns:

  • None

Modifiers:

  • external

privateFunction (ICLF)

None


ICryptoLegacyLens (ICLL)

constructor (ICLL)

None

publicFunction (ICLL)

None

externalFunction (ICLL)

None

getMessagesBlockNumbersByRecipient (ICLL)

Interface: ICryptoLegacyLens Description: Returns the block numbers at which messages were recorded for a given recipient.

Parameters:

  • _recipient (bytes32): Recipient identifier.

Returns:

  • uint64[]: Array of block numbers.

Modifiers:

  • external

  • view

getVestedAndClaimedData (ICLL)

Interface: ICryptoLegacyLens Description: Retrieves the vested and claimed token data for a specific beneficiary over multiple tokens.

Parameters:

  • _beneficiary (bytes32): The beneficiary identifier.

  • _tokens (address[]): Array of token addresses.

Returns:

  • BeneficiaryTokenData[]: An array of vesting data structs.

  • startDate (uint64): The vesting start date.

  • endDate (uint64): The vesting end date.

Modifiers:

  • external

  • view

getCryptoLegacyBaseData (ICLL)

Interface: ICryptoLegacyLens Description: Returns base info about the CryptoLegacy contract, like fees and intervals.

Parameters: None

Returns:

  • CryptoLegacyBaseData: Struct with base config data.

Modifiers:

  • external

  • view

getCryptoLegacyListData (ICLL)

Interface: ICryptoLegacyLens Description: Returns extended data about beneficiaries, transfers, plugins, and token distributions.

Parameters:

  • _tokens (address[]): Array of tokens for which distribution info is fetched.

Returns:

  • CryptoLegacyListData: Struct with beneficiaries, plugin info, distributions, etc.

Modifiers:

  • external

  • view

privateFunction (ICLL)

None


ICryptoLegacyOwnable (ICLO)

constructor (ICLO)

None

publicFunction (ICLO)

None

externalFunction (ICLO)

None

privateFunction (ICLO)

None


ICryptoLegacyPlugin (ICLP)

constructor (ICLP)

None

getSigs (ICLP)

Interface: ICryptoLegacyPlugin Description: Returns an array of function selectors provided by this plugin.

Parameters: None

Returns:

  • bytes4[]: List of function selectors.

Modifiers:

  • external

  • view

getSetupSigs (ICLP)

Interface: ICryptoLegacyPlugin Description: Returns an array of setup function selectors for this plugin.

Parameters: None

Returns:

  • bytes4[]: List of setup function selectors.

Modifiers:

  • external

  • view

getPluginName (ICLP)

Interface: ICryptoLegacyPlugin Description: Returns the readable name of the plugin.

Parameters: None

Returns:

  • string: Plugin name.

Modifiers:

  • external

  • view

getPluginVer (ICLP)

Interface: ICryptoLegacyPlugin Description: Returns the version of the plugin.

Parameters: None

Returns:

  • uint16: Plugin version.

Modifiers:

  • external

  • view

privateFunction (ICLP)

None


ICryptoLegacyUpdaterPlugin (ICLUP)

constructor (ICLUP)

None

publicFunction (ICLUP)

None

externalFunction (ICLUP)

None

privateFunction (ICLUP)

None


IDeBridgeGate (IDBG)

constructor (IDBG)

None

publicFunction (IDBG)

None

sendMessage (IDBG)

Interface: IDeBridgeGate Description: Sends a cross-chain message (no asset transfer) through DeBridge.

Parameters:

  • _dstChainId (uint256): Destination chain ID.

  • _targetContractAddress (bytes): Target contract address in destination chain encoding.

  • _targetContractCalldata (bytes): Calldata for the target contract.

  • _flags (uint256): Bitmask flags controlling behavior (optional overload).

  • _referralCode (uint32): Referral code for identification (optional overload).

Returns:

  • bytes32: A submission ID used to track the message.

Modifiers:

  • external

  • payable

claim (IDBG)

Interface: IDeBridgeGate Description: Claims assets from the debridge (secondary chain -> native chain scenario).

Parameters:

  • _debridgeId (bytes32): Asset identifier.

  • _amount (uint256): Amount to claim.

  • _chainIdFrom (uint256): Origin chain ID.

  • _receiver (address): Recipient address.

  • _nonce (uint256): Submission nonce.

  • _signatures (bytes): Validator signatures.

  • _autoParams (bytes): Auto-call parameters.

Returns:

  • None

Modifiers:

  • external

withdrawFee (IDBG)

Interface: IDeBridgeGate Description: Withdraws collected fees to the fee proxy.

Parameters:

  • _debridgeId (bytes32): The asset identifier.

Returns:

  • None

Modifiers:

  • external

getDebridgeChainAssetFixedFee (IDBG)

Interface: IDeBridgeGate Description: Returns the fixed fee for an asset bridging to a particular chain.

Parameters:

  • _debridgeId (bytes32): Asset identifier.

  • _chainId (uint256): Destination chain ID.

Returns:

  • uint256: The fixed fee amount.

Modifiers:

  • external

  • view

privateFunction (IDBG)

None


IDiamondCut (IDC)

constructor (IDC)

None

diamondCut (IDC)

Interface: IDiamondCut Description: Adds, replaces, or removes multiple function selectors on a diamond.

Parameters:

  • _diamondCut (FacetCut[]): List of facet addresses and their function selectors.

  • _init (address): Address of the contract or facet to execute calldata.

  • _calldata (bytes): Function call to be executed with delegatecall.

Returns:

  • None

Modifiers:

  • external

privateFunction (IDC)

None


IDiamondLoupe (IDL)

constructor (IDL)

None

facets (IDL)

Interface: IDiamondLoupe Description: Gets all facet addresses and their four-byte selectors.

Parameters: None

Returns:

  • Facet[]: An array of facet address plus selectors.

Modifiers:

  • external

  • view

facetFunctionSelectors (IDL)

Interface: IDiamondLoupe Description: Gets all the function selectors provided by a specific facet address.

Parameters:

  • _facet (address): The facet address.

Returns:

  • bytes4[]: List of function selectors.

Modifiers:

  • external

  • view

facetAddresses (IDL)

Interface: IDiamondLoupe Description: Gets all the facet addresses in the diamond.

Parameters: None

Returns:

  • address[]: List of facet addresses.

Modifiers:

  • external

  • view

facetAddress (IDL)

Interface: IDiamondLoupe Description: Gets the facet address that supports a given function selector.

Parameters:

  • _functionSelector (bytes4): The function selector.

Returns:

  • address: The facet address, or zero if not found.

Modifiers:

  • external

  • view

privateFunction (IDL)

None


IFeeRegistry (IFR)

constructor (IFR)

None

getContractCaseFee (IFR)

Interface: IFeeRegistry Description: Returns the fee associated with a specific contract/case combination.

Parameters:

  • _contract (address): Contract address.

  • _case (uint8): Case identifier.

Returns:

  • uint256: The configured fee.

Modifiers:

  • external

  • view

getContractCaseFeeForCode (IFR)

Interface: IFeeRegistry Description: Returns the fee for a contract/case combination plus any code-specific overrides.

Parameters:

  • _contract (address): Contract address.

  • _case (uint8): Case identifier.

  • _code (bytes8): Referral code.

Returns:

  • uint256: The fee amount.

Modifiers:

  • external

  • view

takeFee (IFR)

Interface: IFeeRegistry Description: Collects a fee from a caller, typically forwarding a share to a referral.

Parameters:

  • _contract (address): Contract address.

  • _case (uint8): Case identifier.

  • _code (bytes8): Referral code.

  • _mul (uint256): Fee multiplier.

Returns:

  • None

Modifiers:

  • external

  • payable

createCustomCode (IFR)

Interface: IFeeRegistry Description: Creates a custom referral code with cross-chain locking.

Parameters:

  • _referrer (address): Referrer address.

  • _recipient (address): Recipient address for referral fees.

  • _shortCode (bytes8): Custom code to create.

  • _chainIds (uint256[]): Chains for locking references.

  • _crossChainFees (uint256[]): Fees for each chain.

Returns:

  • bytes8 code: The code created.

  • uint256 totalFee: The total fee paid.

Modifiers:

  • external

  • payable

createCode (IFR)

Interface: IFeeRegistry Description: Creates a referral code.

Parameters:

  • _referrer (address): Referrer address.

  • _recipient (address): Referral recipient address.

  • _chainIds (uint256[]): Chains to lock references.

  • _crossChainFees (uint256[]): Fees for each chain.

Returns:

  • bytes8 code: The code created.

  • uint256 totalFee: The total fee paid.

Modifiers:

  • external

  • payable

updateCrossChainsRef (IFR)

Interface: IFeeRegistry Description: Updates cross-chain references for an existing referrer.

Parameters:

  • _referrer (address): The referrer address.

  • _chainIds (uint256[]): Array of chain IDs to update.

  • _crossChainFees (uint256[]): Corresponding fees.

Returns:

  • uint256 totalFee: The total fee paid.

Modifiers:

  • external

  • payable

accumulatedFee (IFR)

Interface: IFeeRegistry Description: Returns the total accumulated fee for the system.

Parameters: None

Returns:

  • uint128: The accumulated fee.

Modifiers:

  • external

  • view

getSupportedRefInChainsList (IFR)

Interface: IFeeRegistry Description: Returns the list of chain IDs that support referral codes.

Parameters: None

Returns:

  • uint256[]: The chain IDs.

Modifiers:

  • external

  • view

privateFunction (IFR)

None


ILockChainGate (ILCG)

constructor (ILCG)

None

lockLifetimeNft (ILCG)

Interface: ILockChainGate Description: Locks a lifetime NFT from a holder to a set of chain IDs.

Parameters:

  • _tokenId (uint256): NFT token ID.

  • _owner (address): The current owner address.

  • _lockToChainIds (uint256[]): Chains to which the NFT is locked.

  • _crossChainFees (uint256[]): Fees for each chain lock.

Returns:

  • None

Modifiers:

  • external

  • payable

isNftLocked (ILCG)

Interface: ILockChainGate Description: Checks if the NFT for a given owner is currently locked.

Parameters:

  • _owner (address): Owner address.

Returns:

  • bool: True if locked, false otherwise.

Modifiers:

  • external

  • view

isNftLockedAndUpdate (ILCG)

Interface: ILockChainGate Description: Similar to isNftLocked, but may also update the state if needed.

Parameters:

  • _owner (address): Owner address.

Returns:

  • bool: True if locked, false otherwise.

Modifiers:

  • external

calculateCrossChainCreateRefNativeFee (ILCG)

Interface: ILockChainGate Description: Calculates the native fee needed for cross-chain reference creation.

Parameters:

  • _chainIds (uint256[]): Array of chain IDs.

  • _crossChainFees (uint256[]): Fees for each chain.

Returns:

  • uint256: The total native fee required.

Modifiers:

  • external

  • view

privateFunction (ILCG)

None


ILegacyMessenger (ILM)

constructor (ILM)

None

publicFunction (ILM)

None

externalFunction (ILM)

None

privateFunction (ILM)

None


ILido (ILID)

constructor (ILID)

None

submit (ILID)

Interface: ILido Description: Submits Ether to Lido to mint stETH.

Parameters:

  • _referral (address): Optional referral address.

Returns:

  • uint256: Amount of stETH minted.

Modifiers:

  • external

  • payable

transferShares (ILID)

Interface: ILido Description: Transfers stETH shares from caller to a recipient.

Parameters:

  • _recipient (address): The recipient address.

  • _sharesAmount (uint256): Number of shares to transfer.

Returns:

  • uint256: The amount of stETH transferred.

Modifiers:

  • external

transferSharesFrom (ILID)

Interface: ILido Description: Transfers stETH shares from one address to another.

Parameters:

  • _sender (address): The source of the shares.

  • _recipient (address): The destination address.

  • _sharesAmount (uint256): Number of shares to transfer.

Returns:

  • uint256: The amount of stETH transferred.

Modifiers:

  • external

sharesOf (ILID)

Interface: ILido Description: Retrieves the number of shares owned by an account.

Parameters:

  • _account (address): The address to check.

Returns:

  • uint256: The share balance.

Modifiers:

  • external

  • view

privateFunction (ILID)

None


ILifetimeNft (ILN)

constructor (ILN)

None

mint (ILN)

Interface: ILifetimeNft Description: Mints a lifetime NFT to a specified holder.

Parameters:

  • _tokenOwner (address): The address receiving the NFT.

Returns:

  • uint256: The newly minted token ID.

Modifiers:

  • external

setMinterOperator (ILN)

Interface: ILifetimeNft Description: Allows setting an operator that can mint on behalf of the contract.

Parameters:

  • _minter (address): The operator address.

  • _isActive (bool): True to allow minting, false to revoke.

Returns:

  • None

Modifiers:

  • external

privateFunction (ILN)

None


IPluginsRegistry (IPLR)

constructor (IPLR)

None

getPluginDescriptionBlockNumbers (IPLR)

Interface: IPluginsRegistry Description: Retrieves the block numbers associated with a plugin’s description updates.

Parameters:

  • _plugin (address): Plugin address.

Returns:

  • uint64[]: Array of block numbers.

Modifiers:

  • external

  • view

isPluginRegistered (IPLR)

Interface: IPluginsRegistry Description: Checks if a plugin is registered in the system.

Parameters:

  • _plugin (address): Plugin address.

Returns:

  • bool: True if registered, false otherwise.

Modifiers:

  • external

  • view

privateFunction (IPLR)

None


ISafeMinimalMultisig (ISMMS)

constructor (ISMMS)

None

publicFunction (ISMMS)

None

externalFunction (ISMMS)

None

privateFunction (ISMMS)

None


ISignatureRoleTimelock (ISRT)

constructor (ISRT)

None

publicFunction (ISRT)

None

externalFunction (ISRT)

None

privateFunction (ISRT)

None


ITrustedGuardiansPlugin (ITGP)

constructor (ITGP)

None

isGuardiansInitialized (ITGP)

Interface: ITrustedGuardiansPlugin Description: Checks if guardians are explicitly initialized.

Parameters: None

Returns:

  • bool: True if initialized, false otherwise.

Modifiers:

  • external

  • view

privateFunction (ITGP)

None


DiamondLoupeFacet (DLF)

constructor (DLF)

None

facets (DLF)

Contract: DiamondLoupeFacet Description: Returns all facets and their function selectors in this diamond.

Parameters: None

Returns:

  • Facet[]: An array describing each facet.

Modifiers:

  • external

  • view

facetFunctionSelectors (DLF)

Contract: DiamondLoupeFacet Description: Gets all function selectors for a specific facet.

Parameters:

  • _facet (address): The facet address.

Returns:

  • bytes4[]: The function selectors.

Modifiers:

  • external

  • view

facetAddresses (DLF)

Contract: DiamondLoupeFacet Description: Returns all facet addresses used by the diamond.

Parameters: None

Returns:

  • address[]: Array of facet addresses.

Modifiers:

  • external

  • view

facetAddress (DLF)

Contract: DiamondLoupeFacet Description: Finds the facet address that implements a given function selector.

Parameters:

  • _functionSelector (bytes4): Function selector.

Returns:

  • address: The facet address.

Modifiers:

  • external

  • view

storageFacetAddress (DLF)

Contract: DiamondLoupeFacet Description: Similar to facetAddress, but checks the diamond’s storage mapping directly.

Parameters:

  • _functionSelector (bytes4): Function selector.

Returns:

  • address: The facet address from storage.

Modifiers:

  • external

  • view

supportsInterface (DLF)

Contract: DiamondLoupeFacet Description: Implements ERC165 to check if an interface is supported.

Parameters:

  • _interfaceId (bytes4): The interface ID.

Returns:

  • bool: True if supported, false otherwise.

Modifiers:

  • external

  • view

privateFunction (DLF)

None


LibCreate2Deploy (L2D)

constructor (L2D)

None

internalFunction (L2D) - deployByCreate2

Library: LibCreate2Deploy Description: Deploys a contract using CREATE2 if it does not already exist.

Parameters:

  • _contractAddress (address): The expected deployed address (can be zero).

  • _factorySalt (bytes32): Salt used in the CREATE2 process.

  • _contractBytecode (bytes): Bytecode to be deployed.

Returns:

  • address: The deployed contract address.

Modifiers:

  • internal

internalFunction (L2D) - computeAddress

Library: LibCreate2Deploy Description: Computes the deterministic address for the deployment.

Parameters:

  • _salt (bytes32): The salt (usually _factorySalt).

  • _bytecodeHash (bytes32): Hash of the contract’s bytecode.

Returns:

  • address: The computed CREATE2 address.

Modifiers:

  • internal

privateFunction (L2D)

None


LibCryptoLegacy (LCL)

constructor (LCL)

None

internalFunction (LCL) - getCryptoLegacyStorage

Library: LibCryptoLegacy Description: Retrieves the main CryptoLegacy storage struct from a fixed position.

Parameters: None

Returns:

  • ICryptoLegacy.CryptoLegacyStorage: Reference to the storage struct.

Modifiers:

  • internal

  • pure

internalFunction (LCL) - _checkDisabledFunc

Library: LibCryptoLegacy Description: Checks if a particular function is disabled by default flags.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): The storage reference.

  • _funcFlag (uint8): The function flag to check.

Returns:

  • None

Modifiers:

  • internal

  • view

internalFunction (LCL) - _checkDistributionStart

Library: LibCryptoLegacy Description: Ensures distribution has not already started, reverts if it has.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): The storage reference.

Returns:

  • None

Modifiers:

  • internal

  • view

internalFunction (LCL) - _isDistributionStarted

Library: LibCryptoLegacy Description: Checks if distribution is currently active.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): The storage reference.

Returns:

  • bool: True if distribution started, false otherwise.

Modifiers:

  • internal

  • view

internalFunction (LCL) - _checkOwner

Library: LibCryptoLegacy Description: Verifies the caller is the contract owner, reverts otherwise.

Parameters: None

Returns:

  • None

Modifiers:

  • internal

  • view

internalFunction (LCL) - _checkSenderOwner

Library: LibCryptoLegacy Description: Checks msg.sender against the diamond’s contract owner.

Parameters: None

Returns:

  • None

Modifiers:

  • internal

  • view

internalFunction (LCL) - _checkPause

Library: LibCryptoLegacy Description: Reverts if the contract is currently paused.

Parameters: None

Returns:

  • None

Modifiers:

  • internal

  • view

internalFunction (LCL) - _checkAddressIsBeneficiary

Library: LibCryptoLegacy Description: Validates that a given address is a registered beneficiary.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _addr (address): Address to check.

Returns:

  • bytes32: The beneficiary hash if valid.

Modifiers:

  • internal

  • view

internalFunction (LCL) - _checkDistributionReadyForBeneficiary

Library: LibCryptoLegacy Description: Ensures the caller is a beneficiary and distribution is ready.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

Returns:

  • bytes32: The beneficiary hash.

Modifiers:

  • internal

  • view

internalFunction (LCL) - _checkDistributionReady

Library: LibCryptoLegacy Description: Checks that distribution is active or started.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

Returns:

  • None

Modifiers:

  • internal

  • view

internalFunction (LCL) - _getBeneficiariesCount

Library: LibCryptoLegacy Description: Returns the total number of beneficiaries.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

Returns:

  • uint256: The beneficiary count.

Modifiers:

  • internal

  • view

internalFunction (LCL) - _isLifetimeActiveAndUpdate

Library: LibCryptoLegacy Description: Checks if a lifetime NFT is active for the given owner, possibly updating state.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _owner (address): The owner address.

Returns:

  • bool: True if lifetime NFT is locked, false otherwise.

Modifiers:

  • internal

internalFunction (LCL) - _takeFee

Library: LibCryptoLegacy Description: Handles fee logic (lifetime NFT or recurring fee) for updates.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _owner (address): Owner address.

  • _ref (address): Optional referral address.

  • _refShare (uint256): Referral share in basis points.

  • _lockToChainIds (uint256[]): Chain IDs to lock references.

  • _crossChainFees (uint256[]): Fees for each chain.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCL) - _checkFee

Library: LibCryptoLegacy Description: Validates that msg.value is correct for the required fee.

Parameters:

  • _fee (uint256): The expected fee amount.

Returns:

  • None

Modifiers:

  • internal

  • pure

internalFunction (LCL) - _sendFeeByTransfer

Library: LibCryptoLegacy Description: Sends fees via direct transfer to the build manager and referral if provided.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _buildManagerAddress (address): Build manager address.

  • _ref (address): Referral address.

  • _refShare (uint256): Referral share in basis points.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCL) - _tokenPrepareToDistribute

Library: LibCryptoLegacy Description: Prepares token distribution by updating the amount to distribute if needed.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _token (address): Token address.

Returns:

  • ICryptoLegacy.TokenDistribution: Reference to the updated distribution record.

Modifiers:

  • internal

internalFunction (LCL) - _getStartAndEndDate

Library: LibCryptoLegacy Description: Calculates a beneficiary's vesting start and end timestamps.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • bc (ICryptoLegacy.BeneficiaryConfig): Beneficiary config.

Returns:

  • startDate (uint64), endDate (uint64)

Modifiers:

  • internal

  • view

internalFunction (LCL) - _getVestedAndClaimedAmount

Library: LibCryptoLegacy Description: Computes how much a beneficiary has vested and already claimed.

Parameters:

  • td (ICryptoLegacy.TokenDistribution): Token distribution info.

  • bc (ICryptoLegacy.BeneficiaryConfig): Beneficiary config.

  • bv (ICryptoLegacy.BeneficiaryVesting): Beneficiary vesting record.

  • _token (address): Token address.

  • _startDate (uint64): Vesting start time.

  • _endDate (uint64): Vesting end time.

Returns:

  • vestedAmount (uint256),

  • claimedAmount (uint256),

  • totalAmount (uint256)

Modifiers:

  • internal

  • view

internalFunction (LCL) - _getBeneficiaryVesting

Library: LibCryptoLegacy Description: Returns the BeneficiaryVesting struct for a given beneficiary.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _beneficiary (bytes32): Beneficiary hash.

Returns:

  • ICryptoLegacy.BeneficiaryVesting: The vesting info reference.

Modifiers:

  • internal

  • view

internalFunction (LCL) - _setCryptoLegacyToBeneficiaryRegistry

Library: LibCryptoLegacy Description: Registers or unregisters an entity in the beneficiary registry as owner/beneficiary/guardian.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _hash (bytes32): The entity hash.

  • _entityType (IBeneficiaryRegistry.EntityType): The role type.

  • _isAdd (bool): True to add, false to remove.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCL) - _setCryptoLegacyListToBeneficiaryRegistry

Library: LibCryptoLegacy Description: Updates a list of addresses for recovery roles in the beneficiary registry.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _oldHashes (bytes32[]): Old recovery identifiers.

  • _newHashes (bytes32[]): New recovery identifiers.

  • _entityType (IBeneficiaryRegistry.EntityType): Must be RECOVERY.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCL) - _updateOwnerInBeneficiaryRegistry

Library: LibCryptoLegacy Description: Deregisters old owner, registers the new owner in the registry.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _newOwner (address): New owner address.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCL) - _transferTreasuryTokensToLegacy

Library: LibCryptoLegacy Description: Transfers tokens from multiple holders to the legacy contract’s balance.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _holders (address[]): List of holder addresses.

  • _tokens (address[]): List of token addresses.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCL) - _transferTokensFromLegacy

Library: LibCryptoLegacy Description: Transfers tokens out of the legacy contract to specified recipients.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _transfers (ICryptoLegacy.TokenTransferTo[]): The transfers array.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCL) - _addressToHash

Library: LibCryptoLegacy Description: Hashes an address into a bytes32 beneficiary/guardian/owner identifier.

Parameters:

  • _addr (address)

Returns:

  • bytes32: The keccak256 hash.

Modifiers:

  • internal

  • pure

privateFunction (LCL)

None


LibCryptoLegacyPlugins (LCLP)

constructor (LCLP)

None

internalFunction (LCLP) - _validatePlugin

Library: LibCryptoLegacyPlugins Description: Checks if a plugin is registered in the build manager. Reverts if not.

Parameters:

  • _cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _plugin (address): Plugin address.

Returns:

  • None

Modifiers:

  • internal

  • view

internalFunction (LCLP) - _addPluginList

Library: LibCryptoLegacyPlugins Description: Adds an array of plugins to the diamond, verifying registration first.

Parameters:

  • _cls (ICryptoLegacy.CryptoLegacyStorage): Storage reference.

  • _plugins (address[]): Array of plugin addresses.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCLP) - _removePlugin

Library: LibCryptoLegacyPlugins Description: Removes all function selectors associated with a plugin from the diamond.

Parameters:

  • _plugin (ICryptoLegacyPlugin): Plugin instance.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCLP) - _getFacetAddressPosition

Library: LibCryptoLegacyPlugins Description: Finds the index of a facet address in the diamond storage array.

Parameters:

  • ds (LibDiamond.DiamondStorage): Diamond storage reference.

  • _facetAddress (address): Facet address to locate.

Returns:

  • uint256: The index position.

Modifiers:

  • private

  • view

internalFunction (LCLP) - _addFacetAddressIfNotExists

Library: LibCryptoLegacyPlugins Description: Adds a facet address to diamond storage if it doesn’t already exist.

Parameters:

  • ds (LibDiamond.DiamondStorage): Diamond storage reference.

  • _facetAddress (address): Facet address.

Returns:

  • None

Modifiers:

  • private

internalFunction (LCLP) - _removeFacetAddress

Library: LibCryptoLegacyPlugins Description: Removes a facet address from the diamond storage array.

Parameters:

  • ds (LibDiamond.DiamondStorage): Diamond storage reference.

  • _facetAddress (address)

Returns:

  • None

Modifiers:

  • private

addFunctions (LCLP)

Library: LibCryptoLegacyPlugins Description: Adds new function selectors to a given facet in diamond storage.

Parameters:

  • _facetAddress (address): The facet providing these functions.

  • _functionSelectors (bytes4[]): The function selectors to add.

Returns:

  • None

Modifiers:

  • internal

removeFunctions (LCLP)

Library: LibCryptoLegacyPlugins Description: Removes function selectors from a facet.

Parameters:

  • _facetAddress (address): The facet address to remove functions from.

  • _functionSelectors (bytes4[]): The function selectors to remove.

Returns:

  • None

Modifiers:

  • internal

internalFunction (LCLP) - _findFacetBySelector

Library: LibCryptoLegacyPlugins Description: Finds which facet address (if any) provides a given function selector.

Parameters:

  • ds (LibDiamond.DiamondStorage): Diamond storage.

  • _selector (bytes4): The function selector.

Returns:

  • address: The facet address or zero if none found.

Modifiers:

  • internal

  • view

privateFunction (LCLP)

None


LibDiamond (LD)

constructor (LD)

None

diamondStorage (LD)

Library: LibDiamond Description: Returns the diamond storage struct from a fixed slot.

Parameters: None

Returns:

  • (DiamondStorage): The diamond storage reference.

Modifiers:

  • internal

  • pure

setContractOwner (LD)

Library: LibDiamond Description: Sets the contract owner in diamond storage.

Parameters:

  • _newOwner (address)

Returns:

  • None

Modifiers:

  • internal

contractOwner (LD)

Library: LibDiamond Description: Returns the current contract owner from diamond storage.

Parameters: None

Returns:

  • address: The owner address.

Modifiers:

  • internal

  • view

setPause (LD)

Library: LibDiamond Description: Sets the pause state in diamond storage.

Parameters:

  • _isPaused (bool)

Returns:

  • None

Modifiers:

  • internal

getPause (LD)

Library: LibDiamond Description: Checks if the diamond is paused.

Parameters: None

Returns:

  • bool: True if paused, otherwise false.

Modifiers:

  • internal

  • view

enforceIsContractOwner (LD)

Library: LibDiamond Description: Reverts unless msg.sender is the contract owner.

Parameters: None

Returns:

  • None

Modifiers:

  • internal

  • view

diamondCut (LD)

Library: LibDiamond Description: Internal function that processes adding, replacing, or removing facets.

Parameters:

  • _diamondCut (IDiamondCut.FacetCut[]): Facet modifications.

  • _init (address): Contract address for delegatecall.

  • _calldata (bytes): Initialization call data.

Returns:

  • None

Modifiers:

  • internal

addFunctions (LD)

Library: LibDiamond Description: Adds new function selectors to a facet.

Parameters:

  • _facetAddress (address): Facet address.

  • _functionSelectors (bytes4[]): The selectors.

Returns:

  • None

Modifiers:

  • internal

replaceFunctions (LD)

Library: LibDiamond Description: Replaces function selectors with new ones from another facet.

Parameters:

  • _facetAddress (address): New facet address.

  • _functionSelectors (bytes4[]): The selectors to replace.

Returns:

  • None

Modifiers:

  • internal

removeFunctions (LD)

Library: LibDiamond Description: Removes function selectors from a facet.

Parameters:

  • _facetAddress (address): Must be zero for removal.

  • _functionSelectors (bytes4[]): The selectors to remove.

Returns:

  • None

Modifiers:

  • internal

removeFunction (LD)

Library: LibDiamond Description: Internal helper to remove a single function selector mapping.

Parameters:

  • _facetAddress (address): The current facet.

  • _selector (bytes4): The function selector.

Returns:

  • None

Modifiers:

  • internal

initializeDiamondCut (LD)

Library: LibDiamond Description: Executes optional initialization call after diamond cut.

Parameters:

  • _init (address): Address to delegatecall.

  • _calldata (bytes): Call data.

Returns:

  • None

Modifiers:

  • internal

enforceHasContractCode (LD)

Library: LibDiamond Description: Ensures that a contract address has code (nonzero extcodesize).

Parameters:

  • _contract (address)

  • _errorMessage (string)

Returns:

  • None

Modifiers:

  • internal

  • view

privateFunction (LD)

None


LibSafeMinimalBeneficiaryMultisig (LSMBM)

constructor (LSMBM)

None

internalFunction (LSMBM) - _checkIsMultisigExecutor

Library: LibSafeMinimalBeneficiaryMultisig Description: Ensures that msg.sender is the contract itself for multisig execution.

Parameters: None

Returns:

  • None

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _initializationstatus

Library: LibSafeMinimalBeneficiaryMultisig Description: Returns the initialization status of the multisig storage.

Parameters:

  • s (ISafeMinimalMultisig.Storage): The multisig storage.

Returns:

  • ISafeMinimalMultisig.InitializationStatus

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _getVotersAndConfirmations

Library: LibSafeMinimalBeneficiaryMultisig Description: Retrieves the list of voters and the required confirmations.

Parameters:

  • s (ISafeMinimalMultisig.Storage): Multisig storage.

Returns:

  • bytes32[]: The voter list.

  • uint256: Required confirmations.

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _getProposalList

Library: LibSafeMinimalBeneficiaryMultisig Description: Returns the entire list of proposals in storage.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

Returns:

  • ISafeMinimalMultisig.Proposal[]: Array of proposals.

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _getProposal

Library: LibSafeMinimalBeneficiaryMultisig Description: Retrieves a single proposal by ID.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _proposalId (uint256)

Returns:

  • ISafeMinimalMultisig.Proposal: The proposal struct.

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _getProposalListWithStatuses

Library: LibSafeMinimalBeneficiaryMultisig Description: Retrieves all proposals with their voting statuses.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): Legacy storage reference.

  • s (ISafeMinimalMultisig.Storage): Multisig storage.

Returns:

  • bytes32[]: The voter list.

  • uint256: Required confirmations.

  • ISafeMinimalMultisig.ProposalWithStatus[]: Extended proposal data.

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _getProposalWithStatus

Library: LibSafeMinimalBeneficiaryMultisig Description: Retrieves a specific proposal by ID, including who confirmed it.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage)

  • s (ISafeMinimalMultisig.Storage)

  • _proposalId (uint256)

Returns:

  • bytes32[]: Voter list.

  • uint256: Required confirmations.

  • ISafeMinimalMultisig.ProposalWithStatus: The proposal plus confirmation flags.

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _getRequiredConfirmations

Library: LibSafeMinimalBeneficiaryMultisig Description: Computes the needed confirmations for a proposal, possibly defaulting to half+1.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • cls (ICryptoLegacy.CryptoLegacyStorage)

Returns:

  • uint256: Required confirmations.

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _getVoters

Library: LibSafeMinimalBeneficiaryMultisig Description: Returns the list of active voters from beneficiaries.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage)

Returns:

  • bytes32[]: Voter identifiers.

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _getDefaultRequiredConfirmations

Library: LibSafeMinimalBeneficiaryMultisig Description: Default confirmations = floor(beneficiaries/2)+1.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage)

Returns:

  • uint256: The default threshold.

Modifiers:

  • internal

  • view

internalFunction (LSMBM) - _setConfirmations

Library: LibSafeMinimalBeneficiaryMultisig Description: Sets the required confirmations in storage, ensuring valid range.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _voters (bytes32[])

  • _requiredConfirmations (uint256)

Returns:

  • None

Modifiers:

  • internal

internalFunction (LSMBM) - _initializeIfNot

Library: LibSafeMinimalBeneficiaryMultisig Description: Initializes the multisig if not already done, setting default confirmations.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _voters (bytes32[])

Returns:

  • None

Modifiers:

  • internal

internalFunction (LSMBM) - _propose

Library: LibSafeMinimalBeneficiaryMultisig Description: Creates a new multisig proposal.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _allowedMethods (bytes4[])

  • _selector (bytes4)

  • _params (bytes)

Returns:

  • None

Modifiers:

  • internal

internalFunction (LSMBM) - _confirm

Library: LibSafeMinimalBeneficiaryMultisig Description: Confirms an existing proposal, possibly executing it.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _proposalId (uint256)

Returns:

  • None

Modifiers:

  • internal

privateFunction (LSMBM)

None


LibSafeMinimalMultisig (LSMM)

constructor (LSMM)

None

internalFunction (LSMM) - _checkIsVoterAllowed

Library: LibSafeMinimalMultisig Description: Ensures a given voter is in the allowed voters list.

Parameters:

  • _allVoters (bytes32[])

  • _voter (bytes32)

Returns:

  • None

Modifiers:

  • internal

  • pure

internalFunction (LSMM) - _setVotersAndConfirmations

Library: LibSafeMinimalMultisig Description: Sets the voters array and required confirmations in storage.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _voters (bytes32[])

  • _requiredConfirmations (uint256)

Returns:

  • None

Modifiers:

  • internal

internalFunction (LSMM) - _initializationstatus

Library: LibSafeMinimalMultisig Description: Checks if the multisig is already initialized or still needs it.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

Returns:

  • ISafeMinimalMultisig.InitializationStatus

Modifiers:

  • internal

  • view

internalFunction (LSMM) - _calcDefaultConfirmations

Library: LibSafeMinimalMultisig Description: Calculates default confirmations from a count of voters.

Parameters:

  • _voterCount (uint256)

Returns:

  • uint256: Default confirmations (floor(n/2)+1).

Modifiers:

  • internal

  • pure

internalFunction (LSMM) - _isMethodAllowed

Library: LibSafeMinimalMultisig Description: Checks if a function selector is in an allowed methods list.

Parameters:

  • _allowedMethods (bytes4[])

  • _selector (bytes4)

Returns:

  • bool

Modifiers:

  • internal

  • pure

internalFunction (LSMM) - _isVoterAllowed

Library: LibSafeMinimalMultisig Description: Checks if a voter is in an array of allowed voters.

Parameters:

  • _allVoters (bytes32[])

  • _voter (bytes32)

Returns:

  • bool

Modifiers:

  • internal

  • pure

internalFunction (LSMM) - _getConfirmedCount

Library: LibSafeMinimalMultisig Description: Counts how many voters have confirmed a proposal.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _allVoters (bytes32[])

  • _proposalId (uint256)

Returns:

  • uint256: The count of confirmations.

Modifiers:

  • internal

  • view

internalFunction (LSMM) - _getStorageVotersAndConfirmations

Library: LibSafeMinimalMultisig Description: Fetches the stored voters array and required confirmations.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

Returns:

  • bytes32[], uint256

Modifiers:

  • internal

  • view

internalFunction (LSMM) - _getProposal

Library: LibSafeMinimalMultisig Description: Returns a single proposal by ID.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _proposalId (uint256)

Returns:

  • ISafeMinimalMultisig.Proposal

Modifiers:

  • internal

  • view

internalFunction (LSMM) - _getProposalList

Library: LibSafeMinimalMultisig Description: Returns the entire proposals array.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

Returns:

  • ISafeMinimalMultisig.Proposal[]

Modifiers:

  • internal

  • view

internalFunction (LSMM) - _getProposalListWithStatusesAndStorageVoters

Library: LibSafeMinimalMultisig Description: Retrieves proposals plus statuses, using the storage’s voter list.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

Returns:

  • bytes32[]: Voters,

  • uint256: Confirmations,

  • ISafeMinimalMultisig.ProposalWithStatus[]: Proposals.

Modifiers:

  • internal

  • view

internalFunction (LSMM) - _getProposalWithStatus

Library: LibSafeMinimalMultisig Description: Combines a proposal with a boolean array tracking which voters confirmed.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • voters (bytes32[])

  • _proposalId (uint256)

Returns:

  • ISafeMinimalMultisig.ProposalWithStatus

Modifiers:

  • internal

  • view

internalFunction (LSMM) - _propose

Library: LibSafeMinimalMultisig Description: Submits a new proposal, verifying method and voter.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _allVoters (bytes32[])

  • _allowedMethods (bytes4[])

  • _selector (bytes4)

  • _params (bytes)

Returns:

  • None

Modifiers:

  • internal

internalFunction (LSMM) - _confirm

Library: LibSafeMinimalMultisig Description: Confirms a proposal, incrementing confirms. Executes if threshold is met.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _allVoters (bytes32[])

  • _proposalId (uint256)

Returns:

  • None

Modifiers:

  • internal

privateFunction (LSMM) - execute

Library: LibSafeMinimalMultisig Description: Executes a proposal’s call once enough confirmations are present.

Parameters:

  • s (ISafeMinimalMultisig.Storage)

  • _voter (bytes32)

  • _proposalId (uint256)

Returns:

  • None

Modifiers:

  • private


LibTrustedGuardiansPlugin (LTGP)

constructor (LTGP)

None

internalFunction (LTGP) - _resetGuardianVoting

Library: LibTrustedGuardiansPlugin Description: Clears guardian votes and resets distributionStartAt to zero.

Parameters:

  • cls (ICryptoLegacy.CryptoLegacyStorage): The main storage.

Returns:

  • None

Modifiers:

  • internal

privateFunction (LTGP)

None


BeneficiaryPluginAddRights (BPAR)

constructor (BPAR)

None

getSigs (BPAR)

Contract: BeneficiaryPluginAddRights Description: Returns the function selectors this plugin provides.

Parameters: None

Returns:

  • bytes4[]: The selectors.

Modifiers:

  • external

  • view

getSetupSigs (BPAR)

Contract: BeneficiaryPluginAddRights Description: Returns setup function selectors (none in this case).

Parameters: None

Returns:

  • bytes4[]: The selectors.

Modifiers:

  • external

  • pure

getPluginName (BPAR)

Contract: BeneficiaryPluginAddRights Description: Returns the plugin name string.

Parameters: None

Returns:

  • string: The name.

Modifiers:

  • public

  • view

getPluginVer (BPAR)

Contract: BeneficiaryPluginAddRights Description: Returns the plugin version as a uint16.

Parameters: None

Returns:

  • uint16: The version.

Modifiers:

  • external

  • pure

barSetMultisigConfig (BPAR)

Contract: BeneficiaryPluginAddRights Description: Sets the multisig configuration for beneficiary actions.

Parameters:

  • _requiredConfirmations (uint256): The new threshold.

Returns:

  • None

Modifiers:

  • external

barPropose (BPAR)

Contract: BeneficiaryPluginAddRights Description: Creates a new multisig proposal for beneficiary-specific actions.

Parameters:

  • _selector (bytes4): The function selector to propose.

  • _params (bytes): Encoded parameters.

Returns:

  • None

Modifiers:

  • external

barConfirm (BPAR)

Contract: BeneficiaryPluginAddRights Description: Confirms a multisig proposal. Executes if threshold is met.

Parameters:

  • _proposalId (uint256)

Returns:

  • None

Modifiers:

  • external

barAddPluginList (BPAR)

Contract: BeneficiaryPluginAddRights Description: Adds a list of plugins via a multisig executor call.

Parameters:

  • _plugins (address[]): Array of plugin addresses.

Returns:

  • None

Modifiers:

  • external

barGetInitializationStatus (BPAR)

Contract: BeneficiaryPluginAddRights Description: Checks if the underlying multisig is initialized.

Parameters: None

Returns:

  • ISafeMinimalMultisig.InitializationStatus: The status.

Modifiers:

  • external

  • view

barGetVotersAndConfirmations (BPAR)

Contract: BeneficiaryPluginAddRights Description: Retrieves current voters and confirmation threshold.

Parameters: None

Returns:

  • bytes32[]: Voters

  • uint256: Required confirmations

Modifiers:

  • external

  • view

barGetProposalWithStatus (BPAR)

Contract: BeneficiaryPluginAddRights Description: Gets a single proposal plus confirmation status.

Parameters:

  • _proposalId (uint256)

Returns:

  • bytes32[]: Voters

  • uint256: Confirmations

  • ProposalWithStatus: The proposal status

Modifiers:

  • external

  • view

barGetProposalListWithStatuses (BPAR)

Contract: BeneficiaryPluginAddRights Description: Lists all proposals with their status.

Parameters: None

Returns:

  • bytes32[]: Voters

  • uint256: Required confirmations

  • ProposalWithStatus[]: Extended statuses

Modifiers:

  • external

  • view

privateFunction (BPAR)

None


CryptoLegacyBasePlugin (CLBP)

constructor (CLBP)

None

getSigs (CLBP)

Contract: CryptoLegacyBasePlugin Description: Returns function selectors for the plugin.

Parameters: None

Returns:

  • bytes4[]: The selectors.

Modifiers:

  • external

  • view

getSetupSigs (CLBP)

Contract: CryptoLegacyBasePlugin Description: Returns setup function selectors for the base plugin.

Parameters: None

Returns:

  • bytes4[]: The setup selectors.

Modifiers:

  • external

  • view

getPluginName (CLBP)

Contract: CryptoLegacyBasePlugin Description: Returns the plugin’s name string.

Parameters: None

Returns:

  • string: The name.

Modifiers:

  • public

  • pure

getPluginVer (CLBP)

Contract: CryptoLegacyBasePlugin Description: Returns the plugin version.

Parameters: None

Returns:

  • uint16

Modifiers:

  • external

  • pure

initializeByBuildManager (CLBP)

Contract: CryptoLegacyBasePlugin Description: Initializes the contract with data from the build manager.

Parameters:

  • _updateFee (uint256): Update fee.

  • _initialFeeToPay (uint256): Initial fee required.

  • _beneficiaryHashes (bytes32[]): Beneficiaries.

  • _beneficiaryConfig (BeneficiaryConfig[]): Config array.

  • _refCode (bytes8): Referral code.

  • _updateInterval (uint64): Fee update interval.

  • _challengeTimeout (uint64): Challenge timeout.

Returns:

  • None

Modifiers:

  • external

owner (CLBP)

Contract: CryptoLegacyBasePlugin Description: Returns the diamond’s contract owner.

Parameters: None

Returns:

  • address

Modifiers:

  • public

  • view

isPaused (CLBP)

Contract: CryptoLegacyBasePlugin Description: Checks if the contract is paused.

Parameters: None

Returns:

  • bool

Modifiers:

  • public

  • view

buildManager (CLBP)

Contract: CryptoLegacyBasePlugin Description: Returns the build manager instance.

Parameters: None

Returns:

  • ICryptoLegacyBuildManager

Modifiers:

  • external

  • view

renounceOwnership (CLBP)

Contract: CryptoLegacyBasePlugin Description: Renounces contract ownership.

Parameters: None

Returns:

  • None

Modifiers:

  • public

transferOwnership (CLBP)

Contract: CryptoLegacyBasePlugin Description: Transfers ownership to a new address.

Parameters:

  • newOwner (address)

Returns:

  • None

Modifiers:

  • public

payInitialFee (CLBP)

Contract: CryptoLegacyBasePlugin Description: Pays the initial system fee, unpausing the contract if successful.

Parameters:

  • _lockToChainIds (uint256[])

  • _crossChainFees (uint256[])

Returns:

  • None

Modifiers:

  • external

  • payable

setBeneficiaries (CLBP)

Contract: CryptoLegacyBasePlugin Description: Sets or updates beneficiary data.

Parameters:

  • _beneficiaryHashes (bytes32[])

  • _beneficiaryConfig (BeneficiaryConfig[])

Returns:

  • None

Modifiers:

  • external

update (CLBP)

Contract: CryptoLegacyBasePlugin Description: Performs a periodic update, extending the next due time.

Parameters:

  • _lockToChainIds (uint256[])

  • _crossChainFees (uint256[])

Returns:

  • None

Modifiers:

  • external

  • payable

initiateChallenge (CLBP)

Contract: CryptoLegacyBasePlugin Description: Begins a challenge, setting distribution start if the owner hasn't updated.

Parameters: None

Returns:

  • None

Modifiers:

  • external

transferTreasuryTokensToLegacy (CLBP)

Contract: CryptoLegacyBasePlugin Description: Moves tokens from given holders into the legacy contract for distribution.

Parameters:

  • _holders (address[])

  • _tokens (address[])

Returns:

  • None

Modifiers:

  • external

beneficiaryClaim (CLBP)

Contract: CryptoLegacyBasePlugin Description: Allows a beneficiary to claim vested tokens.

Parameters:

  • _tokens (address[])

  • _ref (address): Referral address.

  • _refShare (uint256): Referral share in BPS.

Returns:

  • None

Modifiers:

  • external

  • payable

beneficiarySwitch (CLBP)

Contract: CryptoLegacyBasePlugin Description: Switches a beneficiary to a new hash.

Parameters:

  • _newBeneficiary (bytes32)

Returns:

  • None

Modifiers:

  • external

sendMessagesToBeneficiary (CLBP)

Contract: CryptoLegacyBasePlugin Description: Sends messages (and checks) to multiple beneficiaries.

Parameters:

  • _beneficiaryList (bytes32[])

  • _messageHashList (bytes32[])

  • _messageList (bytes[])

  • _messageCheckList (bytes[])

  • _messageType (uint256)

Returns:

  • None

Modifiers:

  • external

isLifetimeActive (CLBP)

Contract: CryptoLegacyBasePlugin Description: Checks if the lifetime NFT is active for the owner.

Parameters: None

Returns:

  • bool

Modifiers:

  • public

  • view

privateFunction (CLBP)

None


LegacyRecoveryPlugin (LRP)

constructor (LRP)

None

getSigs (LRP)

Contract: LegacyRecoveryPlugin Description: Returns the function selectors provided by this plugin.

Parameters: None

Returns:

  • bytes4[]: The selectors.

Modifiers:

  • external

  • view

getSetupSigs (LRP)

Contract: LegacyRecoveryPlugin Description: Returns setup function selectors, if any.

Parameters: None

Returns:

  • bytes4[]: The setup selectors.

Modifiers:

  • external

  • pure

getPluginName (LRP)

Contract: LegacyRecoveryPlugin Description: Returns the name of this plugin.

Parameters: None

Returns:

  • string

Modifiers:

  • public

  • pure

getPluginVer (LRP)

Contract: LegacyRecoveryPlugin Description: Returns the version of this plugin.

Parameters: None

Returns:

  • uint16

Modifiers:

  • external

  • pure

lrSetMultisigConfig (LRP)

Contract: LegacyRecoveryPlugin Description: Sets the multisig configuration for recovery.

Parameters:

  • _voters (bytes32[]): Array of guardian (recovery) hashes.

  • _requiredConfirmations (uint256)

Returns:

  • None

Modifiers:

  • external

lrPropose (LRP)

Contract: LegacyRecoveryPlugin Description: Creates a new multisig proposal for recovery actions.

Parameters:

  • _selector (bytes4): Function selector.

  • _params (bytes): Encoded parameters.

Returns:

  • None

Modifiers:

  • external

lrConfirm (LRP)

Contract: LegacyRecoveryPlugin Description: Confirms a recovery proposal; executes if threshold is met.

Parameters:

  • _proposalId (uint256)

Returns:

  • None

Modifiers:

  • external

lrTransferTreasuryTokensToLegacy (LRP)

Contract: LegacyRecoveryPlugin Description: Transfers treasury tokens from holders to the legacy contract.

Parameters:

  • _holders (address[])

  • _tokens (address[])

Returns:

  • None

Modifiers:

  • external

lrWithdrawTokensFromLegacy (LRP)

Contract: LegacyRecoveryPlugin Description: Withdraws tokens from the legacy contract to specified recipients.

Parameters:

  • _transfers (ICryptoLegacy.TokenTransferTo[])

Returns:

  • None

Modifiers:

  • external

lrResetGuardianVoting (LRP)

Contract: LegacyRecoveryPlugin Description: Resets guardian voting, clearing votes & distribution start.

Parameters: None

Returns:

  • None

Modifiers:

  • external

lrGetInitializationStatus (LRP)

Contract: LegacyRecoveryPlugin Description: Checks if the plugin’s multisig is initialized.

Parameters: None

Returns:

  • ISafeMinimalMultisig.InitializationStatus

Modifiers:

  • external

  • view

lrGetProposalWithStatus (LRP)

Contract: LegacyRecoveryPlugin Description: Fetches a single proposal with confirmation status.

Parameters:

  • _proposalId (uint256)

Returns:

  • bytes32[]: Voters

  • uint256: Required confirmations

  • ProposalWithStatus: The proposal’s status

Modifiers:

  • external

  • view

lrGetProposalListWithStatuses (LRP)

Contract: LegacyRecoveryPlugin Description: Lists proposals with statuses for the recovery plugin.

Parameters: None

Returns:

  • bytes32[]: Voters

  • uint256: Confirmations

  • ProposalWithStatus[]: Proposals

Modifiers:

  • external

  • view

privateFunction (LRP)

None


LensPlugin (LP)

constructor (LP)

None

getSigs (LP)

Contract: LensPlugin Description: Returns function selectors for this lens plugin.

Parameters: None

Returns:

  • bytes4[]

Modifiers:

  • public

  • view

getSetupSigs (LP)

Contract: LensPlugin Description: Returns setup function selectors, if any.

Parameters: None

Returns:

  • bytes4[]

Modifiers:

  • external

  • pure

getPluginName (LP)

Contract: LensPlugin Description: Returns the plugin’s name.

Parameters: None

Returns:

  • string

Modifiers:

  • external

  • pure

getPluginVer (LP)

Contract: LensPlugin Description: Returns the version number of the plugin.

Parameters: None

Returns:

  • uint16

Modifiers:

  • external

  • pure

updateInterval (LP)

Contract: LensPlugin Description: Retrieves the configured update interval for the CryptoLegacy contract.

Parameters: None

Returns:

  • uint64

Modifiers:

  • external

  • view

challengeTimeout (LP)

Contract: LensPlugin Description: Retrieves the challenge timeout in seconds.

Parameters: None

Returns:

  • uint64

Modifiers:

  • external

  • view

distributionStartAt (LP)

Contract: LensPlugin Description: Returns the timestamp when distribution starts.

Parameters: None

Returns:

  • uint64

Modifiers:

  • external

  • view

lastFeePaidAt (LP)

Contract: LensPlugin Description: Returns the timestamp of the last fee payment.

Parameters: None

Returns:

  • uint64

Modifiers:

  • external

  • view

lastUpdateAt (LP)

Contract: LensPlugin Description: Returns the timestamp of the last update action.

Parameters: None

Returns:

  • uint64

Modifiers:

  • external

  • view

initialFeeToPay (LP)

Contract: LensPlugin Description: Returns the initial fee required at creation, if any remains.

Parameters: None

Returns:

  • uint128

Modifiers:

  • external

  • view

updateFee (LP)

Contract: LensPlugin Description: Returns the current update fee.

Parameters: None

Returns:

  • uint128

Modifiers:

  • external

  • view

invitedByRefCode (LP)

Contract: LensPlugin Description: Returns the referral code used to invite the contract.

Parameters: None

Returns:

  • bytes8

Modifiers:

  • external

  • view

getBeneficiaryVesting (LP)

Contract: LensPlugin Description: Returns the claimed amount of tokens by a beneficiary for a specific token.

Parameters:

  • _beneficiary (bytes32)

  • _token (address)

Returns:

  • uint256: Claimed amount

Modifiers:

  • external

  • view

getOriginalBeneficiaryHash (LP)

Contract: LensPlugin Description: Fetches the original beneficiary hash stored for a given hash.

Parameters:

  • _beneficiary (bytes32)

Returns:

  • bytes32

Modifiers:

  • external

  • view

getBeneficiaryConfig (LP)

Contract: LensPlugin Description: Retrieves the configuration (delay, vesting, share) for a beneficiary.

Parameters:

  • _beneficiary (bytes32)

Returns:

  • ICryptoLegacy.BeneficiaryConfig

Modifiers:

  • external

  • view

getBeneficiaries (LP)

Contract: LensPlugin Description: Returns all beneficiary hashes, original hashes, and their configs.

Parameters: None

Returns:

  • (bytes32[], bytes32[], BeneficiaryConfig[])

Modifiers:

  • external

  • view

getTransferBlockNumbers (LP)

Contract: LensPlugin Description: Returns block numbers when token transfers to or from Legacy occurred.

Parameters: None

Returns:

  • uint64[]

Modifiers:

  • external

  • view

getTokensDistribution (LP)

Contract: LensPlugin Description: Retrieves distribution details for an array of tokens.

Parameters:

  • _tokens (address[])

Returns:

  • ICryptoLegacy.TokenDistribution[]

Modifiers:

  • external

  • view

getMessagesBlockNumbersByRecipient (LP)

Contract: LensPlugin Description: Returns block numbers where messages were recorded for a recipient.

Parameters:

  • _recipient (bytes32)

Returns:

  • uint64[]

Modifiers:

  • external

  • view

getVestedAndClaimedData (LP)

Contract: LensPlugin Description: Computes vested and claimed amounts for a beneficiary across multiple tokens.

Parameters:

  • _beneficiary (bytes32)

  • _tokens (address[])

Returns:

  • (BeneficiaryTokenData[], uint64, uint64)

Modifiers:

  • external

  • view

getPluginInfoList (LP)

Contract: LensPlugin Description: Returns an array of plugin metadata (address, name, version).

Parameters: None

Returns:

  • PluginInfo[]

Modifiers:

  • external

  • view

getPluginMetadata (LP)

Contract: LensPlugin Description: Returns the plugin’s name, version, and description block numbers.

Parameters:

  • _plugin (address)

Returns:

  • (string, uint16, uint64[])

Modifiers:

  • external

  • view

getCryptoLegacyBaseData (LP)

Contract: LensPlugin Description: Returns the core state of the CryptoLegacy contract (fees, intervals, etc.).

Parameters: None

Returns:

  • CryptoLegacyBaseData

Modifiers:

  • external

  • view

getCryptoLegacyListData (LP)

Contract: LensPlugin Description: Returns a more extensive set of data about the legacy (beneficiaries, distributions, plugins).

Parameters:

  • _tokens (address[])

Returns:

  • CryptoLegacyListData

Modifiers:

  • external

  • view

privateFunction (LP)

None


NftLegacyPlugin (NLP)

constructor (NLP)

None

getSigs (NLP)

Contract: NftLegacyPlugin Description: Returns this plugin’s function selectors.

Parameters: None

Returns:

  • bytes4[]

Modifiers:

  • external

  • view

getSetupSigs (NLP)

Contract: NftLegacyPlugin Description: Returns setup function selectors (none).

Parameters: None

Returns:

  • bytes4[]

Modifiers:

  • external

  • pure

getPluginName (NLP)

Contract: NftLegacyPlugin Description: Returns the plugin name.

Parameters: None

Returns:

  • string

Modifiers:

  • external

  • pure

getPluginVer (NLP)

Contract: NftLegacyPlugin Description: Returns the plugin’s version.

Parameters: None

Returns:

  • uint16

Modifiers:

  • external

  • pure

setNftBeneficiary (NLP)

Contract: NftLegacyPlugin Description: Assigns a beneficiary hash and claim delay for one or more NFT token IDs.

Parameters:

  • _beneficiary (bytes32)

  • _nftContract (address)

  • _tokenIds (uint256[])

  • _delay (uint32)

Returns:

  • None

Modifiers:

  • public

transferNftTokensToLegacy (NLP)

Contract: NftLegacyPlugin Description: Transfers specified NFT tokens from their owners to this contract.

Parameters:

  • _nftContract (address)

  • _tokenIds (uint256[])

Returns:

  • None

Modifiers:

  • public

beneficiaryClaimNft (NLP)

Contract: NftLegacyPlugin Description: Allows the designated NFT beneficiary to claim tokens after the claim delay.

Parameters:

  • _nftContract (address)

  • _tokenIds (uint256[])

Returns:

  • None

Modifiers:

  • public

privateFunction (NLP)

None


TrustedGuardiansPlugin (TGP)

constructor (TGP)

None

getSigs (TGP)

Contract: TrustedGuardiansPlugin Description: Returns the function selectors provided by this plugin.

Parameters: None

Returns:

  • bytes4[]

Modifiers:

  • external

  • view

getSetupSigs (TGP)

Contract: TrustedGuardiansPlugin Description: Returns setup function selectors, if any.

Parameters: None

Returns:

  • bytes4[]

Modifiers:

  • external

  • view

getPluginName (TGP)

Contract: TrustedGuardiansPlugin Description: Returns the name of the plugin.

Parameters: None

Returns:

  • string

Modifiers:

  • external

  • pure

getPluginVer (TGP)

Contract: TrustedGuardiansPlugin Description: Returns the plugin version.

Parameters: None

Returns:

  • uint16

Modifiers:

  • external

  • pure

initializeGuardians (TGP)

Contract: TrustedGuardiansPlugin Description: Initializes or re-initializes the guardian configuration.

Parameters:

  • _guardians (GuardianToChange[])

  • _guardiansThreshold (uint8)

  • _guardiansChallengeTimeout (uint64)

Returns:

  • None

Modifiers:

  • external

setGuardians (TGP)

Contract: TrustedGuardiansPlugin Description: Updates the list of guardians, adding or removing them.

Parameters:

  • _guardians (GuardianToChange[])

Returns:

  • None

Modifiers:

  • external

setGuardiansConfig (TGP)

Contract: TrustedGuardiansPlugin Description: Updates the guardians threshold and challenge timeout.

Parameters:

  • _guardiansThreshold (uint8)

  • _guardiansChallengeTimeout (uint64)

Returns:

  • None

Modifiers:

  • external

guardiansVoteForDistribution (TGP)

Contract: TrustedGuardiansPlugin Description: Allows a guardian to vote to start distribution earlier.

Parameters: None

Returns:

  • None

Modifiers:

  • external

guardiansTransferTreasuryTokensToLegacy (TGP)

Contract: TrustedGuardiansPlugin Description: Transfers treasury tokens from holders to the legacy contract, restricted to guardians.

Parameters:

  • _holders (address[])

  • _tokens (address[])

Returns:

  • None

Modifiers:

  • external

resetGuardianVoting (TGP)

Contract: TrustedGuardiansPlugin Description: Resets guardian voting and distributionStartAt.

Parameters: None

Returns:

  • None

Modifiers:

  • external

isGuardiansInitialized (TGP)

Contract: TrustedGuardiansPlugin Description: Checks if guardians are explicitly set or defaulting to beneficiaries.

Parameters: None

Returns:

  • bool

Modifiers:

  • external

  • view

getGuardiansData (TGP)

Contract: TrustedGuardiansPlugin Description: Returns guardian list, votes, threshold, and challenge timeout.

Parameters: None

Returns:

  • bytes32[] guardians

  • bytes32[] guardiansVoted

  • uint8 guardiansThreshold

  • uint64 guardiansChallengeTimeout

Modifiers:

  • external

  • view

privateFunction (TGP)

None


UpdateRolePlugin (URLP)

constructor (URLP)

None

getSigs (URLP)

Contract: UpdateRolePlugin Description: Returns function selectors for this plugin.

Parameters: None

Returns:

  • bytes4[]

Modifiers:

  • external

  • view

getSetupSigs (URLP)

Contract: UpdateRolePlugin Description: Returns the setup function selectors.

Parameters: None

Returns:

  • bytes4[]

Modifiers:

  • external

  • view

getPluginName (URLP)

Contract: UpdateRolePlugin Description: Returns this plugin’s name.

Parameters: None

Returns:

  • string

Modifiers:

  • public

  • pure

getPluginVer (URLP)

Contract: UpdateRolePlugin Description: Returns the plugin version.

Parameters: None

Returns:

  • uint16

Modifiers:

  • external

  • pure

owner (URLP)

Contract: UpdateRolePlugin Description: Returns the diamond’s contract owner.

Parameters: None

Returns:

  • address

Modifiers:

  • public

  • view

isUpdater (URLP)

Contract: UpdateRolePlugin Description: Checks if an address is in the set of updaters.

Parameters:

  • _acc (address)

Returns:

  • bool

Modifiers:

  • public

  • view

getUpdaterList (URLP)

Contract: UpdateRolePlugin Description: Returns the full list of updaters.

Parameters: None

Returns:

  • address[]

Modifiers:

  • public

  • view

setUpdater (URLP)

Contract: UpdateRolePlugin Description: Adds or removes an updater address.

Parameters:

  • _updater (address)

  • _toAdd (bool)

Returns:

  • None

Modifiers:

  • external

  • payable

updateByUpdater (URLP)

Contract: UpdateRolePlugin Description: Allows an approved updater to pay the fee and refresh distribution times.

Parameters:

  • _lockToChainIds (uint256[])

  • _crossChainFees (uint256[])

Returns:

  • None

Modifiers:

  • external

  • payable

privateFunction (URLP)

None


Modifier Glossary

  • public: Accessible externally and internally.

  • external: Callable only externally.

  • internal: Callable within the contract/library or inherited contracts.

  • private: Callable only within the same contract/library.

  • constructor: Executed once upon deployment.

  • onlyOwner: Callable only by the owner.

  • payable: Can receive Ether.

  • view: Does not alter blockchain state.

  • pure: Does not read or modify blockchain state.

  • nonReentrant: Protects from reentrancy attacks.

  • notPaused: Executes only if the contract is active (not paused).

Last updated