> For the complete documentation index, see [llms.txt](https://docs.fly.trade/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fly.trade/developers/deprecated-magpie-contracts/magpieaggregator-diamond-proxy/multicall/multicallfacet.md).

# 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>
