> ## 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

<Info>
  <div class="border-b border-zinc-500/20 dark:border-zinc-500/30 pb-4 flex" style={{gap: '4px', fontFamily: 'var(--font-jetbrains-mono)'}}>
    <span class="token keyword">import</span> <span class="token string">"@patchwork/contracts/PatchworkAssignable/IPatchworkAssignable.sol"</span><span class="token punctuation">;</span>
  </div>

  **Inherits:**
  [`IPatchworkScoped`](/contracts/core/IPatchworkScoped)
</Info>

<div
  className="border-primary dark:border-primary-light"
  style={{
borderTopWidth: '1.5px',
marginBottom: '-1rem',
marginTop: '4rem'
}}
/>

## 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               |

<div
  className="border-primary dark:border-primary-light"
  style={{
borderTopWidth: '1.5px',
marginBottom: '-1rem',
marginTop: '4rem'
}}
/>

## 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;
}
```
