# Multicall

The main use case for Multicall is executing multiple swaps in an atomic transaction, specifically when executing a swap route across multiple virtual and native pools.

#### function multicall

```solidity
function multicall(
        bytes[] calldata data,
        bool fPartial
    ) external payable override returns (bytes[] memory results)
```

Calls multiple ABI-encoded functions in a single transaction. The exexution can be partial or full. If fPartial is true, the method will continue executing all supplied calls even if one of them fails. If fPartial is false, the contract will revert the entire transaction and return an error message when any function call in the multicall fails.

Parameters:

<table><thead><tr><th width="132.33333333333331">Name</th><th width="168">Type</th><th>Description</th></tr></thead><tbody><tr><td>data</td><td><code>bytes[]</code></td><td>byte array of ABI-encoded vRouter function calls</td></tr><tr><td>fPartial</td><td><code>bool</code></td><td>Determines wheter execution is full or partial. </td></tr></tbody></table>


---

# 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.virtuswap.io/virtuswap-documentation/technical-reference/smart-contracts-v1/dex-contracts/multicall.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.
