> ## Documentation Index
> Fetch the complete documentation index at: https://docs.patchwork.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# IPatchworkAssignable

> IPatchwork721 extension for contracts supporting Patchwork assignment

> [!NOTE]
>
> import "@patchwork/contracts/PatchworkAssignable/IPatchworkAssignable.sol";
>
> **Inherits:**
> [`IPatchworkScoped`](https://docs.patchwork.dev/contracts/core/IPatchworkScoped)

## Functions

***

### assign

Assigns a token to another

```solidity theme={null}
function assign(uint256 ourTokenId, address to, uint256 tokenId) external;
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `ourTokenId` | `uint256` | ID of our token |
| `to` | `address` | Address to assign to |
| `tokenId` | `uint256` | ID of the token to assign |

### allowAssignment

Checks permissions for assignment

```solidity theme={null}
function allowAssignment(
    uint256 ourTokenId,
    address target,
    uint256 targetTokenId,
    address targetOwner,
    address by,
    string memory scopeName
) external view returns (bool);
```

**Parameters**

| Name | Type | Description |
| - | - | - |
| `ourTokenId` | `uint256` | the tokenID to assign |
| `target` | `address` | the address of the target |
| `targetTokenId` | `uint256` | the tokenID of the target |
| `targetOwner` | `address` | the ownerOf of the target |
| `by` | `address` | the account invoking the assignment to Patchwork Protocol |
| `scopeName` | `string` | the 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.

```solidity theme={null}
struct Assignment {
    address tokenAddr;
    uint256 tokenId;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.