More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 331 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Release Batch | 20178354 | 204 days ago | IN | 0 ETH | 0.01064619 | ||||
Release Batch | 19687420 | 272 days ago | IN | 0 ETH | 0.01029906 | ||||
Release Batch | 19687398 | 272 days ago | IN | 0 ETH | 0.01262722 | ||||
Release Batch | 19687277 | 272 days ago | IN | 0 ETH | 0.00191094 | ||||
Release Batch | 19687187 | 272 days ago | IN | 0 ETH | 0.00182704 | ||||
Release Batch | 19687167 | 272 days ago | IN | 0 ETH | 0.00102352 | ||||
Release | 19686902 | 273 days ago | IN | 0 ETH | 0.00087789 | ||||
Release Batch | 18398143 | 453 days ago | IN | 0 ETH | 0.00145902 | ||||
Release Batch | 17650450 | 558 days ago | IN | 0 ETH | 0.00444085 | ||||
Release Batch | 17650402 | 558 days ago | IN | 0 ETH | 0.00202192 | ||||
Release Batch | 16909596 | 662 days ago | IN | 0 ETH | 0.00234287 | ||||
Release Batch | 16795641 | 678 days ago | IN | 0 ETH | 0.02769526 | ||||
Release Batch | 16768849 | 682 days ago | IN | 0 ETH | 0.01150188 | ||||
Release Batch | 16726218 | 688 days ago | IN | 0 ETH | 0.0064383 | ||||
Release | 16503852 | 719 days ago | IN | 0 ETH | 0.0011166 | ||||
Release Batch | 16391784 | 735 days ago | IN | 0 ETH | 0.01431959 | ||||
Release Batch | 16332869 | 743 days ago | IN | 0 ETH | 0.00420807 | ||||
Release Batch | 16247971 | 755 days ago | IN | 0 ETH | 0.00378512 | ||||
Release Batch | 16174361 | 765 days ago | IN | 0 ETH | 0.00165123 | ||||
Release | 16109765 | 774 days ago | IN | 0 ETH | 0.00109304 | ||||
Release | 16109763 | 774 days ago | IN | 0 ETH | 0.00090545 | ||||
Release | 16047915 | 783 days ago | IN | 0 ETH | 0.00094366 | ||||
Release | 16047914 | 783 days ago | IN | 0 ETH | 0.00086654 | ||||
Release | 16046412 | 783 days ago | IN | 0 ETH | 0.00079945 | ||||
Release | 16046405 | 783 days ago | IN | 0 ETH | 0.00078122 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers. Name tag integration is not available in advanced view.
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
||||
---|---|---|---|---|---|---|---|
20178354 | 204 days ago | 0.01152865 ETH | |||||
20178354 | 204 days ago | 0 ETH | |||||
20178354 | 204 days ago | 0 ETH | |||||
20178354 | 204 days ago | 0 ETH | |||||
20178354 | 204 days ago | 0 ETH | |||||
20178354 | 204 days ago | 0 ETH | |||||
20178354 | 204 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0.11067512 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH | |||||
19687420 | 272 days ago | 0 ETH |
Loading...
Loading
Contract Name:
CashCowsTreasury
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //------------------------------------------------------------------------------------------- // // /$$$$$$ /$$ /$$$$$$ // /$$__ $$ | $$ /$$__ $$ // | $$ \__/ /$$$$$$ /$$$$$$$| $$$$$$$ | $$ \__/ /$$$$$$ /$$ /$$ /$$ /$$$$$$$ // | $$ |____ $$ /$$_____/| $$__ $$ | $$ /$$__ $$| $$ | $$ | $$ /$$_____/ // | $$ /$$$$$$$| $$$$$$ | $$ \ $$ | $$ | $$ \ $$| $$ | $$ | $$| $$$$$$ // | $$ $$ /$$__ $$ \____ $$| $$ | $$ | $$ $$| $$ | $$| $$ | $$ | $$ \____ $$ // | $$$$$$/| $$$$$$$ /$$$$$$$/| $$ | $$ | $$$$$$/| $$$$$$/| $$$$$/$$$$/ /$$$$$$$/ // \______/ \_______/|_______/ |__/ |__/ \______/ \______/ \_____/\___/ |_______/ // //------------------------------------------------------------------------------------------- // // Moo. import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./IRoyaltySplitter.sol"; // ============ Errors ============ error InvalidCall(); // ============ Interfaces ============ interface IERC721OwnsAll is IERC721 { function ownsAll( address owner, uint256[] memory tokenIds ) external view returns(bool); function totalSupply() external view returns(uint256); } // ============ Contract ============ contract CashCowsTreasury is Context, ReentrancyGuard, IRoyaltySplitter { // ============ Events ============ event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); // ============ Constants ============ //we are going to need this to find out who owns what IERC721OwnsAll public immutable COLLECTION; // ============ Storage ============ //total amount of ETH released uint256 private _ethTotalReleased; //amount of ETH released per NFT token id mapping(uint256 => uint256) private _ethReleased; //total amount of ERC20 released mapping(IERC20 => uint256) private _erc20TotalReleased; //amount of ERC20 released per NFT token id mapping(IERC20 => mapping(uint256 => uint256)) private _erc20Released; // ============ Deploy ============ constructor(IERC721OwnsAll collection) payable { //assign the collection COLLECTION = collection; } /** * @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. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } // ============ Read Methods ============ /** * @dev Determines how much ETH are releaseable */ function releaseable(uint256 tokenId) public view returns(uint256) { return _pendingPayment( address(this).balance + totalReleased(), released(tokenId) ); } /** * @dev Determines how much ERC20 tokens are releaseable */ function releaseable( IERC20 token, uint256 tokenId ) public view returns(uint256) { return _pendingPayment( token.balanceOf(address(this)) + totalReleased(token), released(token, tokenId) ); } /** * @dev Returns the sum of ETH releaseable given `tokenIds` */ function releaseableBatch( uint256[] memory tokenIds ) external view returns(uint256 totalReleaseable) { for(uint256 i = 0; i < tokenIds.length; i++) { //get payment and should be more than zero totalReleaseable += releaseable(tokenIds[i]); } } /** * @dev Returns the sum of ERC20 tokens releaseable given `tokenIds` */ function releaseableBatch( IERC20 token, uint256[] memory tokenIds ) external view returns(uint256 totalReleaseable) { for(uint256 i = 0; i < tokenIds.length; i++) { //get payment and should be more than zero totalReleaseable += releaseable(token, tokenIds[i]); } } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns(uint256) { return _ethTotalReleased; } /** * @dev Getter for the total amount of `token` already released. * `token` should be the address of an IERC20 contract. */ function totalReleased(IERC20 token) public view returns(uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) external view returns(uint256) { return COLLECTION.balanceOf(account); } /** * @dev Getter for the amount of Ether already released to the `tokenId`. */ function released(uint256 tokenId) public view returns(uint256) { return _ethReleased[tokenId]; } /** * @dev Getter for the amount of `token` tokens already released to a * `tokenId`. `token` should be the address of an IERC20 contract. */ function released(IERC20 token, uint256 tokenId) public view returns(uint256) { return _erc20Released[token][tokenId]; } /** * @dev Getter for the address of the payee via `tokenId`. */ function payee(uint256 tokenId) public view returns(address) { return COLLECTION.ownerOf(tokenId); } // ============ Write Methods ============ /** * @dev Triggers a transfer to owner of `tokenId` of the amount of * Ether they are owed, according to their percentage of the total * shares and their previous withdrawals. */ function release(uint256 tokenId) external nonReentrant { //get account and should be the sender address account = payee(tokenId); if (account != _msgSender()) revert InvalidCall(); //get payment and should be more than zero uint256 payment = releaseable(tokenId); if (payment == 0) revert InvalidCall(); //add released payment _ethReleased[tokenId] += payment; _ethTotalReleased += payment; //send it off.. buh bye! Address.sendValue(payable(account), payment); //let everyone know what happened emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` * tokens they are owed, according to their percentage of the total * shares and their previous withdrawals. `token` must be the address * of an IERC20 contract. */ function release(IERC20 token, uint256 tokenId) external nonReentrant { //get account and should be the sender address account = payee(tokenId); if (account != _msgSender()) revert InvalidCall(); //get payment and should be more than zero uint256 payment = releaseable(token, tokenId); if (payment == 0) revert InvalidCall(); //add released payment _erc20Released[token][tokenId] += payment; _erc20TotalReleased[token] += payment; //send it off.. buh bye! SafeERC20.safeTransfer(token, payable(account), payment); //let everyone know what happened emit ERC20PaymentReleased(token, account, payment); } /** * @dev Triggers a batch transfer to owner of `tokenId` of the amount * of Ether they are owed, according to their percentage of the total * shares and their previous withdrawals. */ function releaseBatch(uint256[] memory tokenIds) public virtual { //get account and should be the owner address account = _msgSender(); if (!COLLECTION.ownsAll(_msgSender(), tokenIds)) revert InvalidCall(); uint256 payment; uint256 totalPayment; for(uint256 i = 0; i < tokenIds.length; i++) { //get payment and should be more than zero payment = releaseable(tokenIds[i]); //skip if noting is releaseable if (payment == 0) continue; //add released payment _ethReleased[tokenIds[i]] += payment; //add to total payment totalPayment += payment; } //if no payments are due if (totalPayment == 0) revert InvalidCall(); //add released payment _ethTotalReleased += totalPayment; //send it off.. buh bye! Address.sendValue(payable(account), totalPayment); //let everyone know what happened emit PaymentReleased(account, totalPayment); } /** * @dev Triggers a batch transfer to `account` of the amount of `token` * tokens they are owed, according to their percentage of the total * shares and their previous withdrawals. `token` must be the address * of an IERC20 contract. */ function releaseBatch( IERC20 token, uint256[] memory tokenIds ) external nonReentrant { //get account and should be the owner address account = _msgSender(); if (!COLLECTION.ownsAll(_msgSender(), tokenIds)) revert InvalidCall(); uint256 payment; uint256 totalPayment; for(uint256 i = 0; i < tokenIds.length; i++) { //get payment and should be more than zero payment = releaseable(token, tokenIds[i]); //skip if noting is releaseable if (payment == 0) continue; //add released payment _erc20Released[token][tokenIds[i]] += payment; //add to total payment totalPayment += payment; } //if no payments are due if (totalPayment == 0) revert InvalidCall(); //add released payment _erc20TotalReleased[token] += totalPayment; //send it off.. buh bye! SafeERC20.safeTransfer(token, payable(account), totalPayment); //let everyone know what happened emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( uint256 totalReceived, uint256 alreadyReleased ) private view returns(uint256) { uint256 amount = totalReceived / COLLECTION.totalSupply(); if (amount < alreadyReleased) return 0; return amount - alreadyReleased; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.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)); } } /** * @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"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) 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); } } } }
// 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IRoyaltySplitter { function releaseable(uint256 tokenId) external view returns(uint256); function releaseable(IERC20 token, uint256 tokenId) external view returns(uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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 `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount ) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC721OwnsAll","name":"collection","type":"address"}],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"InvalidCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"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":[],"name":"COLLECTION","outputs":[{"internalType":"contract IERC721OwnsAll","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"releaseBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"releaseBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"releaseable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"releaseable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"releaseableBatch","outputs":[{"internalType":"uint256","name":"totalReleaseable","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"releaseableBatch","outputs":[{"internalType":"uint256","name":"totalReleaseable","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"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":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a060405260405161158638038061158683398101604081905261002291610038565b60016000556001600160a01b0316608052610068565b60006020828403121561004a57600080fd5b81516001600160a01b038116811461006157600080fd5b9392505050565b6080516114e06100a66000396000818161022101528181610551015281816109bf01528181610bd801528181610c7c0152610e6d01526114e06000f3fe6080604052600436106100ec5760003560e01c80636e8790e61161008a578063ce7c2ac211610059578063ce7c2ac2146102e8578063cfe8307014610308578063d79779b21461034b578063e33b7de31461038157600080fd5b80636e8790e61461025b5780637d237eac1461027b5780638b83209b1461029b578063a94d373b146102bb57600080fd5b806337bdc99b116100c657806337bdc99b146101af5780633db9f02a146101cf5780636582f4fa146101ef578063697b23651461020f57600080fd5b80630357371d1461013a5780631908fc5a1461015c5780631e1ee1281461018f57600080fd5b36610135577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561014657600080fd5b5061015a610155366004611121565b610396565b005b34801561016857600080fd5b5061017c6101773660046111f3565b6104eb565b6040519081526020015b60405180910390f35b34801561019b57600080fd5b5061015a6101aa366004611243565b610540565b3480156101bb57600080fd5b5061015a6101ca366004611278565b610724565b3480156101db57600080fd5b5061017c6101ea366004611243565b610840565b3480156101fb57600080fd5b5061017c61020a366004611278565b610886565b34801561021b57600080fd5b506102437f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610186565b34801561026757600080fd5b5061017c610276366004611121565b6108b8565b34801561028757600080fd5b5061015a6102963660046111f3565b610986565b3480156102a757600080fd5b506102436102b6366004611278565b610bbf565b3480156102c757600080fd5b5061017c6102d6366004611278565b60009081526002602052604090205490565b3480156102f457600080fd5b5061017c610303366004611291565b610c5a565b34801561031457600080fd5b5061017c610323366004611121565b6001600160a01b03919091166000908152600460209081526040808320938352929052205490565b34801561035757600080fd5b5061017c610366366004611291565b6001600160a01b031660009081526003602052604090205490565b34801561038d57600080fd5b5060015461017c565b600260005414156103c25760405162461bcd60e51b81526004016103b9906112ae565b60405180910390fd5b600260009081556103d282610bbf565b90506001600160a01b03811633146103fd5760405163574b16a760e11b815260040160405180910390fd5b600061040984846108b8565b9050806104295760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b03841660009081526004602090815260408083208684529091528120805483929061045c9084906112fb565b90915550506001600160a01b038416600090815260036020526040812080548392906104899084906112fb565b9091555061049a9050848383610cf8565b604080516001600160a01b038481168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505060016000555050565b6000805b82518110156105395761051b8484838151811061050e5761050e611313565b60200260200101516108b8565b61052590836112fb565b91508061053181611329565b9150506104ef565b5092915050565b60405163ad94d90160e01b815233907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ad94d901906105909084908690600401611344565b60206040518083038186803b1580156105a857600080fd5b505afa1580156105bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e0919061139a565b6105fd5760405163574b16a760e11b815260040160405180910390fd5b60008060005b845181101561069b5761062e85828151811061062157610621611313565b6020026020010151610886565b92508261063a57610689565b826002600087848151811061065157610651611313565b60200260200101518152602001908152602001600020600082825461067691906112fb565b90915550610686905083836112fb565b91505b8061069381611329565b915050610603565b50806106ba5760405163574b16a760e11b815260040160405180910390fd5b80600160008282546106cc91906112fb565b909155506106dc90508382610d4f565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a150505050565b600260005414156107475760405162461bcd60e51b81526004016103b9906112ae565b6002600090815561075782610bbf565b90506001600160a01b03811633146107825760405163574b16a760e11b815260040160405180910390fd5b600061078d83610886565b9050806107ad5760405163574b16a760e11b815260040160405180910390fd5b600083815260026020526040812080548392906107cb9084906112fb565b9250508190555080600160008282546107e491906112fb565b909155506107f490508282610d4f565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050600160005550565b6000805b82518110156108805761086283828151811061062157610621611313565b61086c90836112fb565b91508061087881611329565b915050610844565b50919050565b60006108b261089460015490565b61089e90476112fb565b600084815260026020526040902054610e68565b92915050565b6001600160a01b03821660009081526003602052604081205461097f906040516370a0823160e01b81523060048201526001600160a01b038616906370a082319060240160206040518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094c91906113bc565b61095691906112fb565b6001600160a01b0385166000908152600460209081526040808320878452909152902054610e68565b9392505050565b600260005414156109a95760405162461bcd60e51b81526004016103b9906112ae565b600260005560405163ad94d90160e01b815233907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ad94d901906109fe9084908690600401611344565b60206040518083038186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e919061139a565b610a6b5760405163574b16a760e11b815260040160405180910390fd5b60008060005b8451811015610b1557610a908686838151811061050e5761050e611313565b925082610a9c57610b03565b6001600160a01b03861660009081526004602052604081208651859290889085908110610acb57610acb611313565b602002602001015181526020019081526020016000206000828254610af091906112fb565b90915550610b00905083836112fb565b91505b80610b0d81611329565b915050610a71565b5080610b345760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b03851660009081526003602052604081208054839290610b5c9084906112fb565b90915550610b6d9050858483610cf8565b604080516001600160a01b038581168252602082018590528716917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250506001600055505050565b6040516331a9108f60e11b8152600481018290526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636352211e9060240160206040518083038186803b158015610c2257600080fd5b505afa158015610c36573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b291906113d5565b6040516370a0823160e01b81526001600160a01b0382811660048301526000917f0000000000000000000000000000000000000000000000000000000000000000909116906370a082319060240160206040518083038186803b158015610cc057600080fd5b505afa158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b291906113bc565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d4a908490610f2c565b505050565b80471015610d9f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016103b9565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610dec576040519150601f19603f3d011682016040523d82523d6000602084013e610df1565b606091505b5050905080610d4a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016103b9565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec457600080fd5b505afa158015610ed8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efc91906113bc565b610f0690856113f2565b905082811015610f1a5760009150506108b2565b610f248382611414565b949350505050565b6000610f81826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ffe9092919063ffffffff16565b805190915015610d4a5780806020019051810190610f9f919061139a565b610d4a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103b9565b6060610f24848460008585843b6110575760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b9565b600080866001600160a01b03168587604051611073919061145b565b60006040518083038185875af1925050503d80600081146110b0576040519150601f19603f3d011682016040523d82523d6000602084013e6110b5565b606091505b50915091506110c58282866110d0565b979650505050505050565b606083156110df57508161097f565b8251156110ef5782518084602001fd5b8160405162461bcd60e51b81526004016103b99190611477565b6001600160a01b038116811461111e57600080fd5b50565b6000806040838503121561113457600080fd5b823561113f81611109565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261117457600080fd5b8135602067ffffffffffffffff808311156111915761119161114d565b8260051b604051601f19603f830116810181811084821117156111b6576111b661114d565b6040529384528581018301938381019250878511156111d457600080fd5b83870191505b848210156110c5578135835291830191908301906111da565b6000806040838503121561120657600080fd5b823561121181611109565b9150602083013567ffffffffffffffff81111561122d57600080fd5b61123985828601611163565b9150509250929050565b60006020828403121561125557600080fd5b813567ffffffffffffffff81111561126c57600080fd5b610f2484828501611163565b60006020828403121561128a57600080fd5b5035919050565b6000602082840312156112a357600080fd5b813561097f81611109565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561130e5761130e6112e5565b500190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561133d5761133d6112e5565b5060010190565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b8181101561138d57845183529383019391830191600101611371565b5090979650505050505050565b6000602082840312156113ac57600080fd5b8151801515811461097f57600080fd5b6000602082840312156113ce57600080fd5b5051919050565b6000602082840312156113e757600080fd5b815161097f81611109565b60008261140f57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611426576114266112e5565b500390565b60005b8381101561144657818101518382015260200161142e565b83811115611455576000848401525b50505050565b6000825161146d81846020870161142b565b9190910192915050565b602081526000825180602084015261149681604085016020870161142b565b601f01601f1916919091016040019291505056fea2646970667358221220ba3399b69c8ecec804b6b2fc2e6db6313659ccb9c5a3cbbaf8e12162de9a18bc64736f6c634300080900330000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f
Deployed Bytecode
0x6080604052600436106100ec5760003560e01c80636e8790e61161008a578063ce7c2ac211610059578063ce7c2ac2146102e8578063cfe8307014610308578063d79779b21461034b578063e33b7de31461038157600080fd5b80636e8790e61461025b5780637d237eac1461027b5780638b83209b1461029b578063a94d373b146102bb57600080fd5b806337bdc99b116100c657806337bdc99b146101af5780633db9f02a146101cf5780636582f4fa146101ef578063697b23651461020f57600080fd5b80630357371d1461013a5780631908fc5a1461015c5780631e1ee1281461018f57600080fd5b36610135577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b34801561014657600080fd5b5061015a610155366004611121565b610396565b005b34801561016857600080fd5b5061017c6101773660046111f3565b6104eb565b6040519081526020015b60405180910390f35b34801561019b57600080fd5b5061015a6101aa366004611243565b610540565b3480156101bb57600080fd5b5061015a6101ca366004611278565b610724565b3480156101db57600080fd5b5061017c6101ea366004611243565b610840565b3480156101fb57600080fd5b5061017c61020a366004611278565b610886565b34801561021b57600080fd5b506102437f0000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f81565b6040516001600160a01b039091168152602001610186565b34801561026757600080fd5b5061017c610276366004611121565b6108b8565b34801561028757600080fd5b5061015a6102963660046111f3565b610986565b3480156102a757600080fd5b506102436102b6366004611278565b610bbf565b3480156102c757600080fd5b5061017c6102d6366004611278565b60009081526002602052604090205490565b3480156102f457600080fd5b5061017c610303366004611291565b610c5a565b34801561031457600080fd5b5061017c610323366004611121565b6001600160a01b03919091166000908152600460209081526040808320938352929052205490565b34801561035757600080fd5b5061017c610366366004611291565b6001600160a01b031660009081526003602052604090205490565b34801561038d57600080fd5b5060015461017c565b600260005414156103c25760405162461bcd60e51b81526004016103b9906112ae565b60405180910390fd5b600260009081556103d282610bbf565b90506001600160a01b03811633146103fd5760405163574b16a760e11b815260040160405180910390fd5b600061040984846108b8565b9050806104295760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b03841660009081526004602090815260408083208684529091528120805483929061045c9084906112fb565b90915550506001600160a01b038416600090815260036020526040812080548392906104899084906112fb565b9091555061049a9050848383610cf8565b604080516001600160a01b038481168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505060016000555050565b6000805b82518110156105395761051b8484838151811061050e5761050e611313565b60200260200101516108b8565b61052590836112fb565b91508061053181611329565b9150506104ef565b5092915050565b60405163ad94d90160e01b815233907f0000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f6001600160a01b03169063ad94d901906105909084908690600401611344565b60206040518083038186803b1580156105a857600080fd5b505afa1580156105bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e0919061139a565b6105fd5760405163574b16a760e11b815260040160405180910390fd5b60008060005b845181101561069b5761062e85828151811061062157610621611313565b6020026020010151610886565b92508261063a57610689565b826002600087848151811061065157610651611313565b60200260200101518152602001908152602001600020600082825461067691906112fb565b90915550610686905083836112fb565b91505b8061069381611329565b915050610603565b50806106ba5760405163574b16a760e11b815260040160405180910390fd5b80600160008282546106cc91906112fb565b909155506106dc90508382610d4f565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a150505050565b600260005414156107475760405162461bcd60e51b81526004016103b9906112ae565b6002600090815561075782610bbf565b90506001600160a01b03811633146107825760405163574b16a760e11b815260040160405180910390fd5b600061078d83610886565b9050806107ad5760405163574b16a760e11b815260040160405180910390fd5b600083815260026020526040812080548392906107cb9084906112fb565b9250508190555080600160008282546107e491906112fb565b909155506107f490508282610d4f565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050600160005550565b6000805b82518110156108805761086283828151811061062157610621611313565b61086c90836112fb565b91508061087881611329565b915050610844565b50919050565b60006108b261089460015490565b61089e90476112fb565b600084815260026020526040902054610e68565b92915050565b6001600160a01b03821660009081526003602052604081205461097f906040516370a0823160e01b81523060048201526001600160a01b038616906370a082319060240160206040518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094c91906113bc565b61095691906112fb565b6001600160a01b0385166000908152600460209081526040808320878452909152902054610e68565b9392505050565b600260005414156109a95760405162461bcd60e51b81526004016103b9906112ae565b600260005560405163ad94d90160e01b815233907f0000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f6001600160a01b03169063ad94d901906109fe9084908690600401611344565b60206040518083038186803b158015610a1657600080fd5b505afa158015610a2a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4e919061139a565b610a6b5760405163574b16a760e11b815260040160405180910390fd5b60008060005b8451811015610b1557610a908686838151811061050e5761050e611313565b925082610a9c57610b03565b6001600160a01b03861660009081526004602052604081208651859290889085908110610acb57610acb611313565b602002602001015181526020019081526020016000206000828254610af091906112fb565b90915550610b00905083836112fb565b91505b80610b0d81611329565b915050610a71565b5080610b345760405163574b16a760e11b815260040160405180910390fd5b6001600160a01b03851660009081526003602052604081208054839290610b5c9084906112fb565b90915550610b6d9050858483610cf8565b604080516001600160a01b038581168252602082018590528716917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250506001600055505050565b6040516331a9108f60e11b8152600481018290526000907f0000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f6001600160a01b031690636352211e9060240160206040518083038186803b158015610c2257600080fd5b505afa158015610c36573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b291906113d5565b6040516370a0823160e01b81526001600160a01b0382811660048301526000917f0000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f909116906370a082319060240160206040518083038186803b158015610cc057600080fd5b505afa158015610cd4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b291906113bc565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610d4a908490610f2c565b505050565b80471015610d9f5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016103b9565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610dec576040519150601f19603f3d011682016040523d82523d6000602084013e610df1565b606091505b5050905080610d4a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016103b9565b6000807f0000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610ec457600080fd5b505afa158015610ed8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610efc91906113bc565b610f0690856113f2565b905082811015610f1a5760009150506108b2565b610f248382611414565b949350505050565b6000610f81826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316610ffe9092919063ffffffff16565b805190915015610d4a5780806020019051810190610f9f919061139a565b610d4a5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016103b9565b6060610f24848460008585843b6110575760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103b9565b600080866001600160a01b03168587604051611073919061145b565b60006040518083038185875af1925050503d80600081146110b0576040519150601f19603f3d011682016040523d82523d6000602084013e6110b5565b606091505b50915091506110c58282866110d0565b979650505050505050565b606083156110df57508161097f565b8251156110ef5782518084602001fd5b8160405162461bcd60e51b81526004016103b99190611477565b6001600160a01b038116811461111e57600080fd5b50565b6000806040838503121561113457600080fd5b823561113f81611109565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261117457600080fd5b8135602067ffffffffffffffff808311156111915761119161114d565b8260051b604051601f19603f830116810181811084821117156111b6576111b661114d565b6040529384528581018301938381019250878511156111d457600080fd5b83870191505b848210156110c5578135835291830191908301906111da565b6000806040838503121561120657600080fd5b823561121181611109565b9150602083013567ffffffffffffffff81111561122d57600080fd5b61123985828601611163565b9150509250929050565b60006020828403121561125557600080fd5b813567ffffffffffffffff81111561126c57600080fd5b610f2484828501611163565b60006020828403121561128a57600080fd5b5035919050565b6000602082840312156112a357600080fd5b813561097f81611109565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561130e5761130e6112e5565b500190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561133d5761133d6112e5565b5060010190565b6001600160a01b038316815260406020808301829052835191830182905260009184820191906060850190845b8181101561138d57845183529383019391830191600101611371565b5090979650505050505050565b6000602082840312156113ac57600080fd5b8151801515811461097f57600080fd5b6000602082840312156113ce57600080fd5b5051919050565b6000602082840312156113e757600080fd5b815161097f81611109565b60008261140f57634e487b7160e01b600052601260045260246000fd5b500490565b600082821015611426576114266112e5565b500390565b60005b8381101561144657818101518382015260200161142e565b83811115611455576000848401525b50505050565b6000825161146d81846020870161142b565b9190910192915050565b602081526000825180602084015261149681604085016020870161142b565b601f01601f1916919091016040019291505056fea2646970667358221220ba3399b69c8ecec804b6b2fc2e6db6313659ccb9c5a3cbbaf8e12162de9a18bc64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f
-----Decoded View---------------
Arg [0] : collection (address): 0x1A371de4634c3DEBf7196A1EFc59e620aff0915F
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000001a371de4634c3debf7196a1efc59e620aff0915f
Loading...
Loading
Loading...
Loading
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.