# Multicall

### Aggregate

This function takes an array of `Call` structs, each containing a target address and call data, and executes each call. It returns the block number at the time of execution and an array of bytes arrays containing the return data from each call.

Example Input:

```solidity
Multicall.aggregate(
    Multicall.Call[] memory calls
);
```

**Example Output:**

```
// Returns the block number at the time of execution and an array of bytes arrays containing the return data from each call.
```

### Get Eth Balance

This function returns the Ether balance of a given address.

**Example Input:**

```solidity
Multicall.getEthBalance(
    address addr
);
```

**Example Output:**

```
// Returns the Ether balance of the given address.
```

### Get Block Hash

This function returns the block hash of a given block number.

**Example Input:**

```solidity
Multicall.getBlockHash(
    uint256 blockNumber
);
```

**Example Output:**

```
// Returns the block hash of the given block number.
```

### Get Last Block Hash

This function returns the block hash of the last block.

**Example Input:**

```solidity
Multicall.getLastBlockHash();
```

**Example Output:**

```
// Returns the block hash of the last block.
```

### Get Current Block Timestamp

This function returns the timestamp of the current block.

**Example Input:**

```solidity
Multicall.getCurrentBlockTimestamp();
```

**Example Output:**

```
// Returns the difficulty of the current block.
```

### Get Current Block Gas Limit

This function returns the gas limit of the current block.

**Example Input:**

```solidity
Multicall.getCurrentBlockGasLimit();
```

**Example Output:**

```
// Returns the gas limit of the current block.
```

### Get Current Block Coinbase

This function returns the coinbase (miner's address) of the current block.

**Example Input:**

```solidity
Multicall.getCurrentBlockCoinbase();
```

**Example Output:**

```
// Returns the coinbase (miner's address) of the current block.
```


---

# 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.vela.exchange/vela-knowledge-base/developers/contract-functions/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.
