đGetter Functions
This page provides an overview on how the getter functions of the NFTDelegation smart contract work.
Main Retrieve functions
How to retrieve all delegation addresses delegated from a Delegator on a specific use case on a collection?
Purpose: The retrieveDelegationAddresses() function retrieves all delegation addresses (active & inactive) assigned by a delegator on a specific use case on a specific collection.
Description: The function takes three parameters: _delegatorAddress, _collectionAddress and _useCase. The _delegatorAddress parameter is the address of the delegator. The _collectionAddress parameter is the address of the collection for which the delegation addresses will be retrieved. The _useCase parameter is the type of delegation for which all delegation addresses will be returned. This function returns an address array that includes all delegation addresses delegated from a delegator on a specific usecase on a specific collection.
How to retrieve all delegators who gave delegation rights to a delegation Address on a specific use case on a collection?
Purpose: The retrieveDelegators() function retrieves all delegators addresses (active & inactive) who gave delegation rights to a delegation Address on a specific use case on a specific collection
Description: The function takes three parameters: _delegationAddress, _collectionAddress and _useCase. The _delegationAddress parameter is the address for which a delegator gave delegation rights. The _collectionAddress parameter is the address of the collection for which the delegators' addresses will be retrieved. The _useCase parameter is the type of delegation for which all delegators' addresses will be returned. This function returns an address array that includes all delegators' addresses who gave delegation rights to a delegation address on a specific usecase on a specific collection.
How to check if a delegation exists given a delegator address?
Purpose: The retrieveDelegatorStatusOfDelegation() function retrieves the status of a delegation given a delegator address.
Description: The function takes three parameters: _delegatorAddress, _collectionAddress and _useCase. The _delegatorAddress parameter is the address of the delegator. The _collectionAddress parameter is the address of the collection for which the status will be returned. The _useCase parameter is the type of delegation for which the delegation status will be returned. This function returns a boolean value indicating whether a delegation on a specific use case on a specific collection exists or not, if true it means that the delegator registered a delegation address on a specific use case on a specific collection.
How to check if a delegation exists given a delegation address?
Purpose: The retrieveDelegationAddressStatusOfDelegation() function retrieves the status of a delegation given a delegation address.
Description: The function takes three parameters: _delegationAddress, _collectionAddress and _useCase. The _delegationAddress parameter is the address for which a delegation was registered. The _collectionAddress parameter is the address of the collection for which the status will be returned. The _useCase parameter is the type of delegation for which the delegation status will be returned. This function returns a boolean value indicating whether a delegation on a specific use case on a specific collection exists or not, if true it means that a delegator registered the given delegation address on a specific use case on a specific collection.
How to check if a delegation exists given a delegator address and a delegation address??
Purpose: The retrieveGlobalStatusOfDelegation() function retrieves the status of a delegation given both the address of the delegator and the delegation address.
Description: The function takes four parameters: _delegatorAddress, _delegationAddress, _collectionAddress and _useCase. The _delegatorAddress parameter is the address of the delegator. The _delegationAddress parameter is the address for which a delegation was registered. The _collectionAddress parameter is the address of the collection for which the status will be returned. The _useCase parameter is the type of delegation for which the delegation status will be returned. This function returns a boolean value indicating whether a delegation on a specific use case on a specific collection exists or not, if true it means that a delegator registered the given delegation address on a specific use case on a specific collection.
How to retrieve the most recent delegation address delegated from a Delegator on a specific use case on a collection?
Purpose: The retrieveMostRecentDelegation() function retrieves the most recent delegation addresses assigned by a delegator on a specific use case on a specific collection.
Description: The function takes three parameters: _delegatorAddress, _collectionAddress and _useCase. The _delegatorAddress parameter is the address of the delegator. The _collectionAddress parameter is the address of the collection for which the most recent delegation address will be retrieved. The _useCase parameter is the type of delegation for which the most recent delegation address will be returned. This function returns the most recent address delegated from a delegator on a specific usecase on a specific collection.
How to retrieve the most recent delegator who gave delegation rights to a delegation Address on a specific use case on a collection?
Purpose: The retrieveMostRecentDelegator() function retrieves most recent delegator who gave delegation rights to a delegation Address on a specific use case on a specific collection
Description: The function takes three parameters: _delegationAddress, _collectionAddress and _useCase. The _delegationAddress parameter is the address for which a delegator gave delegation rights. The _collectionAddress parameter is the address of the collection for which the delegators' addresses will be retrieved. The _useCase parameter is the type of delegation for which all delegators' addresses will be returned. This function returns the most recent delegator address who gave delegation rights to a delegation address on a specific usecase on a specific collection.
How to retrieve the active delegation addresses delegated from a Delegator on a specific use case on a collection?
Purpose: The retrieveActiveDelegations() function retrieves the active delegation addresses assigned by a delegator on a specific use case on a specific collection.
Description: The function takes four parameters: _delegatorAddress, _collectionAddress, _date and _useCase. The _delegatorAddress parameter is the address of the delegator. The _collectionAddress parameter is the address of the collection for which the active delegation addresses will be retrieved. The _date parameter is the epoch time value for which the active delegation addresses will be retrieved, _date compares its value against the _expiryDate that was given when a delegation was registered. The _useCase parameter is the type of delegation for which all delegation addresses will be returned. This function returns an address array that includes the active delegation addresses delegated from a delegator on a specific usecase on a specific collection.
How to retrieve the active delegators who gave delegation rights to a delegation Address on a specific use case on a collection?
Purpose: The retrieveActiveDelegators() function retrieves the active delegators addresses who gave delegation rights to a delegation Address on a specific use case on a specific collection
Description: The function takes four parameters: _delegationAddress, _collectionAddress, _date and _useCase. The _delegationAddress parameter is the address for which a delegator gave delegation rights. The _collectionAddress parameter is the address of the collection for which the delegators' addresses will be retrieved. The _date parameter is the epoch time value for which the active delegators' addresses will be retrieved, _date compares its value against the _expiryDate that was given when a delegation was registered. The _useCase parameter is the type of delegation for which all delegators' addresses will be returned. This function returns an address array that includes the active delegators' addresses who gave delegation rights to a delegation address on a specific usecase on a specific collection.
How to check if a delegator gave sub-delegation rights to a delegation address on a collection?
Purpose: The retrieveSubDelegationStatus() function retrieves the sub-delegation rights status between a delegator and a delegation address.
Description: The function takes three parameters: _delegatorAddress, _collectionAddress and _delegationAddress. The _delegatorAddress parameter is the address of the delegator. The _collectionAddress parameter is the address of the collection for which sub-delegation rights were given from a delegator to a delegation address. The _delegationAddress parameter is the address for which the delegator gave sub-delegation rights. This function returns a boolean value indicating whether sub-delegation rights were given from the delegator to the delegation address.
How to check the consolidation status/relationship between two addresses on a collection?
Purpose: The checkConsolidationStatus() function retrieves consolidation status/relationship between two addresses that may exist on a collection.
Description: The function takes three parameters: _wallet1, _wallet2 and _collectionAddress. The _wallet1 and _wallet2 parameters can either be a delegator address, a delegation address or any other address. The _collectionAddress parameter is the address of the collection for which consolidation status/relationship may exist between the two addresses. This function returns a boolean value indicating whether a consolidation status/relationship exists between the two given addresses.
Other Retrieve Functions
How to retrieve all data about a delegator address for a specific usecase on a collection?
Purpose: The retrieveDelegationAddressesTokensIDsandExpiredDates() function retrieves for a specific use case on a specific collection, the delegation addresses, token IDs, expiry dates and if the delegator assigned all tokens owned or a specific token when codnucting a delegation.
Description: The function takes three parameters: _delegatorAddress, _collectionAddress and _useCase. The _delegatorAddress parameter is the address of the delegator. The _collectionAddress parameter is the address of the collection for which full data will be retrieved. The _useCase parameter is the type of delegation for which full data will be returned. This function returns an address array that includes all delegation addresses delegated from a delegator on a specific usecase on a specific collection, a uint array that includes the token ids that were registered, a bool array that indicates if all tokens owned by the delegator were assigned during the registration or just a specific token id and a uint array that includes expiry dates of each delegation.
How to retrieve all data about a delegation address for a specific usecase on a collection?
Purpose: The retrieveDelegatorsTokensIDsandExpiredDates() function retrieves for a specific use case on a specific collection, the delegators' addresses, token IDs, expiry dates and if the delegator assigned all tokens owned or a specific token when codnucting a delegation.
Description: The function takes three parameters: _delegationAddress, _collectionAddress and _useCase. The _delegationAddress parameter is the address for which full data will be retrieved. The _collectionAddress parameter is the address of the collection for which full data will be retrieved. The _useCase parameter is the type of delegation for which full data will be returned. This function returns an address array that includes all delegators' addresses who gave delegation rights to a delegation address on a specific usecase on a specific collection, a uint array that includes the token ids that were registered, a bool array that indicates if all tokens owned by the delegator were assigned during the registration or just a specific token id and a uint array that includes expiry dates of each delegation.
How to check the delegation status given a specific token id?
Purpose: The retrieveTokenStatus() function retrieves the status of a delegation given a specific token id.
Description: The function takes five parameters: _delegatorAddress, _collectionAddress, _delegationAddress, _useCase and _tokenid. The _delegatorAddress parameter is the address that registered a delegation using a specific token id of a collection. The _delegatorAddress must match the token owner address of that specific token id within the collection. The _collectionAddress parameter is the address of the collection for which delegation rights were given. The _delegationAddress parameter is the address for which delegation rights were given on that specific token id. The _useCase parameter is the type of delegation. This function returns a boolean value indicating whether delegation rights were given for the specific token id by the token owner.
How to retrieve the global lock status that exists on a delegation address?
Purpose: The retrieveGlobalLockStatus() function retrieves the global lock status of a delegation Address.
Description: The function takes one parameter: _delegationAddress. The _delegationAddress parameter is the address for which the global lock status will be returned. This function returns a boolean value indicating whether the global lock is enabled or not, if true it means that the _delegationAddress is locked and cannot be registered in any other usecase or collection.
How to retrieve the collection lock status that exists on a delegation address?
Purpose: The retrieveCollectionLockStatus() function retrieves the collection lock status of a delegation Address.
Description: The function takes two parameters: _collectionAddress and _delegationAddress. The _collectionAddress parameter is the address of the collection for which the collection lock status of a delegation Address will be retrieved. The _delegationAddress parameter is the address for which the collection lock status will be returned. This function returns a boolean value indicating whether the collection lock is enabled or not, if true it means that the _delegationAddress is locked and cannot be registered within the same collection.
How to retrieve the collection use case lock status that exists on a delegation address?
Purpose: The retrieveCollectionUseCaseLockStatus() function retrieves the collection use case lock status of a delegation Address.
Description: The function takes three parameters: _collectionAddress, _delegationAddress and _useCase. The _collectionAddress parameter is the address of the collection for which the collection use case lock status of a delegation Address will be retrieved. The _delegationAddress parameter is the address for which the collection use case lock status will be returned. The _useCase parameter is the type of delegation for which the collection use case status will be returned. This function returns a boolean value indicating whether the collection use case lock is enabled or not, if true it means that the _delegationAddress is locked and cannot be registered for the same use case within the same collection.
How to check if a delegator address is active or not?
Purpose: The retrieveStatusOfActiveDelegator() function checks if a delegator address who gave delegation rights to a delegation Address on a specific use case on a specific collection is active or not.
Description: The function takes five parameters: _delegatorAddress, _collectionAddress, _delegationAddress, _date and _useCase. The _delegatorAddress parameter is the address of the delegator. The _collectionAddress parameter is the address of the collection for which the status, active or inactive, of the delegator will be retrieved. The _delegationAddress parameter is the address for which a delegator gave delegation rights. The _date parameter is the epoch time value for which the status of the delegator address will be retrieved, _date compares its value against the _expiryDate that was given when a delegation was registered. The _useCase parameter is the type of delegation for which the status of the delegator will be returned. This function returns a boolean variable that indicates if a delegator address is active or not.
How to check if a delegation address is the most recent one delegated?
Purpose: The retrieveStatusOfMostRecentDelegation() function checks the status of a delegation address to identify if it's the most recent one delegated or not.
Description: The function takes four parameters: _delegatorAddress, _collectionAddress, _delegationAddress and _useCase. The _delegatorAddress parameter is the address of the delegator. The _collectionAddress parameter is the address of the collection for which the status of the most recent delegation address will be retrieved. The _delegationAddress parameter is the address that will be checked if its the most recent delegated or not. The _useCase parameter is the type of delegation for which the status of the delegation Address will be returned. This function returns a boolean variable that indicates if a delegation address is the most rent one delegated or not.
Last updated