# MulticallFacet

The purpose of this contract is to serve as a facet in a Diamond contract that allows for batch execution of multiple delegatecalls using the `multicall` function.

### multicall():

The `multicall` function enforces that the caller is the contract owner and then delegates the execution to the `LibMulticall.multicall` function, which handles the execution of multiple delegatecalls to different facets.

**Input**:

<table><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><p></p><pre class="language-solidity"><code class="lang-solidity">selectors
</code></pre></td><td><p></p><pre class="language-solidity"><code class="lang-solidity">bytes4[] 
</code></pre></td><td>an array of function selectors</td></tr><tr><td><p></p><pre class="language-solidity"><code class="lang-solidity">data
</code></pre></td><td><p></p><pre class="language-solidity"><code class="lang-solidity">bytes[]
</code></pre></td><td>an array of data that needs to be fed into the selectors</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.fly.trade/developers/deprecated-magpie-contracts/magpieaggregator-diamond-proxy/multicall/multicallfacet.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.
