ETH Price: $3,260.03 (-0.00%)
Gas: 2 Gwei

Contract

0x1Bd85B13E8AFc1EE9e32F9869b293D082E71a3fA
 

Overview

ETH Balance

0.0090868 ETH

Eth Value

$29.62 (@ $3,260.03/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Release171650122023-05-01 9:12:47453 days ago1682932367IN
0x1Bd85B13...82E71a3fA
0 ETH0.0023887252.459107
Release168219352023-03-13 22:07:35501 days ago1678745255IN
0x1Bd85B13...82E71a3fA
0 ETH0.0011220624.64192229
Release167486392023-03-03 14:41:23512 days ago1677854483IN
0x1Bd85B13...82E71a3fA
0 ETH0.0012793228.09532268
Release167486342023-03-03 14:40:23512 days ago1677854423IN
0x1Bd85B13...82E71a3fA
0 ETH0.0012909428.35062566
Release166395772023-02-16 6:42:59527 days ago1676529779IN
0x1Bd85B13...82E71a3fA
0 ETH0.0017863137.18782409
Release166294952023-02-14 20:53:47528 days ago1676408027IN
0x1Bd85B13...82E71a3fA
0 ETH0.00519092113.99859944
Release163535362023-01-07 7:52:35567 days ago1673077955IN
0x1Bd85B13...82E71a3fA
0 ETH0.0006395414.04523659
Release163534592023-01-07 7:36:59567 days ago1673077019IN
0x1Bd85B13...82E71a3fA
0 ETH0.0006184613.58227795
Release163197302023-01-02 14:37:11572 days ago1672670231IN
0x1Bd85B13...82E71a3fA
0 ETH0.0007174914.93690812
Release163140072023-01-01 19:28:11572 days ago1672601291IN
0x1Bd85B13...82E71a3fA
0 ETH0.0006481914.23513889
Release163103262023-01-01 7:08:35573 days ago1672556915IN
0x1Bd85B13...82E71a3fA
0 ETH0.0006808614.9524726
Release161961432022-12-16 8:44:23589 days ago1671180263IN
0x1Bd85B13...82E71a3fA
0 ETH0.000683115.00179521
Release161490182022-12-09 18:45:23596 days ago1670611523IN
0x1Bd85B13...82E71a3fA
0 ETH0.0009475319.72593797
Release161170802022-12-05 7:22:23600 days ago1670224943IN
0x1Bd85B13...82E71a3fA
0 ETH0.0005669412.45078317
Release159692022022-11-14 15:34:47621 days ago1668440087IN
0x1Bd85B13...82E71a3fA
0 ETH0.001060822.08406264
Release159691982022-11-14 15:33:59621 days ago1668440039IN
0x1Bd85B13...82E71a3fA
0 ETH0.0010624423.33245156
Release158521322022-10-29 7:09:35637 days ago1667027375IN
0x1Bd85B13...82E71a3fA
0 ETH0.000360947.92673149
Release157838422022-10-19 18:07:59647 days ago1666202879IN
0x1Bd85B13...82E71a3fA
0 ETH0.0022591449.61336345
Release157837852022-10-19 17:56:35647 days ago1666202195IN
0x1Bd85B13...82E71a3fA
0 ETH0.0019644343.14113418
Release156946042022-10-07 7:02:23659 days ago1665126143IN
0x1Bd85B13...82E71a3fA
0 ETH0.000274786.03451637
Release156823482022-10-05 13:58:23661 days ago1664978303IN
0x1Bd85B13...82E71a3fA
0 ETH0.000464419.66819803
Release156823432022-10-05 13:57:23661 days ago1664978243IN
0x1Bd85B13...82E71a3fA
0 ETH0.000450999.90436134
Release156796352022-10-05 4:51:23661 days ago1664945483IN
0x1Bd85B13...82E71a3fA
0 ETH0.000325766.78190304
Release156796292022-10-05 4:50:11661 days ago1664945411IN
0x1Bd85B13...82E71a3fA
0 ETH0.000320997.04934274
Release156766532022-10-04 18:47:23662 days ago1664909243IN
0x1Bd85B13...82E71a3fA
0 ETH0.0012476225.97332586
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
171650122023-05-01 9:12:47453 days ago1682932367
0x1Bd85B13...82E71a3fA
0.00921325 ETH
170244632023-04-11 11:08:47473 days ago1681211327
0x1Bd85B13...82E71a3fA
0.000145 ETH
170244552023-04-11 11:06:59473 days ago1681211219
0x1Bd85B13...82E71a3fA
0.00014 ETH
170244502023-04-11 11:05:59473 days ago1681211159
0x1Bd85B13...82E71a3fA
0.000135 ETH
170244452023-04-11 11:04:59473 days ago1681211099
0x1Bd85B13...82E71a3fA
0.000125 ETH
170244262023-04-11 11:01:11473 days ago1681210871
0x1Bd85B13...82E71a3fA
0.0001225 ETH
170243582023-04-11 10:47:23473 days ago1681210043
0x1Bd85B13...82E71a3fA
0.0015 ETH
170243532023-04-11 10:46:23473 days ago1681209983
0x1Bd85B13...82E71a3fA
0.000095 ETH
170243382023-04-11 10:43:23473 days ago1681209803
0x1Bd85B13...82E71a3fA
0.001125 ETH
170233332023-04-11 7:18:59473 days ago1681197539
0x1Bd85B13...82E71a3fA
0.0010425 ETH
169969922023-04-07 13:45:47477 days ago1680875147
0x1Bd85B13...82E71a3fA
0.00105 ETH
168933522023-03-23 22:57:59491 days ago1679612279
0x1Bd85B13...82E71a3fA
0.00015 ETH
168933522023-03-23 22:57:59491 days ago1679612279
0x1Bd85B13...82E71a3fA
0.0015 ETH
168243802023-03-14 6:22:59501 days ago1678774979
0x1Bd85B13...82E71a3fA
0.010875 ETH
168219352023-03-13 22:07:35501 days ago1678745255
0x1Bd85B13...82E71a3fA
0.19092482 ETH
168141002023-03-12 19:43:35502 days ago1678650215
0x1Bd85B13...82E71a3fA
0.0000975 ETH
167979762023-03-10 13:18:35505 days ago1678454315
0x1Bd85B13...82E71a3fA
0.000125 ETH
167733632023-03-07 2:08:35508 days ago1678154915
0x1Bd85B13...82E71a3fA
0.000125 ETH
167688022023-03-06 10:45:11509 days ago1678099511
0x1Bd85B13...82E71a3fA
0.000074 ETH
167486392023-03-03 14:41:23512 days ago1677854483
0x1Bd85B13...82E71a3fA
0.011996 ETH
167486342023-03-03 14:40:23512 days ago1677854423
0x1Bd85B13...82E71a3fA
0.019607 ETH
167303702023-03-01 1:00:47514 days ago1677632447
0x1Bd85B13...82E71a3fA
0.0000835 ETH
167270682023-02-28 13:51:23515 days ago1677592283
0x1Bd85B13...82E71a3fA
0.000075 ETH
167270682023-02-28 13:51:23515 days ago1677592283
0x1Bd85B13...82E71a3fA
0.000075 ETH
167183722023-02-27 8:33:59516 days ago1677486839
0x1Bd85B13...82E71a3fA
0.0001 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PaymentSplitter

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 4 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "openzeppelin-solidity/contracts//utils/Address.sol";
import "openzeppelin-solidity/contracts//utils/Context.sol";
import "openzeppelin-solidity/contracts//utils/math/SafeMath.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
		emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 totalReceived = address(this).balance + _totalReleased;
        uint256 payment = (totalReceived * _shares[account]) / _totalShares - _released[account];

        require(payment != 0, "PaymentSplitter: account is not due payment");

        _released[account] = _released[account] + payment;
        _totalReleased = _totalReleased + payment;

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

File 2 of 4 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 3 of 4 : Context.sol
// SPDX-License-Identifier: MIT

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 4 of 4 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 20
  },
  "evmVersion": "berlin",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares_","type":"uint256[]"}],"stateMutability":"payable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405260405162000b8238038062000b828339810160408190526200002691620003c6565b8051825114620000985760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620000eb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200008f565b60005b825181101562000157576200014283828151811062000111576200011162000552565b60200260200101518383815181106200012e576200012e62000552565b60200260200101516200016060201b60201c565b806200014e816200051e565b915050620000ee565b5050506200057e565b6001600160a01b038216620001cd5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200008f565b600081116200021f5760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200008f565b6001600160a01b038216600090815260026020526040902054156200029b5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200008f565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200030390829062000503565b600055604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b600082601f8301126200035e57600080fd5b81516020620003776200037183620004dd565b620004aa565b80838252828201915082860187848660051b89010111156200039857600080fd5b60005b85811015620003b9578151845292840192908401906001016200039b565b5090979650505050505050565b60008060408385031215620003da57600080fd5b82516001600160401b0380821115620003f257600080fd5b818501915085601f8301126200040757600080fd5b815160206200041a6200037183620004dd565b8083825282820191508286018a848660051b89010111156200043b57600080fd5b600096505b84871015620004765780516001600160a01b03811681146200046157600080fd5b83526001969096019591830191830162000440565b50918801519196509093505050808211156200049157600080fd5b50620004a0858286016200034c565b9150509250929050565b604051601f8201601f191681016001600160401b0381118282101715620004d557620004d562000568565b604052919050565b60006001600160401b03821115620004f957620004f962000568565b5060051b60200190565b600082198211156200051957620005196200053c565b500190565b60006000198214156200053557620005356200053c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6105f4806200058e6000396000f3fe6080604052600436106100595760003560e01c8063191655871461009e5780633a98ef39146100c05780638b83209b146100e45780639852595c1461011c578063ce7c2ac214610152578063e33b7de31461018857600080fd5b36610099577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770333460405161008f9291906104f1565b60405180910390a1005b600080fd5b3480156100aa57600080fd5b506100be6100b93660046104b4565b61019d565b005b3480156100cc57600080fd5b506000545b6040519081526020015b60405180910390f35b3480156100f057600080fd5b506101046100ff3660046104d8565b610369565b6040516001600160a01b0390911681526020016100db565b34801561012857600080fd5b506100d16101373660046104b4565b6001600160a01b031660009081526003602052604090205490565b34801561015e57600080fd5b506100d161016d3660046104b4565b6001600160a01b031660009081526002602052604090205490565b34801561019457600080fd5b506001546100d1565b6001600160a01b0381166000908152600260205260409020546102165760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b60648201526084015b60405180910390fd5b600060015447610226919061050a565b6001600160a01b0383166000908152600360209081526040808320548354600290935290832054939450919261025c9085610544565b6102669190610522565b6102709190610563565b9050806102d35760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b606482015260840161020d565b6001600160a01b0383166000908152600360205260409020546102f790829061050a565b6001600160a01b03841660009081526003602052604090205560015461031e90829061050a565b60015561032b8382610399565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056838260405161035c9291906104f1565b60405180910390a1505050565b60006004828154811061037e5761037e610590565b6000918252602090912001546001600160a01b031692915050565b804710156103e95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161020d565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610436576040519150601f19603f3d011682016040523d82523d6000602084013e61043b565b606091505b50509050806104af5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b606482015260840161020d565b505050565b6000602082840312156104c657600080fd5b81356104d1816105a6565b9392505050565b6000602082840312156104ea57600080fd5b5035919050565b6001600160a01b03929092168252602082015260400190565b6000821982111561051d5761051d61057a565b500190565b60008261053f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561055e5761055e61057a565b500290565b6000828210156105755761057561057a565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03811681146105bb57600080fd5b5056fea26469706673582212200beeb80e1541869c22957dbd63d181525e15ec0e7a9ac76c6afe85cf77bb6ac964736f6c63430008060033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000030000000000000000000000008f180e6d618f42eef6cc8870b39c69ade06ebaa5000000000000000000000000c6dc654b5aa7969a24c7e4442a52e61fb8b24827000000000000000000000000078adfba8ed90ed0e6778ddc7951aa362e438c2c00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000032

Deployed Bytecode

0x6080604052600436106100595760003560e01c8063191655871461009e5780633a98ef39146100c05780638b83209b146100e45780639852595c1461011c578063ce7c2ac214610152578063e33b7de31461018857600080fd5b36610099577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770333460405161008f9291906104f1565b60405180910390a1005b600080fd5b3480156100aa57600080fd5b506100be6100b93660046104b4565b61019d565b005b3480156100cc57600080fd5b506000545b6040519081526020015b60405180910390f35b3480156100f057600080fd5b506101046100ff3660046104d8565b610369565b6040516001600160a01b0390911681526020016100db565b34801561012857600080fd5b506100d16101373660046104b4565b6001600160a01b031660009081526003602052604090205490565b34801561015e57600080fd5b506100d161016d3660046104b4565b6001600160a01b031660009081526002602052604090205490565b34801561019457600080fd5b506001546100d1565b6001600160a01b0381166000908152600260205260409020546102165760405162461bcd60e51b815260206004820152602660248201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060448201526573686172657360d01b60648201526084015b60405180910390fd5b600060015447610226919061050a565b6001600160a01b0383166000908152600360209081526040808320548354600290935290832054939450919261025c9085610544565b6102669190610522565b6102709190610563565b9050806102d35760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060448201526a191d59481c185e5b595b9d60aa1b606482015260840161020d565b6001600160a01b0383166000908152600360205260409020546102f790829061050a565b6001600160a01b03841660009081526003602052604090205560015461031e90829061050a565b60015561032b8382610399565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056838260405161035c9291906104f1565b60405180910390a1505050565b60006004828154811061037e5761037e610590565b6000918252602090912001546001600160a01b031692915050565b804710156103e95760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161020d565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610436576040519150601f19603f3d011682016040523d82523d6000602084013e61043b565b606091505b50509050806104af5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726044820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b606482015260840161020d565b505050565b6000602082840312156104c657600080fd5b81356104d1816105a6565b9392505050565b6000602082840312156104ea57600080fd5b5035919050565b6001600160a01b03929092168252602082015260400190565b6000821982111561051d5761051d61057a565b500190565b60008261053f57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561055e5761055e61057a565b500290565b6000828210156105755761057561057a565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6001600160a01b03811681146105bb57600080fd5b5056fea26469706673582212200beeb80e1541869c22957dbd63d181525e15ec0e7a9ac76c6afe85cf77bb6ac964736f6c63430008060033

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

000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000030000000000000000000000008f180e6d618f42eef6cc8870b39c69ade06ebaa5000000000000000000000000c6dc654b5aa7969a24c7e4442a52e61fb8b24827000000000000000000000000078adfba8ed90ed0e6778ddc7951aa362e438c2c00000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000032

-----Decoded View---------------
Arg [0] : payees (address[]): 0x8F180E6D618f42eEF6Cc8870b39C69adE06EbAA5,0xC6dC654B5aa7969A24c7e4442a52E61FB8b24827,0x078adfbA8Ed90eD0E6778ddc7951AA362E438c2C
Arg [1] : shares_ (uint256[]): 20,30,50

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [3] : 0000000000000000000000008f180e6d618f42eef6cc8870b39c69ade06ebaa5
Arg [4] : 000000000000000000000000c6dc654b5aa7969a24c7e4442a52e61fb8b24827
Arg [5] : 000000000000000000000000078adfba8ed90ed0e6778ddc7951aa362e438c2c
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000014
Arg [8] : 000000000000000000000000000000000000000000000000000000000000001e
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000032


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