Ape Curtis Testnet

Contract

0x970599f13e98153C90dD310ee1616843556665F2

Overview

APE Balance

Ape Curtis LogoApe Curtis LogoApe Curtis Logo0 APE

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

Latest 2 internal transactions

Parent Transaction Hash Block From To
137468902024-12-10 16:59:454 days ago1733849985
0x970599f1...3556665F2
0 APE
137464872024-12-10 16:56:214 days ago1733849781  Contract Creation0 APE

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
DiamondInitMulti

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 2 : DiamondInitMulti.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

//Originally from:
//******************************************************************************\
//* Author: Nick Mudge <[email protected]> (https://twitter.com/mudgen)
//* EIP-2535 Diamonds: https://eips.ethereum.org/EIPS/eip-2535
//*
//* Implementation of a diamond.
//******************************************************************************/

import {Address} from "@openzeppelin/contracts/utils/Address.sol";

error AddressAndCalldataLengthDoNotMatch(uint256 initAddressListLength, uint256 initDataListLength);

contract DiamondInitMulti {
    // This function is provided in the third parameter of the `diamondCut` function.
    // The `diamondCut` function executes this function to execute multiple initializer functions for a single upgrade.

    function initialize(address[] calldata initAddressList, bytes[] calldata initDataList) external {
        if (initAddressList.length != initDataList.length) {
            revert AddressAndCalldataLengthDoNotMatch(initAddressList.length, initDataList.length);
        }
        for (uint i; i < initAddressList.length; i++) {
            if (initAddressList[i] != address(0)) {
                Address.functionDelegateCall(initAddressList[i], initDataList[i]);
            }
        }
    }
}

File 2 of 2 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

Settings
{
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "evmVersion": "paris",
  "viaIR": true,
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"initAddressListLength","type":"uint256"},{"internalType":"uint256","name":"initDataListLength","type":"uint256"}],"name":"AddressAndCalldataLengthDoNotMatch","type":"error"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address[]","name":"initAddressList","type":"address[]"},{"internalType":"bytes[]","name":"initDataList","type":"bytes[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080806040523461001657610449908161001c8239f35b600080fdfe60808060405260048036101561001457600080fd5b600091823560e01c6337f8d5ff1461002b57600080fd5b346101bb5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101bb5767ffffffffffffffff90823582811161022c5761007a9036908501610230565b919093602490602435858111610228576100979036908301610230565b9490938582036101f65750875b8181106100af578880f35b73ffffffffffffffffffffffffffffffffffffffff6100d76100d283858c610266565b6102a5565b166100e5575b6001016100a4565b6100f36100d282848b610266565b90868110156101cb578060051b8601357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1873603018112156101c7578601918235908982116101c3576020908c82860184360381136101bf5761015d61015886610339565b6102c6565b9685885284880190858736920101116101bb576001978386886101aa9983968637830101525190845af4903d156101b2573d8e61019c61015883610339565b91825281943d92013e610373565b5090506100dd565b60609250610373565b8280fd5b5080fd5b8b80fd5b8a80fd5b848a6032867f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b85604492847f7340e1660000000000000000000000000000000000000000000000000000000084528301526024820152fd5b8780fd5b8480fd5b9181601f840112156102615782359167ffffffffffffffff8311610261576020808501948460051b01011161026157565b600080fd5b91908110156102765760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036102615790565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761030a57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161030a57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b906103b2575080511561038857805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b8151158061040a575b6103c3575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b156103bb56fea26469706673582212205e89cb64d1201cbd1929aee7e11973e4117d237513f95065d7f85b8b4e174e1f64736f6c63430008170033

Deployed Bytecode

0x60808060405260048036101561001457600080fd5b600091823560e01c6337f8d5ff1461002b57600080fd5b346101bb5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101bb5767ffffffffffffffff90823582811161022c5761007a9036908501610230565b919093602490602435858111610228576100979036908301610230565b9490938582036101f65750875b8181106100af578880f35b73ffffffffffffffffffffffffffffffffffffffff6100d76100d283858c610266565b6102a5565b166100e5575b6001016100a4565b6100f36100d282848b610266565b90868110156101cb578060051b8601357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1873603018112156101c7578601918235908982116101c3576020908c82860184360381136101bf5761015d61015886610339565b6102c6565b9685885284880190858736920101116101bb576001978386886101aa9983968637830101525190845af4903d156101b2573d8e61019c61015883610339565b91825281943d92013e610373565b5090506100dd565b60609250610373565b8280fd5b5080fd5b8b80fd5b8a80fd5b848a6032867f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b85604492847f7340e1660000000000000000000000000000000000000000000000000000000084528301526024820152fd5b8780fd5b8480fd5b9181601f840112156102615782359167ffffffffffffffff8311610261576020808501948460051b01011161026157565b600080fd5b91908110156102765760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036102615790565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f604051930116820182811067ffffffffffffffff82111761030a57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161030a57601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b906103b2575080511561038857805190602001fd5b60046040517f1425ea42000000000000000000000000000000000000000000000000000000008152fd5b8151158061040a575b6103c3575090565b60249073ffffffffffffffffffffffffffffffffffffffff604051917f9996b315000000000000000000000000000000000000000000000000000000008352166004820152fd5b50803b156103bb56fea26469706673582212205e89cb64d1201cbd1929aee7e11973e4117d237513f95065d7f85b8b4e174e1f64736f6c63430008170033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.