TLNftDelegationRegistry
Inherits: Ownable, Pausable, ITLNftDelegationRegistry
Author: transientlabs.xyz
Transient Labs NFT Delegation Registry, providing a universal interface for TL contracts to check NFT delegation and use it for features like Story Inscriptions, Synergy, Multi-Metadata and more.
This registry is not intended to be used in core ownership functions defined by ERC-721 and ERC-1155.
State Variables
delegateRegistry
IDelegateRegistry public immutable delegateRegistry;
Functions
constructor
constructor(address initOwner, address delegateRegistry_) Ownable(initOwner);
checkDelegateForERC721
Function to check if an address is delegated for a vault for an ERC-721 token
This function does not ensure the vault is the current owner of the token
function checkDelegateForERC721(address delegate, address vault, address nftContract, uint256 tokenId)
external
view
returns (bool);
Parameters
Name | Type | Description |
---|---|---|
delegate | address | The address to check for delegation status |
vault | address | The vault address to check against |
nftContract | address | The nft contract address to check |
tokenId | uint256 | The token id to check against |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | bool True is delegated, False if not |
checkDelegateForERC1155
Function to check if an address is delegated for a vault for an ERC-1155 token
This function does not ensure the vault has a balance of the token in question
function checkDelegateForERC1155(address delegate, address vault, address nftContract, uint256 tokenId)
external
view
returns (bool);
Parameters
Name | Type | Description |
---|---|---|
delegate | address | The address to check for delegation status |
vault | address | The vault address to check against |
nftContract | address | The nft contract address to check |
tokenId | uint256 | The token id to check against |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | bool True is delegated, False if not |
setPaused
Function to pause the contract (always return false)
Only callable by the owner
function setPaused(bool status) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
status | bool | A boolean indicating to pause or unpause the contract |