ETH Price: $3,134.07 (-0.91%)

Contract

0x74E2EA6a8c5B3c39e65619CBd1AEf4B660D037Db
 
Transaction Hash
Method
Block
From
To
Release199690532024-05-28 14:46:47170 days ago1716907607IN
0x74E2EA6a...660D037Db
0 ETH0.0009166520.11752493
Release184423372023-10-27 15:07:59384 days ago1698419279IN
0x74E2EA6a...660D037Db
0 ETH0.0015756934.58131345
Release161698262022-12-12 16:30:23703 days ago1670862623IN
0x74E2EA6a...660D037Db
0 ETH0.0009314620.44253951
Release154355192022-08-29 17:51:37808 days ago1661795497IN
0x74E2EA6a...660D037Db
0 ETH0.0007817317.1565405
Transfer152800772022-08-05 4:08:02832 days ago1659672482IN
0x74E2EA6a...660D037Db
0.025 ETH0.0003041913.53725838
Transfer152710642022-08-03 18:27:48834 days ago1659551268IN
0x74E2EA6a...660D037Db
0.06225 ETH0.0005865626.10304101
Transfer151198532022-07-11 6:51:43857 days ago1657522303IN
0x74E2EA6a...660D037Db
0.074935 ETH0.0003173314.12178522
Transfer149645712022-06-15 0:05:15883 days ago1655251515IN
0x74E2EA6a...660D037Db
0.1217 ETH0.0008837539.32890719
Transfer149643172022-06-14 22:58:37883 days ago1655247517IN
0x74E2EA6a...660D037Db
0.0725 ETH0.000838837.32825694
Transfer148989532022-06-03 19:33:56894 days ago1654284836IN
0x74E2EA6a...660D037Db
0.1874 ETH0.0017529878.01121306
Transfer148383062022-05-24 22:28:19904 days ago1653431299IN
0x74E2EA6a...660D037Db
0.05449999 ETH0.000497322.13087217
Transfer148376752022-05-24 20:07:41904 days ago1653422861IN
0x74E2EA6a...660D037Db
0.15093 ETH0.0007905735.18213403
Transfer147925912022-05-17 12:43:32912 days ago1652791412IN
0x74E2EA6a...660D037Db
0.0795 ETH0.0007802434.72220005
Transfer147761422022-05-14 21:57:18914 days ago1652565438IN
0x74E2EA6a...660D037Db
0.116535 ETH0.000568825.31291726
Transfer147437152022-05-09 17:40:00920 days ago1652118000IN
0x74E2EA6a...660D037Db
0.084 ETH0.00317119141.12374954
Transfer147279082022-05-07 5:15:56922 days ago1651900556IN
0x74E2EA6a...660D037Db
0.059575 ETH0.0007625133.93339448
Transfer146963272022-05-02 4:56:11927 days ago1651467371IN
0x74E2EA6a...660D037Db
0.093495 ETH0.0010724247.7247448
Transfer146663442022-04-27 12:00:54932 days ago1651060854IN
0x74E2EA6a...660D037Db
0.0275 ETH0.0007975935.49455227
Transfer146487052022-04-24 17:15:46935 days ago1650820546IN
0x74E2EA6a...660D037Db
0.09895 ETH0.0008937339.77261345
Transfer146216632022-04-20 11:38:46939 days ago1650454726IN
0x74E2EA6a...660D037Db
0.0425 ETH0.000846837.68426157
Transfer146131622022-04-19 3:21:17940 days ago1650338477IN
0x74E2EA6a...660D037Db
0.0989 ETH0.0005687925.31233839
Transfer145713412022-04-12 14:43:50947 days ago1649774630IN
0x74E2EA6a...660D037Db
0.14325 ETH0.0013637260.68807125
Transfer145712882022-04-12 14:32:58947 days ago1649773978IN
0x74E2EA6a...660D037Db
0.13155 ETH0.001170152.07188798
Transfer145477062022-04-08 22:09:06950 days ago1649455746IN
0x74E2EA6a...660D037Db
0.0485 ETH0.001428963.58892607
Transfer145458432022-04-08 15:01:45951 days ago1649430105IN
0x74E2EA6a...660D037Db
0.43707 ETH0.0010628947.30081279
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
201906772024-06-28 14:06:59139 days ago1719583619
0x74E2EA6a...660D037Db
0.0025 ETH
200842222024-06-13 16:54:23154 days ago1718297663
0x74E2EA6a...660D037Db
0.0015 ETH
200842192024-06-13 16:53:35154 days ago1718297615
0x74E2EA6a...660D037Db
0.00014999 ETH
200501362024-06-08 22:36:35158 days ago1717886195
0x74E2EA6a...660D037Db
0.0025 ETH
199690532024-05-28 14:46:47170 days ago1716907607
0x74E2EA6a...660D037Db
0.0403703 ETH
199202802024-05-21 19:10:35176 days ago1716318635
0x74E2EA6a...660D037Db
0.0015 ETH
199196142024-05-21 16:56:35177 days ago1716310595
0x74E2EA6a...660D037Db
0.0015 ETH
197983452024-05-04 17:51:11194 days ago1714845071
0x74E2EA6a...660D037Db
0.00135 ETH
196841022024-04-18 18:23:11210 days ago1713464591
0x74E2EA6a...660D037Db
0.00493944 ETH
196666672024-04-16 7:50:59212 days ago1713253859
0x74E2EA6a...660D037Db
0.000125 ETH
196554412024-04-14 18:04:23214 days ago1713117863
0x74E2EA6a...660D037Db
0.0005 ETH
195929152024-04-05 23:48:35222 days ago1712360915
0x74E2EA6a...660D037Db
0.000137 ETH
195914762024-04-05 18:59:59223 days ago1712343599
0x74E2EA6a...660D037Db
0.0012 ETH
191379542024-02-02 3:10:11286 days ago1706843411
0x74E2EA6a...660D037Db
0.00125 ETH
189893502024-01-12 7:32:59307 days ago1705044779
0x74E2EA6a...660D037Db
0.00067 ETH
188350642023-12-21 15:14:23329 days ago1703171663
0x74E2EA6a...660D037Db
0.00015 ETH
187767852023-12-13 10:54:11337 days ago1702464851
0x74E2EA6a...660D037Db
0.0000995 ETH
187250162023-12-06 4:51:11344 days ago1701838271
0x74E2EA6a...660D037Db
0.0245 ETH
186826052023-11-30 6:21:59350 days ago1701325319
0x74E2EA6a...660D037Db
0.00075 ETH
185445412023-11-10 22:31:11369 days ago1699655471
0x74E2EA6a...660D037Db
0.000825 ETH
184585082023-10-29 21:26:23381 days ago1698614783
0x74E2EA6a...660D037Db
0.000504 ETH
184580002023-10-29 19:44:23381 days ago1698608663
0x74E2EA6a...660D037Db
0.0014055 ETH
184423372023-10-27 15:07:59384 days ago1698419279
0x74E2EA6a...660D037Db
0.79117086 ETH
184154542023-10-23 20:48:47387 days ago1698094127
0x74E2EA6a...660D037Db
0.000278 ETH
184154542023-10-23 20:48:47387 days ago1698094127
0x74E2EA6a...660D037Db
0.001662 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OpenSeaSecondarySplitter

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion
File 1 of 5 : OpenSeaSecondarySplitter.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/finance/PaymentSplitter.sol";

contract OpenSeaSecondarySplitter is PaymentSplitter {
  constructor(address[] memory payees, uint256[] memory shares)
    PaymentSplitter(payees, shares)
  {}

  function getAvailablePayment(address account)
    external
    view
    returns (uint256)
  {
    uint256 totalReceived = address(this).balance + _totalReleased;
    return
      (totalReceived * _shares[account]) / _totalShares - _released[account];
  }
}

File 2 of 5 : 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. 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;
        }
    }
}

File 3 of 5 : 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) {
        return msg.data;
    }
}

File 4 of 5 : 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;
        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");

        (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");

        (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");

        (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");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 5 of 5 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Address.sol";
import "../utils/Context.sol";
import "../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 public _totalShares;
    uint256 public _totalReleased;

    mapping(address => uint256) public _shares;
    mapping(address => uint256) public _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_);
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 1
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"stateMutability":"nonpayable","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":"address","name":"","type":"address"}],"name":"_released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","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"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getAvailablePayment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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"}]

60806040523480156200001157600080fd5b5060405162000d6438038062000d648339810160408190526200003491620002ba565b81818051825114620000635760405162461bcd60e51b81526004016200005a90620003f9565b60405180910390fd5b6000825111620000875760405162461bcd60e51b81526004016200005a9062000496565b60005b82518110156200010b57620000f6838281518110620000b957634e487b7160e01b600052603260045260246000fd5b6020026020010151838381518110620000e257634e487b7160e01b600052603260045260246000fd5b60200260200101516200011660201b60201c565b80620001028162000571565b9150506200008a565b5050505050620005bb565b6001600160a01b0382166200013f5760405162461bcd60e51b81526004016200005a90620003ad565b60008111620001625760405162461bcd60e51b81526004016200005a90620004cd565b6001600160a01b038216600090815260026020526040902054156200019b5760405162461bcd60e51b81526004016200005a906200044b565b60048054600181019091557f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0180546001600160a01b0319166001600160a01b0384169081179091556000908152600260205260408120829055546200020390829062000556565b6000556040517f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac906200023a908490849062000394565b60405180910390a15050565b600082601f83011262000257578081fd5b81516020620002706200026a8362000530565b62000504565b82815281810190858301838502870184018810156200028d578586fd5b855b85811015620002ad578151845292840192908401906001016200028f565b5090979650505050505050565b60008060408385031215620002cd578182fd5b82516001600160401b0380821115620002e4578384fd5b818501915085601f830112620002f8578384fd5b815160206200030b6200026a8362000530565b82815281810190858301838502870184018b101562000328578889fd5b8896505b84871015620003615780516001600160a01b03811681146200034c57898afd5b8352600196909601959183019183016200032c565b50918801519196509093505050808211156200037b578283fd5b506200038a8582860162000246565b9150509250929050565b6001600160a01b03929092168252602082015260400190565b6020808252602c908201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060408201526b7a65726f206164647265737360a01b606082015260800190565b60208082526032908201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726040820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960408201526a206861732073686172657360a81b606082015260800190565b6020808252601a908201527f5061796d656e7453706c69747465723a206e6f20706179656573000000000000604082015260600190565b6020808252601d908201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604082015260600190565b6040518181016001600160401b0381118282101715620005285762000528620005a5565b604052919050565b60006001600160401b038211156200054c576200054c620005a5565b5060209081020190565b600082198211156200056c576200056c6200058f565b500190565b60006000198214156200058857620005886200058f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b61079980620005cb6000396000f3fe6080604052600436106100905760003560e01c806319165587146100dc5780633a7d7d39146100fe5780633a98ef39146101295780638b83209b1461013e5780639852595c1461016b578063b0428da61461018b578063b34c8caf146101a0578063ce7c2ac2146101c0578063e1b0311f146101e0578063e33b7de314610200578063eab902f914610215576100d7565b366100d7577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7706100be610235565b346040516100cd929190610583565b60405180910390a1005b600080fd5b3480156100e857600080fd5b506100fc6100f7366004610538565b610239565b005b34801561010a57600080fd5b50610113610386565b60405161012091906106be565b60405180910390f35b34801561013557600080fd5b5061011361038c565b34801561014a57600080fd5b5061015e610159366004610554565b610392565b604051610120919061056f565b34801561017757600080fd5b50610113610186366004610538565b6103d0565b34801561019757600080fd5b506101136103eb565b3480156101ac57600080fd5b506101136101bb366004610538565b6103f1565b3480156101cc57600080fd5b506101136101db366004610538565b610403565b3480156101ec57600080fd5b506101136101fb366004610538565b61041e565b34801561020c57600080fd5b50610113610430565b34801561022157600080fd5b50610113610230366004610538565b610436565b3390565b6001600160a01b0381166000908152600260205260409020546102775760405162461bcd60e51b815260040161026e9061059c565b60405180910390fd5b60006001544761028791906106c7565b6001600160a01b038316600090815260036020908152604080832054835460029093529083205493945091926102bd90856106ff565b6102c791906106df565b6102d1919061071e565b9050806102f05760405162461bcd60e51b815260040161026e90610673565b6001600160a01b0383166000908152600360205260409020546103149082906106c7565b6001600160a01b03841660009081526003602052604090205560015461033b9082906106c7565b6001556103488382610497565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568382604051610379929190610583565b60405180910390a1505050565b60015481565b60005490565b6000600482815481106103b557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b6001600160a01b031660009081526003602052604090205490565b60005481565b60026020526000908152604090205481565b6001600160a01b031660009081526002602052604090205490565b60036020526000908152604090205481565b60015490565b6000806001544761044791906106c7565b6001600160a01b03841660009081526003602090815260408083205483546002909352922054929350909161047c90846106ff565b61048691906106df565b610490919061071e565b9392505050565b804710156104b75760405162461bcd60e51b815260040161026e9061063c565b6000826001600160a01b0316826040516104d09061056c565b60006040518083038185875af1925050503d806000811461050d576040519150601f19603f3d011682016040523d82523d6000602084013e610512565b606091505b50509050806105335760405162461bcd60e51b815260040161026e906105e2565b505050565b600060208284031215610549578081fd5b81356104908161074b565b600060208284031215610565578081fd5b5035919050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726040820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b90815260200190565b600082198211156106da576106da610735565b500190565b6000826106fa57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561071957610719610735565b500290565b60008282101561073057610730610735565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461076057600080fd5b5056fea2646970667358221220edc76c8afb49ffdcc248497121646dc810a5f7f999e8e917fd85fa49167a686d64736f6c63430008000033000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000008b6121e1ed4a63f003f3a0fee536c6f2976983bf0000000000000000000000007544cc4c99b94bde484a2997c407442d1b43a335000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000003cf0000000000000000000000000000000000000000000000000000000000000019

Deployed Bytecode

0x6080604052600436106100905760003560e01c806319165587146100dc5780633a7d7d39146100fe5780633a98ef39146101295780638b83209b1461013e5780639852595c1461016b578063b0428da61461018b578063b34c8caf146101a0578063ce7c2ac2146101c0578063e1b0311f146101e0578063e33b7de314610200578063eab902f914610215576100d7565b366100d7577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7706100be610235565b346040516100cd929190610583565b60405180910390a1005b600080fd5b3480156100e857600080fd5b506100fc6100f7366004610538565b610239565b005b34801561010a57600080fd5b50610113610386565b60405161012091906106be565b60405180910390f35b34801561013557600080fd5b5061011361038c565b34801561014a57600080fd5b5061015e610159366004610554565b610392565b604051610120919061056f565b34801561017757600080fd5b50610113610186366004610538565b6103d0565b34801561019757600080fd5b506101136103eb565b3480156101ac57600080fd5b506101136101bb366004610538565b6103f1565b3480156101cc57600080fd5b506101136101db366004610538565b610403565b3480156101ec57600080fd5b506101136101fb366004610538565b61041e565b34801561020c57600080fd5b50610113610430565b34801561022157600080fd5b50610113610230366004610538565b610436565b3390565b6001600160a01b0381166000908152600260205260409020546102775760405162461bcd60e51b815260040161026e9061059c565b60405180910390fd5b60006001544761028791906106c7565b6001600160a01b038316600090815260036020908152604080832054835460029093529083205493945091926102bd90856106ff565b6102c791906106df565b6102d1919061071e565b9050806102f05760405162461bcd60e51b815260040161026e90610673565b6001600160a01b0383166000908152600360205260409020546103149082906106c7565b6001600160a01b03841660009081526003602052604090205560015461033b9082906106c7565b6001556103488382610497565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568382604051610379929190610583565b60405180910390a1505050565b60015481565b60005490565b6000600482815481106103b557634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b6001600160a01b031660009081526003602052604090205490565b60005481565b60026020526000908152604090205481565b6001600160a01b031660009081526002602052604090205490565b60036020526000908152604090205481565b60015490565b6000806001544761044791906106c7565b6001600160a01b03841660009081526003602090815260408083205483546002909352922054929350909161047c90846106ff565b61048691906106df565b610490919061071e565b9392505050565b804710156104b75760405162461bcd60e51b815260040161026e9061063c565b6000826001600160a01b0316826040516104d09061056c565b60006040518083038185875af1925050503d806000811461050d576040519150601f19603f3d011682016040523d82523d6000602084013e610512565b606091505b50509050806105335760405162461bcd60e51b815260040161026e906105e2565b505050565b600060208284031215610549578081fd5b81356104908161074b565b600060208284031215610565578081fd5b5035919050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c20726040820152791958da5c1a595b9d081b585e481a185d99481c995d995c9d195960321b606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b90815260200190565b600082198211156106da576106da610735565b500190565b6000826106fa57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561071957610719610735565b500290565b60008282101561073057610730610735565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461076057600080fd5b5056fea2646970667358221220edc76c8afb49ffdcc248497121646dc810a5f7f999e8e917fd85fa49167a686d64736f6c63430008000033

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

000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000008b6121e1ed4a63f003f3a0fee536c6f2976983bf0000000000000000000000007544cc4c99b94bde484a2997c407442d1b43a335000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000003cf0000000000000000000000000000000000000000000000000000000000000019

-----Decoded View---------------
Arg [0] : payees (address[]): 0x8B6121e1Ed4a63F003f3A0Fee536c6f2976983bf,0x7544cc4c99B94BDE484A2997c407442D1B43A335
Arg [1] : shares (uint256[]): 975,25

-----Encoded View---------------
8 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [3] : 0000000000000000000000008b6121e1ed4a63f003f3a0fee536c6f2976983bf
Arg [4] : 0000000000000000000000007544cc4c99b94bde484a2997c407442d1b43a335
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [6] : 00000000000000000000000000000000000000000000000000000000000003cf
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000019


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.