# createERC1155SingleTransferVoucher

Utility to create a `Voucher` to transfer ERC-1155 token from one address to another on the base layer.

## Usage

The example below shows how to create a `Voucher` to withdraw 1 token of token id 1 from the application to the `msgSender` of the an input.

```ts twoslash
import { Rollup } from "@cartesi/rollup";
import { createERC1155SingleTransferVoucher } from "@deroll/wallet";
import { parseUnits } from "viem";

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

const application = "0xab7528bb862fb57e8a2bcd567a2e929a0be56a5e";
const token = "0x04d724738873CB6a86328D2EbAEb2079D715e61e"; // ERC-1155 address
rollup.run({
    advance: ({ msgSender }) => {
        const value = parseUnits("1", 18);
        const voucher = createERC1155SingleTransferVoucher( // [!code focus]
            token, // [!code focus]
            application, // [!code focus]
            msgSender, // [!code focus]
            1n, // [!code focus]
            value, // [!code focus]
            "0x", // [!code focus]
        ); // [!code focus]
        rollup.emitVoucher(voucher);
        return true;
    },
});
```

## Returns

Type: `Voucher`

## Parameters

Type: `Address`

ERC-1155 token address.

Type: `Address`

Source address.

Type: `Address`

Destination address.

Type: `bigint`

Token id.

Type: `bigint`

Token amount.

Type: `Hex`

Extra payload sent to the base layer.
