ETH Price: $3,567.09 (+2.76%)
Gas: 15 Gwei

Contract

0x03Fd3D61423E6d46DCC3917862fBC57653dc3Eb0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value

There are no matching entries

Please try again later

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To Value
174784912023-06-14 13:31:23371 days ago1686749483  Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Splitter

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : Splitter.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.18;

import { IERC20 } from "openzeppelin-contracts/interfaces/IERC20.sol";
import { SafeERC20 } from "openzeppelin-contracts/token/ERC20/utils/SafeERC20.sol";
import { Ownable } from "openzeppelin-contracts/access/Ownable.sol";
import { ReentrancyGuard } from "openzeppelin-contracts/security/ReentrancyGuard.sol";
import { Withdrawable } from "./Withdrawable.sol";

/**
 * @title Splitter
 * @author Immunefi
 */
contract Splitter is Ownable, Withdrawable, ReentrancyGuard {
    using SafeERC20 for IERC20;

    struct ERC20Payment {
        address token;
        uint256 amount;
    }

    event FeeRecipientChanged(address prevFeeRecipient, address newFeeRecipient);
    event FeeChanged(uint256 prevFee, uint256 newFee);
    event PayWhitehat(
        address indexed from,
        bytes32 indexed referenceId,
        address wh,
        ERC20Payment[] payout,
        uint256 nativeTokenAmt,
        address feeRecipient,
        uint256 fee
    );

    uint256 public fee;
    uint256 public constant FEE_BASIS = 100_00;
    uint256 public immutable maxFee;
    uint256 public immutable gasCap;
    address payable public feeRecipient;

    constructor(uint256 _gasCap, uint256 _maxFee, uint256 _fee, address _owner, address payable _feeRecipient) {
        require(_maxFee <= FEE_BASIS, "Splitter: maxFee must be below FEE_BASIS");
        maxFee = _maxFee;

        gasCap = _gasCap;

        _setFee(_fee);

        _changeFeeRecipient(_feeRecipient);

        _transferOwnership(_owner);
    }

    /**
     * @notice internal set fee
     * @param newFee value of the new fee. Must be less than maxFee
     */
    function _setFee(uint256 newFee) internal {
        require(newFee <= maxFee, "Splitter: fee must be below maxFee");

        emit FeeChanged(fee, newFee);
        fee = newFee;
    }

    /**
     * @notice set fee
     * @dev only callable by owner
     * @param newFee value of the new fee
     */
    function setFee(uint256 newFee) public onlyOwner {
        _setFee(newFee);
    }

    /**
     * @notice internal change fee recipient
     * @param newFeeRecipient address of new fee recipient
     */
    function _changeFeeRecipient(address payable newFeeRecipient) internal {
        require(newFeeRecipient != address(0), "Splitter: FeeRecipient cannot be null address");

        emit FeeRecipientChanged(feeRecipient, newFeeRecipient);

        feeRecipient = newFeeRecipient;
    }

    /**
     * @notice change fee recipient
     * @dev only callable by owner
     * @param newFeeRecipient address of new fee recipient
     */
    function changeFeeRecipient(address payable newFeeRecipient) public onlyOwner {
        _changeFeeRecipient(newFeeRecipient);
    }

    /**
     * @notice Pay a whitehat
     * @dev If whitehats attempt to grief payments, project/immunefi reserves the right to nullify bounty payout
     * @dev The amount of gas forwarded to the whitehat should be enough for a delegatecall to be made to support
     *      gnosis safe wallets
     * @param referenceId id reference to report
     * @param wh whitehat address
     * @param payout The payout of tokens/token amounts to whitehat
     * @param nativeTokenAmt The payout of native Ether amount to whitehat
     * @param gas The amount of gas to forward to the whitehat to mitigate gas griefing
     */
    function payWhitehat(
        bytes32 referenceId,
        address payable wh,
        ERC20Payment[] calldata payout,
        uint256 nativeTokenAmt,
        uint256 gas
    ) public payable nonReentrant {
        require(wh != address(0), "Splitter: Whitehat address cannot be null");
        require(gas <= gasCap, "Splitter: Gas greater than max allowed");

        for (uint256 i = 0; i < payout.length; i++) {
            uint256 feeAmount = (payout[i].amount * fee) / FEE_BASIS;
            if (feeAmount > 0) IERC20(payout[i].token).safeTransferFrom(msg.sender, feeRecipient, feeAmount);
            IERC20(payout[i].token).safeTransferFrom(msg.sender, wh, payout[i].amount);
        }

        if (nativeTokenAmt > 0) {
            _payWhitehatNative(wh, nativeTokenAmt, gas);
        } else if (msg.value > 0) {
            // must refund msg.sender
            _refundCaller(msg.value);
        }

        if (nativeTokenAmt > 0 || payout.length > 0) {
            emit PayWhitehat(msg.sender, referenceId, wh, payout, nativeTokenAmt, feeRecipient, fee);
        }
    }

    /**
     * @notice Pays whitehat in native token
     * @param wh whitehat address
     * @param nativeTokenAmt The payout of native Ether amount to whitehat
     * @param gas The amount of gas to forward to the whitehat to mitigate gas griefing
     */
    function _payWhitehatNative(address payable wh, uint256 nativeTokenAmt, uint256 gas) internal {
        uint256 feeAmount = (nativeTokenAmt * fee) / FEE_BASIS;
        if (feeAmount > 0) {
            // feeRecipient is trusted, we can skip this check
            // slither-disable-next-line arbitrary-send-eth,low-level-calls
            (bool successFee, ) = feeRecipient.call{ value: feeAmount }("");
            require(successFee, "Splitter: Failed to send ether to fee receiver");
        }
        // wh is not trusted but, we cap execution and avoid to re-enter, we can skip this check
        // slither-disable-next-line arbitrary-send-eth,low-level-calls
        (bool successWh, ) = wh.call{ value: nativeTokenAmt, gas: gas }("");
        require(successWh, "Splitter: Failed to send ether to whitehat");

        uint256 nativeAmountDistributed = nativeTokenAmt + feeAmount;
        if (msg.value > nativeAmountDistributed) {
            _refundCaller(msg.value - nativeAmountDistributed);
        }
    }

    /**
     * @notice Refunds msg.sender
     * @param amount Amount to refund
     */
    function _refundCaller(uint256 amount) internal {
        // slither-disable-next-line arbitrary-send-eth,low-level-calls
        (bool success, ) = msg.sender.call{ value: amount }("");
        require(success, "Splitter: Failed to refund to msg.sender");
    }

    /**
     * @notice Withdraw asset ERC20 or ETH
     * @param assetAddress Asset to be withdrawn.
     */
    function withdrawERC20ETH(address assetAddress) public override onlyOwner {
        super.withdrawERC20ETH(assetAddress);
    }
}

File 2 of 10 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/IERC20.sol";

File 4 of 10 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 5 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 6 of 10 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 7 of 10 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 8 of 10 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @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, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * 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.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @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`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) 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(errorMessage);
        }
    }
}

File 9 of 10 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 10 of 10 : Withdrawable.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity 0.8.18;

import "openzeppelin-contracts/token/ERC20/IERC20.sol";
import { SafeERC20 } from "openzeppelin-contracts/token/ERC20/utils/SafeERC20.sol";

/**
    Ensures that any contract that inherits from this contract is able to
    withdraw funds that are accidentally received or stuck.
 */

contract Withdrawable {
    using SafeERC20 for IERC20;
    address constant ETHER = address(0);

    event LogWithdraw(address indexed _from, address indexed _assetAddress, uint256 indexed tokenId, uint256 amount);

    /**
     * @notice Withdraw asset ERC20 or ETH
     * @param _assetAddress Asset to be withdrawn.
     */
    function withdrawERC20ETH(address _assetAddress) public virtual {
        uint256 assetBalance;
        if (_assetAddress == ETHER) {
            address self = address(this); // workaround for a possible solidity bug
            assetBalance = self.balance;
            payable(msg.sender).transfer(assetBalance);
        } else {
            assetBalance = IERC20(_assetAddress).balanceOf(address(this));
            IERC20(_assetAddress).safeTransfer(msg.sender, assetBalance);
        }
        emit LogWithdraw(msg.sender, _assetAddress, 0, assetBalance);
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_gasCap","type":"uint256"},{"internalType":"uint256","name":"_maxFee","type":"uint256"},{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address payable","name":"_feeRecipient","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevFee","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"prevFeeRecipient","type":"address"},{"indexed":false,"internalType":"address","name":"newFeeRecipient","type":"address"}],"name":"FeeRecipientChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_from","type":"address"},{"indexed":true,"internalType":"address","name":"_assetAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"bytes32","name":"referenceId","type":"bytes32"},{"indexed":false,"internalType":"address","name":"wh","type":"address"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct Splitter.ERC20Payment[]","name":"payout","type":"tuple[]"},{"indexed":false,"internalType":"uint256","name":"nativeTokenAmt","type":"uint256"},{"indexed":false,"internalType":"address","name":"feeRecipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"fee","type":"uint256"}],"name":"PayWhitehat","type":"event"},{"inputs":[],"name":"FEE_BASIS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"newFeeRecipient","type":"address"}],"name":"changeFeeRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gasCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referenceId","type":"bytes32"},{"internalType":"address payable","name":"wh","type":"address"},{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Splitter.ERC20Payment[]","name":"payout","type":"tuple[]"},{"internalType":"uint256","name":"nativeTokenAmt","type":"uint256"},{"internalType":"uint256","name":"gas","type":"uint256"}],"name":"payWhitehat","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"assetAddress","type":"address"}],"name":"withdrawERC20ETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c06040523480156200001157600080fd5b50604051620014eb380380620014eb8339810160408190526200003491620002c2565b6200003f33620000e2565b60018055612710841115620000ac5760405162461bcd60e51b815260206004820152602860248201527f53706c69747465723a206d6178466565206d7573742062652062656c6f77204660448201526745455f424153495360c01b60648201526084015b60405180910390fd5b608084905260a0859052620000c18362000132565b620000cc81620001d2565b620000d782620000e2565b50505050506200031e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b608051811115620001915760405162461bcd60e51b815260206004820152602260248201527f53706c69747465723a20666565206d7573742062652062656c6f77206d617846604482015261656560f01b6064820152608401620000a3565b60025460408051918252602082018390527f5fc463da23c1b063e66f9e352006a7fbe8db7223c455dc429e881a2dfe2f94f1910160405180910390a1600255565b6001600160a01b038116620002405760405162461bcd60e51b815260206004820152602d60248201527f53706c69747465723a20466565526563697069656e742063616e6e6f7420626560448201526c206e756c6c206164647265737360981b6064820152608401620000a3565b600354604080516001600160a01b03928316815291831660208301527f0bc21fe5c3ab742ff1d15b5c4477ffbacf1167e618228078fa625edebe7f331d910160405180910390a1600380546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381168114620002bf57600080fd5b50565b600080600080600060a08688031215620002db57600080fd5b8551945060208601519350604086015192506060860151620002fd81620002a9565b60808701519092506200031081620002a9565b809150509295509295909350565b60805160a05161119a6200035160003960008181610105015261031401526000818160be01526107ce015261119a6000f3fe6080604052600436106100a75760003560e01c8063715018a611610064578063715018a6146101c15780638686ebcc146101d65780638da5cb5b146101ec578063ccdb4b481461020a578063ddca3f431461021d578063f2fde38b1461023357600080fd5b806301f59d16146100ac578063047dbeb8146100f3578063236040711461012757806346904840146101495780635eefe00d1461018157806369fe0e2d146101a1575b600080fd5b3480156100b857600080fd5b506100e07f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b3480156100ff57600080fd5b506100e07f000000000000000000000000000000000000000000000000000000000000000081565b34801561013357600080fd5b50610147610142366004610eb8565b610253565b005b34801561015557600080fd5b50600354610169906001600160a01b031681565b6040516001600160a01b0390911681526020016100ea565b34801561018d57600080fd5b5061014761019c366004610eb8565b610267565b3480156101ad57600080fd5b506101476101bc366004610edc565b610278565b3480156101cd57600080fd5b50610147610289565b3480156101e257600080fd5b506100e061271081565b3480156101f857600080fd5b506000546001600160a01b0316610169565b610147610218366004610ef5565b61029d565b34801561022957600080fd5b506100e060025481565b34801561023f57600080fd5b5061014761024e366004610eb8565b61050d565b61025b610583565b610264816105dd565b50565b61026f610583565b610264816106b2565b610280610583565b610264816107cc565b610291610583565b61029b6000610888565b565b6102a56108d8565b6001600160a01b0385166103125760405162461bcd60e51b815260206004820152602960248201527f53706c69747465723a20576869746568617420616464726573732063616e6e6f6044820152681d081899481b9d5b1b60ba1b60648201526084015b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000008111156103915760405162461bcd60e51b815260206004820152602660248201527f53706c69747465723a204761732067726561746572207468616e206d617820616044820152651b1b1bddd95960d21b6064820152608401610309565b60005b8381101561046e5760006127106002548787858181106103b6576103b6610f93565b905060400201602001356103ca9190610fbf565b6103d49190610fdc565b90508015610428576003546104289033906001600160a01b03168389898781811061040157610401610f93565b6104179260206040909202019081019150610eb8565b6001600160a01b0316929190610931565b61045b338888888681811061043f5761043f610f93565b9050604002016020013589898781811061040157610401610f93565b508061046681610ffe565b915050610394565b508115610485576104808583836109a2565b610494565b34156104945761049434610b5f565b60008211806104a257508215155b156104fc57600354600254604051889233927fd0f71f7ab684d50fcdbde4a7688a973cb219b23bc0d096c03315b455404a1641926104f3928b928b928b928b926001600160a01b0390911691611017565b60405180910390a35b61050560018055565b505050505050565b610515610583565b6001600160a01b03811661057a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610309565b61026481610888565b6000546001600160a01b0316331461029b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610309565b6001600160a01b0381166106495760405162461bcd60e51b815260206004820152602d60248201527f53706c69747465723a20466565526563697069656e742063616e6e6f7420626560448201526c206e756c6c206164647265737360981b6064820152608401610309565b600354604080516001600160a01b03928316815291831660208301527f0bc21fe5c3ab742ff1d15b5c4477ffbacf1167e618228078fa625edebe7f331d910160405180910390a1600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166106fb575060405130803191339083156108fc029084906000818181858888f193505050501580156106f4573d6000803e3d6000fd5b5050610779565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561073f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107639190611090565b90506107796001600160a01b0383163383610c0c565b6000826001600160a01b0316336001600160a01b03167f74217ce088f00bfd283666b763c64f0d1b1c345591dfdd01891dddf52446694e846040516107c091815260200190565b60405180910390a45050565b7f00000000000000000000000000000000000000000000000000000000000000008111156108475760405162461bcd60e51b815260206004820152602260248201527f53706c69747465723a20666565206d7573742062652062656c6f77206d617846604482015261656560f01b6064820152608401610309565b60025460408051918252602082018390527f5fc463da23c1b063e66f9e352006a7fbe8db7223c455dc429e881a2dfe2f94f1910160405180910390a1600255565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001540361092a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610309565b6002600155565b6040516001600160a01b038085166024830152831660448201526064810182905261099c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610c41565b50505050565b6000612710600254846109b59190610fbf565b6109bf9190610fdc565b90508015610a83576003546040516000916001600160a01b03169083908381818185875af1925050503d8060008114610a14576040519150601f19603f3d011682016040523d82523d6000602084013e610a19565b606091505b5050905080610a815760405162461bcd60e51b815260206004820152602e60248201527f53706c69747465723a204661696c656420746f2073656e64206574686572207460448201526d37903332b2903932b1b2b4bb32b960911b6064820152608401610309565b505b6000846001600160a01b0316848490604051600060405180830381858888f193505050503d8060008114610ad3576040519150601f19603f3d011682016040523d82523d6000602084013e610ad8565b606091505b5050905080610b3c5760405162461bcd60e51b815260206004820152602a60248201527f53706c69747465723a204661696c656420746f2073656e6420657468657220746044820152691bc81dda1a5d195a185d60b21b6064820152608401610309565b6000610b4883866110a9565b90508034111561050557610505610b5f82346110bc565b604051600090339083908381818185875af1925050503d8060008114610ba1576040519150601f19603f3d011682016040523d82523d6000602084013e610ba6565b606091505b5050905080610c085760405162461bcd60e51b815260206004820152602860248201527f53706c69747465723a204661696c656420746f20726566756e6420746f206d73604482015267339739b2b73232b960c11b6064820152608401610309565b5050565b6040516001600160a01b038316602482015260448101829052610c3c90849063a9059cbb60e01b90606401610965565b505050565b6000610c96826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d139092919063ffffffff16565b805190915015610c3c5780806020019051810190610cb491906110cf565b610c3c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610309565b6060610d228484600085610d2a565b949350505050565b606082471015610d8b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610309565b600080866001600160a01b03168587604051610da79190611115565b60006040518083038185875af1925050503d8060008114610de4576040519150601f19603f3d011682016040523d82523d6000602084013e610de9565b606091505b5091509150610dfa87838387610e05565b979650505050505050565b60608315610e74578251600003610e6d576001600160a01b0385163b610e6d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610309565b5081610d22565b610d228383815115610e895781518083602001fd5b8060405162461bcd60e51b81526004016103099190611131565b6001600160a01b038116811461026457600080fd5b600060208284031215610eca57600080fd5b8135610ed581610ea3565b9392505050565b600060208284031215610eee57600080fd5b5035919050565b60008060008060008060a08789031215610f0e57600080fd5b863595506020870135610f2081610ea3565b9450604087013567ffffffffffffffff80821115610f3d57600080fd5b818901915089601f830112610f5157600080fd5b813581811115610f6057600080fd5b8a60208260061b8501011115610f7557600080fd5b979a9699505060200196606081013595608090910135945092505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610fd657610fd6610fa9565b92915050565b600082610ff957634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161101057611010610fa9565b5060010190565b6001600160a01b03878116825260a06020808401829052908301879052600091889160c08501845b8a81101561107057843561105281610ea3565b8416825284830135838301526040948501949091019060010161103f565b506040860198909852509490941660608301525060800152509392505050565b6000602082840312156110a257600080fd5b5051919050565b80820180821115610fd657610fd6610fa9565b81810381811115610fd657610fd6610fa9565b6000602082840312156110e157600080fd5b81518015158114610ed557600080fd5b60005b8381101561110c5781810151838201526020016110f4565b50506000910152565b600082516111278184602087016110f1565b9190910192915050565b60208152600082518060208401526111508160408501602087016110f1565b601f01601f1916919091016040019291505056fea2646970667358221220b6a5906d267e68dc9af48fe79ef6832fb04184a4ac5ffc47f1bc8c9ac579b9fb64736f6c63430008120033000000000000000000000000000000000000000000000000000000000000c35000000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000023261bb09d0857e9788a2b9a9ceb9dd48726821900000000000000000000000023261bb09d0857e9788a2b9a9ceb9dd487268219

Deployed Bytecode

0x6080604052600436106100a75760003560e01c8063715018a611610064578063715018a6146101c15780638686ebcc146101d65780638da5cb5b146101ec578063ccdb4b481461020a578063ddca3f431461021d578063f2fde38b1461023357600080fd5b806301f59d16146100ac578063047dbeb8146100f3578063236040711461012757806346904840146101495780635eefe00d1461018157806369fe0e2d146101a1575b600080fd5b3480156100b857600080fd5b506100e07f00000000000000000000000000000000000000000000000000000000000005dc81565b6040519081526020015b60405180910390f35b3480156100ff57600080fd5b506100e07f000000000000000000000000000000000000000000000000000000000000c35081565b34801561013357600080fd5b50610147610142366004610eb8565b610253565b005b34801561015557600080fd5b50600354610169906001600160a01b031681565b6040516001600160a01b0390911681526020016100ea565b34801561018d57600080fd5b5061014761019c366004610eb8565b610267565b3480156101ad57600080fd5b506101476101bc366004610edc565b610278565b3480156101cd57600080fd5b50610147610289565b3480156101e257600080fd5b506100e061271081565b3480156101f857600080fd5b506000546001600160a01b0316610169565b610147610218366004610ef5565b61029d565b34801561022957600080fd5b506100e060025481565b34801561023f57600080fd5b5061014761024e366004610eb8565b61050d565b61025b610583565b610264816105dd565b50565b61026f610583565b610264816106b2565b610280610583565b610264816107cc565b610291610583565b61029b6000610888565b565b6102a56108d8565b6001600160a01b0385166103125760405162461bcd60e51b815260206004820152602960248201527f53706c69747465723a20576869746568617420616464726573732063616e6e6f6044820152681d081899481b9d5b1b60ba1b60648201526084015b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000c3508111156103915760405162461bcd60e51b815260206004820152602660248201527f53706c69747465723a204761732067726561746572207468616e206d617820616044820152651b1b1bddd95960d21b6064820152608401610309565b60005b8381101561046e5760006127106002548787858181106103b6576103b6610f93565b905060400201602001356103ca9190610fbf565b6103d49190610fdc565b90508015610428576003546104289033906001600160a01b03168389898781811061040157610401610f93565b6104179260206040909202019081019150610eb8565b6001600160a01b0316929190610931565b61045b338888888681811061043f5761043f610f93565b9050604002016020013589898781811061040157610401610f93565b508061046681610ffe565b915050610394565b508115610485576104808583836109a2565b610494565b34156104945761049434610b5f565b60008211806104a257508215155b156104fc57600354600254604051889233927fd0f71f7ab684d50fcdbde4a7688a973cb219b23bc0d096c03315b455404a1641926104f3928b928b928b928b926001600160a01b0390911691611017565b60405180910390a35b61050560018055565b505050505050565b610515610583565b6001600160a01b03811661057a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610309565b61026481610888565b6000546001600160a01b0316331461029b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610309565b6001600160a01b0381166106495760405162461bcd60e51b815260206004820152602d60248201527f53706c69747465723a20466565526563697069656e742063616e6e6f7420626560448201526c206e756c6c206164647265737360981b6064820152608401610309565b600354604080516001600160a01b03928316815291831660208301527f0bc21fe5c3ab742ff1d15b5c4477ffbacf1167e618228078fa625edebe7f331d910160405180910390a1600380546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166106fb575060405130803191339083156108fc029084906000818181858888f193505050501580156106f4573d6000803e3d6000fd5b5050610779565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561073f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107639190611090565b90506107796001600160a01b0383163383610c0c565b6000826001600160a01b0316336001600160a01b03167f74217ce088f00bfd283666b763c64f0d1b1c345591dfdd01891dddf52446694e846040516107c091815260200190565b60405180910390a45050565b7f00000000000000000000000000000000000000000000000000000000000005dc8111156108475760405162461bcd60e51b815260206004820152602260248201527f53706c69747465723a20666565206d7573742062652062656c6f77206d617846604482015261656560f01b6064820152608401610309565b60025460408051918252602082018390527f5fc463da23c1b063e66f9e352006a7fbe8db7223c455dc429e881a2dfe2f94f1910160405180910390a1600255565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60026001540361092a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610309565b6002600155565b6040516001600160a01b038085166024830152831660448201526064810182905261099c9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152610c41565b50505050565b6000612710600254846109b59190610fbf565b6109bf9190610fdc565b90508015610a83576003546040516000916001600160a01b03169083908381818185875af1925050503d8060008114610a14576040519150601f19603f3d011682016040523d82523d6000602084013e610a19565b606091505b5050905080610a815760405162461bcd60e51b815260206004820152602e60248201527f53706c69747465723a204661696c656420746f2073656e64206574686572207460448201526d37903332b2903932b1b2b4bb32b960911b6064820152608401610309565b505b6000846001600160a01b0316848490604051600060405180830381858888f193505050503d8060008114610ad3576040519150601f19603f3d011682016040523d82523d6000602084013e610ad8565b606091505b5050905080610b3c5760405162461bcd60e51b815260206004820152602a60248201527f53706c69747465723a204661696c656420746f2073656e6420657468657220746044820152691bc81dda1a5d195a185d60b21b6064820152608401610309565b6000610b4883866110a9565b90508034111561050557610505610b5f82346110bc565b604051600090339083908381818185875af1925050503d8060008114610ba1576040519150601f19603f3d011682016040523d82523d6000602084013e610ba6565b606091505b5050905080610c085760405162461bcd60e51b815260206004820152602860248201527f53706c69747465723a204661696c656420746f20726566756e6420746f206d73604482015267339739b2b73232b960c11b6064820152608401610309565b5050565b6040516001600160a01b038316602482015260448101829052610c3c90849063a9059cbb60e01b90606401610965565b505050565b6000610c96826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610d139092919063ffffffff16565b805190915015610c3c5780806020019051810190610cb491906110cf565b610c3c5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610309565b6060610d228484600085610d2a565b949350505050565b606082471015610d8b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610309565b600080866001600160a01b03168587604051610da79190611115565b60006040518083038185875af1925050503d8060008114610de4576040519150601f19603f3d011682016040523d82523d6000602084013e610de9565b606091505b5091509150610dfa87838387610e05565b979650505050505050565b60608315610e74578251600003610e6d576001600160a01b0385163b610e6d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610309565b5081610d22565b610d228383815115610e895781518083602001fd5b8060405162461bcd60e51b81526004016103099190611131565b6001600160a01b038116811461026457600080fd5b600060208284031215610eca57600080fd5b8135610ed581610ea3565b9392505050565b600060208284031215610eee57600080fd5b5035919050565b60008060008060008060a08789031215610f0e57600080fd5b863595506020870135610f2081610ea3565b9450604087013567ffffffffffffffff80821115610f3d57600080fd5b818901915089601f830112610f5157600080fd5b813581811115610f6057600080fd5b8a60208260061b8501011115610f7557600080fd5b979a9699505060200196606081013595608090910135945092505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610fd657610fd6610fa9565b92915050565b600082610ff957634e487b7160e01b600052601260045260246000fd5b500490565b60006001820161101057611010610fa9565b5060010190565b6001600160a01b03878116825260a06020808401829052908301879052600091889160c08501845b8a81101561107057843561105281610ea3565b8416825284830135838301526040948501949091019060010161103f565b506040860198909852509490941660608301525060800152509392505050565b6000602082840312156110a257600080fd5b5051919050565b80820180821115610fd657610fd6610fa9565b81810381811115610fd657610fd6610fa9565b6000602082840312156110e157600080fd5b81518015158114610ed557600080fd5b60005b8381101561110c5781810151838201526020016110f4565b50506000910152565b600082516111278184602087016110f1565b9190910192915050565b60208152600082518060208401526111508160408501602087016110f1565b601f01601f1916919091016040019291505056fea2646970667358221220b6a5906d267e68dc9af48fe79ef6832fb04184a4ac5ffc47f1bc8c9ac579b9fb64736f6c63430008120033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000000000000000000000000000000000000000c35000000000000000000000000000000000000000000000000000000000000005dc00000000000000000000000000000000000000000000000000000000000003e800000000000000000000000023261bb09d0857e9788a2b9a9ceb9dd48726821900000000000000000000000023261bb09d0857e9788a2b9a9ceb9dd487268219

-----Decoded View---------------
Arg [0] : _gasCap (uint256): 50000
Arg [1] : _maxFee (uint256): 1500
Arg [2] : _fee (uint256): 1000
Arg [3] : _owner (address): 0x23261Bb09D0857E9788a2B9A9cEb9dD487268219
Arg [4] : _feeRecipient (address): 0x23261Bb09D0857E9788a2B9A9cEb9dD487268219

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000c350
Arg [1] : 00000000000000000000000000000000000000000000000000000000000005dc
Arg [2] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [3] : 00000000000000000000000023261bb09d0857e9788a2b9a9ceb9dd487268219
Arg [4] : 00000000000000000000000023261bb09d0857e9788a2b9a9ceb9dd487268219


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
Loading...
Loading
[ 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.