> For the complete documentation index, see [llms.txt](https://docs.saddle.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.saddle.finance/solidity-docs/helper/multicall2.md).

# Multicall2

## Functions:

* [`aggregate(struct Multicall2.Call[] calls)`](#Multicall2-aggregate-struct-Multicall2-Call---)
* [`blockAndAggregate(struct Multicall2.Call[] calls)`](#Multicall2-blockAndAggregate-struct-Multicall2-Call---)
* [`getBlockHash(uint256 blockNumber)`](#Multicall2-getBlockHash-uint256-)
* [`getBlockNumber()`](#Multicall2-getBlockNumber--)
* [`getCurrentBlockCoinbase()`](#Multicall2-getCurrentBlockCoinbase--)
* [`getCurrentBlockDifficulty()`](#Multicall2-getCurrentBlockDifficulty--)
* [`getCurrentBlockGasLimit()`](#Multicall2-getCurrentBlockGasLimit--)
* [`getCurrentBlockTimestamp()`](#Multicall2-getCurrentBlockTimestamp--)
* [`getEthBalance(address addr)`](#Multicall2-getEthBalance-address-)
* [`getLastBlockHash()`](#Multicall2-getLastBlockHash--)
* [`tryAggregate(bool requireSuccess, struct Multicall2.Call[] calls)`](#Multicall2-tryAggregate-bool-struct-Multicall2-Call---)
* [`tryBlockAndAggregate(bool requireSuccess, struct Multicall2.Call[] calls)`](#Multicall2-tryBlockAndAggregate-bool-struct-Multicall2-Call---)

## Function `aggregate(struct Multicall2.Call[] calls) → uint256 blockNumber, bytes[] returnData` <a href="#multicall2-aggregate-struct-multicall2-call" id="multicall2-aggregate-struct-multicall2-call"></a>

No description

## Function `blockAndAggregate(struct Multicall2.Call[] calls) → uint256 blockNumber, bytes32 blockHash, struct Multicall2.Result[] returnData` <a href="#multicall2-blockandaggregate-struct-multicall2-call" id="multicall2-blockandaggregate-struct-multicall2-call"></a>

No description

## Function `getBlockHash(uint256 blockNumber) → bytes32 blockHash` <a href="#multicall2-getblockhash-uint256" id="multicall2-getblockhash-uint256"></a>

No description

## Function `getBlockNumber() → uint256 blockNumber` <a href="#multicall2-getblocknumber" id="multicall2-getblocknumber"></a>

No description

## Function `getCurrentBlockCoinbase() → address coinbase` <a href="#multicall2-getcurrentblockcoinbase" id="multicall2-getcurrentblockcoinbase"></a>

No description

## Function `getCurrentBlockDifficulty() → uint256 difficulty` <a href="#multicall2-getcurrentblockdifficulty" id="multicall2-getcurrentblockdifficulty"></a>

No description

## Function `getCurrentBlockGasLimit() → uint256 gaslimit` <a href="#multicall2-getcurrentblockgaslimit" id="multicall2-getcurrentblockgaslimit"></a>

No description

## Function `getCurrentBlockTimestamp() → uint256 timestamp` <a href="#multicall2-getcurrentblocktimestamp" id="multicall2-getcurrentblocktimestamp"></a>

No description

## Function `getEthBalance(address addr) → uint256 balance` <a href="#multicall2-getethbalance-address" id="multicall2-getethbalance-address"></a>

No description

## Function `getLastBlockHash() → bytes32 blockHash` <a href="#multicall2-getlastblockhash" id="multicall2-getlastblockhash"></a>

No description

## Function `tryAggregate(bool requireSuccess, struct Multicall2.Call[] calls) → struct Multicall2.Result[] returnData` <a href="#multicall2-tryaggregate-bool-struct-multicall2-call" id="multicall2-tryaggregate-bool-struct-multicall2-call"></a>

No description

## Function `tryBlockAndAggregate(bool requireSuccess, struct Multicall2.Call[] calls) → uint256 blockNumber, bytes32 blockHash, struct Multicall2.Result[] returnData` <a href="#multicall2-tryblockandaggregate-bool-struct-multicall2-call" id="multicall2-tryblockandaggregate-bool-struct-multicall2-call"></a>

No description


---

# 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.saddle.finance/solidity-docs/helper/multicall2.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.
