TLNftDelegationRegistry

Git Source

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

NameTypeDescription
delegateaddressThe address to check for delegation status
vaultaddressThe vault address to check against
nftContractaddressThe nft contract address to check
tokenIduint256The token id to check against

Returns

NameTypeDescription
<none>boolbool 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

NameTypeDescription
delegateaddressThe address to check for delegation status
vaultaddressThe vault address to check against
nftContractaddressThe nft contract address to check
tokenIduint256The token id to check against

Returns

NameTypeDescription
<none>boolbool 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

NameTypeDescription
statusboolA boolean indicating to pause or unpause the contract