ETH Price: $2,346.28 (+2.49%)
Gas: 0.25 Gwei

Contract

0x0dc79a38f2fDFD6df40F69d9784d2a869b58A137
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

ContractCreator

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Commit Waifus Wi...132208852021-09-14 1:32:481645 days ago1631583168IN
0x0dc79a38...69b58A137
0 ETH0.0102696942.9510994
Reveal Waifus Wi...129432122021-08-02 1:58:581688 days ago1627869538IN
0x0dc79a38...69b58A137
0 ETH0.0050319124
Commit Waifus Wi...129432092021-08-02 1:58:291688 days ago1627869509IN
0x0dc79a38...69b58A137
0 ETH0.0068199723.10000002
Reveal Waifus Wi...129431442021-08-02 1:43:271688 days ago1627868607IN
0x0dc79a38...69b58A137
0 ETH0.0045918221.901
Commit Waifus Wi...129431412021-08-02 1:43:021688 days ago1627868582IN
0x0dc79a38...69b58A137
0 ETH0.0061999721.00000002
Reveal Waifus Wi...128923672021-07-25 0:57:531696 days ago1627174673IN
0x0dc79a38...69b58A137
0 ETH0.0031449415
Commit Waifus Wi...128923652021-07-25 0:57:151696 days ago1627174635IN
0x0dc79a38...69b58A137
0 ETH0.0050939216.3
Reveal Waifus Wi...128467602021-07-17 21:54:281703 days ago1626558868IN
0x0dc79a38...69b58A137
0 ETH0.0036900617.6
Commit Waifus Wi...128467552021-07-17 21:53:281703 days ago1626558808IN
0x0dc79a38...69b58A137
0 ETH0.005812718.6
Commit Waifus Wi...128464582021-07-17 20:45:181703 days ago1626554718IN
0x0dc79a38...69b58A137
0 ETH0.0065627321
Reveal Waifus Wi...127941852021-07-09 16:20:221711 days ago1625847622IN
0x0dc79a38...69b58A137
0 ETH0.005660927.00000156
Commit Waifus Wi...127941802021-07-09 16:18:491711 days ago1625847529IN
0x0dc79a38...69b58A137
0 ETH0.008750328
Reveal Waifus Wi...127940762021-07-09 15:57:581711 days ago1625846278IN
0x0dc79a38...69b58A137
0 ETH0.0060802229
Commit Waifus Wi...127940742021-07-09 15:57:261711 days ago1625846246IN
0x0dc79a38...69b58A137
0 ETH0.0090628129
Commit Waifus Wi...127141342021-06-27 5:06:071724 days ago1624770367IN
0x0dc79a38...69b58A137
0 ETH0.0023910210
Reveal Waifus Wi...126739582021-06-20 22:38:361730 days ago1624228716IN
0x0dc79a38...69b58A137
0 ETH0.0023062911
Commit Waifus Wi...126739552021-06-20 22:38:131730 days ago1624228693IN
0x0dc79a38...69b58A137
0 ETH0.0034376211
Reveal Waifus Wi...126724052021-06-20 17:01:201730 days ago1624208480IN
0x0dc79a38...69b58A137
0 ETH0.0020966310
Commit Waifus Wi...126724032021-06-20 17:01:011730 days ago1624208461IN
0x0dc79a38...69b58A137
0 ETH0.0031251110
Reveal Waifus Wi...126427352021-06-16 2:03:371735 days ago1623809017IN
0x0dc79a38...69b58A137
0 ETH0.0072898717
Commit Waifus Wi...126427272021-06-16 2:03:021735 days ago1623808982IN
0x0dc79a38...69b58A137
0 ETH0.0093382918
Reveal Waifus Wi...126268932021-06-13 15:18:011737 days ago1623597481IN
0x0dc79a38...69b58A137
0 ETH0.0052415725
Reveal Waifus Wi...126267982021-06-13 14:56:141737 days ago1623596174IN
0x0dc79a38...69b58A137
0 ETH0.0028060510
Commit Waifus Wi...126267972021-06-13 14:56:051737 days ago1623596165IN
0x0dc79a38...69b58A137
0 ETH0.0049881110
Reveal Waifus Wi...126161162021-06-11 23:13:091739 days ago1623453189IN
0x0dc79a38...69b58A137
0 ETH0.0035116211
View all transactions

Latest 7 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
-132208852021-09-14 1:32:481645 days ago1631583168
0x0dc79a38...69b58A137
 Contract Creation0 ETH
-127141342021-06-27 5:06:071724 days ago1624770367
0x0dc79a38...69b58A137
 Contract Creation0 ETH
-126267972021-06-13 14:56:051737 days ago1623596165
0x0dc79a38...69b58A137
 Contract Creation0 ETH
-125993452021-06-09 8:38:241742 days ago1623227904
0x0dc79a38...69b58A137
 Contract Creation0 ETH
-125327582021-05-30 1:23:161752 days ago1622337796
0x0dc79a38...69b58A137
 Contract Creation0 ETH
-123128852021-04-26 1:06:461786 days ago1619399206
0x0dc79a38...69b58A137
 Contract Creation0 ETH
-123128122021-04-26 0:51:531786 days ago1619398313
0x0dc79a38...69b58A137
 Contract Creation0 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NFTXDungeonWrapper

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at Etherscan.io on 2021-04-26
*/

/**
 *Submitted for verification at Etherscan.io on 2021-03-14
*/

// Sources flattened with hardhat v2.1.1 https://hardhat.org

// File contracts/utils/Clones.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for
 * deploying minimal proxy contracts, also known as "clones".
 *
 * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies
 * > a minimal bytecode implementation that delegates all calls to a known, fixed address.
 *
 * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2`
 * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the
 * deterministic method.
 *
 * _Available since v3.4._
 */
library Clones {
    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create opcode, which should never revert.
     */
    function clone(address implementation) internal returns (address instance) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create(0, ptr, 0x37)
        }
        require(instance != address(0), "ERC1167: create failed");
    }

    /**
     * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`.
     *
     * This function uses the create2 opcode and a `salt` to deterministically deploy
     * the clone. Using the same `implementation` and `salt` multiple time will revert, since
     * the clones cannot be deployed twice at the same address.
     */
    function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000)
            instance := create2(0, ptr, 0x37, salt)
        }
        require(instance != address(0), "ERC1167: create2 failed");
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt, address deployer) internal pure returns (address predicted) {
        // solhint-disable-next-line no-inline-assembly
        assembly {
            let ptr := mload(0x40)
            mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000)
            mstore(add(ptr, 0x14), shl(0x60, implementation))
            mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000)
            mstore(add(ptr, 0x38), shl(0x60, deployer))
            mstore(add(ptr, 0x4c), salt)
            mstore(add(ptr, 0x6c), keccak256(ptr, 0x37))
            predicted := keccak256(add(ptr, 0x37), 0x55)
        }
    }

    /**
     * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}.
     */
    function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) {
        return predictDeterministicAddress(implementation, salt, address(this));
    }
}


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

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain`call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

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

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

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

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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


// File contracts/token/IERC20.sol


pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    function claim(uint256[] memory indices) external returns (uint256);
    /**
     * @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);
}


// File contracts/token/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);
}


// File contracts/token/IERC721.sol


pragma solidity ^0.8.0;

/**
 * @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;
}


// File contracts/WrapperChild.sol

pragma solidity ^0.8.0;


interface IWrapperChildImpl {
    function initialize(address user) external;
    function unwrap(uint256 num) external;
}

interface IWrapperParent {
  function nftxFund() external view returns (address);
  function xToken() external view returns (address);
  function vaultID() external view returns (uint256);
}

interface INFTXFund {
    function mint(uint256 vaultId, uint256[] memory nftIds, uint256 d2Amount) external;
    function redeem(uint256 game, uint256 option) external;
}

interface IWaifuDungeon {
    function commitSwapWaifus(uint256[] calldata _ids) external;
    function revealWaifus() external;
}

contract WrapperChildImpl {
  IERC721 constant WAIFUSION = IERC721(0x2216d47494E516d8206B70FCa8585820eD3C4946);
  IERC20 constant WET = IERC20(0x76280AF9D18a868a0aF3dcA95b57DDE816c1aaf2);
  IWaifuDungeon constant WAIFU_DUNGEON = IWaifuDungeon(0xB291984262259BcFe6Aa02b66a06e9769C5c1eF3);
  bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
  uint256 private constant UNSET = 1 << 255;
  uint256 private constant MAX_SWAP = 3;

  bool private initialized;
  IWrapperParent public parent;
  address public user; 

  uint256 private receivedNftID;

  function initialize(address _parent, address _user) external {
    require(!initialized, "already initialized");
    initialized = true;

    parent = IWrapperParent(_parent);
    user = _user;
    IERC20(parent.xToken()).approve(parent.nftxFund(), type(uint256).max);
    WET.approve(address(WAIFU_DUNGEON), type(uint256).max);

    WAIFUSION.setApprovalForAll(address(WAIFU_DUNGEON), true);
    receivedNftID = UNSET;
  }

  function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4) {
      if (from == address(WAIFU_DUNGEON)) {
        // Use msg.sender here to allow arbitrary NFTs from dungeon.
        uint256[] memory ids = new uint256[](1);
        ids[0] = tokenId;
        WET.claim(ids);
        IERC721(msg.sender).safeTransferFrom(address(this), user, tokenId);
      } else if (from == address(parent.nftxFund())) {
        receivedNftID = tokenId;
      } else {
        revert("invalid from");
      }
      return _ERC721_RECEIVED;
  }

  function commitSwapWaifus(uint256 num) external onlyParent() {
    IERC20(parent.xToken()).transferFrom(user, address(this), num * 1 ether);
    uint256[] memory ids = new uint256[](num);
    for (uint256 i = 0; i < num; i++) {
      INFTXFund(parent.nftxFund()).redeem(parent.vaultID(), 1);
      ids[i] = receivedNftID;
    }
    WET.transferFrom(user, address(this), num * 5490 ether);
    WAIFU_DUNGEON.commitSwapWaifus(ids);
  }

  function revealWaifus() external onlyParent() {
    WAIFU_DUNGEON.revealWaifus();
    WET.transfer(user, WET.balanceOf(address(this)));
  }

  modifier onlyParent() {
    require(msg.sender == address(parent), "not parent");
    _;
  } 
}

// File contracts/NFTXDungeonWrapper.sol

pragma solidity ^0.8.0;

contract NFTXDungeonWrapper {
  // TODO: Maybe derive some way from NFTX addr.
  address immutable wrapperChildImpl;
  address public nftxFund = 0xAf93fCce0548D3124A5fC3045adAf1ddE4e8Bf7e; 
  address public xToken = 0x0F10E6ec76346c2362897BFe948c8011BB72880F;
  uint256 public vaultID = 37;

  constructor() {
    address impl = address(new WrapperChildImpl());
    wrapperChildImpl = impl;
  }

  function commitWaifusWithNFTX(uint256 num) external {
    address userWrapper = checkChild();
    WrapperChildImpl(userWrapper).commitSwapWaifus(num);
  }

  function revealWaifusWithNFTX() external {
    address userWrapper = checkChild();
    WrapperChildImpl(userWrapper).revealWaifus();
  }

  function userWrapperAddr(address user) public view returns (address) {
    bytes32 salt = keccak256(abi.encodePacked(address(this), user));
    return Clones.predictDeterministicAddress(wrapperChildImpl, salt);
  }

  function checkChild() public returns (address) {
    address properWrapper = userWrapperAddr(msg.sender);
    if (!Address.isContract(properWrapper)) {
      bytes32 salt = keccak256(abi.encodePacked(address(this), msg.sender));
      address wrapper = Clones.cloneDeterministic(wrapperChildImpl, salt);
      WrapperChildImpl(wrapper).initialize(address(this), msg.sender); 
    }
    return properWrapper;
  }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"checkChild","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"num","type":"uint256"}],"name":"commitWaifusWithNFTX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nftxFund","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revealWaifusWithNFTX","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"userWrapperAddr","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"xToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60a060405273af93fcce0548d3124a5fc3045adaf1dde4e8bf7e6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550730f10e6ec76346c2362897bfe948c8011bb72880f600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060256002553480156100be57600080fd5b5060006040516100cd90610129565b604051809103906000f0801580156100e9573d6000803e3d6000fd5b5090508073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050610136565b6119318061093b83390190565b60805160601c6107e061015b600039600081816101a9015261022501526107e06000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80635aa842e41161005b5780635aa842e4146100ee5780636694141b146100f857806379a0746614610116578063eb76dfea146101325761007d565b8063088b699e1461008257806319c4414d146100a057806359af8314146100d0575b600080fd5b61008a610150565b6040516100979190610656565b60405180910390f35b6100ba60048036038101906100b59190610580565b610176565b6040516100c79190610656565b60405180910390f35b6100d86101d6565b6040516100e59190610656565b60405180910390f35b6100f66102c3565b005b610100610332565b60405161010d9190610656565b60405180910390f35b610130600480360381019061012b91906105a9565b610356565b005b61013a6103d1565b60405161014791906106ba565b60405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080308360405160200161018c92919061062a565b6040516020818303038152906040528051906020012090506101ce7f0000000000000000000000000000000000000000000000000000000000000000826103d7565b915050919050565b6000806101e233610176565b90506101ed816103ec565b6102bc576000303360405160200161020692919061062a565b604051602081830303815290604052805190602001209050600061024a7f0000000000000000000000000000000000000000000000000000000000000000836103ff565b90508073ffffffffffffffffffffffffffffffffffffffff1663485cc95530336040518363ffffffff1660e01b8152600401610287929190610671565b600060405180830381600087803b1580156102a157600080fd5b505af11580156102b5573d6000803e3d6000fd5b5050505050505b8091505090565b60006102cd6101d6565b90508073ffffffffffffffffffffffffffffffffffffffff16631e331f526040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561031757600080fd5b505af115801561032b573d6000803e3d6000fd5b5050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006103606101d6565b90508073ffffffffffffffffffffffffffffffffffffffff1663daab874b836040518263ffffffff1660e01b815260040161039b91906106ba565b600060405180830381600087803b1580156103b557600080fd5b505af11580156103c9573d6000803e3d6000fd5b505050505050565b60025481565b60006103e48383306104d6565b905092915050565b600080823b905060008111915050919050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528360601b60148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152826037826000f5915050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156104d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c79061069a565b60405180910390fd5b92915050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528460601b60148201527f5af43d82803e903d91602b57fd5bf3ff0000000000000000000000000000000060288201528260601b603882015283604c82015260378120606c820152605560378201209150509392505050565b6000813590506105658161077c565b92915050565b60008135905061057a81610793565b92915050565b60006020828403121561059257600080fd5b60006105a084828501610556565b91505092915050565b6000602082840312156105bb57600080fd5b60006105c98482850161056b565b91505092915050565b6105db816106e6565b82525050565b6105f26105ed826106e6565b610722565b82525050565b60006106056017836106d5565b915061061082610753565b602082019050919050565b61062481610718565b82525050565b600061063682856105e1565b60148201915061064682846105e1565b6014820191508190509392505050565b600060208201905061066b60008301846105d2565b92915050565b600060408201905061068660008301856105d2565b61069360208301846105d2565b9392505050565b600060208201905081810360008301526106b3816105f8565b9050919050565b60006020820190506106cf600083018461061b565b92915050565b600082825260208201905092915050565b60006106f1826106f8565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061072d82610734565b9050919050565b600061073f82610746565b9050919050565b60008160601b9050919050565b7f455243313136373a2063726561746532206661696c6564000000000000000000600082015250565b610785816106e6565b811461079057600080fd5b50565b61079c81610718565b81146107a757600080fd5b5056fea264697066735822122073421f09d5e34396cc96c86871e0c17da89510420e3d57bbe265612ba745fc1e64736f6c63430008040033608060405234801561001057600080fd5b50611911806100206000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063150b7a02146100675780631e331f5214610097578063485cc955146100a15780634f8632ba146100bd57806360f96a8f146100db578063daab874b146100f9575b600080fd5b610081600480360381019061007c919061128d565b610115565b60405161008e9190611596565b60405180910390f35b61009f61047f565b005b6100bb60048036038101906100b69190611251565b6106e5565b005b6100c5610b52565b6040516100d291906114d0565b60405180910390f35b6100e3610b78565b6040516100f091906115b1565b60405180910390f35b610113600480360381019061010e9190611336565b610b9e565b005b600073b291984262259bcfe6aa02b66a06e9769c5c1ef373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610351576000600167ffffffffffffffff8111156101a2577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156101d05781602001602082028036833780820191505090505b509050848160008151811061020e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020026020010181815250507376280af9d18a868a0af3dca95b57dde816c1aaf273ffffffffffffffffffffffffffffffffffffffff16636ba4c138826040518263ffffffff1660e01b81526004016102679190611574565b602060405180830381600087803b15801561028157600080fd5b505af1158015610295573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102b9919061135f565b503373ffffffffffffffffffffffffffffffffffffffff166342842e0e30600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518463ffffffff1660e01b8152600401610319939291906114eb565b600060405180830381600087803b15801561033357600080fd5b505af1158015610347573d6000803e3d6000fd5b505050505061046c565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636694141b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103b957600080fd5b505afa1580156103cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103f19190611228565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610430578360028190555061046b565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610462906115ec565b60405180910390fd5b5b63150b7a0260e01b905095945050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461050f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105069061160c565b60405180910390fd5b73b291984262259bcfe6aa02b66a06e9769c5c1ef373ffffffffffffffffffffffffffffffffffffffff16631e331f526040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561056b57600080fd5b505af115801561057f573d6000803e3d6000fd5b505050507376280af9d18a868a0af3dca95b57dde816c1aaf273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167376280af9d18a868a0af3dca95b57dde816c1aaf273ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161062391906114d0565b60206040518083038186803b15801561063b57600080fd5b505afa15801561064f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610673919061135f565b6040518363ffffffff1660e01b815260040161069092919061154b565b602060405180830381600087803b1580156106aa57600080fd5b505af11580156106be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106e2919061130d565b50565b60008054906101000a900460ff1615610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072a906115cc565b60405180910390fd5b60016000806101000a81548160ff02191690831515021790555081600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663088b699e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561083757600080fd5b505afa15801561084b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061086f9190611228565b73ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636694141b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f257600080fd5b505afa158015610906573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092a9190611228565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161096892919061154b565b602060405180830381600087803b15801561098257600080fd5b505af1158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba919061130d565b507376280af9d18a868a0af3dca95b57dde816c1aaf273ffffffffffffffffffffffffffffffffffffffff1663095ea7b373b291984262259bcfe6aa02b66a06e9769c5c1ef37fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610a3e92919061154b565b602060405180830381600087803b158015610a5857600080fd5b505af1158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a90919061130d565b50732216d47494e516d8206b70fca8585820ed3c494673ffffffffffffffffffffffffffffffffffffffff1663a22cb46573b291984262259bcfe6aa02b66a06e9769c5c1ef360016040518363ffffffff1660e01b8152600401610af5929190611522565b600060405180830381600087803b158015610b0f57600080fd5b505af1158015610b23573d6000803e3d6000fd5b505050507f80000000000000000000000000000000000000000000000000000000000000006002819055505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c259061160c565b60405180910390fd5b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663088b699e6040518163ffffffff1660e01b815260040160206040518083038186803b158015610c9657600080fd5b505afa158015610caa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cce9190611228565b73ffffffffffffffffffffffffffffffffffffffff166323b872dd600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630670de0b6b3a764000085610d21919061169f565b6040518463ffffffff1660e01b8152600401610d3f939291906114eb565b602060405180830381600087803b158015610d5957600080fd5b505af1158015610d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d91919061130d565b5060008167ffffffffffffffff811115610dd4577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015610e025781602001602082028036833780820191505090505b50905060005b8281101561101757600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636694141b6040518163ffffffff1660e01b815260040160206040518083038186803b158015610e7857600080fd5b505afa158015610e8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eb09190611228565b73ffffffffffffffffffffffffffffffffffffffff16637cbc2373600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663eb76dfea6040518163ffffffff1660e01b815260040160206040518083038186803b158015610f3357600080fd5b505afa158015610f47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6b919061135f565b60016040518363ffffffff1660e01b8152600401610f8a92919061162c565b600060405180830381600087803b158015610fa457600080fd5b505af1158015610fb8573d6000803e3d6000fd5b50505050600254828281518110610ff8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001018181525050808061100f906117a3565b915050610e08565b507376280af9d18a868a0af3dca95b57dde816c1aaf273ffffffffffffffffffffffffffffffffffffffff166323b872dd600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306901299d0e18bbbe88000086611082919061169f565b6040518463ffffffff1660e01b81526004016110a0939291906114eb565b602060405180830381600087803b1580156110ba57600080fd5b505af11580156110ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f2919061130d565b5073b291984262259bcfe6aa02b66a06e9769c5c1ef373ffffffffffffffffffffffffffffffffffffffff16629b1452826040518263ffffffff1660e01b815260040161113f9190611574565b600060405180830381600087803b15801561115957600080fd5b505af115801561116d573d6000803e3d6000fd5b505050505050565b60008135905061118481611896565b92915050565b60008151905061119981611896565b92915050565b6000815190506111ae816118ad565b92915050565b60008083601f8401126111c657600080fd5b8235905067ffffffffffffffff8111156111df57600080fd5b6020830191508360018202830111156111f757600080fd5b9250929050565b60008135905061120d816118c4565b92915050565b600081519050611222816118c4565b92915050565b60006020828403121561123a57600080fd5b60006112488482850161118a565b91505092915050565b6000806040838503121561126457600080fd5b600061127285828601611175565b925050602061128385828601611175565b9150509250929050565b6000806000806000608086880312156112a557600080fd5b60006112b388828901611175565b95505060206112c488828901611175565b94505060406112d5888289016111fe565b935050606086013567ffffffffffffffff8111156112f257600080fd5b6112fe888289016111b4565b92509250509295509295909350565b60006020828403121561131f57600080fd5b600061132d8482850161119f565b91505092915050565b60006020828403121561134857600080fd5b6000611356848285016111fe565b91505092915050565b60006020828403121561137157600080fd5b600061137f84828501611213565b91505092915050565b600061139483836114b2565b60208301905092915050565b6113a9816116f9565b82525050565b60006113ba82611665565b6113c4818561167d565b93506113cf83611655565b8060005b838110156114005781516113e78882611388565b97506113f283611670565b9250506001810190506113d3565b5085935050505092915050565b6114168161170b565b82525050565b61142581611717565b82525050565b6114348161176d565b82525050565b61144381611791565b82525050565b600061145660138361168e565b91506114618261181b565b602082019050919050565b6000611479600c8361168e565b915061148482611844565b602082019050919050565b600061149c600a8361168e565b91506114a78261186d565b602082019050919050565b6114bb81611763565b82525050565b6114ca81611763565b82525050565b60006020820190506114e560008301846113a0565b92915050565b600060608201905061150060008301866113a0565b61150d60208301856113a0565b61151a60408301846114c1565b949350505050565b600060408201905061153760008301856113a0565b611544602083018461140d565b9392505050565b600060408201905061156060008301856113a0565b61156d60208301846114c1565b9392505050565b6000602082019050818103600083015261158e81846113af565b905092915050565b60006020820190506115ab600083018461141c565b92915050565b60006020820190506115c6600083018461142b565b92915050565b600060208201905081810360008301526115e581611449565b9050919050565b600060208201905081810360008301526116058161146c565b9050919050565b600060208201905081810360008301526116258161148f565b9050919050565b600060408201905061164160008301856114c1565b61164e602083018461143a565b9392505050565b6000819050602082019050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006116aa82611763565b91506116b583611763565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156116ee576116ed6117ec565b5b828202905092915050565b600061170482611743565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006117788261177f565b9050919050565b600061178a82611743565b9050919050565b600061179c82611763565b9050919050565b60006117ae82611763565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156117e1576117e06117ec565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f616c726561647920696e697469616c697a656400000000000000000000000000600082015250565b7f696e76616c69642066726f6d0000000000000000000000000000000000000000600082015250565b7f6e6f7420706172656e7400000000000000000000000000000000000000000000600082015250565b61189f816116f9565b81146118aa57600080fd5b50565b6118b68161170b565b81146118c157600080fd5b50565b6118cd81611763565b81146118d857600080fd5b5056fea2646970667358221220462f3ed3dd2bb25ccb7023b90e652c583d5340bc7eff6de3feee973c127bede564736f6c63430008040033

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061007d5760003560e01c80635aa842e41161005b5780635aa842e4146100ee5780636694141b146100f857806379a0746614610116578063eb76dfea146101325761007d565b8063088b699e1461008257806319c4414d146100a057806359af8314146100d0575b600080fd5b61008a610150565b6040516100979190610656565b60405180910390f35b6100ba60048036038101906100b59190610580565b610176565b6040516100c79190610656565b60405180910390f35b6100d86101d6565b6040516100e59190610656565b60405180910390f35b6100f66102c3565b005b610100610332565b60405161010d9190610656565b60405180910390f35b610130600480360381019061012b91906105a9565b610356565b005b61013a6103d1565b60405161014791906106ba565b60405180910390f35b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080308360405160200161018c92919061062a565b6040516020818303038152906040528051906020012090506101ce7f000000000000000000000000360847dd95801b47586df6982dc7966e73e9e390826103d7565b915050919050565b6000806101e233610176565b90506101ed816103ec565b6102bc576000303360405160200161020692919061062a565b604051602081830303815290604052805190602001209050600061024a7f000000000000000000000000360847dd95801b47586df6982dc7966e73e9e390836103ff565b90508073ffffffffffffffffffffffffffffffffffffffff1663485cc95530336040518363ffffffff1660e01b8152600401610287929190610671565b600060405180830381600087803b1580156102a157600080fd5b505af11580156102b5573d6000803e3d6000fd5b5050505050505b8091505090565b60006102cd6101d6565b90508073ffffffffffffffffffffffffffffffffffffffff16631e331f526040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561031757600080fd5b505af115801561032b573d6000803e3d6000fd5b5050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006103606101d6565b90508073ffffffffffffffffffffffffffffffffffffffff1663daab874b836040518263ffffffff1660e01b815260040161039b91906106ba565b600060405180830381600087803b1580156103b557600080fd5b505af11580156103c9573d6000803e3d6000fd5b505050505050565b60025481565b60006103e48383306104d6565b905092915050565b600080823b905060008111915050919050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528360601b60148201527f5af43d82803e903d91602b57fd5bf300000000000000000000000000000000006028820152826037826000f5915050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156104d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c79061069a565b60405180910390fd5b92915050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528460601b60148201527f5af43d82803e903d91602b57fd5bf3ff0000000000000000000000000000000060288201528260601b603882015283604c82015260378120606c820152605560378201209150509392505050565b6000813590506105658161077c565b92915050565b60008135905061057a81610793565b92915050565b60006020828403121561059257600080fd5b60006105a084828501610556565b91505092915050565b6000602082840312156105bb57600080fd5b60006105c98482850161056b565b91505092915050565b6105db816106e6565b82525050565b6105f26105ed826106e6565b610722565b82525050565b60006106056017836106d5565b915061061082610753565b602082019050919050565b61062481610718565b82525050565b600061063682856105e1565b60148201915061064682846105e1565b6014820191508190509392505050565b600060208201905061066b60008301846105d2565b92915050565b600060408201905061068660008301856105d2565b61069360208301846105d2565b9392505050565b600060208201905081810360008301526106b3816105f8565b9050919050565b60006020820190506106cf600083018461061b565b92915050565b600082825260208201905092915050565b60006106f1826106f8565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061072d82610734565b9050919050565b600061073f82610746565b9050919050565b60008160601b9050919050565b7f455243313136373a2063726561746532206661696c6564000000000000000000600082015250565b610785816106e6565b811461079057600080fd5b50565b61079c81610718565b81146107a757600080fd5b5056fea264697066735822122073421f09d5e34396cc96c86871e0c17da89510420e3d57bbe265612ba745fc1e64736f6c63430008040033

Deployed Bytecode Sourcemap

23329:1363:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23525:66;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;24047:217;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;24270:419;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;23902:139;;;:::i;:::-;;23451:68;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;23739:157;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;23596:27;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;23525:66;;;;;;;;;;;;;:::o;24047:217::-;24107:7;24123:12;24173:4;24180;24148:37;;;;;;;;;:::i;:::-;;;;;;;;;;;;;24138:48;;;;;;24123:63;;24200:58;24235:16;24253:4;24200:34;:58::i;:::-;24193:65;;;24047:217;;;:::o;24270:419::-;24308:7;24324:21;24348:27;24364:10;24348:15;:27::i;:::-;24324:51;;24387:33;24406:13;24387:18;:33::i;:::-;24382:275;;24431:12;24481:4;24488:10;24456:43;;;;;;;;;:::i;:::-;;;;;;;;;;;;;24446:54;;;;;;24431:69;;24509:15;24527:49;24553:16;24571:4;24527:25;:49::i;:::-;24509:67;;24602:7;24585:36;;;24630:4;24637:10;24585:63;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;24382:275;;;24670:13;24663:20;;;24270:419;:::o;23902:139::-;23950:19;23972:12;:10;:12::i;:::-;23950:34;;24008:11;23991:42;;;:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23902:139;:::o;23451:68::-;;;;;;;;;;;;:::o;23739:157::-;23798:19;23820:12;:10;:12::i;:::-;23798:34;;23856:11;23839:46;;;23886:3;23839:51;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23739:157;;:::o;23596:27::-;;;;:::o;3655:207::-;3753:17;3790:64;3818:14;3834:4;3848;3790:27;:64::i;:::-;3783:71;;3655:207;;;;:::o;4620:422::-;4680:4;4888:12;4999:7;4987:20;4979:28;;5033:1;5026:4;:8;5019:15;;;4620:422;;;:::o;2067:616::-;2151:16;2278:4;2272:11;2309:66;2304:3;2297:79;2423:14;2417:4;2413:25;2406:4;2401:3;2397:14;2390:49;2476:66;2469:4;2464:3;2460:14;2453:90;2591:4;2585;2580:3;2577:1;2569:27;2557:39;;2246:361;2645:1;2625:22;;:8;:22;;;;2617:58;;;;;;;;;;;;:::i;:::-;;;;;;;;;2067:616;;;;:::o;2798:742::-;2914:17;3042:4;3036:11;3073:66;3068:3;3061:79;3187:14;3181:4;3177:25;3170:4;3165:3;3161:14;3154:49;3240:66;3233:4;3228:3;3224:14;3217:90;3354:8;3348:4;3344:19;3337:4;3332:3;3328:14;3321:43;3401:4;3394;3389:3;3385:14;3378:28;3458:4;3453:3;3443:20;3436:4;3431:3;3427:14;3420:44;3517:4;3510;3505:3;3501:14;3491:31;3478:44;;3010:523;;;;;;:::o;7:139:1:-;53:5;91:6;78:20;69:29;;107:33;134:5;107:33;:::i;:::-;59:87;;;;:::o;152:139::-;198:5;236:6;223:20;214:29;;252:33;279:5;252:33;:::i;:::-;204:87;;;;:::o;297:262::-;356:6;405:2;393:9;384:7;380:23;376:32;373:2;;;421:1;418;411:12;373:2;464:1;489:53;534:7;525:6;514:9;510:22;489:53;:::i;:::-;479:63;;435:117;363:196;;;;:::o;565:262::-;624:6;673:2;661:9;652:7;648:23;644:32;641:2;;;689:1;686;679:12;641:2;732:1;757:53;802:7;793:6;782:9;778:22;757:53;:::i;:::-;747:63;;703:117;631:196;;;;:::o;833:118::-;920:24;938:5;920:24;:::i;:::-;915:3;908:37;898:53;;:::o;957:157::-;1062:45;1082:24;1100:5;1082:24;:::i;:::-;1062:45;:::i;:::-;1057:3;1050:58;1040:74;;:::o;1120:366::-;1262:3;1283:67;1347:2;1342:3;1283:67;:::i;:::-;1276:74;;1359:93;1448:3;1359:93;:::i;:::-;1477:2;1472:3;1468:12;1461:19;;1266:220;;;:::o;1492:118::-;1579:24;1597:5;1579:24;:::i;:::-;1574:3;1567:37;1557:53;;:::o;1616:397::-;1756:3;1771:75;1842:3;1833:6;1771:75;:::i;:::-;1871:2;1866:3;1862:12;1855:19;;1884:75;1955:3;1946:6;1884:75;:::i;:::-;1984:2;1979:3;1975:12;1968:19;;2004:3;1997:10;;1760:253;;;;;:::o;2019:222::-;2112:4;2150:2;2139:9;2135:18;2127:26;;2163:71;2231:1;2220:9;2216:17;2207:6;2163:71;:::i;:::-;2117:124;;;;:::o;2247:332::-;2368:4;2406:2;2395:9;2391:18;2383:26;;2419:71;2487:1;2476:9;2472:17;2463:6;2419:71;:::i;:::-;2500:72;2568:2;2557:9;2553:18;2544:6;2500:72;:::i;:::-;2373:206;;;;;:::o;2585:419::-;2751:4;2789:2;2778:9;2774:18;2766:26;;2838:9;2832:4;2828:20;2824:1;2813:9;2809:17;2802:47;2866:131;2992:4;2866:131;:::i;:::-;2858:139;;2756:248;;;:::o;3010:222::-;3103:4;3141:2;3130:9;3126:18;3118:26;;3154:71;3222:1;3211:9;3207:17;3198:6;3154:71;:::i;:::-;3108:124;;;;:::o;3238:169::-;3322:11;3356:6;3351:3;3344:19;3396:4;3391:3;3387:14;3372:29;;3334:73;;;;:::o;3413:96::-;3450:7;3479:24;3497:5;3479:24;:::i;:::-;3468:35;;3458:51;;;:::o;3515:126::-;3552:7;3592:42;3585:5;3581:54;3570:65;;3560:81;;;:::o;3647:77::-;3684:7;3713:5;3702:16;;3692:32;;;:::o;3730:100::-;3769:7;3798:26;3818:5;3798:26;:::i;:::-;3787:37;;3777:53;;;:::o;3836:94::-;3875:7;3904:20;3918:5;3904:20;:::i;:::-;3893:31;;3883:47;;;:::o;3936:94::-;3969:8;4017:5;4013:2;4009:14;3988:35;;3978:52;;;:::o;4036:173::-;4176:25;4172:1;4164:6;4160:14;4153:49;4142:67;:::o;4215:122::-;4288:24;4306:5;4288:24;:::i;:::-;4281:5;4278:35;4268:2;;4327:1;4324;4317:12;4268:2;4258:79;:::o;4343:122::-;4416:24;4434:5;4416:24;:::i;:::-;4409:5;4406:35;4396:2;;4455:1;4452;4445:12;4396:2;4386:79;:::o

Swarm Source

ipfs://462f3ed3dd2bb25ccb7023b90e652c583d5340bc7eff6de3feee973c127bede5

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.