Contracts Functions. Part 1.
Below is a clear overview of each major CryptoLegacy contract function: purpose, inputs, outputs, key logic, events, and external interactions.
Table of Contents
BeneficiaryRegistry (BR)
constructor (BENR)
setCryptoLegacyBeneficiary (BENR)
setCryptoLegacyGuardian (BENR)
setCryptoLegacyOwner (BENR)
setCryptoLegacyRecoveryAddresses (BENR)
getCryptoLegacyListByBeneficiary (BENR)
getCryptoLegacyListByOwner (BENR)
getCryptoLegacyListByGuardian (BENR)
getCryptoLegacyListByRecovery (BENR)
getCryptoLegacyBlockNumberChanges (BENR)
getAllCryptoLegacyListByRoles (BENR)
_setBlockNumberChange (BENR)
BuildManagerOwnable (BMO)
constructor (BMO)
setBuildManager (BMO)
_checkBuildManagerValid (BMO)
getBuildManagerAdded (BMO)
CryptoLegacy (CL)
constructor (CL)
replacePlugin (CL)
addPluginList (CL)
removePluginList (CL)
externalLens (CL)
CryptoLegacyBuildManager (CLBM)
receive (CLBM)
constructor (CLBM)
setRegistries (CLBM)
_setRegistries (CLBM)
setFactory (CLBM)
_setFactory (CLBM)
setSupplyLimit (CLBM)
setExternalLens (CLBM)
withdrawFee (CLBM)
payFee (CLBM)
_payFee (CLBM)
_checkFee (CLBM)
_mintAndLockLifetimeNft (CLBM)
payInitialFee (CLBM)
payForMultipleLifetimeNft (CLBM)
createCustomRef (CLBM)
createRef (CLBM)
updateCrossChainsRef (CLBM)
_createRefAndPayForBuild (CLBM)
_checkBuildArgs (CLBM)
buildCryptoLegacy (CLBM)
_getAndPayBuildFee (CLBM)
getUpdateFee (CLBM)
getAndPayBuildFee (CLBM)
calculateCrossChainCreateRefFee (CLBM)
getFactoryAddress (CLBM)
isLifetimeNftLocked (CLBM)
isLifetimeNftLockedAndUpdate (CLBM)
isPluginRegistered (CLBM)
isCryptoLegacyBuilt (CLBM)
CryptoLegacyDiamondBase (CLDB)
fallback (CLDB)
CryptoLegacyExternalLens (CLEXL)
isLifetimeActive (CLEXL)
isPaused (CLEXL)
buildManager (CLEXL)
owner (CLEXL)
_baseData (CLEXL)
_listTokensData (CLEXL)
updateInterval (CLEXL)
challengeTimeout (CLEXL)
distributionStartAt (CLEXL)
lastFeePaidAt (CLEXL)
lastUpdateAt (CLEXL)
initialFeeToPay (CLEXL)
updateFee (CLEXL)
invitedByRefCode (CLEXL)
getBeneficiaries (CLEXL)
getTokensDistribution (CLEXL)
getCryptoLegacyBaseData (CLEXL)
getCryptoLegacyListData (CLEXL)
getMessagesBlockNumbersByRecipient (CLEXL)
getTransferBlockNumbers (CLEXL)
getVestedAndClaimedData (CLEXL)
getPluginInfoList (CLEXL)
getCryptoLegacyListWithStatuses (CLEXL)
CryptoLegacyFactory (CLF)
constructor (CLF)
setBuildOperator (CLF)
createCryptoLegacy (CLF)
cryptoLegacyBytecode (CLF)
computeAddress (CLF)
CryptoLegacyOwnable (CLO)
onlyOwner (CLO)
notPaused (CLO)
_transferOwnership (CLO)
_setPause (CLO)
setPause (CLO)
FeeRegistry (FR)
constructor (FR)
initialize (FR)
setCodeOperator (FR)
setSupportedRefCodeInChains (FR)
setFeeBeneficiaries (FR)
setDefaultPct (FR)
_setDefaultPct (FR)
setRefererSpecificPct (FR)
setContractCaseFee (FR)
takeFee (FR)
withdrawAccumulatedFee (FR)
withdrawReferralAccumulatedFee (FR)
_setCustomCode (FR)
_createCustomCode (FR)
_checkCodeNotZero (FR)
_checkSenderIsOperator (FR)
createCustomCode (FR)
createCode (FR)
_setCrossChainsRef (FR)
updateCrossChainsRef (FR)
crossCreateCustomCode (FR)
crossUpdateCustomCode (FR)
_encodeCrossCreateCustomCodeCommand (FR)
_encodeCrossUpdateCustomCodeCommand (FR)
_checkSenderIsReferrer (FR)
_checkNewOwnerIsNotReferrer (FR)
changeCodeReferrer (FR)
changeRecipientReferrer (FR)
getCodeOperatorsList (FR)
isCodeOperator (FR)
getSupportedRefInChainsList (FR)
isSupportedRefInChain (FR)
getFeeBeneficiaries (FR)
getCodePct (FR)
calculateFee (FR)
getContractCaseFee (FR)
getContractCaseFeeForCode (FR)
getReferrerByAddress (FR)
getReferrerByCode (FR)
defaultSharePct (FR)
defaultDiscountPct (FR)
refererByCode (FR)
codeByReferrer (FR)
accumulatedFee (FR)
LegacyMessenger (LM)
constructor (LM)
sendMessagesTo (LM)
getMessagesBlockNumbersByRecipient (LM)
LifetimeNft (LTN)
constructor (LTN)
setBaseUri (LTN)
_setBaseUri (LTN)
setMinterOperator (LTN)
mint (LTN)
_baseURI (LTN)
tokensOfOwner (LTN)
getTier (LTN)
LockChainGate (LCG)
constructor (LCG)
_initializeLockChainGate (LCG)
setLockOperator (LCG)
setDebridgeGate (LCG)
setDebridgeNativeFee (LCG)
setDestinationChainContract (LCG)
_setDestinationChainContract (LCG)
setSourceChainContract (LCG)
_setSourceChainContract (LCG)
setSourceAndDestinationChainContract (LCG)
setLockPeriod (LCG)
setReferralCode (LCG)
setCustomChainId (LCG)
_writeLockLifetimeNft (LCG)
lockLifetimeNft (LCG)
_lockLifetimeNftToChains (LCG)
_checkFee (LCG)
lockLifetimeNftToChains (LCG)
_lockLifetimeNftToChain (LCG)
unlockLifetimeNft (LCG)
unlockLifetimeNftFromChain (LCG)
_deleteTokenData (LCG)
_onlyCrossChain (LCG)
_send (LCG)
approveLifetimeNftTo (LCG)
_transferLifetimeNftTo (LCG)
transferLifetimeNftTo (LCG)
updateNftOwnerOnChainList (LCG)
_updateNftOwnerOnChainList (LCG)
_updateLifetimeNftOwnerOnChain (LCG)
_encodeCrossLockCommand (LCG)
_encodeCrossUnlockCommand (LCG)
_encodeCrossUpdateOwnerCommand (LCG)
_checkDestinationLockedChain (LCG)
_checkCrossChainLock (LCG)
_checkTooEarly (LCG)
_checkSource (LCG)
_checkHolderTokenLock (LCG)
_getLockedToChainsIdsOfAccount (LCG)
_getLockedUntil (LCG)
getLockedToChainsIds (LCG)
lockPeriod (LCG)
referralCode (LCG)
ownerOfTokenId (LCG)
lockedNftFromChainId (LCG)
lockedNftApprovedTo (LCG)
lockedNft (LCG)
getDeBridgeChainNativeFeeAndCheck (LCG)
_getDeBridgeChainNativeFeeAndCheck (LCG)
getDeBridgeChainNativeFee (LCG)
_getDeBridgeChainNativeFee (LCG)
deBridgeGate (LCG)
lifetimeNft (LCG)
deBridgeChainConfig (LCG)
getLockOperatorsList (LCG)
isLockOperator (LCG)
calculateCrossChainCreateRefNativeFee (LCG)
isNftLocked (LCG)
isNftLockedAndUpdate (LCG)
_isNftLocked (LCG)
getChainId (LCG)
_getChainId (LCG)
MultiPermit (MP)
constructor (MP)
approveTreasuryTokensToLegacy (MP)
PluginsRegistry (PR)
constructor (PR)
addPlugin (PR)
addPluginDescription (PR)
removePlugin (PR)
isPluginRegistered (PR)
getPluginMetadata (PR)
getPluginDescriptionBlockNumbers (PR)
getPluginAddressList (PR)
getPluginInfoList (PR)
ProxyBuilder (PB)
constructor (PB)
setProxyAdmin (PB)
build (PB)
proxyBytecode (PB)
computeAddress (PB)
ProxyBuilderAdmin (PBA)
constructor (PBA)
SignatureRoleTimelock (SRT)
constructor (SRT)
setMaxExecutionPeriod (SRT)
setRoleAccounts (SRT)
_addRoleAccount (SRT)
_getAddressIndex (SRT)
_getBytes4Index (SRT)
_removeRoleAccount (SRT)
addSignatureRoleList (SRT)
_addSignatureRole (SRT)
removeSignatureRoleList (SRT)
_removeSignatureRole (SRT)
scheduleCallList (SRT)
_checkRole (SRT)
_scheduleCall (SRT)
executeCallList (SRT)
_executeCall (SRT)
cancelCallList (SRT)
_cancelCall (SRT)
getRoleAccounts (SRT)
getTargets (SRT)
getTargetSigs (SRT)
getCallId (SRT)
getCall (SRT)
getCallsList (SRT)
getCallIds (SRT)
getCallsLength (SRT)
BeneficiaryRegistry (BR)
BeneficiaryRegistry (BENR)
constructor (BENR)
Contract: BeneficiaryRegistry
Description: Initializes the contract and transfers ownership to the specified _owner
.
Parameters:
_owner
(address): The initial owner of the contract.
Returns:
None
Modifiers:
constructor
setCryptoLegacyBeneficiary (BENR)
Contract: BeneficiaryRegistry
Description: Adds or removes the calling CryptoLegacy contract from the beneficiary registry based on _isAdd
.
Parameters:
_beneficiary
(bytes32): The beneficiary hash._isAdd
(bool): If true, adds the contract; if false, removes it.
Returns:
None
Modifiers:
external
setCryptoLegacyGuardian (BENR)
Contract: BeneficiaryRegistry
Description: Adds or removes the calling CryptoLegacy contract from the guardian registry based on _isAdd
.
Parameters:
_guardian
(bytes32): The guardian hash._isAdd
(bool): If true, adds the contract; if false, removes it.
Returns:
None
Modifiers:
external
setCryptoLegacyOwner (BENR)
Contract: BeneficiaryRegistry
Description: Adds or removes the calling CryptoLegacy contract from the owner registry based on _isAdd
.
Parameters:
_owner
(bytes32): The owner hash._isAdd
(bool): If true, adds the contract; if false, removes it.
Returns:
None
Modifiers:
external
setCryptoLegacyRecoveryAddresses (BENR)
Contract: BeneficiaryRegistry Description: Updates the recovery addresses for the calling CryptoLegacy contract by removing the old addresses and adding the new ones.
Parameters:
_oldRecoveryHashes
(bytes32[]): The recovery hashes to remove._newRecoveryHashes
(bytes32[]): The recovery hashes to add.
Returns:
None
Modifiers:
external
getCryptoLegacyListByBeneficiary (BENR)
Contract: BeneficiaryRegistry Description: Retrieves the list of CryptoLegacy contract addresses associated with a given beneficiary hash.
Parameters:
_hash
(bytes32): The beneficiary hash.
Returns:
address[]
(address[]): An array of CryptoLegacy contract addresses.
Modifiers:
public
view
getCryptoLegacyListByOwner (BENR)
Contract: BeneficiaryRegistry Description: Retrieves the list of CryptoLegacy contract addresses associated with a given owner hash.
Parameters:
_hash
(bytes32): The owner hash.
Returns:
address[]
(address[]): An array of CryptoLegacy contract addresses.
Modifiers:
public
view
getCryptoLegacyListByGuardian (BENR)
Contract: BeneficiaryRegistry Description: Retrieves the list of CryptoLegacy contract addresses associated with a given guardian hash.
Parameters:
_hash
(bytes32): The guardian hash.
Returns:
address[]
(address[]): An array of CryptoLegacy contract addresses.
Modifiers:
public
view
getCryptoLegacyListByRecovery (BENR)
Contract: BeneficiaryRegistry Description: Retrieves the list of CryptoLegacy contract addresses associated with a given recovery hash.
Parameters:
_hash
(bytes32): The recovery hash.
Returns:
address[]
(address[]): An array of CryptoLegacy contract addresses.
Modifiers:
public
view
getCryptoLegacyBlockNumberChanges (BENR)
Contract: BeneficiaryRegistry Description: Retrieves the list of block numbers at which changes were recorded for a given CryptoLegacy contract.
Parameters:
_cryptoLegacy
(address): The CryptoLegacy contract address.
Returns:
uint256[]
(uint256[]): An array of block numbers.
Modifiers:
public
view
getAllCryptoLegacyListByRoles (BENR)
Contract: BeneficiaryRegistry Description: Retrieves arrays of CryptoLegacy contract addresses for a given hash, categorized by beneficiary, owner, guardian, and recovery roles.
Parameters:
_hash
(bytes32): The account hash.
Returns:
listByBeneficiary
(address[]): Contracts mapped by beneficiary.listByOwner
(address[]): Contracts mapped by owner.listByGuardian
(address[]): Contracts mapped by guardian.listByRecovery
(address[]): Contracts mapped by recovery.
Modifiers:
public
view
_setBlockNumberChange (BENR)
Contract: BeneficiaryRegistry Description: Internally updates the stored list of block numbers for the provided CryptoLegacy contract.
Parameters:
_cryptoLegacy
(address): The address of the CryptoLegacy contract.
Returns:
None
Modifiers:
internal
BuildManagerOwnable (BMO)
constructor (BMO)
Contract: BuildManagerOwnable
Description: Initializes the contract by setting up an Ownable
from OpenZeppelin.
Parameters:
None Returns:
None Modifiers:
constructor
setBuildManager (BMO)
Contract: BuildManagerOwnable Description: Adds or removes a build manager. Only the owner can call this. Parameters:
_buildManager
(address): The address to add or remove._isAdd
(bool): True to add, false to remove. Returns:None Modifiers:
external
onlyOwner
_checkBuildManagerValid (BMO)
Contract: BuildManagerOwnable Description: An internal helper to validate that the given CryptoLegacy contract is built by a valid build manager. Parameters:
_cryptoLegacy
(address): The CryptoLegacy contract to check._clOwner
(address): The expected owner if nonzero. Returns:None Modifiers:
internal
getBuildManagerAdded (BMO)
Contract: BuildManagerOwnable Description: Returns the list of build managers that have been added. Parameters:
None Returns:
address[]
: Array of build manager addresses. Modifiers:external
view
CryptoLegacy (CL)
constructor (CL)
Contract: CryptoLegacy Description: Deploys the CryptoLegacy contract, sets the build manager, owner, and plugins. Parameters:
_buildManager
(address): The build manager._owner
(address): The new owner of the contract._plugins
(address[]): Initial plugin addresses. Returns:None Modifiers:
constructor
replacePlugin (CL)
Contract: CryptoLegacy Description: Replaces existing plugins with new ones. Only callable by the owner. Parameters:
_oldPlugins
(address[]): Plugins to remove._newPlugins
(address[]): Plugins to add. Returns:None Modifiers:
external
onlyOwner
addPluginList (CL)
Contract: CryptoLegacy Description: Adds a list of plugins. Only callable by the owner. Parameters:
_plugins
(address[]): Array of plugin addresses to add. Returns:None Modifiers:
external
onlyOwner
removePluginList (CL)
Contract: CryptoLegacy Description: Removes plugins from the contract. Only callable by the owner. Parameters:
_plugins
(address[]): Array of plugin addresses to remove. Returns:None Modifiers:
external
onlyOwner
externalLens (CL)
Contract: CryptoLegacy Description: Returns the external lens address in use for explorer integration. Parameters:
None Returns:
address
: The external lens address. Modifiers:external
view
CryptoLegacyBuildManager (CLBM)
receive (CLBM)
Contract: CryptoLegacyBuildManager Description: Fallback function to handle direct ETH transfers. Parameters:
None Returns:
None Modifiers:
payable
constructor (CLBM)
Contract: CryptoLegacyBuildManager Description: Sets up the registry contracts, factory, and lifetime NFT, then transfers ownership. Parameters:
_owner
(address): Owner address._feeRegistry
(IFeeRegistry): Fee registry contract._pluginsRegistry
(IPluginsRegistry): Plugins registry._beneficiaryRegistry
(IBeneficiaryRegistry): Beneficiary registry._lifetimeNft
(ILifetimeNft): Lifetime NFT contract._factory
(ICryptoLegacyFactory): Factory contract. Returns:None Modifiers:
constructor
setRegistries (CLBM)
Contract: CryptoLegacyBuildManager Description: Sets registry contracts. Only the owner may call. Parameters:
_feeRegistry
(IFeeRegistry): Fee registry._pluginsRegistry
(IPluginsRegistry): Plugins registry._beneficiaryRegistry
(IBeneficiaryRegistry): Beneficiary registry. Returns:None Modifiers:
external
onlyOwner
_setRegistries (CLBM)
Contract: CryptoLegacyBuildManager Description: Internal function to update registry references and emit event. Parameters:
_feeRegistry
(IFeeRegistry): Fee registry._pluginsRegistry
(IPluginsRegistry): Plugins registry._beneficiaryRegistry
(IBeneficiaryRegistry): Beneficiary registry. Returns:None Modifiers:
internal
setFactory (CLBM)
Contract: CryptoLegacyBuildManager Description: Updates the factory contract reference. Only the owner may call. Parameters:
_factory
(ICryptoLegacyFactory): Factory contract. Returns:None Modifiers:
external
onlyOwner
_setFactory (CLBM)
Contract: CryptoLegacyBuildManager Description: Internal function to set the factory contract and emit event. Parameters:
_factory
(ICryptoLegacyFactory): The new factory contract. Returns:None Modifiers:
internal
setSupplyLimit (CLBM)
Contract: CryptoLegacyBuildManager Description: Sets minimum supply for mass minting. Only owner can call. Parameters:
_newVal
(uint256): New minimum supply. Returns:None Modifiers:
external
onlyOwner
setExternalLens (CLBM)
Contract: CryptoLegacyBuildManager Description: Sets an external lens address. Only owner can call. Parameters:
_externalLens
(address): The new lens address. Returns:None Modifiers:
external
onlyOwner
withdrawFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Withdraws a specified amount of ETH to a recipient. Only owner can call. Parameters:
_recipient
(address payable): Address to receive the ETH._amount
(uint256): Amount to withdraw. Returns:None Modifiers:
external
onlyOwner
payFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Pays the fee and optionally records a referral code. Parameters:
_code
(bytes8): Referral code._toHolder
(address): Address for referral benefits._mul
(uint256): Multiplier for fees._lockToChainIds
(uint256[]): Chain IDs to lock tokens._crossChainFees
(uint256[]): Cross-chain fees array. Returns:None Modifiers:
external
payable
_payFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Internal function to calculate and take the fee based on provided parameters. Parameters:
_code
(bytes8): Referral code._toHolder
(address): Address to receive referral benefits or NFT._feeCase
(uint8): Fee case identifier._mul
(uint256): Fee multiplier._subValue
(uint256): Amount to subtract from msg.value._chainIds
(uint256[]): Chain IDs._crossChainFees
(uint256[]): Cross-chain fees. Returns:None Modifiers:
internal
_checkFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Ensures the fee value is sufficient. Parameters:
_value
(uint256): The amount of ETH sent._fee
(uint256): Required fee. Returns:None Modifiers:
internal
_mintAndLockLifetimeNft (CLBM)
Contract: CryptoLegacyBuildManager Description: Mints a lifetime NFT and locks it cross-chain if needed. Parameters:
_tokenOwner
(address): The recipient of the NFT._chainIds
(uint256[]): Destination chain IDs._crossChainFees
(uint256[]): Cross-chain fees._valueToSend
(uint256): Remaining ETH to forward. Returns:None Modifiers:
internal
payInitialFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Pays the initial build fee for a new CryptoLegacy contract, optionally buying a lifetime NFT if enough ETH is sent. Parameters:
_code
(bytes8): Referral code._toHolder
(address): Address that receives locked NFT._lockToChainIds
(uint256[]): Chain IDs to lock._crossChainFees
(uint256[]): Cross-chain fees. Returns:None Modifiers:
public
payable
payForMultipleLifetimeNft (CLBM)
Contract: CryptoLegacyBuildManager Description: Pays fees to mint multiple lifetime NFTs in a batch. Parameters:
_code
(bytes8): Referral code._lifetimeNftMints
(LifetimeNftMint[]): Array of mint requests. Returns:None Modifiers:
public
payable
createCustomRef (CLBM)
Contract: CryptoLegacyBuildManager Description: Creates a custom referral code and pays associated cross-chain fees. Parameters:
_customRefCode
(bytes8): Desired referral code._recipient
(address): Recipient address for referral benefits._chainIds
(uint256[]): Destination chain IDs._crossChainFees
(uint256[]): Corresponding cross-chain fees. Returns:refCode
(bytes8): The newly created referral code.crossChainFee
(uint256): The total cross-chain fee spent. Modifiers:public
payable
createRef (CLBM)
Contract: CryptoLegacyBuildManager Description: Creates a referral code (generated short code) and pays cross-chain fees. Parameters:
_recipient
(address): Address that receives referral benefits._chainIds
(uint256[]): Destination chain IDs._crossChainFees
(uint256[]): Corresponding cross-chain fees. Returns:refCode
(bytes8): Generated referral code.crossChainFee
(uint256): The total cross-chain fee spent. Modifiers:public
payable
updateCrossChainsRef (CLBM)
Contract: CryptoLegacyBuildManager Description: Updates cross-chain referral parameters. Parameters:
_chainIds
(uint256[]): New chain IDs._crossChainFees
(uint256[]): New cross-chain fees. Returns:crossChainFee
(uint256): The total cross-chain fee spent. Modifiers:external
payable
_createRefAndPayForBuild (CLBM)
Contract: CryptoLegacyBuildManager Description: Internal function to handle referral code creation and build fee payment. Parameters:
_buildArgs
(BuildArgs): Build arguments._refArgs
(RefArgs): Referral arguments. Returns:initialFeeToPay
(uint256): The fee needed initially.updateFee
(uint256): Fee for subsequent updates. Modifiers:internal
_checkBuildArgs (CLBM)
Contract: CryptoLegacyBuildManager Description: Internal function that validates build arguments such as update interval and challenge timeout. Parameters:
_buildArgs
(BuildArgs): The build arguments struct. Returns:None Modifiers:
internal
buildCryptoLegacy (CLBM)
Contract: CryptoLegacyBuildManager Description: Deploys a new CryptoLegacy instance, initializes it, and records it in the registry. Parameters:
_buildArgs
(BuildArgs): Build arguments._refArgs
(RefArgs): Referral arguments._create2Args
(Create2Args): CREATE2 deployment parameters. Returns:address payable
: Address of the newly deployed contract. Modifiers:public
payable
_getAndPayBuildFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Determines and pays the build fee, considering lifetime NFT lock if applicable. Parameters:
_invitedByRefCode
(bytes8): Referral code._subValue
(uint256): Amount subtracted from msg.value._chainIds
(uint256[]): Destination chains._crossChainFees
(uint256[]): Cross-chain fees. Returns:initialFeeToPay
(uint256): The required initial fee.updateFee
(uint256): The update fee. Modifiers:internal
getUpdateFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Returns the update fee for a given referral code. Parameters:
_refCode
(bytes8): Referral code. Returns:uint256
: The update fee. Modifiers:external
view
getAndPayBuildFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Public function to fetch and pay the build fee. Parameters:
_invitedByRefCode
(bytes8): Referral code. Returns:initialFeeToPay
(uint256): The required initial fee.updateFee
(uint256): The update fee. Modifiers:public
payable
calculateCrossChainCreateRefFee (CLBM)
Contract: CryptoLegacyBuildManager Description: Calculates the total native fee for cross-chain referral creation. Parameters:
_chainIds
(uint256[]): Destination chain IDs._crossChainFees
(uint256[]): Cross-chain fees. Returns:uint256
: The total native fee. Modifiers:public
view
getFactoryAddress (CLBM)
Contract: CryptoLegacyBuildManager Description: Returns the address of the associated factory. Parameters:
None Returns:
address
: The factory contract address. Modifiers:external
view
isLifetimeNftLocked (CLBM)
Contract: CryptoLegacyBuildManager Description: Checks if a given owner has locked a lifetime NFT. Parameters:
_owner
(address): The owner in question. Returns:bool
: True if locked, false otherwise. Modifiers:external
view
isLifetimeNftLockedAndUpdate (CLBM)
Contract: CryptoLegacyBuildManager Description: Checks if a lifetime NFT is locked for an owner and updates if needed. Parameters:
_owner
(address): The address to check/update. Returns:bool
: True if locked, false otherwise. Modifiers:external
isPluginRegistered (CLBM)
Contract: CryptoLegacyBuildManager Description: Checks whether a given plugin is registered. Parameters:
_plugin
(address): Plugin address. Returns:bool
: True if registered, otherwise false. Modifiers:external
view
isCryptoLegacyBuilt (CLBM)
Contract: CryptoLegacyBuildManager Description: Checks whether a given address is a valid, built CryptoLegacy contract. Parameters:
_cryptoLegacy
(address): Address of the CryptoLegacy contract. Returns:bool
: True if it is recognized as built. Modifiers:external
view
CryptoLegacyDiamondBase (CLDB)
fallback (CLDB)
Contract: CryptoLegacyDiamondBase Description: Fallback function that delegates calls to the appropriate facet per the Diamond Standard. Parameters:
None Returns:
None Modifiers:
external
payable
CryptoLegacyExternalLens (CLEXL)
isLifetimeActive (CLEXL)
Contract: CryptoLegacyExternalLens Description: Checks if lifetime mode is active on a given CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:bool
: True if lifetime is active. Modifiers:external
view
isPaused (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns whether a given CryptoLegacy is paused. Parameters:
_cryptoLegacy
(address): Target contract. Returns:bool
: True if paused, false otherwise. Modifiers:external
view
buildManager (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the build manager of a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:address
: The build manager address. Modifiers:external
view
owner (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the owner of a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:address
: The owner address. Modifiers:external
view
_baseData (CLEXL)
Contract: CryptoLegacyExternalLens Description: Internal helper that fetches base data of a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:ICryptoLegacyLens.CryptoLegacyBaseData
: Struct with base data. Modifiers:internal
view
_listTokensData (CLEXL)
Contract: CryptoLegacyExternalLens Description: Internal helper that fetches distribution data for specified tokens. Parameters:
_cryptoLegacy
(address): Target contract._tokens
(address[]): List of tokens. Returns:ICryptoLegacyLens.CryptoLegacyListData
: Struct with tokens distribution data. Modifiers:internal
view
updateInterval (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the update interval of a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:uint64
: Update interval in seconds. Modifiers:external
view
challengeTimeout (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the challenge timeout of a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:uint64
: Challenge timeout in seconds. Modifiers:external
view
distributionStartAt (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns when distribution starts for a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:uint64
: The start timestamp. Modifiers:external
view
lastFeePaidAt (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the last fee payment timestamp. Parameters:
_cryptoLegacy
(address): Target contract. Returns:uint64
: Last fee payment time. Modifiers:external
view
lastUpdateAt (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the last update timestamp. Parameters:
_cryptoLegacy
(address): Target contract. Returns:uint64
: Last update time. Modifiers:external
view
initialFeeToPay (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the initial fee to pay for a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:uint128
: The initial fee. Modifiers:external
view
updateFee (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the update fee for a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:uint128
: The update fee. Modifiers:external
view
invitedByRefCode (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the referral code used to create a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:bytes8
: The referral code. Modifiers:external
view
getBeneficiaries (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns arrays of beneficiary info from the CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract. Returns:bytes32[]
: Hashes,bytes32[]
: Original hashes,ICryptoLegacy.BeneficiaryConfig[]
: Config array. Modifiers:external
view
getTokensDistribution (CLEXL)
Contract: CryptoLegacyExternalLens Description: Fetches token distribution details for a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract._tokens
(address[]): Tokens to check. Returns:ICryptoLegacy.TokenDistribution[]
: Distribution list. Modifiers:external
view
getCryptoLegacyBaseData (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns base data of a CryptoLegacy via lens. Parameters:
_cryptoLegacy
(address): Target contract. Returns:ICryptoLegacyLens.CryptoLegacyBaseData
: Base data. Modifiers:external
view
getCryptoLegacyListData (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns distribution data for specified tokens. Parameters:
_cryptoLegacy
(address): Target contract._tokens
(address[]): Tokens to fetch data for. Returns:ICryptoLegacyLens.CryptoLegacyListData
: Token distribution data. Modifiers:external
view
getMessagesBlockNumbersByRecipient (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns the block numbers for messages related to a specific recipient in a CryptoLegacy. Parameters:
_cryptoLegacy
(address): Target contract._recipient
(bytes32): Recipient hash. Returns:uint64[]
: Array of block numbers. Modifiers:external
view
getTransferBlockNumbers (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns block numbers of CryptoLegacy transfer events. Parameters:
_cryptoLegacy
(address): Target contract. Returns:uint64[]
: Array of block numbers. Modifiers:external
view
getVestedAndClaimedData (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns vested and claimed data for a beneficiary across multiple tokens. Parameters:
_cryptoLegacy
(address): Target contract._beneficiary
(bytes32): Beneficiary hash._tokens
(address[]): Array of token addresses. Returns:ICryptoLegacyLens.BeneficiaryTokenData[]
: Detailed token data.uint64
: Start date.uint64
: End date. Modifiers:external
view
getPluginInfoList (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns plugin info list from the CryptoLegacy contract. Parameters:
_cryptoLegacy
(address): Target contract. Returns:ICryptoLegacyLens.PluginInfo[]
: Array of plugin info. Modifiers:external
view
getCryptoLegacyListWithStatuses (CLEXL)
Contract: CryptoLegacyExternalLens Description: Returns arrays of CryptoLegacy addresses by roles and indicates default-guardian status. Parameters:
_beneficiaryRegistry
(IBeneficiaryRegistry): Registry reference._hash
(bytes32): The hash used to look up roles. Returns:listByBeneficiary
(address[]): Array of addresses.beneficiaryDefaultGuardian
(bool[]): True if default guardianship is used.listByOwner
(address[]): Array of addresses.listByGuardian
(address[]): Array of addresses.listByRecovery
(address[]): Array of addresses. Modifiers:external
view
CryptoLegacyFactory (CLF)
constructor (CLF)
Contract: CryptoLegacyFactory Description: Sets the initial owner for the factory. Parameters:
_owner
(address): Address to become the owner. Returns:None Modifiers:
constructor
setBuildOperator (CLF)
Contract: CryptoLegacyFactory Description: Adds or removes a build operator. Only the owner can call. Parameters:
_operator
(address): The operator address._isAdd
(bool): True to add, false to remove. Returns:None Modifiers:
public
onlyOwner
createCryptoLegacy (CLF)
Contract: CryptoLegacyFactory Description: Creates a new CryptoLegacy contract using CREATE2. Parameters:
_owner
(address): Owner address of the new contract._plugins
(address[]): Plugin list._create2Args
(Create2Args): The create2 parameters. Returns:address payable
: Address of the deployed CryptoLegacy. Modifiers:external
cryptoLegacyBytecode (CLF)
Contract: CryptoLegacyFactory Description: Returns the bytecode for a new CryptoLegacy deployment. Parameters:
_buildManager
(address): Build manager._owner
(address): Owner of the new contract._plugins
(address[]): Plugins. Returns:bytes
: The concatenated bytecode. Modifiers:public
pure
computeAddress (CLF)
Contract: CryptoLegacyFactory Description: Computes the deterministic CREATE2 address for a given salt and bytecode hash. Parameters:
_salt
(bytes32): The salt._bytecodeHash
(bytes32): The bytecode hash. Returns:address
: The computed address. Modifiers:public
view
CryptoLegacyOwnable (CLO)
onlyOwner (CLO)
Contract: CryptoLegacyOwnable Description: A modifier that restricts function calls to the contract owner. Parameters:
None Returns:
None Modifiers:
onlyOwner
notPaused (CLO)
Contract: CryptoLegacyOwnable Description: A modifier that ensures the contract is not paused. Parameters:
None Returns:
None Modifiers:
notPaused
_transferOwnership (CLO)
Contract: CryptoLegacyOwnable Description: Internal function to update the contract owner. Parameters:
_owner
(address): The new owner. Returns:None Modifiers:
internal
_setPause (CLO)
Contract: CryptoLegacyOwnable Description: Internal function to set or unset pause state. Parameters:
_isPaused
(bool): True to pause, false otherwise. Returns:None Modifiers:
internal
setPause (CLO)
Contract: CryptoLegacyOwnable Description: Public function to pause or unpause the contract. Only owner can call. Parameters:
_isPaused
(bool): True to pause, false otherwise. Returns:None Modifiers:
public
onlyOwner
FeeRegistry (FR)
constructor (FR)
Contract: FeeRegistry Description: Initializes the contract storage position for the fee registry. Parameters:
None Returns:
None Modifiers:
constructor
initialize (FR)
Contract: FeeRegistry Description: One-time initializer setting owner, default discount/share, lifetime NFT, and lock period. Parameters:
_owner
(address): Owner of this registry._defaultDiscountPct
(uint32): Default discount percentage._defaultSharePct
(uint32): Default share percentage._lifetimeNft
(ILifetimeNft): LifetimeNft contract._lockPeriod
(uint256): Lock period. Returns:None Modifiers:
public
initializer
setCodeOperator (FR)
Contract: FeeRegistry Description: Adds or removes an operator for managing referral codes. Only the owner may call. Parameters:
_operator
(address): Operator address._isAdd
(bool): True to add, false to remove. Returns:None Modifiers:
public
onlyOwner
setSupportedRefCodeInChains (FR)
Contract: FeeRegistry Description: Adds or removes supported chain IDs for referral codes. Only owner may call. Parameters:
_chains
(uint256[]): Array of chain IDs._isAdd
(bool): True to add, false to remove. Returns:None Modifiers:
public
onlyOwner
setFeeBeneficiaries (FR)
Contract: FeeRegistry Description: Updates the custom fee beneficiaries for revenue distribution. Only owner may call. Parameters:
_beneficiaries
(FeeBeneficiary[]): Array of beneficiary info. Returns:None Modifiers:
public
onlyOwner
setDefaultPct (FR)
Contract: FeeRegistry Description: Sets the default discount and share percentages. Only owner may call. Parameters:
_defaultDiscountPct
(uint32): The new default discount percentage._defaultSharePct
(uint32): The new default share percentage. Returns:None Modifiers:
public
onlyOwner
_setDefaultPct (FR)
Contract: FeeRegistry Description: Internal function to store and emit changes to default percentages. Parameters:
_defaultDiscountPct
(uint32): The discount percentage._defaultSharePct
(uint32): The share percentage. Returns:None Modifiers:
internal
setRefererSpecificPct (FR)
Contract: FeeRegistry Description: Sets specific discount/share for a given referrer. Only owner can call. Parameters:
_referrer
(address): The referrer address._discountPct
(uint32): New discount percentage._sharePct
(uint32): New share percentage. Returns:None Modifiers:
public
onlyOwner
setContractCaseFee (FR)
Contract: FeeRegistry Description: Sets the fee for a specific contract and case. Only owner can call. Parameters:
_contract
(address): The contract._case
(uint8): The case identifier._fee
(uint128): The fee amount. Returns:None Modifiers:
public
onlyOwner
takeFee (FR)
Contract: FeeRegistry Description: Deducts fee from msg.value, distributes discount/share to referrer, accumulates remainder. Parameters:
_contract
(address): Source contract._case
(uint8): Fee case._code
(bytes8): Referral code._mul
(uint256): Fee multiplier. Returns:None Modifiers:
external
payable
withdrawAccumulatedFee (FR)
Contract: FeeRegistry Description: Withdraws the accumulated fees among configured beneficiaries. Parameters:
None Returns:
None Modifiers:
external
withdrawReferralAccumulatedFee (FR)
Contract: FeeRegistry Description: Withdraws accumulated referral fees for a specific referral code. Parameters:
_code
(bytes8): Referral code. Returns:None Modifiers:
external
_setCustomCode (FR)
Contract: FeeRegistry Description: Internal function to associate a custom code with a referrer, recipient, discount, and share. Parameters:
_referrer
(address): Referrer address._recipient
(address): Recipient address._shortCode
(bytes8): The desired short code._discountPct
(uint32): Discount percentage._sharePct
(uint32): Share percentage. Returns:bytes8
: The short code. Modifiers:internal
_createCustomCode (FR)
Contract: FeeRegistry Description: Internal function to create a new custom referral code. Parameters:
_referrer
(address): Referrer address._recipient
(address): Recipient address._shortCode
(bytes8): The code to set._fromChain
(uint256): Source chain ID._discountPct
(uint32): Discount percentage._sharePct
(uint32): Share percentage. Returns:bytes8
: The short code. Modifiers:internal
_checkCodeNotZero (FR)
Contract: FeeRegistry Description: Ensures the code is not zero. Parameters:
_shortCode
(bytes8): The code to check. Returns:None Modifiers:
internal
_checkSenderIsOperator (FR)
Contract: FeeRegistry Description: Ensures the caller is an authorized code operator. Parameters:
None Returns:
None Modifiers:
internal
createCustomCode (FR)
Contract: FeeRegistry
Description: Creates a custom code in the current chain and cross-chain if _chainIds
specified.
Parameters:
_referrer
(address): Owner of the code._recipient
(address): Recipient of referral benefits._shortCode
(bytes8): Desired code._chainIds
(uint256[]): Destination chain IDs._crossChainFees
(uint256[]): Fees for each chain. Returns:bytes8
: The final code.uint256
: Total fee spent on cross-chain. Modifiers:public
payable
createCode (FR)
Contract: FeeRegistry Description: Creates a random short referral code. Parameters:
_referrer
(address): Owner of the code._recipient
(address): Recipient address._chainIds
(uint256[]): Destination chain IDs._crossChainFees
(uint256[]): Fees for each chain. Returns:bytes8
: The generated code.uint256
: Total cross-chain fee. Modifiers:public
payable
_setCrossChainsRef (FR)
Contract: FeeRegistry Description: Internal function to handle cross-chain setup for referral codes. Parameters:
_isCreate
(bool): True if creating, otherwise updating._shortCode
(bytes8): The referral code._toChainIDs
(uint256[]): Chain IDs._crossChainFees
(uint256[]): Fees for each chain. Returns:uint256
: The total fee spent. Modifiers:internal
updateCrossChainsRef (FR)
Contract: FeeRegistry Description: Updates cross-chain referral settings for the caller's code. Parameters:
_chainIds
(uint256[]): New chain IDs._crossChainFees
(uint256[]): New cross-chain fees. Returns:uint256
: Total cross-chain fee. Modifiers:external
payable
crossCreateCustomCode (FR)
Contract: FeeRegistry Description: Cross-chain creation of a custom referral code triggered from another chain. Parameters:
_fromChainId
(uint256): The source chain ID._referrer
(address): Referrer address._recipient
(address): Recipient address._shortCode
(bytes8): Code._discountPct
(uint32): Discount._sharePct
(uint32): Share. Returns:None Modifiers:
external
crossUpdateCustomCode (FR)
Contract: FeeRegistry Description: Cross-chain update of a custom referral code triggered from another chain. Parameters:
_fromChainId
(uint256): The source chain ID._referrer
(address): Referrer address._recipient
(address): Recipient address._shortCode
(bytes8): Code._discountPct
(uint32): Discount._sharePct
(uint32): Share. Returns:None Modifiers:
external
_encodeCrossCreateCustomCodeCommand (FR)
Contract: FeeRegistry Description: Encodes the cross-chain create custom code command. Parameters:
_referrer
(address): Referrer._recipient
(address): Recipient._shortCode
(bytes8): Code._discountPct
(uint32): Discount._sharePct
(uint32): Share. Returns:bytes
: The encoded data. Modifiers:internal
view
_encodeCrossUpdateCustomCodeCommand (FR)
Contract: FeeRegistry Description: Encodes the cross-chain update custom code command. Parameters:
_referrer
(address): Referrer._recipient
(address): Recipient._shortCode
(bytes8): Code._discountPct
(uint32): Discount._sharePct
(uint32): Share. Returns:bytes
: The encoded data. Modifiers:internal
view
_checkSenderIsReferrer (FR)
Contract: FeeRegistry Description: Ensures msg.sender is the correct referrer for a code. Parameters:
_code
(bytes8): Referral code. Returns:None Modifiers:
internal
_checkNewOwnerIsNotReferrer (FR)
Contract: FeeRegistry Description: Ensures the new owner doesn't already have a code. Parameters:
_newReferer
(address): The new referrer. Returns:None Modifiers:
internal
changeCodeReferrer (FR)
Contract: FeeRegistry Description: Changes the referrer of a code, optionally sets cross-chain references. Parameters:
_code
(bytes8): The code._newReferer
(address): The new referrer._newRecipient
(address): The new recipient._chainIds
(uint256[]): Chain IDs._crossChainFees
(uint256[]): Fees. Returns:uint256
: Total cross-chain fee spent. Modifiers:public
payable
changeRecipientReferrer (FR)
Contract: FeeRegistry Description: Changes only the recipient for a referral code, with cross-chain updates if needed. Parameters:
_code
(bytes8): The code._newRecipient
(address): The new recipient._chainIds
(uint256[]): Chain IDs._crossChainFees
(uint256[]): Fees. Returns:uint256
: Total cross-chain fee spent. Modifiers:public
payable
getCodeOperatorsList (FR)
Contract: FeeRegistry Description: Returns the list of code operators. Parameters:
None Returns:
address[]
: The list of operator addresses. Modifiers:public
view
isCodeOperator (FR)
Contract: FeeRegistry Description: Checks if a given address is a code operator. Parameters:
_addr
(address): Address to check. Returns:bool
: True if operator, false otherwise. Modifiers:public
view
getSupportedRefInChainsList (FR)
Contract: FeeRegistry Description: Returns a list of chain IDs that support referral codes. Parameters:
None Returns:
uint256[]
: Supported chain IDs. Modifiers:public
view
isSupportedRefInChain (FR)
Contract: FeeRegistry Description: Checks if a chain ID is supported for referral codes. Parameters:
_chainId
(uint256): The chain ID. Returns:bool
: True if supported. Modifiers:public
view
getFeeBeneficiaries (FR)
Contract: FeeRegistry Description: Returns the fee beneficiaries array. Parameters:
None Returns:
FeeBeneficiary[]
: The array of beneficiaries. Modifiers:public
view
getCodePct (FR)
Contract: FeeRegistry Description: Fetches the effective discount and share percentage for a referral code. Parameters:
_code
(bytes8): Referral code. Returns:discountPct
(uint32): Effective discount.sharePct
(uint32): Effective share. Modifiers:public
view
calculateFee (FR)
Contract: FeeRegistry Description: Calculates discount, share, and final fee for a given code and fee amount. Parameters:
_code
(bytes8): Referral code._fee
(uint256): Original fee. Returns:discount
(uint256): Discount amount.share
(uint256): Referral share.fee
(uint256): Final fee. Modifiers:public
view
getContractCaseFee (FR)
Contract: FeeRegistry Description: Returns the fee for a contract case. Parameters:
_contract
(address): The contract._case
(uint8): Case identifier. Returns:uint256
: The fee amount. Modifiers:public
view
getContractCaseFeeForCode (FR)
Contract: FeeRegistry Description: Returns the fee for a contract case after applying referral code discount. Parameters:
_contract
(address): The contract._case
(uint8): The case._code
(bytes8): Referral code. Returns:uint256
: Fee amount after discount. Modifiers:public
view
getReferrerByAddress (FR)
Contract: FeeRegistry Description: Retrieves referrer data using an address. Parameters:
_referrer
(address): The referrer address. Returns:Referrer
: Referrer struct. Modifiers:public
view
getReferrerByCode (FR)
Contract: FeeRegistry Description: Retrieves referrer info by referral code. Parameters:
_code
(bytes8): Referral code. Returns:Referrer
: Struct with referrer data. Modifiers:public
view
defaultSharePct (FR)
Contract: FeeRegistry Description: Returns the default share percentage. Parameters:
None Returns:
uint32
: The default share percentage. Modifiers:external
view
defaultDiscountPct (FR)
Contract: FeeRegistry Description: Returns the default discount percentage. Parameters:
None Returns:
uint32
: The default discount percentage. Modifiers:external
view
refererByCode (FR)
Contract: FeeRegistry Description: Returns referrer info for a code (storage mapping). Parameters:
_code
(bytes8): The referral code. Returns:Referrer
: The referrer data. Modifiers:external
view
codeByReferrer (FR)
Contract: FeeRegistry Description: Returns the referral code for a given referrer address. Parameters:
_referrer
(address): The referrer. Returns:bytes8
: The referral code. Modifiers:external
view
accumulatedFee (FR)
Contract: FeeRegistry Description: Returns the total accumulated fee stored in the registry. Parameters:
None Returns:
uint128
: The amount of accumulated fee. Modifiers:external
view
LegacyMessenger (LM)
constructor (LM)
Contract: LegacyMessenger Description: Sets up ownership through the BuildManagerOwnable constructor. Parameters:
_owner
(address): The owner of the contract. Returns:None Modifiers:
constructor
sendMessagesTo (LM)
Contract: LegacyMessenger Description: Sends messages to multiple recipients, logs them with block numbers. Parameters:
_cryptoLegacy
(address): The CryptoLegacy contract._recipientList
(bytes32[]): Recipients’ hashes._messageHashList
(bytes32[]): Message hashes._messageList
(bytes[]): Actual message data._messageCheckList
(bytes[]): Message check data._messageType
(uint256): The type of message. Returns:None Modifiers:
public
getMessagesBlockNumbersByRecipient (LM)
Contract: LegacyMessenger Description: Returns the block numbers at which messages were received for a given recipient hash. Parameters:
_recipient
(bytes32): Recipient hash. Returns:uint64[]
: An array of block numbers. Modifiers:external
view
LifetimeNft (LTN)
constructor (LTN)
Contract: LifetimeNft Description: Initializes an ERC721 token with a base URI, then transfers ownership. Parameters:
name_
(string): NFT name.symbol_
(string): NFT symbol.baseURI_
(string): Base URI._owner
(address): Owner of the NFT contract. Returns:None Modifiers:
constructor
setBaseUri (LTN)
Contract: LifetimeNft Description: Updates the base URI of all tokens. Only owner can call. Parameters:
baseURI_
(string): The new base URI. Returns:None Modifiers:
external
onlyOwner
_setBaseUri (LTN)
Contract: LifetimeNft Description: Internal function to set and emit the base URI event. Parameters:
baseURI_
(string): The new base URI. Returns:None Modifiers:
internal
setMinterOperator (LTN)
Contract: LifetimeNft Description: Adds or removes addresses that can mint NFTs. Only owner can call. Parameters:
_minter
(address): Minter address._isActive
(bool): True to add, false to remove. Returns:None Modifiers:
external
onlyOwner
mint (LTN)
Contract: LifetimeNft
Description: Mints a new Lifetime NFT to _tokenOwner
. Only callable by a minter operator.
Parameters:
_tokenOwner
(address): Recipient of the newly minted NFT. Returns:uint256
: The new token ID. Modifiers:external
_baseURI (LTN)
Contract: LifetimeNft
Description: Internal override returning the current baseURI
.
Parameters:
None Returns:
string
: The base URI. Modifiers:internal
view
tokensOfOwner (LTN)
Contract: LifetimeNft Description: Returns an array of token IDs owned by a specific address. Parameters:
_owner
(address): The token owner. Returns:uint256[]
: Array of token IDs. Modifiers:external
view
getTier (LTN)
Contract: LifetimeNft Description: Determines a tier based on tokenId (e.g., Silicon, Gallium, Indium, etc.). Parameters:
_tokenId
(uint256): Token ID. Returns:Tier
: The tier enum. Modifiers:external
pure
LockChainGate (LCG)
constructor (LCG)
Contract: LockChainGate Description: Disables initializers for the proxy-based setup. Parameters:
None Returns:
None Modifiers:
constructor
_initializeLockChainGate (LCG)
Contract: LockChainGate Description: Internal function to set the lifetime NFT, lock period, and ownership. Parameters:
_lifetimeNft
(ILifetimeNft): The LifetimeNft contract._lockPeriod
(uint256): The time the NFT remains locked._owner
(address): The owner for this gate. Returns:None Modifiers:
internal
setLockOperator (LCG)
Contract: LockChainGate Description: Adds or removes an operator authorized to perform NFT lock operations. Parameters:
_operator
(address): Operator address._isAdd
(bool): True to add, false to remove. Returns:None Modifiers:
public
onlyOwner
setDebridgeGate (LCG)
Contract: LockChainGate Description: Sets the deBridgeGate contract. Only owner can call. Parameters:
_deBridgeGate
(address): The new deBridgeGate. Returns:None Modifiers:
external
onlyOwner
setDebridgeNativeFee (LCG)
Contract: LockChainGate Description: Sets the fixed native fee for a specific chain. Only owner can call. Parameters:
_chainId
(uint256): Chain ID._nativeFee
(uint256): Fee in native currency. Returns:None Modifiers:
external
onlyOwner
setDestinationChainContract (LCG)
Contract: LockChainGate Description: Sets the destination contract address for a given chain. Only owner can call. Parameters:
_chainId
(uint256): The chain ID._chainContract
(address): The contract address on that chain. Returns:None Modifiers:
external
onlyOwner
_setDestinationChainContract (LCG)
Contract: LockChainGate Description: Internal function to record the destination chain contract. Parameters:
_chainId
(uint256): Chain ID._chainContract
(address): The contract on that chain. Returns:None Modifiers:
internal
setSourceChainContract (LCG)
Contract: LockChainGate Description: Sets the source contract address for a given chain. Only owner can call. Parameters:
_chainId
(uint256): The chain ID._chainContract
(address): The contract address. Returns:None Modifiers:
external
onlyOwner
_setSourceChainContract (LCG)
Contract: LockChainGate Description: Internal function to record the source chain contract. Parameters:
_chainId
(uint256): Chain ID._chainContract
(address): The contract. Returns:None Modifiers:
internal
setSourceAndDestinationChainContract (LCG)
Contract: LockChainGate Description: Sets both source and destination chain contracts to the same address. Only owner can call. Parameters:
_chainId
(uint256): Chain ID._chainContract
(address): Contract address. Returns:None Modifiers:
external
onlyOwner
setLockPeriod (LCG)
Contract: LockChainGate Description: Updates the lock period for the NFT. Only owner can call. Parameters:
_lockPeriod
(uint256): The new lock period in seconds. Returns:None Modifiers:
external
onlyOwner
setReferralCode (LCG)
Contract: LockChainGate Description: Sets the referral code used in deBridge calls. Only owner can call. Parameters:
_referralCode
(uint32): The new referral code. Returns:None Modifiers:
external
onlyOwner
setCustomChainId (LCG)
Contract: LockChainGate Description: Sets a custom chain ID for the contract. Only owner can call. Parameters:
_customChainId
(uint256): The custom chain ID. Returns:None Modifiers:
external
onlyOwner
_writeLockLifetimeNft (LCG)
Contract: LockChainGate Description: Internal function to record that an NFT is locked for a holder. Parameters:
_holder
(address): The NFT holder._tokenId
(uint256): Token ID to lock. Returns:None Modifiers:
internal
lockLifetimeNft (LCG)
Contract: LockChainGate Description: Locks a lifetime NFT for a holder and optionally locks it cross-chain. Parameters:
_tokenId
(uint256): The NFT token ID._holder
(address): The address to receive the locked NFT._lockToChainIds
(uint256[]): Chain IDs to lock._crossChainFees
(uint256[]): Corresponding fees. Returns:None Modifiers:
external
payable
_lockLifetimeNftToChains (LCG)
Contract: LockChainGate Description: Internal function to lock a NFT to multiple chains. Parameters:
_holder
(address): NFT holder._toChainIDs
(uint256[]): Chain IDs._crossChainFees
(uint256[]): Fees array. Returns:None Modifiers:
internal
_checkFee (LCG)
Contract: LockChainGate Description: Ensures the user has provided sufficient fee. Parameters:
_fee
(uint256): The required fee. Returns:None Modifiers:
internal
lockLifetimeNftToChains (LCG)
Contract: LockChainGate Description: Public function to lock an already locked NFT to additional chains. Parameters:
_toChainIDs
(uint256[]): Chain IDs._crossChainFees
(uint256[]): Corresponding fees. Returns:None Modifiers:
external
payable
_lockLifetimeNftToChain (LCG)
Contract: LockChainGate Description: Internal function to send a cross-chain lock command for a single chain. Parameters:
_toChainID
(uint256): Destination chain ID._holder
(address): The NFT holder._sendFee
(uint256): The fee to send. Returns:None Modifiers:
internal
unlockLifetimeNft (LCG)
Contract: LockChainGate Description: Unlocks the NFT for the holder if lock period ended and not cross-chain locked. Parameters:
_tokenId
(uint256): The token ID to unlock. Returns:None Modifiers:
external
unlockLifetimeNftFromChain (LCG)
Contract: LockChainGate Description: Unlocks an NFT from a cross-chain lock. Parameters:
_tokenId
(uint256): The token ID to unlock. Returns:None Modifiers:
external
payable
_deleteTokenData (LCG)
Contract: LockChainGate Description: Internal function to clear stored lock data for an NFT. Parameters:
_holder
(address): The holder._tokenId
(uint256): The token ID. Returns:None Modifiers:
internal
_onlyCrossChain (LCG)
Contract: LockChainGate Description: Ensures a call is coming via CallProxy from the specified source chain. Parameters:
_fromChainID
(uint256): Source chain ID. Returns:None Modifiers:
internal
_send (LCG)
Contract: LockChainGate Description: Internal function to send a message via deBridgeGate. Parameters:
_dstTransactionCall
(bytes): The call data for the destination chain._toChainId
(uint256): Destination chain ID._value
(uint256): Fee sent. Returns:bytes32
: Submission ID. Modifiers:internal
approveLifetimeNftTo (LCG)
Contract: LockChainGate Description: Approves a specific address to unlock or transfer a locked NFT. Parameters:
_tokenId
(uint256): The NFT token ID._approveTo
(address): The address approved. Returns:None Modifiers:
external
_transferLifetimeNftTo (LCG)
Contract: LockChainGate Description: Internal function to handle local NFT ownership transfer among locked holders. Parameters:
_tokenId
(uint256): The NFT token ID._holder
(address): Current holder._transferTo
(address): New holder._fromChain
(uint256): The originating chain ID. Returns:None Modifiers:
internal
transferLifetimeNftTo (LCG)
Contract: LockChainGate Description: Transfers ownership of a locked NFT to a new address, optionally updating cross-chain. Parameters:
_tokenId
(uint256): The token ID._transferTo
(address): The new owner._toChainIDs
(uint256[]): Chains to update._crossChainFees
(uint256[]): Fees. Returns:None Modifiers:
external
payable
updateNftOwnerOnChainList (LCG)
Contract: LockChainGate Description: Updates the NFT owner on specified chains for the caller. Parameters:
_tokenId
(uint256): NFT token ID._toChainIDs
(uint256[]): Destination chain IDs._crossChainFees
(uint256[]): Fees. Returns:None Modifiers:
external
payable
_updateNftOwnerOnChainList (LCG)
Contract: LockChainGate Description: Internal function to iterate over chain IDs and update NFT ownership. Parameters:
_tokenId
(uint256): Token ID._toChainIDs
(uint256[]): Chain IDs._crossChainFees
(uint256[]): Fees._holder
(address): Current holder. Returns:None Modifiers:
internal
_updateLifetimeNftOwnerOnChain (LCG)
Contract: LockChainGate Description: Internal function to send a cross-chain update of NFT owner to a single chain. Parameters:
_tokenId
(uint256): Token ID._toChainID
(uint256): Destination chain ID._holder
(address): The new owner._sendFee
(uint256): Fee to send. Returns:bytes32
: Submission ID. Modifiers:internal
_encodeCrossLockCommand (LCG)
Contract: LockChainGate Description: Encodes a cross-chain command for locking an NFT. Parameters:
_tokenId
(uint256): Token ID._holder
(address): Holder address. Returns:bytes
: Encoded call data. Modifiers:internal
view
_encodeCrossUnlockCommand (LCG)
Contract: LockChainGate Description: Encodes a cross-chain command for unlocking an NFT. Parameters:
_tokenId
(uint256): Token ID._holder
(address): Holder. Returns:bytes
: Encoded call data. Modifiers:internal
view
_encodeCrossUpdateOwnerCommand (LCG)
Contract: LockChainGate Description: Encodes a cross-chain command for updating NFT owner. Parameters:
_tokenId
(uint256): Token ID._transferTo
(address): New owner. Returns:bytes
: Encoded data. Modifiers:internal
view
_checkDestinationLockedChain (LCG)
Contract: LockChainGate Description: Ensures the NFT is locked and a destination chain is specified. Parameters:
_toChainID
(uint256): Destination chain ID._holder
(address): NFT holder. Returns:uint256
: The locked token ID. Modifiers:internal
view
_checkCrossChainLock (LCG)
Contract: LockChainGate Description: Verifies the NFT is not cross-chain locked. Parameters:
_tokenId
(uint256): Token ID. Returns:None Modifiers:
internal
view
_checkTooEarly (LCG)
Contract: LockChainGate Description: Ensures the current time is past the lock period. Parameters:
_holder
(address): The NFT holder. Returns:None Modifiers:
internal
view
_checkSource (LCG)
Contract: LockChainGate Description: Verifies a cross-chain call originated from the expected source chain. Parameters:
_fromChainID
(uint256): The source chain ID. Returns:None Modifiers:
internal
view
_checkHolderTokenLock (LCG)
Contract: LockChainGate Description: Ensures the holder truly owns the locked token. Parameters:
_holder
(address): The holder address._tokenId
(uint256): The token ID. Returns:None Modifiers:
internal
view
_getLockedToChainsIdsOfAccount (LCG)
Contract: LockChainGate Description: Internal function returning chain IDs the holder’s NFT is locked to. Parameters:
_holder
(address): The NFT holder. Returns:uint256[]
: An array of chain IDs. Modifiers:internal
view
_getLockedUntil (LCG)
Contract: LockChainGate Description: Calculates the timestamp until which an NFT is locked. Parameters:
_holder
(address): The NFT holder. Returns:uint256
: The unlock time. Modifiers:internal
view
getLockedToChainsIds (LCG)
Contract: LockChainGate Description: Returns chain IDs to which a given NFT token ID is locked. Parameters:
_tokenId
(uint256): The token ID. Returns:uint256[]
: Chain IDs array. Modifiers:external
view
lockPeriod (LCG)
Contract: LockChainGate Description: Returns the current lock period. Parameters:
None Returns:
uint256
: The lock period in seconds. Modifiers:external
view
referralCode (LCG)
Contract: LockChainGate Description: Returns the referral code used in cross-chain calls. Parameters:
None Returns:
uint256
: The referral code. Modifiers:external
view
ownerOfTokenId (LCG)
Contract: LockChainGate Description: Returns the recorded owner of a locked token ID. Parameters:
_tokenId
(uint256): The token ID. Returns:address
: Owner address. Modifiers:external
view
lockedNftFromChainId (LCG)
Contract: LockChainGate Description: Returns the source chain ID if the NFT is cross-chain locked. Parameters:
_tokenId
(uint256): The token ID. Returns:uint256
: The source chain ID. Modifiers:external
view
lockedNftApprovedTo (LCG)
Contract: LockChainGate Description: Returns the address approved to unlock/transfer a locked NFT. Parameters:
_tokenId
(uint256): Token ID. Returns:address
: Approved address. Modifiers:external
view
lockedNft (LCG)
Contract: LockChainGate Description: Returns lock information for an account’s NFT. Parameters:
_holder
(address): The holder. Returns:LockedNft
: The lock details (lockedAt, tokenId). Modifiers:external
view
getDeBridgeChainNativeFeeAndCheck (LCG)
Contract: LockChainGate Description: Returns the required native fee for cross-chain calls and checks msg.value. Parameters:
_chainId
(uint256): Destination chain._userValue
(uint256): Value provided by the user. Returns:uint256
: The native fee. Modifiers:external
payable
_getDeBridgeChainNativeFeeAndCheck (LCG)
Contract: LockChainGate Description: Internal function that calculates the fee and checks it. Parameters:
_chainId
(uint256): Destination chain._userValue
(uint256): The user-provided value. Returns:uint256
: The native fee. Modifiers:internal
getDeBridgeChainNativeFee (LCG)
Contract: LockChainGate Description: Returns the set or default native fee for cross-chain calls. Parameters:
_chainId
(uint256): Destination chain._userValue
(uint256): Provided value. Returns:uint256
: The native fee. Modifiers:external
view
_getDeBridgeChainNativeFee (LCG)
Contract: LockChainGate Description: Internal function to get the appropriate deBridge fee. Parameters:
_chainId
(uint256): Destination chain ID._userValue
(uint256): The user’s provided value. Returns:uint256
: The fee. Modifiers:internal
view
deBridgeGate (LCG)
Contract: LockChainGate Description: Returns the address of the deBridgeGate contract. Parameters:
None Returns:
address
: The deBridgeGate address. Modifiers:external
view
lifetimeNft (LCG)
Contract: LockChainGate Description: Returns the address of the LifetimeNft contract. Parameters:
None Returns:
address
: The LifetimeNft address. Modifiers:external
view
deBridgeChainConfig (LCG)
Contract: LockChainGate Description: Returns chain config data for a given chain ID. Parameters:
_chainId
(uint256): Chain ID. Returns:nativeFee
(uint256): The native fee.destinationChain
(address): The destination chain contract.sourceChain
(address): The source chain contract. Modifiers:external
view
getLockOperatorsList (LCG)
Contract: LockChainGate Description: Returns a list of addresses designated as lock operators. Parameters:
None Returns:
address[]
: Array of operator addresses. Modifiers:external
view
isLockOperator (LCG)
Contract: LockChainGate Description: Checks if an address is in the set of lock operators. Parameters:
_addr
(address): Address to check. Returns:bool
: True if operator, false otherwise. Modifiers:public
view
calculateCrossChainCreateRefNativeFee (LCG)
Contract: LockChainGate Description: Computes total native fee required to create a cross-chain referral. Parameters:
_chainIds
(uint256[]): Destination chain IDs._crossChainFees
(uint256[]): Fees. Returns:uint256
: Total native fee. Modifiers:public
view
isNftLocked (LCG)
Contract: LockChainGate Description: Checks whether the NFT for a given owner is locked. Parameters:
_holder
(address): The owner’s address. Returns:bool
: True if locked. Modifiers:external
view
isNftLockedAndUpdate (LCG)
Contract: LockChainGate Description: Checks and updates a lock if the period has passed. Parameters:
_holder
(address): The NFT holder. Returns:bool
: True if the NFT is still locked. Modifiers:external
_isNftLocked (LCG)
Contract: LockChainGate Description: Internal function to check if an NFT is locked for a holder. Parameters:
_holder
(address): The holder address. Returns:bool
: True if locked. Modifiers:internal
view
getChainId (LCG)
Contract: LockChainGate Description: Returns either the custom chain ID or the actual chainid. Parameters:
None Returns:
uint256
: The chain ID. Modifiers:external
view
_getChainId (LCG)
Contract: LockChainGate Description: Internal function for chain ID retrieval. Parameters:
None Returns:
uint256
: The chain ID. Modifiers:internal
view
MultiPermit (MP)
constructor (MP)
Contract: MultiPermit Description: Initializes an empty constructor. Parameters:
None Returns:
None Modifiers:
constructor
approveTreasuryTokensToLegacy (MP)
Contract: MultiPermit Description: Executes multiple ERC20 permits in a single transaction. Parameters:
_permits
(PermitData[]): An array of permit data. Returns:None Modifiers:
external
PluginsRegistry (PR)
constructor (PR)
Contract: PluginsRegistry Description: Sets the contract’s owner. Parameters:
_owner
(address): The owner address. Returns:None Modifiers:
constructor
addPlugin (PR)
Contract: PluginsRegistry Description: Adds a new plugin and records the block number for description. Parameters:
_plugin
(address): Plugin contract address._description
(string): Description text. Returns:None Modifiers:
public
onlyOwner
addPluginDescription (PR)
Contract: PluginsRegistry Description: Adds an extra description for an already registered plugin. Parameters:
_plugin
(address): Plugin address._description
(string): Description text. Returns:None Modifiers:
public
onlyOwner
removePlugin (PR)
Contract: PluginsRegistry Description: Removes a plugin from the registry. Only owner can call. Parameters:
_plugin
(address): Plugin to remove. Returns:None Modifiers:
public
onlyOwner
isPluginRegistered (PR)
Contract: PluginsRegistry Description: Checks if a plugin is registered. Parameters:
_plugin
(address): Plugin address. Returns:bool
: True if registered. Modifiers:public
view
getPluginMetadata (PR)
Contract: PluginsRegistry Description: Retrieves plugin name, version, and description block numbers. Parameters:
_plugin
(address): Plugin address. Returns:string
: Name.uint16
: Version.uint64[]
: Block numbers for descriptions. Modifiers:public
view
getPluginDescriptionBlockNumbers (PR)
Contract: PluginsRegistry Description: Returns block numbers at which plugin descriptions were added. Parameters:
_plugin
(address): Plugin address. Returns:uint64[]
: Array of block numbers. Modifiers:external
view
getPluginAddressList (PR)
Contract: PluginsRegistry Description: Returns an array of all registered plugin addresses. Parameters:
None Returns:
address[]
: List of plugin addresses. Modifiers:public
view
getPluginInfoList (PR)
Contract: PluginsRegistry Description: Returns detailed plugin info (address, name, version, etc.) for all registered plugins. Parameters:
None Returns:
PluginInfo[]
: Array of plugin info. Modifiers:public
view
ProxyBuilder (PB)
constructor (PB)
Contract: ProxyBuilder Description: Sets the initial owner and optional proxy admin. Parameters:
_owner
(address): Owner address._proxyAdmin
(address): The proxy admin address (optional). Returns:None Modifiers:
constructor
setProxyAdmin (PB)
Contract: ProxyBuilder Description: Sets the ProxyAdmin address. Only the owner can call. Parameters:
_proxyAdmin
(address): The new ProxyAdmin. Returns:None Modifiers:
external
onlyOwner
build (PB)
Contract: ProxyBuilder Description: Deploys a TransparentUpgradeableProxy using CREATE2. Only owner can call. Parameters:
_create2Address
(address): Predicted address._create2Salt
(bytes32): The salt for CREATE2._implementation
(address): Implementation contract._initData
(bytes): Data for proxy initialization. Returns:address
: The deployed proxy address. Modifiers:external
onlyOwner
proxyBytecode (PB)
Contract: ProxyBuilder Description: Returns the creation bytecode for deploying a TransparentUpgradeableProxy with given implementation. Parameters:
_implementation
(address): The implementation._data
(bytes): Init data. Returns:bytes
: The bytecode. Modifiers:public
view
computeAddress (PB)
Contract: ProxyBuilder Description: Computes the CREATE2 deterministic address for given salt and bytecode hash. Parameters:
_salt
(bytes32): Salt used in CREATE2._bytecodeHash
(bytes32): Hash of the bytecode. Returns:address
: The computed address. Modifiers:public
view
ProxyBuilderAdmin (PBA)
constructor (PBA)
Contract: ProxyBuilderAdmin Description: Calls the ProxyAdmin constructor, then transfers ownership. Parameters:
_owner
(address): The owner for ProxyAdmin. Returns:None Modifiers:
constructor
SignatureRoleTimelock (SRT)
constructor (SRT)
Contract: SignatureRoleTimelock Description: Initializes the timelock contract, sets admin role, and optionally sets initial roles and signatures. Parameters:
_adminTimelock
(uint128): Timelock for admin-level signatures._roles
(AddressRoleInput[]): Array of role additions._sigs
(SignatureToAdd[]): Array of signature roles to add. Returns:None Modifiers:
constructor
setMaxExecutionPeriod (SRT)
Contract: SignatureRoleTimelock Description: Sets the max period during which a scheduled call can be executed. Parameters:
_maxExecutionPeriod
(uint128): New max period in seconds. Returns:None Modifiers:
external
onlyRole(ADMIN_ROLE)
setRoleAccounts (SRT)
Contract: SignatureRoleTimelock Description: Assigns or removes accounts from various roles. Parameters:
_list
(AddressRoleInput[]): List describing changes. Returns:None Modifiers:
external
onlyRole(ADMIN_ROLE)
_addRoleAccount (SRT)
Contract: SignatureRoleTimelock Description: Internal function to add an account to a role. Parameters:
_role
(bytes32): The role ID._account
(address): The account. Returns:None Modifiers:
internal
_getAddressIndex (SRT)
Contract: SignatureRoleTimelock Description: Internal helper to find an address in an array. Parameters:
_list
(address[]): The array._addr
(address): The address to find. Returns:uint
: The found index or max. Modifiers:internal
pure
_getBytes4Index (SRT)
Contract: SignatureRoleTimelock Description: Internal helper to find a bytes4 value in an array. Parameters:
_list
(bytes4[]): The array._hash
(bytes4): The selector to find. Returns:uint
: The index or max. Modifiers:internal
pure
_removeRoleAccount (SRT)
Contract: SignatureRoleTimelock Description: Internal function to remove an account from a role. Parameters:
_role
(bytes32): The role ID._account
(address): The account to remove. Returns:None Modifiers:
internal
addSignatureRoleList (SRT)
Contract: SignatureRoleTimelock Description: Adds signature roles for multiple target selectors in a single call. Parameters:
_sigs
(SignatureToAdd[]): Array describing new signature roles. Returns:None Modifiers:
external
onlyCurrentAddress
_addSignatureRole (SRT)
Contract: SignatureRoleTimelock Description: Internal function to add a signature role on a target. Parameters:
_target
(address): Target contract._signature
(bytes4): Function selector._role
(bytes32): Required role._timelock
(uint128): Timelock in seconds. Returns:None Modifiers:
internal
removeSignatureRoleList (SRT)
Contract: SignatureRoleTimelock Description: Removes multiple signature roles in a single call. Parameters:
_sigsToRemove
(SignatureToRemove[]): Signatures to remove. Returns:None Modifiers:
external
onlyCurrentAddress
_removeSignatureRole (SRT)
Contract: SignatureRoleTimelock Description: Internal function to remove a signature role from a target. Parameters:
_target
(address): Target._signature
(bytes4): Selector. Returns:None Modifiers:
internal
scheduleCallList (SRT)
Contract: SignatureRoleTimelock Description: Schedules multiple calls with timelocks. Parameters:
_calls
(CallToAdd[]): Array of calls to schedule. Returns:bytes32[]
: The call IDs. Modifiers:external
nonReentrant
_checkRole (SRT)
Contract: SignatureRoleTimelock Description: Internal override to verify the caller has a required role. Parameters:
_role
(bytes32): The role. Returns:None Modifiers:
internal
_scheduleCall (SRT)
Contract: SignatureRoleTimelock Description: Internal function to schedule a single call. Parameters:
_target
(address): Target._sig
(bytes4): Function selector._data
(bytes): Call data. Returns:bytes32
: The call ID. Modifiers:internal
executeCallList (SRT)
Contract: SignatureRoleTimelock Description: Executes multiple scheduled calls. Parameters:
_callIds
(bytes32[]): IDs of calls to execute. Returns:None Modifiers:
external
nonReentrant
_executeCall (SRT)
Contract: SignatureRoleTimelock Description: Internal function that performs the actual call if timelock has passed. Parameters:
callId
(bytes32): The call ID to execute. Returns:None Modifiers:
internal
cancelCallList (SRT)
Contract: SignatureRoleTimelock Description: Cancels multiple scheduled calls. Only admin can call. Parameters:
_callIds
(bytes32[]): Call IDs to cancel. Returns:None Modifiers:
external
onlyRole(ADMIN_ROLE)
nonReentrant
_cancelCall (SRT)
Contract: SignatureRoleTimelock Description: Internal function to cancel a specific call. Parameters:
callId
(bytes32): The call ID. Returns:None Modifiers:
internal
getRoleAccounts (SRT)
Contract: SignatureRoleTimelock Description: Returns addresses for a given role. Parameters:
_role
(bytes32): The role ID. Returns:address[]
: Array of accounts. Modifiers:external
view
getTargets (SRT)
Contract: SignatureRoleTimelock Description: Returns a list of target addresses that have signature roles defined. Parameters:
None Returns:
address[]
: Array of target addresses. Modifiers:external
view
getTargetSigs (SRT)
Contract: SignatureRoleTimelock Description: Returns all function selectors and associated roles/timelocks for a specific target. Parameters:
_target
(address): The target contract. Returns:TargetSigRes[]
: Array of (selector, role, timelock). Modifiers:external
view
getCallId (SRT)
Contract: SignatureRoleTimelock Description: Computes the call ID for a scheduled call. Parameters:
target
(address): The target contract.data
(bytes): The call data.caller
(address): The scheduler.executeAfter
(uint256): The earliest execution time. Returns:bytes32
: The call ID. Modifiers:public
pure
getCall (SRT)
Contract: SignatureRoleTimelock Description: Returns details of a scheduled call by ID. Parameters:
_callId
(bytes32): The call ID. Returns:CallRequest
: The call request struct. Modifiers:external
view
getCallsList (SRT)
Contract: SignatureRoleTimelock Description: Returns a list of scheduled calls with details, from an offset and limit. Parameters:
_offset
(uint256): Start index._limit
(uint256): Number of calls to fetch. Returns:bytes32[]
: Array of call IDs.CallRequest[]
: Array of call request structs. Modifiers:external
view
getCallIds (SRT)
Contract: SignatureRoleTimelock Description: Returns all scheduled call IDs. Parameters:
None Returns:
bytes32[]
: Array of call IDs. Modifiers:external
view
getCallsLength (SRT)
Contract: SignatureRoleTimelock Description: Returns total number of scheduled calls. Parameters:
None Returns:
uint256
: Length of calls array. Modifiers:external
view
Modifier Glossary
public: Accessible externally and internally.
external: Callable only externally.
internal: Callable only 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