Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x9d4e7902AFC52236590639EFcB002d243Bbb7dcD
Balance 0 ETH
Nonce 1
Code Size 1599 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

1599 bytes
0x608060405260043610610042575f3560e01c8063127effb2146100555780637943da691461007f5780638d925ccd14610095578063f2bcd022146100bf57610051565b366100515761004f6100e9565b005b5f80fd5b348015610060575f80fd5b50610069610263565b60405161007691906103f7565b60405180910390f35b34801561008a575f80fd5b506100936100e9565b005b3480156100a0575f80fd5b506100a9610287565b6040516100b691906103f7565b60405180910390f35b3480156100ca575f80fd5b506100d36102ab565b6040516100e091906103f7565b60405180910390f35b5f4790505f811161012f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101269061046a565b60405180910390fd5b5f6064601e8361013f91906104be565b610149919061052c565b90505f6103e860518361015c91906104be565b610166919061052c565b90505f818385610176919061055c565b610180919061055c565b90506101cb817f000000000000000000000000a32b528e66398b90bd5d6583ae6462e7637473a273ffffffffffffffffffffffffffffffffffffffff166102cf90919063ffffffff16565b610214827f0000000000000000000000008712ec373579b1d5d0edb9aaa09991277c84907373ffffffffffffffffffffffffffffffffffffffff166102cf90919063ffffffff16565b61025d837f00000000000000000000000076f57d95ae6f413eca397e3f6e4e9f9efffc40c173ffffffffffffffffffffffffffffffffffffffff166102cf90919063ffffffff16565b50505050565b7f00000000000000000000000076f57d95ae6f413eca397e3f6e4e9f9efffc40c181565b7f0000000000000000000000008712ec373579b1d5d0edb9aaa09991277c84907381565b7f000000000000000000000000a32b528e66398b90bd5d6583ae6462e7637473a281565b8047101561031457306040517fcd78605900000000000000000000000000000000000000000000000000000000815260040161030b91906105af565b60405180910390fd5b5f8273ffffffffffffffffffffffffffffffffffffffff1682604051610339906105f5565b5f6040518083038185875af1925050503d805f8114610373576040519150601f19603f3d011682016040523d82523d5f602084013e610378565b606091505b50509050806103b3576040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6103e1826103b8565b9050919050565b6103f1816103d7565b82525050565b5f60208201905061040a5f8301846103e8565b92915050565b5f82825260208201905092915050565b7f4e6f2062616c616e636520746f206469737472696275746500000000000000005f82015250565b5f610454601883610410565b915061045f82610420565b602082019050919050565b5f6020820190508181035f83015261048181610448565b9050919050565b5f819050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f6104c882610488565b91506104d383610488565b92508282026104e181610488565b915082820484148315176104f8576104f7610491565b5b5092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f61053682610488565b915061054183610488565b925082610551576105506104ff565b5b828204905092915050565b5f61056682610488565b915061057183610488565b925082820390508181111561058957610588610491565b5b92915050565b5f610599826103b8565b9050919050565b6105a98161058f565b82525050565b5f6020820190506105c25f8301846105a0565b92915050565b5f81905092915050565b50565b5f6105e05f836105c8565b91506105eb826105d2565b5f82019050919050565b5f6105ff826105d5565b915081905091905056fea26469706673582212206e5e4e6df3c0560e589e0681a43e65d59510cfee558992aedf7f18d1d710483064736f6c63430008150033

Verified Source Code Full Match

Compiler: v0.8.21+commit.d9974bed EVM: shanghai Optimization: No
Address.sol 159 lines
// 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();
        }
    }
}
ValidatorFeeSplitterVAT.sol 42 lines
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2024 Brick Towers <[email protected]>
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/Address.sol";

contract ValidatorFeeSplitterVAT {
    using Address for address payable;

    address payable public immutable withdrawalAddress;
    address payable public immutable operatorAddress;
    address payable public immutable vatAddress;

    constructor(
        address payable withdrawalAddress_,
        address payable operatorAddress_,
        address payable vatAddress_
    ) {
        withdrawalAddress = withdrawalAddress_;
        operatorAddress = operatorAddress_;
        vatAddress = vatAddress_;
    }

    function distributeBalance() public {
        uint256 balance = address(this).balance;
        require(balance > 0, "No balance to distribute");

        // Calculate the split
        uint256 amountToOperator = balance * 30 / 100;
        uint256 amountToVat = amountToOperator * 81 / 1000;
        uint256 amountToWithdraw = balance - amountToOperator - amountToVat;

        // Transfer the amounts
        withdrawalAddress.sendValue(amountToWithdraw);
        vatAddress.sendValue(amountToVat);
        operatorAddress.sendValue(amountToOperator);
    }

    receive() external payable {
        distributeBalance();
    }
}

Read Contract

operatorAddress 0x127effb2 → address
vatAddress 0x8d925ccd → address
withdrawalAddress 0xf2bcd022 → address

Write Contract 1 functions

These functions modify contract state and require a wallet transaction to execute.

distributeBalance 0x7943da69
No parameters

Recent Transactions

No transactions found for this address