import”@patchwork/contracts/PatchworkAssignable/IPatchworkAssignable.sol”;

Inherits: IPatchworkScoped

Functions


assign

Assigns a token to another

function assign(uint256 ourTokenId, address to, uint256 tokenId) external;

Parameters

NameTypeDescription
ourTokenIduint256ID of our token
toaddressAddress to assign to
tokenIduint256ID of the token to assign

allowAssignment

Checks permissions for assignment

function allowAssignment(
    uint256 ourTokenId,
    address target,
    uint256 targetTokenId,
    address targetOwner,
    address by,
    string memory scopeName
) external view returns (bool);

Parameters

NameTypeDescription
ourTokenIduint256the tokenID to assign
targetaddressthe address of the target
targetTokenIduint256the tokenID of the target
targetOwneraddressthe ownerOf of the target
byaddressthe account invoking the assignment to Patchwork Protocol
scopeNamestringthe scope name of the contract to assign to

Structs


Assignment

Represents an assignment of a token from an external NFT contract to a token in this contract.

struct Assignment {
    address tokenAddr;
    uint256 tokenId;
}