> For the complete documentation index, see [llms.txt](https://docs.notional.finance/developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.notional.finance/developers/smart-contract-documentation/erc1155token.md).

# ERC1155 Token

## ERC1155Token

Implements the ERC1155 token standard for transferring fCash tokens within Notional. ERC1155 ids encode an identifier that represents assets that are fungible with each other. For example, two fCash tokens that asset in the same market and mature at the same time are fungible with each other and therefore will have the same id. `CASH_PAYER` tokens are not transferrable because they have negative value.

### Methods

* [safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes data)](#safeTransferFrom)
* [safeBatchTransferFrom(address from, address to, uint256\[\] ids, uint256\[\] values, bytes data)](#safeBatchTransferFrom)

## Methods

#### safeTransferFrom

> Transfers tokens between from and to addresses.
>
> **Parameters:**
>
> * from: Source address
> * to: Target address
> * id: ID of the token type
> * value: Transfer amount
> * data: Additional data with no specified format, unused by this contract but forwarded unaltered
>
>   to the ERC1155TokenReceiver.

**Error Codes:**

* INVALID\_ADDRESS: destination address cannot be 0
* INTEGER\_OVERFLOW: value cannot overflow uint128
* CANNOT\_TRANSFER\_PAYER: cannot transfer assets that confer obligations
* CANNOT\_TRANSFER\_MATURED\_ASSET: cannot transfer asset that has matured
* INSUFFICIENT\_BALANCE: from account does not have sufficient tokens
* ERC1155\_NOT\_ACCEPTED: to contract must accept the transfer

#### safeBatchTransferFrom

> Transfers tokens between from and to addresses in batch.
>
> **Parameters:**
>
> * from: Source address
> * to: Target address
> * ids: IDs of each token type (order and length must match \_values array)
> * values: Transfer amounts per token type (order and length must match \_ids array)
> * data: Additional data with no specified format, unused by this contract but forwarded unaltered
>
>   to the ERC1155TokenReceiver.

**Error Codes:**

* INVALID\_ADDRESS: destination address cannot be 0
* INTEGER\_OVERFLOW: value cannot overflow uint128
* CANNOT\_TRANSFER\_PAYER: cannot transfer assets that confer obligations
* CANNOT\_TRANSFER\_MATURED\_ASSET: cannot transfer asset that has matured
* INSUFFICIENT\_BALANCE: from account does not have sufficient tokens
* ERC1155\_NOT\_ACCEPTED: to contract must accept the transfer


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.notional.finance/developers/smart-contract-documentation/erc1155token.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
