Multicall

Description:

Smart contract deployed on Ethereum with Factory features.

Blockchain: Ethereum

Source Code: View Code On The Blockchain

Solidity Source Code:

{{
  "language": "Solidity",
  "sources": {
    "contracts/Multicall.sol": {
      "content": "// SPDX-License-Identifier: MIT\r
pragma solidity ^0.8.19;\r
\r
/**\r
 * @title Multicall\r
 * @notice Aggregate multiple constant function call results into one\r
 * @dev This is the original Makerdao Multicall contract\r
 * @dev Reversed from contract: 0xeefBa1e63905eF1D7ACbA5a8513c70307C1cE441\r
 */\r
contract Multicall {\r
    /**\r
     * @notice Call structure for aggregate function\r
     * @param target The contract address to call\r
     * @param callData The encoded function call data\r
     */\r
    struct Call {\r
        address target;\r
        bytes callData;\r
    }\r
\r
    /**\r
     * @notice Aggregate multiple calls into one transaction\r
     * @dev Executes multiple calls and returns all results\r
     * @dev Reverts if any call fails\r
     * @param calls Array of Call structs containing target and callData\r
     * @return blockNumber The current block number\r
     * @return returnData Array of return data from each call\r
     */\r
    function aggregate(Call[] memory calls)\r
        public\r
        returns (uint256 blockNumber, bytes[] memory returnData)\r
    {\r
        blockNumber = block.number;\r
        returnData = new bytes[](calls.length);\r
        \r
        for (uint256 i = 0; i < calls.length; i++) {\r
            (bool success, bytes memory ret) = calls[i].target.call(\r
                calls[i].callData\r
            );\r
            require(success, "Multicall: call failed");\r
            returnData[i] = ret;\r
        }\r
    }\r
\r
    /**\r
     * @notice Get current block timestamp\r
     * @return timestamp The current block timestamp\r
     */\r
    function getCurrentBlockTimestamp() public view returns (uint256 timestamp) {\r
        timestamp = block.timestamp;\r
    }\r
\r
    /**\r
     * @notice Get the hash of the last block\r
     * @return blockHash The hash of the previous block\r
     */\r
    function getLastBlockHash() public view returns (bytes32 blockHash) {\r
        blockHash = blockhash(block.number - 1);\r
    }\r
\r
    /**\r
     * @notice Get ETH balance of an address\r
     * @param addr The address to check\r
     * @return balance The ETH balance of the address\r
     */\r
    function getEthBalance(address addr) public view returns (uint256 balance) {\r
        balance = addr.balance;\r
    }\r
\r
    /**\r
     * @notice Get current block difficulty\r
     * @return difficulty The current block difficulty\r
     */\r
    function getCurrentBlockDifficulty() public view returns (uint256 difficulty) {\r
        difficulty = block.difficulty;\r
    }\r
\r
    /**\r
     * @notice Get current block gas limit\r
     * @return gaslimit The current block gas limit\r
     */\r
    function getCurrentBlockGasLimit() public view returns (uint256 gaslimit) {\r
        gaslimit = block.gaslimit;\r
    }\r
\r
    /**\r
     * @notice Get current block coinbase (miner address)\r
     * @return coinbase The current block coinbase address\r
     */\r
    function getCurrentBlockCoinbase() public view returns (address coinbase) {\r
        coinbase = block.coinbase;\r
    }\r
\r
    /**\r
     * @notice Get hash of a specific block\r
     * @param blockNumber The block number to get hash for\r
     * @return blockHash The hash of the specified block\r
     */\r
    function getBlockHash(uint256 blockNumber) public view returns (bytes32 blockHash) {\r
        blockHash = blockhash(blockNumber);\r
    }\r
}\r
"
    }
  },
  "settings": {
    "optimizer": {
      "enabled": true,
      "runs": 200
    },
    "evmVersion": "paris",
    "outputSelection": {
      "*": {
        "*": [
          "evm.bytecode",
          "evm.deployedBytecode",
          "devdoc",
          "userdoc",
          "metadata",
          "abi"
        ]
      }
    }
  }
}}

Tags:
Factory|addr:0x8c934a57124aa11b0f79a06ca8e55122e5bf6d49|verified:true|block:23638888|tx:0xd29b1435307efd066d15aa57016fc67d92c376a5a430e457484117f7bfd55c3e|first_check:1761304024

Submitted on: 2025-10-24 13:07:07

Comments

Log in to comment.

No comments yet.