> For the complete documentation index, see [llms.txt](https://docs.inverter.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inverter.network/contracts/technical-reference/external/forwarder/transactionforwarder_v1.md).

# TransactionForwarder\_v1

[Git Source](https://github.com/InverterNetwork/inverter-contracts/blob/2a8a4c80ff4f24a59546d4e6126b81bc51228c94/src/external/forwarder/TransactionForwarder_v1.sol)

**Inherits:** [ITransactionForwarder\_v1](/contracts/technical-reference/external/forwarder/interfaces/itransactionforwarder_v1.sol.md), [ERC2771ForwarderUpgradeable](<https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/22489db15621b9a42ebddb1facade6962034e9b9/contracts/metatx/ERC2771ForwarderUpgradeable.sol&#xA;>), [ContextUpgradeable](<https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/22489db15621b9a42ebddb1facade6962034e9b9/contracts/utils/ContextUpgradeable.sol&#xA;>)

**Author:** Inverter Network

This contract enables users to interact with smart contracts indirectly through a trusted forwarder. It supports meta transactions, allowing transactions to be sent by one party but signed and paid for by another. It also handles batch transactions (multi-call), facilitating complex, multi-step interactions within a single transaction.

*Integrates* [*{ERC2771ForwarderUpgradeable}* ](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/22489db15621b9a42ebddb1facade6962034e9b9/contracts/metatx/ERC2771ForwarderUpgradeable.sol)*and* [*{ContextUpgradeable}* ](https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable/blob/22489db15621b9a42ebddb1facade6962034e9b9/contracts/utils/ContextUpgradeable.sol)*to manage and relay meta transactions. It handles nonce management, signature verification, and ensures only trusted calls are forwarded.*

### State Variables

#### \_\_gap

*Storage gap for future upgrades.*

```solidity
uint[50] private __gap;
```

### Functions

#### constructor

```solidity
constructor();
```

#### init

```solidity
function init() external initializer;
```

#### createDigest

Creates a digest for the given `ForwardRequestData`.

*The signature field of the given `ForwardRequestData` can be empty.*

```solidity
function createDigest(ForwardRequestData memory req)
    external
    view
    returns (bytes32 digest);
```

**Parameters**

| Name  | Type                 | Description                                         |
| ----- | -------------------- | --------------------------------------------------- |
| `req` | `ForwardRequestData` | The ForwardRequest you want to get the digest from. |

**Returns**

| Name     | Type      | Description                                              |
| -------- | --------- | -------------------------------------------------------- |
| `digest` | `bytes32` | The digest needed to create a signature for the request. |

#### executeMulticall

Enables the execution of multiple calls in a single transaction.

```solidity
function executeMulticall(SingleCall[] calldata calls)
    external
    returns (Result[] memory results);
```

**Parameters**

| Name    | Type           | Description                                                     |
| ------- | -------------- | --------------------------------------------------------------- |
| `calls` | `SingleCall[]` | Array of call structs that should be executed in the multicall. |

**Returns**

| Name      | Type       | Description                                                 |
| --------- | ---------- | ----------------------------------------------------------- |
| `results` | `Result[]` | returnData The return data of the calls that were executed. |

#### \_getStructHash

Returns the digest for the given `ForwardRequestData`.

```solidity
function _getStructHash(
    ERC2771ForwarderUpgradeable.ForwardRequestData memory req
) internal view returns (bytes32);
```

**Parameters**

| Name  | Type                                             | Description                                         |
| ----- | ------------------------------------------------ | --------------------------------------------------- |
| `req` | `ERC2771ForwarderUpgradeable.ForwardRequestData` | The ForwardRequest you want to get the digest from. |

**Returns**

| Name     | Type      | Description                                                     |
| -------- | --------- | --------------------------------------------------------------- |
| `<none>` | `bytes32` | digest The digest needed to create a signature for the request. |

#### \_\_isTrustedByTarget

```solidity
function __isTrustedByTarget(address target) private view returns (bool);
```


---

# 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.inverter.network/contracts/technical-reference/external/forwarder/transactionforwarder_v1.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.
