# transferERC721

Transfer L2 ERC-721 ownership from one user to another.

## Usage

The following example is an advance handler that transfers token 1 of the `0xc6582A9b48F211Fa8c2B5b16CB615eC39bcA653B` ERC-721 from the sender of the input to a recipient specified in the input payload.
If the sender does not have ownership of the token an exception is raised, and that handler is aborted.

```ts twoslash
import { Rollup, chain } from "@cartesi/rollup";
import { createWallet } from "@deroll/wallet";

// open the rollup device
const rollup = new Rollup();

// create wallet
const wallet = createWallet();

const token = "0xc6582A9b48F211Fa8c2B5b16CB615eC39bcA653B"; // NFT address
rollup.run({
    advance: chain(wallet.handler, ({ msgSender, payload }) => {
        const address = payload.toString();
        wallet.transferERC721(token, msgSender, address, 1n); // [!code focus]
        return true;
    }),
});
```

## Returns

Type: `void`

## Parameters

Type: `Address`

Token address.

Type: `string`

From address.

Type: `string`

Recipiend address.

Type: `bigint`

Amount to transfer.
