# IERC 1363 Receiver Upgradeable

## Methods

### onTransferReceived

```solidity
function onTransferReceived(address operator, address from, uint256 value, bytes data) external nonpayable returns (bytes4)
```

Handle the receipt of ERC1363 tokens

*Any ERC1363 smart contract calls this function on the recipient after a `transfer` or a `transferFrom`. This function MAY throw to revert and reject the transfer. Return of other than the magic value MUST result in the transaction being reverted. Note: the token contract address is always the message sender.*

#### Parameters

| Name     | Type    | Description                                                                          |
| -------- | ------- | ------------------------------------------------------------------------------------ |
| operator | address | address The address which called `transferAndCall` or `transferFromAndCall` function |
| from     | address | address The address which are token transferred from                                 |
| value    | uint256 | uint256 The amount of tokens transferred                                             |
| data     | bytes   | bytes Additional data with no specified format                                       |

#### Returns

| Name | Type   | Description                                                                                        |
| ---- | ------ | -------------------------------------------------------------------------------------------------- |
| \_0  | bytes4 | `bytes4(keccak256(&quot;onTransferReceived(address,address,uint256,bytes)&quot;))` unless throwing |


---

# Agent Instructions: 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:

```
GET https://docs.fringe.fi/smart-contract-documentation/openzeppelin/contracts-upgradeable/interfaces/ierc1363receiverupgradeable.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
