ETH Price: $2,424.52 (-1.35%)
 

Overview

Max Total Supply

0 PROP

Holders

35

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
Genesis Talk: Deployer
Balance
1 PROP
0x3e6c23cdaa52b1b6621dbb30c367d16ace21f760
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
PropHouse

Compiler Version
v0.8.21+commit.d9974bed

Optimization Enabled:
Yes with 10000 runs

Other Settings:
paris EvmVersion
File 1 of 26 : PropHouse.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { IManager } from './interfaces/IManager.sol';
import { AssetController } from './lib/utils/AssetController.sol';
import { IDepositReceiver } from './interfaces/IDepositReceiver.sol';
import { AssetHelper } from './lib/utils/AssetHelper.sol';
import { AssetType, Asset } from './lib/types/Common.sol';
import { IPropHouse } from './interfaces/IPropHouse.sol';
import { LibClone } from 'solady/src/utils/LibClone.sol';
import { Uint256 } from './lib/utils/Uint256.sol';
import { IHouse } from './interfaces/IHouse.sol';
import { IRound } from './interfaces/IRound.sol';
import { ERC721 } from './lib/token/ERC721.sol';
import { PHMetadata } from './Constants.sol';

/// @notice The entrypoint for house and round creation
contract PropHouse is IPropHouse, ERC721, AssetController {
    using { Uint256.toUint256 } for address;
    using { AssetHelper.toID } for Asset;
    using LibClone for address;

    /// @notice The Prop House manager contract
    IManager public immutable manager;

    /// @param _manager The Prop House manager contract address
    constructor(address _manager) ERC721(PHMetadata.NAME, PHMetadata.SYMBOL) {
        manager = IManager(_manager);

        _setContractURI(PHMetadata.URI);
    }

    /// @notice Returns house metadata for `tokenId`
    /// @param tokenId The token ID
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        return manager.getMetadataRenderer(address(this)).tokenURI(tokenId);
    }

    /// @notice Deposit an asset to the provided round and return any remaining
    /// ether to the caller.
    /// @param round The round to deposit to
    /// @param asset The asset to transfer to the round
    /// @dev For safety, this function validates the round before the transfer
    function depositTo(address payable round, Asset calldata asset) external payable {
        if (!isRound(round)) {
            revert INVALID_ROUND();
        }

        uint256 etherRemaining = _depositTo(msg.sender, round, asset);
        if (etherRemaining != 0) {
            _transferETH(payable(msg.sender), etherRemaining);
        }
    }

    /// @notice Deposit many assets to the provided round and return any remaining
    /// ether to the caller.
    /// @param round The round to deposit to
    /// @param assets The assets to transfer to the round
    /// @dev For safety, this function validates the round before the transfer
    function batchDepositTo(address payable round, Asset[] calldata assets) external payable {
        if (!isRound(round)) {
            revert INVALID_ROUND();
        }

        uint256 etherRemaining = _batchDepositTo(msg.sender, round, assets);
        if (etherRemaining != 0) {
            _transferETH(payable(msg.sender), etherRemaining);
        }
    }

    /// @notice Create a round on an existing house
    /// @param house The house to create the round on
    /// @param newRound The round creation data
    function createRoundOnExistingHouse(
        address house,
        Round calldata newRound
    ) external payable returns (address round) {
        if (!isHouse(house)) {
            revert INVALID_HOUSE();
        }
        if (!manager.isRoundRegistered(_getImpl(house), newRound.impl)) {
            revert INVALID_ROUND_IMPL_FOR_HOUSE();
        }

        round = _createRound(house, newRound);
        IRound(round).initialize{ value: msg.value }(newRound.config);
    }

    /// @notice Create a round on an existing house and deposit assets to the round
    /// @param house The house to create the round on
    /// @param newRound The round creation data
    /// @param assets Assets to deposit to the round
    function createAndFundRoundOnExistingHouse(
        address house,
        Round calldata newRound,
        Asset[] calldata assets
    ) external payable returns (address round) {
        if (!isHouse(house)) {
            revert INVALID_HOUSE();
        }
        if (!manager.isRoundRegistered(_getImpl(house), newRound.impl)) {
            revert INVALID_ROUND_IMPL_FOR_HOUSE();
        }

        round = _createRound(house, newRound);

        uint256 etherRemaining = _batchDepositTo(msg.sender, payable(round), assets);
        IRound(round).initialize{ value: etherRemaining }(newRound.config);
    }

    /// @notice Create a round on a new house
    /// @param newHouse The house creation data
    /// @param newRound The round creation data
    function createRoundOnNewHouse(
        House calldata newHouse,
        Round calldata newRound
    ) external payable returns (address house, address round) {
        if (!manager.isHouseRegistered(newHouse.impl)) {
            revert INVALID_HOUSE_IMPL();
        }
        if (!manager.isRoundRegistered(newHouse.impl, newRound.impl)) {
            revert INVALID_ROUND_IMPL_FOR_HOUSE();
        }

        house = _createHouse(newHouse);
        round = _createRound(house, newRound);

        IRound(round).initialize{ value: msg.value }(newRound.config);
    }

    /// @notice Create a round on a new house and deposit assets to the round
    /// @param newHouse The house creation data
    /// @param newRound The round creation data
    /// @param assets Assets to deposit to the round
    function createAndFundRoundOnNewHouse(
        House calldata newHouse,
        Round calldata newRound,
        Asset[] calldata assets
    ) external payable returns (address house, address round) {
        if (!manager.isHouseRegistered(newHouse.impl)) {
            revert INVALID_HOUSE_IMPL();
        }
        if (!manager.isRoundRegistered(newHouse.impl, newRound.impl)) {
            revert INVALID_ROUND_IMPL_FOR_HOUSE();
        }

        house = _createHouse(newHouse);
        round = _createRound(house, newRound);

        uint256 etherRemaining = _batchDepositTo(msg.sender, payable(round), assets);
        IRound(round).initialize{ value: etherRemaining }(newRound.config);
    }

    /// @notice Create a new house
    /// @param newHouse The house creation data
    function createHouse(House calldata newHouse) external returns (address house) {
        if (!manager.isHouseRegistered(newHouse.impl)) {
            revert INVALID_HOUSE_IMPL();
        }
        house = _createHouse(newHouse);
    }

    /// @notice Returns `true` if the passed `house` address is valid
    /// @param house The house address
    function isHouse(address house) public view returns (bool) {
        return exists(house.toUint256());
    }

    /// @notice Returns `true` if the passed `round` address is valid on any house
    /// @param round The round address
    function isRound(address round) public view returns (bool) {
        try IRound(round).house() returns (address house) {
            return isHouse(house) && IHouse(house).isRound(round);
        } catch {
            return false;
        }
    }

    /// @notice Create and initialize a new house contract
    /// @param newHouse The house creation data
    function _createHouse(House memory newHouse) internal returns (address house) {
        house = newHouse.impl.clone();

        // Mint the ownership token to the house creator
        _mint(msg.sender, house.toUint256());

        emit HouseCreated(msg.sender, house, IHouse(house).kind());

        IHouse(house).initialize(newHouse.config);
    }

    /// @notice Create a new round and emit an event
    /// @param house The house address on which to create the round
    /// @param newRound The round creation data
    function _createRound(address house, Round calldata newRound) internal returns (address round) {
        round = IHouse(house).createRound(newRound.impl, newRound.title, msg.sender);

        emit RoundCreated(msg.sender, house, round, IRound(round).kind(), newRound.title, newRound.description);
    }

    /// @notice Deposit an asset to the provided round
    /// @param user The user depositing the asset
    /// @param round The round address
    /// @param asset The asset to transfer to the round
    function _depositTo(address user, address payable round, Asset memory asset) internal returns (uint256) {
        uint256 etherRemaining = msg.value;

        // Reduce amount of remaining ether, if necessary
        if (asset.assetType == AssetType.Native) {
            // Ensure that sufficient native tokens are still available.
            if (asset.amount > etherRemaining) {
                revert INSUFFICIENT_ETHER_SUPPLIED();
            }
            // Skip underflow check as a comparison has just been made
            unchecked {
                etherRemaining -= asset.amount;
            }
        }

        _transfer(asset, user, round);

        emit DepositToRound(user, round, asset);

        // If supported, call the round's deposit receiver callback
        if (IRound(round).supportsInterface(type(IDepositReceiver).interfaceId)) {
            IDepositReceiver(round).onDepositReceived(user, asset.toID(), asset.amount);
        }
        return etherRemaining;
    }

    /// @notice Deposit many assets to the provided round
    /// @param user The user depositing the assets
    /// @param round The round address
    /// @param assets The assets to transfer to the strategy
    function _batchDepositTo(address user, address payable round, Asset[] memory assets) internal returns (uint256) {
        uint256 assetCount = assets.length;

        uint256 etherRemaining = msg.value;

        uint256[] memory assetIds = new uint256[](assetCount);
        uint256[] memory assetAmounts = new uint256[](assetCount);
        for (uint256 i = 0; i < assetCount; ) {
            // Populate asset IDs and amounts in preparation for deposit token minting
            assetIds[i] = assets[i].toID();
            assetAmounts[i] = assets[i].amount;

            // Reduce amount of remaining ether, if necessary
            if (assets[i].assetType == AssetType.Native) {
                // Ensure that sufficient native tokens are still available.
                if (assets[i].amount > etherRemaining) {
                    revert INSUFFICIENT_ETHER_SUPPLIED();
                }

                // Skip underflow check as a comparison has just been made
                unchecked {
                    etherRemaining -= assets[i].amount;
                }
            }

            _transfer(assets[i], user, round);

            unchecked {
                ++i;
            }
        }

        emit BatchDepositToRound(user, round, assets);

        // If supported, call the round's deposit receiver callback
        if (IRound(round).supportsInterface(type(IDepositReceiver).interfaceId)) {
            IDepositReceiver(round).onDepositsReceived(user, assetIds, assetAmounts);
        }
        return etherRemaining;
    }

    /// @notice Returns the implementation address for the provided `clone`
    /// @param clone The clone contract address
    function _getImpl(address clone) internal view returns (address impl) {
        assembly {
            extcodecopy(clone, 0x0, 0xB, 0x14)
            impl := shr(0x60, mload(0x0))
        }
    }
}

File 2 of 26 : IManager.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { ITokenMetadataRenderer } from './ITokenMetadataRenderer.sol';

/// @notice Interface for the Manager contract
interface IManager {
    /// @notice Emitted when a house implementation is registered
    /// @param houseImpl The house implementation address
    /// @param houseType The house implementation type
    event HouseRegistered(address houseImpl, bytes32 houseType);

    /// @notice Emitted when a house implementation is unregistered
    /// @param houseImpl The house implementation address
    event HouseUnregistered(address houseImpl);

    /// @notice Emitted when a round implementation is registered on a house
    /// @param houseImpl The house implementation address
    /// @param roundImpl The round implementation address
    /// @param roundType The round implementation type
    event RoundRegistered(address houseImpl, address roundImpl, bytes32 roundType);

    /// @notice Emitted when a round implementation is unregistered on a house
    /// @param houseImpl The house implementation address
    /// @param roundImpl The round implementation address
    event RoundUnregistered(address houseImpl, address roundImpl);

    /// @notice Emitted when a metadata renderer is set for a contract
    /// @param addr The contract address
    /// @param renderer The renderer address
    event MetadataRendererSet(address addr, address renderer);

    /// @notice Emitted when the security council address is set
    /// @param securityCouncil The security council address
    event SecurityCouncilSet(address securityCouncil);

    /// @notice Determine if a house implementation is registered
    /// @param houseImpl The house implementation address
    function isHouseRegistered(address houseImpl) external view returns (bool);

    /// @notice Determine if a round implementation is registered on the provided house
    /// @param houseImpl The house implementation address
    /// @param roundImpl The round implementation address
    function isRoundRegistered(address houseImpl, address roundImpl) external view returns (bool);

    /// @notice Get the metadata renderer for a contract
    /// @param contract_ The contract address
    function getMetadataRenderer(address contract_) external view returns (ITokenMetadataRenderer);

    /// @notice Get the security council address
    function getSecurityCouncil() external view returns (address);
}

File 3 of 26 : AssetController.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { IERC20 } from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import { IERC1155 } from '@openzeppelin/contracts/token/ERC1155/IERC1155.sol';
import { SafeERC20 } from '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import { AssetType, Asset } from '../types/Common.sol';

abstract contract AssetController {
    using SafeERC20 for IERC20;

    /// @notice Thrown when unused asset parameters are populated
    error UNUSED_ASSET_PARAMETERS();

    /// @notice Thrown when an ether transfer does not succeed
    error ETHER_TRANSFER_FAILED();

    /// @notice Thrown when the ERC721 transfer amount is not equal to one
    error INVALID_ERC721_TRANSFER_AMOUNT();

    /// @notice Thrown when an unknown asset type is provided
    error INVALID_ASSET_TYPE();

    /// @notice Thrown when no asset amount is provided
    error MISSING_ASSET_AMOUNT();

    /// @dev Returns the balance of `asset` for `account`
    /// @param asset The asset to fetch the balance of
    /// @param account The account to fetch the balance for
    function _balanceOf(Asset memory asset, address account) internal view returns (uint256) {
        if (asset.assetType == AssetType.Native) {
            return account.balance;
        }
        if (asset.assetType == AssetType.ERC20) {
            return IERC20(asset.token).balanceOf(account);
        }
        if (asset.assetType == AssetType.ERC721) {
            return IERC721(asset.token).ownerOf(asset.identifier) == account ? 1 : 0;
        }
        if (asset.assetType == AssetType.ERC1155) {
            return IERC1155(asset.token).balanceOf(account, asset.identifier);
        }
        revert INVALID_ASSET_TYPE();
    }

    /// @dev Transfer a given asset from the provided `from` address to the `to` address
    /// @param asset The asset to transfer, including the asset amount
    /// @param source The account supplying the asset
    /// @param recipient The asset recipient
    function _transfer(Asset memory asset, address source, address payable recipient) internal {
        if (asset.assetType == AssetType.Native) {
            // Ensure neither the token nor the identifier parameters are set
            if ((uint160(asset.token) | asset.identifier) != 0) {
                revert UNUSED_ASSET_PARAMETERS();
            }

            _transferETH(recipient, asset.amount);
        } else if (asset.assetType == AssetType.ERC20) {
            // Ensure that no identifier is supplied
            if (asset.identifier != 0) {
                revert UNUSED_ASSET_PARAMETERS();
            }

            _transferERC20(asset.token, source, recipient, asset.amount);
        } else if (asset.assetType == AssetType.ERC721) {
            _transferERC721(asset.token, asset.identifier, source, recipient, asset.amount);
        } else if (asset.assetType == AssetType.ERC1155) {
            _transferERC1155(asset.token, asset.identifier, source, recipient, asset.amount);
        } else {
            revert INVALID_ASSET_TYPE();
        }
    }

    /// @notice Transfers one or more assets from the provided `from` address to the `to` address
    /// @param assets The assets to transfer, including the asset amounts
    /// @param source The account supplying the assets
    /// @param recipient The asset recipient
    function _transferMany(Asset[] memory assets, address source, address payable recipient) internal {
        uint256 assetCount = assets.length;
        for (uint256 i = 0; i < assetCount; ) {
            _transfer(assets[i], source, recipient);
            unchecked {
                ++i;
            }
        }
    }

    /// @notice Transfers ETH to a recipient address
    /// @param recipient The transfer recipient
    /// @param amount The amount of ETH to transfer
    function _transferETH(address payable recipient, uint256 amount) internal {
        _assertNonZeroAmount(amount);

        bool success;
        assembly {
            success := call(10000, recipient, amount, 0, 0, 0, 0)
        }
        if (!success) {
            revert ETHER_TRANSFER_FAILED();
        }
    }

    /// @notice Transfers ERC20 tokens from a provided account to a recipient address
    /// @param token The token to transfer
    /// @param source The transfer source
    /// @param recipient The transfer recipient
    /// @param amount The amount to transfer
    function _transferERC20(address token, address source, address recipient, uint256 amount) internal {
        _assertNonZeroAmount(amount);

        // Use `transfer` if the source is this contract
        if (source == address(this)) {
            IERC20(token).safeTransfer(recipient, amount);
        } else {
            IERC20(token).safeTransferFrom(source, recipient, amount);
        }
    }

    /// @notice Transfers an ERC721 token to a recipient address
    /// @param token The token to transfer
    /// @param identifier The ID of the token to transfer
    /// @param source The transfer source
    /// @param recipient The transfer recipient
    /// @param amount The token amount (Must be 1)
    function _transferERC721(
        address token,
        uint256 identifier,
        address source,
        address recipient,
        uint256 amount
    ) internal {
        if (amount != 1) {
            revert INVALID_ERC721_TRANSFER_AMOUNT();
        }
        IERC721(token).transferFrom(source, recipient, identifier);
    }

    /// @notice Transfers ERC1155 tokens to a recipient address
    /// @param token The token to transfer
    /// @param identifier The ID of the token to transfer
    /// @param source The transfer source
    /// @param recipient The transfer recipient
    /// @param amount The amount to transfer
    function _transferERC1155(
        address token,
        uint256 identifier,
        address source,
        address recipient,
        uint256 amount
    ) internal {
        _assertNonZeroAmount(amount);

        IERC1155(token).safeTransferFrom(source, recipient, identifier, amount, new bytes(0));
    }

    /// @dev Ensure that a given asset amount is not zero
    /// @param amount The amount to check
    function _assertNonZeroAmount(uint256 amount) internal pure {
        // Revert if the supplied amount is equal to zero
        if (amount == 0) {
            revert MISSING_ASSET_AMOUNT();
        }
    }
}

File 4 of 26 : IDepositReceiver.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { IRound } from './IRound.sol';

/// @notice Interface that can be implemented by rounds that receive deposits
interface IDepositReceiver is IRound {
    /// @notice A callback that is called when a deposit is received
    function onDepositReceived(address depositor, uint256 id, uint256 amount) external;

    /// @notice A callback that is called when a batch of deposits is received
    function onDepositsReceived(address depositor, uint256[] calldata ids, uint256[] calldata amounts) external;
}

File 5 of 26 : AssetHelper.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { Asset, AssetType, PackedAsset } from '../types/Common.sol';

library AssetHelper {
    /// @notice Returns the packed asset information for a single asset
    /// @param asset The asset information
    function pack(Asset memory asset) internal pure returns (PackedAsset memory packed) {
        unchecked {
            packed = PackedAsset({ assetId: toID(asset), amount: asset.amount });
        }
    }

    /// @notice Returns the packed asset information for the provided assets
    /// @param assets The asset information
    function packMany(Asset[] memory assets) internal pure returns (PackedAsset[] memory packed) {
        unchecked {
            uint256 assetCount = assets.length;
            packed = new PackedAsset[](assetCount);

            for (uint256 i = 0; i < assetCount; ++i) {
                packed[i] = pack(assets[i]);
            }
        }
    }

    /// @notice Calculates the asset IDs for the provided assets
    /// @param assets The asset information
    function toIDs(Asset[] memory assets) internal pure returns (uint256[] memory ids) {
        unchecked {
            uint256 assetCount = assets.length;
            ids = new uint256[](assetCount);

            for (uint256 i = 0; i < assetCount; ++i) {
                ids[i] = toID(assets[i]);
            }
        }
    }

    /// @dev Calculates the asset ID for the provided asset
    /// @param asset The asset information
    function toID(Asset memory asset) internal pure returns (uint256) {
        if (asset.assetType == AssetType.Native) {
            return uint256(asset.assetType);
        }
        if (asset.assetType == AssetType.ERC20) {
            return uint256(bytes32(abi.encodePacked(asset.assetType, asset.token)));
        }
        // prettier-ignore
        return uint256(
            bytes32(abi.encodePacked(asset.assetType, keccak256(abi.encodePacked(asset.token, asset.identifier))))
        );
    }
}

File 6 of 26 : Common.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

/// @notice Supported asset types
enum AssetType {
    Native,
    ERC20,
    ERC721,
    ERC1155
}

/// @notice Common struct for all supported asset types
struct Asset {
    AssetType assetType;
    address token;
    uint256 identifier;
    uint256 amount;
}

/// @notice Packed asset information, which consists of an asset ID and amount
struct PackedAsset {
    uint256 assetId;
    uint256 amount;
}

/// @notice Merkle proof information for an incremental tree
struct IncrementalTreeProof {
    bytes32[] siblings;
    uint8[] pathIndices;
}

/// @notice A meta-transaction relayer address and deposit amount
struct MetaTransaction {
    address relayer;
    uint256 deposit;
}

File 7 of 26 : IPropHouse.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { Asset } from '../lib/types/Common.sol';
import { IERC721 } from './IERC721.sol';

/// @notice Interface implemented by the Prop House entry contract
interface IPropHouse is IERC721 {
    /// @notice House creation data, including the implementation contract and config
    struct House {
        address impl;
        bytes config;
    }

    /// @notice Round creation data, including the implementation contract, config, and other metadata
    struct Round {
        address impl;
        bytes config;
        string title;
        string description;
    }

    /// @notice Thrown when an insufficient amount of ether is provided to `msg.value`
    error INSUFFICIENT_ETHER_SUPPLIED();

    /// @notice Thrown when a provided house is invalid
    error INVALID_HOUSE();

    /// @notice Thrown when a provided round is invalid
    error INVALID_ROUND();

    /// @notice Thrown when a provided house implementation is invalid
    error INVALID_HOUSE_IMPL();

    /// @notice Thrown when a round implementation contract is invalid for a house
    error INVALID_ROUND_IMPL_FOR_HOUSE();

    /// @notice Thrown when a house attempts to pull tokens from a user who has not approved it
    error HOUSE_NOT_APPROVED_BY_USER();

    /// @notice Emitted when a house is created
    /// @param creator The house creator
    /// @param house The house contract address
    /// @param kind The house contract type
    event HouseCreated(address indexed creator, address indexed house, bytes32 kind);

    /// @notice Emitted when a round is created
    /// @param creator The round creator
    /// @param house The house that the round was created on
    /// @param round The round contract address
    /// @param kind The round contract type
    /// @param title The round title
    /// @param description The round description
    event RoundCreated(
        address indexed creator,
        address indexed house,
        address indexed round,
        bytes32 kind,
        string title,
        string description
    );

    /// @notice Emitted when an asset is deposited to a round
    /// @param from The user who deposited the asset
    /// @param round The round that received the asset
    /// @param asset The asset information
    event DepositToRound(address from, address round, Asset asset);

    /// @notice Emitted when one or more assets are deposited to a round
    /// @param from The user who deposited the asset(s)
    /// @param round The round that received the asset(s)
    /// @param assets The asset information
    event BatchDepositToRound(address from, address round, Asset[] assets);

    /// @notice Returns `true` if the passed `house` address is valid
    /// @param house The house address
    function isHouse(address house) external view returns (bool);

    /// @notice Returns `true` if the passed `round` address is valid on any house
    /// @param round The round address
    function isRound(address round) external view returns (bool);
}

File 8 of 26 : LibClone.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/// @notice Minimal proxy library.
/// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibClone.sol)
/// @author Minimal proxy by 0age (https://github.com/0age)
/// @author Clones with immutable args by wighawag, zefram.eth, Saw-mon & Natalie
/// (https://github.com/Saw-mon-and-Natalie/clones-with-immutable-args)
///
/// @dev Minimal proxy:
/// Although the sw0nt pattern saves 5 gas over the erc-1167 pattern during runtime,
/// it is not supported out-of-the-box on Etherscan. Hence, we choose to use the 0age pattern,
/// which saves 4 gas over the erc-1167 pattern during runtime, and has the smallest bytecode.
///
/// @dev Clones with immutable args (CWIA):
/// The implementation of CWIA here implements a `receive()` method that emits the
/// `ReceiveETH(uint256)` event. This skips the `DELEGATECALL` when there is no calldata,
/// enabling us to accept hard gas-capped `sends` & `transfers` for maximum backwards
/// composability. The minimal proxy implementation does not offer this feature.
library LibClone {
    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                       CUSTOM ERRORS                        */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Unable to deploy the clone.
    error DeploymentFailed();

    /// @dev The salt must start with either the zero address or the caller.
    error SaltDoesNotStartWithCaller();

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                  MINIMAL PROXY OPERATIONS                  */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Deploys a clone of `implementation`.
    function clone(address implementation) internal returns (address instance) {
        /// @solidity memory-safe-assembly
        assembly {
            /**
             * --------------------------------------------------------------------------+
             * CREATION (9 bytes)                                                        |
             * --------------------------------------------------------------------------|
             * Opcode     | Mnemonic          | Stack     | Memory                       |
             * --------------------------------------------------------------------------|
             * 60 runSize | PUSH1 runSize     | r         |                              |
             * 3d         | RETURNDATASIZE    | 0 r       |                              |
             * 81         | DUP2              | r 0 r     |                              |
             * 60 offset  | PUSH1 offset      | o r 0 r   |                              |
             * 3d         | RETURNDATASIZE    | 0 o r 0 r |                              |
             * 39         | CODECOPY          | 0 r       | [0..runSize): runtime code   |
             * f3         | RETURN            |           | [0..runSize): runtime code   |
             * --------------------------------------------------------------------------|
             * RUNTIME (44 bytes)                                                        |
             * --------------------------------------------------------------------------|
             * Opcode  | Mnemonic       | Stack                  | Memory                |
             * --------------------------------------------------------------------------|
             *                                                                           |
             * ::: keep some values in stack ::::::::::::::::::::::::::::::::::::::::::: |
             * 3d      | RETURNDATASIZE | 0                      |                       |
             * 3d      | RETURNDATASIZE | 0 0                    |                       |
             * 3d      | RETURNDATASIZE | 0 0 0                  |                       |
             * 3d      | RETURNDATASIZE | 0 0 0 0                |                       |
             *                                                                           |
             * ::: copy calldata to memory ::::::::::::::::::::::::::::::::::::::::::::: |
             * 36      | CALLDATASIZE   | cds 0 0 0 0            |                       |
             * 3d      | RETURNDATASIZE | 0 cds 0 0 0 0          |                       |
             * 3d      | RETURNDATASIZE | 0 0 cds 0 0 0 0        |                       |
             * 37      | CALLDATACOPY   | 0 0 0 0                | [0..cds): calldata    |
             *                                                                           |
             * ::: delegate call to the implementation contract :::::::::::::::::::::::: |
             * 36      | CALLDATASIZE   | cds 0 0 0 0            | [0..cds): calldata    |
             * 3d      | RETURNDATASIZE | 0 cds 0 0 0 0          | [0..cds): calldata    |
             * 73 addr | PUSH20 addr    | addr 0 cds 0 0 0 0     | [0..cds): calldata    |
             * 5a      | GAS            | gas addr 0 cds 0 0 0 0 | [0..cds): calldata    |
             * f4      | DELEGATECALL   | success 0 0            | [0..cds): calldata    |
             *                                                                           |
             * ::: copy return data to memory :::::::::::::::::::::::::::::::::::::::::: |
             * 3d      | RETURNDATASIZE | rds success 0 0        | [0..cds): calldata    |
             * 3d      | RETURNDATASIZE | rds rds success 0 0    | [0..cds): calldata    |
             * 93      | SWAP4          | 0 rds success 0 rds    | [0..cds): calldata    |
             * 80      | DUP1           | 0 0 rds success 0 rds  | [0..cds): calldata    |
             * 3e      | RETURNDATACOPY | success 0 rds          | [0..rds): returndata  |
             *                                                                           |
             * 60 0x2a | PUSH1 0x2a     | 0x2a success 0 rds     | [0..rds): returndata  |
             * 57      | JUMPI          | 0 rds                  | [0..rds): returndata  |
             *                                                                           |
             * ::: revert :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
             * fd      | REVERT         |                        | [0..rds): returndata  |
             *                                                                           |
             * ::: return :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
             * 5b      | JUMPDEST       | 0 rds                  | [0..rds): returndata  |
             * f3      | RETURN         |                        | [0..rds): returndata  |
             * --------------------------------------------------------------------------+
             */

            mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)
            mstore(0x14, implementation)
            mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)
            instance := create(0, 0x0c, 0x35)
            // Restore the part of the free memory pointer that has been overwritten.
            mstore(0x21, 0)
            // If `instance` is zero, revert.
            if iszero(instance) {
                // Store the function selector of `DeploymentFailed()`.
                mstore(0x00, 0x30116425)
                // Revert with (offset, size).
                revert(0x1c, 0x04)
            }
        }
    }

    /// @dev Deploys a deterministic clone of `implementation` with `salt`.
    function cloneDeterministic(address implementation, bytes32 salt)
        internal
        returns (address instance)
    {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)
            mstore(0x14, implementation)
            mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)
            instance := create2(0, 0x0c, 0x35, salt)
            // Restore the part of the free memory pointer that has been overwritten.
            mstore(0x21, 0)
            // If `instance` is zero, revert.
            if iszero(instance) {
                // Store the function selector of `DeploymentFailed()`.
                mstore(0x00, 0x30116425)
                // Revert with (offset, size).
                revert(0x1c, 0x04)
            }
        }
    }

    /// @dev Returns the initialization code hash of the clone of `implementation`.
    /// Used for mining vanity addresses with create2crunch.
    function initCodeHash(address implementation) internal pure returns (bytes32 hash) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x21, 0x5af43d3d93803e602a57fd5bf3)
            mstore(0x14, implementation)
            mstore(0x00, 0x602c3d8160093d39f33d3d3d3d363d3d37363d73)
            hash := keccak256(0x0c, 0x35)
            // Restore the part of the free memory pointer that has been overwritten.
            mstore(0x21, 0)
        }
    }

    /// @dev Returns the address of the deterministic clone of `implementation`,
    /// with `salt` by `deployer`.
    function predictDeterministicAddress(address implementation, bytes32 salt, address deployer)
        internal
        pure
        returns (address predicted)
    {
        bytes32 hash = initCodeHash(implementation);
        predicted = predictDeterministicAddress(hash, salt, deployer);
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*           CLONES WITH IMMUTABLE ARGS OPERATIONS            */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Deploys a minimal proxy with `implementation`,
    /// using immutable arguments encoded in `data`.
    function clone(address implementation, bytes memory data) internal returns (address instance) {
        assembly {
            // Compute the boundaries of the data and cache the memory slots around it.
            let mBefore3 := mload(sub(data, 0x60))
            let mBefore2 := mload(sub(data, 0x40))
            let mBefore1 := mload(sub(data, 0x20))
            let dataLength := mload(data)
            let dataEnd := add(add(data, 0x20), dataLength)
            let mAfter1 := mload(dataEnd)

            // +2 bytes for telling how much data there is appended to the call.
            let extraLength := add(dataLength, 2)
            // The `creationSize` is `extraLength + 108`
            // The `runSize` is `creationSize - 10`.

            /**
             * ---------------------------------------------------------------------------------------------------+
             * CREATION (10 bytes)                                                                                |
             * ---------------------------------------------------------------------------------------------------|
             * Opcode     | Mnemonic          | Stack     | Memory                                                |
             * ---------------------------------------------------------------------------------------------------|
             * 61 runSize | PUSH2 runSize     | r         |                                                       |
             * 3d         | RETURNDATASIZE    | 0 r       |                                                       |
             * 81         | DUP2              | r 0 r     |                                                       |
             * 60 offset  | PUSH1 offset      | o r 0 r   |                                                       |
             * 3d         | RETURNDATASIZE    | 0 o r 0 r |                                                       |
             * 39         | CODECOPY          | 0 r       | [0..runSize): runtime code                            |
             * f3         | RETURN            |           | [0..runSize): runtime code                            |
             * ---------------------------------------------------------------------------------------------------|
             * RUNTIME (98 bytes + extraLength)                                                                   |
             * ---------------------------------------------------------------------------------------------------|
             * Opcode   | Mnemonic       | Stack                    | Memory                                      |
             * ---------------------------------------------------------------------------------------------------|
             *                                                                                                    |
             * ::: if no calldata, emit event & return w/o `DELEGATECALL` ::::::::::::::::::::::::::::::::::::::: |
             * 36       | CALLDATASIZE   | cds                      |                                             |
             * 60 0x2c  | PUSH1 0x2c     | 0x2c cds                 |                                             |
             * 57       | JUMPI          |                          |                                             |
             * 34       | CALLVALUE      | cv                       |                                             |
             * 3d       | RETURNDATASIZE | 0 cv                     |                                             |
             * 52       | MSTORE         |                          | [0..0x20): callvalue                        |
             * 7f sig   | PUSH32 0x9e..  | sig                      | [0..0x20): callvalue                        |
             * 59       | MSIZE          | 0x20 sig                 | [0..0x20): callvalue                        |
             * 3d       | RETURNDATASIZE | 0 0x20 sig               | [0..0x20): callvalue                        |
             * a1       | LOG1           |                          | [0..0x20): callvalue                        |
             * 00       | STOP           |                          | [0..0x20): callvalue                        |
             * 5b       | JUMPDEST       |                          |                                             |
             *                                                                                                    |
             * ::: copy calldata to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
             * 36       | CALLDATASIZE   | cds                      |                                             |
             * 3d       | RETURNDATASIZE | 0 cds                    |                                             |
             * 3d       | RETURNDATASIZE | 0 0 cds                  |                                             |
             * 37       | CALLDATACOPY   |                          | [0..cds): calldata                          |
             *                                                                                                    |
             * ::: keep some values in stack :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
             * 3d       | RETURNDATASIZE | 0                        | [0..cds): calldata                          |
             * 3d       | RETURNDATASIZE | 0 0                      | [0..cds): calldata                          |
             * 3d       | RETURNDATASIZE | 0 0 0                    | [0..cds): calldata                          |
             * 3d       | RETURNDATASIZE | 0 0 0 0                  | [0..cds): calldata                          |
             * 61 extra | PUSH2 extra    | e 0 0 0 0                | [0..cds): calldata                          |
             *                                                                                                    |
             * ::: copy extra data to memory :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
             * 80       | DUP1           | e e 0 0 0 0              | [0..cds): calldata                          |
             * 60 0x62  | PUSH1 0x62     | 0x62 e e 0 0 0 0         | [0..cds): calldata                          |
             * 36       | CALLDATASIZE   | cds 0x62 e e 0 0 0 0     | [0..cds): calldata                          |
             * 39       | CODECOPY       | e 0 0 0 0                | [0..cds): calldata, [cds..cds+e): extraData |
             *                                                                                                    |
             * ::: delegate call to the implementation contract ::::::::::::::::::::::::::::::::::::::::::::::::: |
             * 36       | CALLDATASIZE   | cds e 0 0 0 0            | [0..cds): calldata, [cds..cds+e): extraData |
             * 01       | ADD            | cds+e 0 0 0 0            | [0..cds): calldata, [cds..cds+e): extraData |
             * 3d       | RETURNDATASIZE | 0 cds+e 0 0 0 0          | [0..cds): calldata, [cds..cds+e): extraData |
             * 73 addr  | PUSH20 addr    | addr 0 cds+e 0 0 0 0     | [0..cds): calldata, [cds..cds+e): extraData |
             * 5a       | GAS            | gas addr 0 cds+e 0 0 0 0 | [0..cds): calldata, [cds..cds+e): extraData |
             * f4       | DELEGATECALL   | success 0 0              | [0..cds): calldata, [cds..cds+e): extraData |
             *                                                                                                    |
             * ::: copy return data to memory ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
             * 3d       | RETURNDATASIZE | rds success 0 0          | [0..cds): calldata, [cds..cds+e): extraData |
             * 3d       | RETURNDATASIZE | rds rds success 0 0      | [0..cds): calldata, [cds..cds+e): extraData |
             * 93       | SWAP4          | 0 rds success 0 rds      | [0..cds): calldata, [cds..cds+e): extraData |
             * 80       | DUP1           | 0 0 rds success 0 rds    | [0..cds): calldata, [cds..cds+e): extraData |
             * 3e       | RETURNDATACOPY | success 0 rds            | [0..rds): returndata                        |
             *                                                                                                    |
             * 60 0x60  | PUSH1 0x60     | 0x60 success 0 rds       | [0..rds): returndata                        |
             * 57       | JUMPI          | 0 rds                    | [0..rds): returndata                        |
             *                                                                                                    |
             * ::: revert ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
             * fd       | REVERT         |                          | [0..rds): returndata                        |
             *                                                                                                    |
             * ::: return ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: |
             * 5b       | JUMPDEST       | 0 rds                    | [0..rds): returndata                        |
             * f3       | RETURN         |                          | [0..rds): returndata                        |
             * ---------------------------------------------------------------------------------------------------+
             */
            // Write the bytecode before the data.
            mstore(data, 0x5af43d3d93803e606057fd5bf3)
            // Write the address of the implementation.
            mstore(sub(data, 0x0d), implementation)
            // Write the rest of the bytecode.
            mstore(
                sub(data, 0x21),
                or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)
            )
            // `keccak256("ReceiveETH(uint256)")`
            mstore(
                sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff
            )
            mstore(
                sub(data, 0x5a),
                or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)
            )
            mstore(dataEnd, shl(0xf0, extraLength))

            // Create the instance.
            instance := create(0, sub(data, 0x4c), add(extraLength, 0x6c))

            // If `instance` is zero, revert.
            if iszero(instance) {
                // Store the function selector of `DeploymentFailed()`.
                mstore(0x00, 0x30116425)
                // Revert with (offset, size).
                revert(0x1c, 0x04)
            }

            // Restore the overwritten memory surrounding `data`.
            mstore(dataEnd, mAfter1)
            mstore(data, dataLength)
            mstore(sub(data, 0x20), mBefore1)
            mstore(sub(data, 0x40), mBefore2)
            mstore(sub(data, 0x60), mBefore3)
        }
    }

    /// @dev Deploys a deterministic clone of `implementation`,
    /// using immutable arguments encoded in `data`, with `salt`.
    function cloneDeterministic(address implementation, bytes memory data, bytes32 salt)
        internal
        returns (address instance)
    {
        assembly {
            // Compute the boundaries of the data and cache the memory slots around it.
            let mBefore3 := mload(sub(data, 0x60))
            let mBefore2 := mload(sub(data, 0x40))
            let mBefore1 := mload(sub(data, 0x20))
            let dataLength := mload(data)
            let dataEnd := add(add(data, 0x20), dataLength)
            let mAfter1 := mload(dataEnd)

            // +2 bytes for telling how much data there is appended to the call.
            let extraLength := add(dataLength, 2)

            // Write the bytecode before the data.
            mstore(data, 0x5af43d3d93803e606057fd5bf3)
            // Write the address of the implementation.
            mstore(sub(data, 0x0d), implementation)
            // Write the rest of the bytecode.
            mstore(
                sub(data, 0x21),
                or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)
            )
            // `keccak256("ReceiveETH(uint256)")`
            mstore(
                sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff
            )
            mstore(
                sub(data, 0x5a),
                or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)
            )
            mstore(dataEnd, shl(0xf0, extraLength))

            // Create the instance.
            instance := create2(0, sub(data, 0x4c), add(extraLength, 0x6c), salt)

            // If `instance` is zero, revert.
            if iszero(instance) {
                // Store the function selector of `DeploymentFailed()`.
                mstore(0x00, 0x30116425)
                // Revert with (offset, size).
                revert(0x1c, 0x04)
            }

            // Restore the overwritten memory surrounding `data`.
            mstore(dataEnd, mAfter1)
            mstore(data, dataLength)
            mstore(sub(data, 0x20), mBefore1)
            mstore(sub(data, 0x40), mBefore2)
            mstore(sub(data, 0x60), mBefore3)
        }
    }

    /// @dev Returns the initialization code hash of the clone of `implementation`
    /// using immutable arguments encoded in `data`.
    /// Used for mining vanity addresses with create2crunch.
    function initCodeHash(address implementation, bytes memory data)
        internal
        pure
        returns (bytes32 hash)
    {
        assembly {
            // Compute the boundaries of the data and cache the memory slots around it.
            let mBefore3 := mload(sub(data, 0x60))
            let mBefore2 := mload(sub(data, 0x40))
            let mBefore1 := mload(sub(data, 0x20))
            let dataLength := mload(data)
            let dataEnd := add(add(data, 0x20), dataLength)
            let mAfter1 := mload(dataEnd)

            // +2 bytes for telling how much data there is appended to the call.
            let extraLength := add(dataLength, 2)

            // Write the bytecode before the data.
            mstore(data, 0x5af43d3d93803e606057fd5bf3)
            // Write the address of the implementation.
            mstore(sub(data, 0x0d), implementation)
            // Write the rest of the bytecode.
            mstore(
                sub(data, 0x21),
                or(shl(0x48, extraLength), 0x593da1005b363d3d373d3d3d3d610000806062363936013d73)
            )
            // `keccak256("ReceiveETH(uint256)")`
            mstore(
                sub(data, 0x3a), 0x9e4ac34f21c619cefc926c8bd93b54bf5a39c7ab2127a895af1cc0691d7e3dff
            )
            mstore(
                sub(data, 0x5a),
                or(shl(0x78, add(extraLength, 0x62)), 0x6100003d81600a3d39f336602c57343d527f)
            )
            mstore(dataEnd, shl(0xf0, extraLength))

            // Compute and store the bytecode hash.
            hash := keccak256(sub(data, 0x4c), add(extraLength, 0x6c))

            // Restore the overwritten memory surrounding `data`.
            mstore(dataEnd, mAfter1)
            mstore(data, dataLength)
            mstore(sub(data, 0x20), mBefore1)
            mstore(sub(data, 0x40), mBefore2)
            mstore(sub(data, 0x60), mBefore3)
        }
    }

    /// @dev Returns the address of the deterministic clone of
    /// `implementation` using immutable arguments encoded in `data`, with `salt`, by `deployer`.
    function predictDeterministicAddress(
        address implementation,
        bytes memory data,
        bytes32 salt,
        address deployer
    ) internal pure returns (address predicted) {
        bytes32 hash = initCodeHash(implementation, data);
        predicted = predictDeterministicAddress(hash, salt, deployer);
    }

    /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
    /*                      OTHER OPERATIONS                      */
    /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/

    /// @dev Returns the address when a contract with initialization code hash,
    /// `hash`, is deployed with `salt`, by `deployer`.
    function predictDeterministicAddress(bytes32 hash, bytes32 salt, address deployer)
        internal
        pure
        returns (address predicted)
    {
        /// @solidity memory-safe-assembly
        assembly {
            // Compute and store the bytecode hash.
            mstore8(0x00, 0xff) // Write the prefix.
            mstore(0x35, hash)
            mstore(0x01, shl(96, deployer))
            mstore(0x15, salt)
            predicted := keccak256(0x00, 0x55)
            // Restore the part of the free memory pointer that has been overwritten.
            mstore(0x35, 0)
        }
    }

    /// @dev Reverts if `salt` does not start with either the zero address or the caller.
    function checkStartsWithCaller(bytes32 salt) internal view {
        /// @solidity memory-safe-assembly
        assembly {
            // If the salt does not start with the zero address or the caller.
            if iszero(or(iszero(shr(96, salt)), eq(caller(), shr(96, salt)))) {
                // Store the function selector of `SaltDoesNotStartWithCaller()`.
                mstore(0x00, 0x2f634836)
                // Revert with (offset, size).
                revert(0x1c, 0x04)
            }
        }
    }
}

File 9 of 26 : Uint256.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { MAX_250_BIT_UNSIGNED } from '../../Constants.sol';

library Uint256 {
    /// @notice Split a uint256 into a high and low value
    /// @param value The uint256 value to split
    /// @dev This is useful for passing uint256 values to Starknet, whose felt
    /// type only supports 251 bits.
    function split(uint256 value) internal pure returns (uint256, uint256) {
        uint256 low = value & ((1 << 128) - 1);
        uint256 high = value >> 128;
        return (low, high);
    }

    /// Mask the passed `value` to 250 bits
    /// @param value The value to mask
    function mask250(bytes32 value) internal pure returns (uint256) {
        return uint256(value) & MAX_250_BIT_UNSIGNED;
    }

    /// @notice Convert an address to a uint256
    /// @param addr The address to convert
    function toUint256(address addr) internal pure returns (uint256) {
        return uint256(uint160(addr));
    }
}

File 10 of 26 : IHouse.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { IERC721 } from './IERC721.sol';

/// @notice Common House interface
interface IHouse is IERC721 {
    /// @notice Thrown when the caller is not the prop house contract
    error ONLY_PROP_HOUSE();

    /// @notice Thrown when the caller does not hold the house ownership token
    error ONLY_HOUSE_OWNER();

    /// @notice Thrown when the provided value does not fit into 8 bits
    error VALUE_DOES_NOT_FIT_IN_8_BITS();

    /// @notice The house type
    function kind() external view returns (bytes32);

    /// @notice Initialize the house
    /// @param data Initialization data
    function initialize(bytes calldata data) external;

    /// @notice Returns `true` if the provided address is a valid round on the house
    /// @param round The round to validate
    function isRound(address round) external view returns (bool);

    /// @notice Create a new round
    /// @param impl The round implementation contract
    /// @param title The round title
    /// @param creator The round creator address
    function createRound(address impl, string calldata title, address creator) external returns (address);
}

File 11 of 26 : IRound.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { IERC165 } from './IERC165.sol';

/// @notice Interface that must be implemented by all round types
interface IRound is IERC165 {
    /// @notice Thrown when the caller of a guarded function is not the prop house contract
    error ONLY_PROP_HOUSE();

    /// @notice Thrown when the caller of a guarded function is not the round manager
    error ONLY_ROUND_MANAGER();

    /// @notice Thrown when the address of a provided strategy is zero
    /// @param strategy The address of the strategy
    error INVALID_STRATEGY(uint256 strategy);

    /// @notice The round type
    function kind() external view returns (bytes32);

    /// @notice Get the round title
    function title() external pure returns (string memory);

    /// @notice Initialize the round
    /// @param data The optional round data. If empty, round registration is deferred.
    function initialize(bytes calldata data) external payable;

    /// @notice The house that the round belongs to
    function house() external view returns (address);

    /// @notice The round ID
    function id() external view returns (uint256);
}

File 12 of 26 : ERC721.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { IERC721 } from '../../interfaces/IERC721.sol';
import { ERC721TokenReceiver } from '../utils/TokenReceiver.sol';
import { ImmutableStrings } from '../utils/ImmutableStrings.sol';
import { Address } from '../utils/Address.sol';

/// @title ERC721
/// @notice Modified from Rohan Kulkarni's work for Nouns Builder
/// Originally modified from OpenZeppelin Contracts v4.7.3 (token/ERC721/ERC721Upgradeable.sol)
/// - Uses custom errors declared in IERC721
/// - Includes contract-level metadata via `contractURI`
/// - Uses immutable name and symbol via `ImmutableStrings`
abstract contract ERC721 is IERC721 {
    using ImmutableStrings for string;
    using ImmutableStrings for ImmutableStrings.ImmutableString;

    /// @notice The token name
    ImmutableStrings.ImmutableString internal immutable _name;

    /// @notice The token symbol
    ImmutableStrings.ImmutableString internal immutable _symbol;

    /// @notice Contract-level metadata
    string public contractURI;

    /// @notice The token owners
    /// @dev ERC-721 token id => Owner
    mapping(uint256 => address) internal owners;

    /// @notice The owner balances
    /// @dev Owner => Balance
    mapping(address => uint256) internal balances;

    /// @notice The token approvals
    /// @dev ERC-721 token id => Manager
    mapping(uint256 => address) internal tokenApprovals;

    /// @notice The balance approvals
    /// @dev Owner => Operator => Approved
    mapping(address => mapping(address => bool)) internal operatorApprovals;

    /// @param name_ The token name
    /// @param symbol_ The token symbol
    constructor(string memory name_, string memory symbol_) {
        _name = name_.toImmutableString();
        _symbol = symbol_.toImmutableString();
    }

    /// @notice The token URI
    /// @param tokenId The ERC-721 token id
    function tokenURI(uint256 tokenId) public view virtual returns (string memory) {}

    /// @notice The token name
    function name() public view virtual returns (string memory) {
        return _name.toString();
    }

    /// @notice The token symbol
    function symbol() public view virtual returns (string memory) {
        return _symbol.toString();
    }

    /// @notice If the contract implements an interface
    /// @param interfaceId The interface id
    function supportsInterface(bytes4 interfaceId) external pure returns (bool) {
        return
            interfaceId == 0x01ffc9a7 || // ERC165 Interface ID
            interfaceId == 0x80ac58cd || // ERC721 Interface ID
            interfaceId == 0x5b5e139f; // ERC721Metadata Interface ID
    }

    /// @notice The account approved to manage a token
    /// @param tokenId The ERC-721 token id
    function getApproved(uint256 tokenId) external view returns (address) {
        return tokenApprovals[tokenId];
    }

    /// @notice If an operator is authorized to manage all of an owner's tokens
    /// @param owner The owner address
    /// @param operator The operator address
    function isApprovedForAll(address owner, address operator) external view returns (bool) {
        return operatorApprovals[owner][operator];
    }

    /// @notice The number of tokens owned
    /// @param owner The owner address
    function balanceOf(address owner) public view returns (uint256) {
        if (owner == address(0)) revert ADDRESS_ZERO();

        return balances[owner];
    }

    /// @notice Returns whether `tokenId` exists.
    /// @param tokenId The ERC-721 token id
    function exists(uint256 tokenId) public view returns (bool) {
        return owners[tokenId] != address(0);
    }

    /// @notice The owner of a token
    /// @param tokenId The ERC-721 token id
    function ownerOf(uint256 tokenId) public view returns (address) {
        address owner = owners[tokenId];

        if (owner == address(0)) revert INVALID_OWNER();

        return owner;
    }

    /// @notice Authorizes an account to manage a token
    /// @param to The account address
    /// @param tokenId The ERC-721 token id
    function approve(address to, uint256 tokenId) external {
        address owner = owners[tokenId];

        if (msg.sender != owner && !operatorApprovals[owner][msg.sender]) revert INVALID_APPROVAL();

        tokenApprovals[tokenId] = to;

        emit Approval(owner, to, tokenId);
    }

    /// @notice Authorizes an account to manage all tokens
    /// @param operator The account address
    /// @param approved If permission is being given or removed
    function setApprovalForAll(address operator, bool approved) external {
        operatorApprovals[msg.sender][operator] = approved;

        emit ApprovalForAll(msg.sender, operator, approved);
    }

    /// @notice Transfers a token from sender to recipient
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    function transferFrom(address from, address to, uint256 tokenId) public {
        if (from != owners[tokenId]) revert INVALID_OWNER();

        if (to == address(0)) revert ADDRESS_ZERO();

        if (msg.sender != from && !operatorApprovals[from][msg.sender] && msg.sender != tokenApprovals[tokenId])
            revert INVALID_APPROVAL();

        _beforeTokenTransfer(from, to, tokenId);

        unchecked {
            --balances[from];

            ++balances[to];
        }

        owners[tokenId] = to;

        delete tokenApprovals[tokenId];

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /// @notice Safe transfers a token from sender to recipient
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    function safeTransferFrom(address from, address to, uint256 tokenId) external {
        transferFrom(from, to, tokenId);

        if (
            Address.isContract(to) &&
            ERC721TokenReceiver(to).onERC721Received(msg.sender, from, tokenId, '') !=
            ERC721TokenReceiver.onERC721Received.selector
        ) revert INVALID_RECIPIENT();
    }

    /// @notice Safe transfers a token from sender to recipient with additional data
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external {
        transferFrom(from, to, tokenId);

        if (
            Address.isContract(to) &&
            ERC721TokenReceiver(to).onERC721Received(msg.sender, from, tokenId, data) !=
            ERC721TokenReceiver.onERC721Received.selector
        ) revert INVALID_RECIPIENT();
    }

    /// @dev Updates the contract URI
    /// @param _contractURI The new contract URI
    function _setContractURI(string memory _contractURI) internal {
        contractURI = _contractURI;

        emit ContractURIUpdated(_contractURI);
    }

    /// @dev Mints a token to a recipient
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    function _mint(address to, uint256 tokenId) internal virtual {
        if (to == address(0)) revert ADDRESS_ZERO();

        if (owners[tokenId] != address(0)) revert ALREADY_MINTED();

        _beforeTokenTransfer(address(0), to, tokenId);

        unchecked {
            ++balances[to];
        }

        owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /// @dev Burns a token to a recipient
    /// @param tokenId The ERC-721 token id
    function _burn(uint256 tokenId) internal virtual {
        address owner = owners[tokenId];

        if (owner == address(0)) revert NOT_MINTED();

        _beforeTokenTransfer(owner, address(0), tokenId);

        unchecked {
            --balances[owner];
        }

        delete owners[tokenId];

        delete tokenApprovals[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /// @dev Hook called before a token transfer
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual {}

    /// @dev Hook called after a token transfer
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    function _afterTokenTransfer(address from, address to, uint256 tokenId) internal virtual {}
}

File 13 of 26 : Constants.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

// ETH pseudo-token address
address constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

// The maximum value that can be represented as an unsigned 250-bit integer
uint256 constant MAX_250_BIT_UNSIGNED = 0x03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;

/// @notice Starknet function selector constants
library Selector {
    // print(get_selector_from_name("register_round"))
    uint256 constant REGISTER_ROUND = 0x26490f901ea8ad5a245d987479919f1d20fbb0c164367e33ef09a9ea4ba8d04;

    // print(get_selector_from_name("cancel_round"))
    uint256 constant CANCEL_ROUND = 0x8af3ea41808c9515720e56add54a2d8008458a8bc5e347b791c6d75cd0e407;

    // print(get_selector_from_name("finalize_round"))
    uint256 constant FINALIZE_ROUND = 0x2445872c1b7a1219e1e75f2a60719ce0a68a8442fee1bdbee6c3c649340e6f3;

    // print(get_selector_from_name("route_call_to_round"))
    uint256 constant ROUTE_CALL_TO_ROUND = 0x24931ca109ce0ffa87913d91f12d6ac327550c015a573c7b17a187c29ed8c1a;
}

/// @notice Prop House metadata constants
library PHMetadata {
    // The Prop House NFT name
    string constant NAME = 'Prop House';

    // The Prop House entrypoint NFT symbol
    string constant SYMBOL = 'PROP';

    // The Prop House entrypoint NFT contract URI
    string constant URI = 'ipfs://bafkreiagexn2wbv5t63y2xbf6mmcx3rktrqxrsyzf5gl5l7c2lm3bkqjc4';
}

/// @notice Community house metadata constants
library CHMetadata {
    // The Community House type
    bytes32 constant TYPE = 'COMMUNITY';

    // The Community House NFT name
    string constant NAME = 'Community House';

    // The Community House NFT symbol
    string constant SYMBOL = 'COMM';
}

/// @notice Round type constants
library RoundType {
    // The Timed Round type
    bytes32 constant TIMED = 'TIMED';

    // The Infinite Round type
    bytes32 constant INFINITE = 'INFINITE';
}

File 14 of 26 : ITokenMetadataRenderer.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

interface ITokenMetadataRenderer {
    /// @notice Returns metadata for `tokenId` as a Base64-JSON blob
    /// @param tokenId The token ID
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 16 of 26 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (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`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 17 of 26 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 19 of 26 : IERC721.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

/// @title IERC721
/// @notice The external ERC721 events, errors, and functions
interface IERC721 {
    /// @dev Thrown when a caller is not authorized to approve or transfer a token
    error INVALID_APPROVAL();

    /// @dev Thrown when a transfer is called with the incorrect token owner
    error INVALID_OWNER();

    /// @dev Thrown when a transfer is attempted to address(0)
    error INVALID_RECIPIENT();

    /// @dev Thrown when an existing token is called to be minted
    error ALREADY_MINTED();

    /// @dev Thrown when a non-existent token is called to be burned
    error NOT_MINTED();

    /// @dev Thrown when address(0) is incorrectly provided
    error ADDRESS_ZERO();

    /// @notice Emitted when a token is transferred from sender to recipient
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /// @notice Emitted when an owner approves an account to manage a token
    /// @param owner The owner address
    /// @param approved The account address
    /// @param tokenId The ERC-721 token id
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /// @notice Emitted when an owner sets an approval for a spender to manage all tokens
    /// @param owner The owner address
    /// @param operator The spender address
    /// @param approved If the approval is being set or removed
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /// @notice Emitted when the contract URI is updated
    /// @param uri The updated contract URI
    event ContractURIUpdated(string uri);

    /// @notice Contract-level metadata
    function contractURI() external view returns (string memory);

    /// @notice The number of tokens owned
    /// @param owner The owner address
    function balanceOf(address owner) external view returns (uint256);

    /// @notice The owner of a token
    /// @param tokenId The ERC-721 token id
    function ownerOf(uint256 tokenId) external view returns (address);

    /// @notice The account approved to manage a token
    /// @param tokenId The ERC-721 token id
    function getApproved(uint256 tokenId) external view returns (address);

    /// @notice If an operator is authorized to manage all of an owner's tokens
    /// @param owner The owner address
    /// @param operator The operator address
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /// @notice Authorizes an account to manage a token
    /// @param to The account address
    /// @param tokenId The ERC-721 token id
    function approve(address to, uint256 tokenId) external;

    /// @notice Authorizes an account to manage all tokens
    /// @param operator The account address
    /// @param approved If permission is being given or removed
    function setApprovalForAll(address operator, bool approved) external;

    /// @notice Safe transfers a token from sender to recipient with additional data
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    /// @param data The additional data sent in the call to the recipient
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;

    /// @notice Safe transfers a token from sender to recipient
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /// @notice Transfers a token from sender to recipient
    /// @param from The sender address
    /// @param to The recipient address
    /// @param tokenId The ERC-721 token id
    function transferFrom(address from, address to, uint256 tokenId) external;
}

File 20 of 26 : IERC165.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

/// @title IERC165
/// @notice Interface of the ERC165 standard, as defined in the https://eips.ethereum.org/EIPS/eip-165[EIP].
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 30000 gas.
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 21 of 26 : TokenReceiver.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

import { IERC165 } from '../../interfaces/IERC165.sol';

/// @notice A generic interface for a contract which properly accepts ERC721 tokens.
abstract contract ERC721TokenReceiver {
    function onERC721Received(address, address, uint256, bytes calldata) external virtual returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.
abstract contract ERC1155TokenReceiver is IERC165 {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes calldata
    ) external view virtual returns (bytes4) {
        return ERC1155TokenReceiver.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] calldata,
        uint256[] calldata,
        bytes calldata
    ) external view virtual returns (bytes4) {
        return ERC1155TokenReceiver.onERC1155BatchReceived.selector;
    }
}

File 22 of 26 : ImmutableStrings.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

library ImmutableStrings {
    type ImmutableString is uint256;

    /// @notice Thrown when the input length is greater than or equal to 32
    error LENGTH_GTE_32();

    /// @dev Converts a standard string to an immutable string
    /// @param input The standard string
    function toImmutableString(string memory input) internal pure returns (ImmutableString) {
        if (bytes(input).length >= 32) {
            revert LENGTH_GTE_32();
        }
        return ImmutableString.wrap(uint256(bytes32(bytes(input)) | bytes32(bytes(input).length)));
    }

    /// @dev Converts an immutable string to a standard string
    /// @param input The immutable string
    function toString(ImmutableString input) internal pure returns (string memory) {
        uint256 unwrapped = ImmutableString.unwrap(input);
        uint256 len = unwrapped & 255;
        uint256 readNoLength = (unwrapped >> 8) << 8;
        string memory res = string(abi.encode(readNoLength));
        assembly {
            mstore(res, len) // "res" points to the length, not the offset.
        }
        return res;
    }
}

File 23 of 26 : Address.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.17;

/// @title Address
/// @notice Modified from Rohan Kulkarni's work for Nouns Builder
/// Originally modified from OpenZeppelin Contracts v4.7.3 (utils/Address.sol)
/// - Uses custom errors
/// - Adds util converting address to bytes32
library Address {
    /// @dev Thrown when the target of a delegatecall is not a contract
    error INVALID_TARGET();

    /// @dev Thrown when a delegatecall has failed
    error DELEGATE_CALL_FAILED();

    /// @dev If an address is a contract
    function isContract(address _account) internal view returns (bool rv) {
        assembly {
            rv := gt(extcodesize(_account), 0)
        }
    }

    /// @dev Performs a delegatecall on an address
    function functionDelegateCall(address _target, bytes memory _data) internal returns (bytes memory) {
        if (!isContract(_target)) revert INVALID_TARGET();

        (bool success, bytes memory returndata) = _target.delegatecall(_data);

        return verifyCallResult(success, returndata);
    }

    /// @dev Verifies a delegatecall was successful
    function verifyCallResult(bool _success, bytes memory _returndata) internal pure returns (bytes memory) {
        if (_success) {
            return _returndata;
        } else {
            if (_returndata.length > 0) {
                assembly {
                    let returndata_size := mload(_returndata)

                    revert(add(32, _returndata), returndata_size)
                }
            } else {
                revert DELEGATE_CALL_FAILED();
            }
        }
    }
}

File 24 of 26 : IERC165.sol
// 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);
}

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

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

Settings
{
  "remappings": [
    "@ensdomains/=/Users/prop_house/node_modules/@ensdomains/",
    "@openzeppelin/=/Users/prop_house/node_modules/@openzeppelin/",
    "@prophouse/=/Users/prop_house/node_modules/@prophouse/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "hardhat/=/Users/prop_house/node_modules/hardhat/",
    "solady/=/Users/prop_house/node_modules/solady/",
    "solmate/=/Users/prop_house/node_modules/solmate/",
    "token/=/Users/prop_house/node_modules/@prophouse/protocol/contracts/ethereum/lib/token/",
    "types/=/Users/prop_house/node_modules/@prophouse/protocol/contracts/ethereum/lib/types/",
    "utils/=/Users/prop_house/node_modules/@prophouse/protocol/contracts/ethereum/lib/utils/",
    "lib/forge-std:ds-test/=lib/forge-std/lib/ds-test/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "none",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_manager","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ADDRESS_ZERO","type":"error"},{"inputs":[],"name":"ALREADY_MINTED","type":"error"},{"inputs":[],"name":"ETHER_TRANSFER_FAILED","type":"error"},{"inputs":[],"name":"HOUSE_NOT_APPROVED_BY_USER","type":"error"},{"inputs":[],"name":"INSUFFICIENT_ETHER_SUPPLIED","type":"error"},{"inputs":[],"name":"INVALID_APPROVAL","type":"error"},{"inputs":[],"name":"INVALID_ASSET_TYPE","type":"error"},{"inputs":[],"name":"INVALID_ERC721_TRANSFER_AMOUNT","type":"error"},{"inputs":[],"name":"INVALID_HOUSE","type":"error"},{"inputs":[],"name":"INVALID_HOUSE_IMPL","type":"error"},{"inputs":[],"name":"INVALID_OWNER","type":"error"},{"inputs":[],"name":"INVALID_RECIPIENT","type":"error"},{"inputs":[],"name":"INVALID_ROUND","type":"error"},{"inputs":[],"name":"INVALID_ROUND_IMPL_FOR_HOUSE","type":"error"},{"inputs":[],"name":"LENGTH_GTE_32","type":"error"},{"inputs":[],"name":"MISSING_ASSET_AMOUNT","type":"error"},{"inputs":[],"name":"NOT_MINTED","type":"error"},{"inputs":[],"name":"UNUSED_ASSET_PARAMETERS","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"round","type":"address"},{"components":[{"internalType":"enum AssetType","name":"assetType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct Asset[]","name":"assets","type":"tuple[]"}],"name":"BatchDepositToRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"ContractURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"round","type":"address"},{"components":[{"internalType":"enum AssetType","name":"assetType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"indexed":false,"internalType":"struct Asset","name":"asset","type":"tuple"}],"name":"DepositToRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"house","type":"address"},{"indexed":false,"internalType":"bytes32","name":"kind","type":"bytes32"}],"name":"HouseCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"address","name":"house","type":"address"},{"indexed":true,"internalType":"address","name":"round","type":"address"},{"indexed":false,"internalType":"bytes32","name":"kind","type":"bytes32"},{"indexed":false,"internalType":"string","name":"title","type":"string"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"RoundCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"round","type":"address"},{"components":[{"internalType":"enum AssetType","name":"assetType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Asset[]","name":"assets","type":"tuple[]"}],"name":"batchDepositTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"house","type":"address"},{"components":[{"internalType":"address","name":"impl","type":"address"},{"internalType":"bytes","name":"config","type":"bytes"},{"internalType":"string","name":"title","type":"string"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct IPropHouse.Round","name":"newRound","type":"tuple"},{"components":[{"internalType":"enum AssetType","name":"assetType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Asset[]","name":"assets","type":"tuple[]"}],"name":"createAndFundRoundOnExistingHouse","outputs":[{"internalType":"address","name":"round","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"impl","type":"address"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct IPropHouse.House","name":"newHouse","type":"tuple"},{"components":[{"internalType":"address","name":"impl","type":"address"},{"internalType":"bytes","name":"config","type":"bytes"},{"internalType":"string","name":"title","type":"string"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct IPropHouse.Round","name":"newRound","type":"tuple"},{"components":[{"internalType":"enum AssetType","name":"assetType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Asset[]","name":"assets","type":"tuple[]"}],"name":"createAndFundRoundOnNewHouse","outputs":[{"internalType":"address","name":"house","type":"address"},{"internalType":"address","name":"round","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"impl","type":"address"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct IPropHouse.House","name":"newHouse","type":"tuple"}],"name":"createHouse","outputs":[{"internalType":"address","name":"house","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"house","type":"address"},{"components":[{"internalType":"address","name":"impl","type":"address"},{"internalType":"bytes","name":"config","type":"bytes"},{"internalType":"string","name":"title","type":"string"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct IPropHouse.Round","name":"newRound","type":"tuple"}],"name":"createRoundOnExistingHouse","outputs":[{"internalType":"address","name":"round","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"impl","type":"address"},{"internalType":"bytes","name":"config","type":"bytes"}],"internalType":"struct IPropHouse.House","name":"newHouse","type":"tuple"},{"components":[{"internalType":"address","name":"impl","type":"address"},{"internalType":"bytes","name":"config","type":"bytes"},{"internalType":"string","name":"title","type":"string"},{"internalType":"string","name":"description","type":"string"}],"internalType":"struct IPropHouse.Round","name":"newRound","type":"tuple"}],"name":"createRoundOnNewHouse","outputs":[{"internalType":"address","name":"house","type":"address"},{"internalType":"address","name":"round","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"round","type":"address"},{"components":[{"internalType":"enum AssetType","name":"assetType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct Asset","name":"asset","type":"tuple"}],"name":"depositTo","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"house","type":"address"}],"name":"isHouse","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"round","type":"address"}],"name":"isRound","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"manager","outputs":[{"internalType":"contract IManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b5060405162003ce438038062003ce4833981016040819052620000349162000155565b6040518060400160405280600a81526020016950726f7020486f75736560b01b81525060405180604001604052806004815260200163050524f560e41b8152506200008582620000d160201b60201c565b6080526200009381620000d1565b60a05250506001600160a01b03811660c05260408051608081019091526042808252620000ca919062003ca260208301396200010a565b506200036a565b60006020825110620000f657604051636647069560e11b815260040160405180910390fd5b8151620001038362000187565b1792915050565b60006200011882826200024e565b507f905d981207a7d0b6c62cc46ab0be2a076d0298e4a86d0ab79882dbd01ac37378816040516200014a91906200031a565b60405180910390a150565b6000602082840312156200016857600080fd5b81516001600160a01b03811681146200018057600080fd5b9392505050565b80516020808301519190811015620001a9576000198160200360031b1b821691505b50919050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001da57607f821691505b602082108103620001a957634e487b7160e01b600052602260045260246000fd5b601f8211156200024957600081815260208120601f850160051c81016020861015620002245750805b601f850160051c820191505b81811015620002455782815560010162000230565b5050505b505050565b81516001600160401b038111156200026a576200026a620001af565b62000282816200027b8454620001c5565b84620001fb565b602080601f831160018114620002ba5760008415620002a15750858301515b600019600386901b1c1916600185901b17855562000245565b600085815260208120601f198616915b82811015620002eb57888601518255948401946001909101908401620002ca565b50858210156200030a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600060208083528351808285015260005b8181101562000349578581018301518582016040015282016200032b565b506000604082860101526040601f19601f8301168501019250505092915050565b60805160a05160c0516138d0620003d2600039600081816103070152818161096401528181610a5501528181611014015281816114160152818161153e015281816116c9015281816117ba0152611a49015260006111f30152600061060d01526138d06000f3fe6080604052600436106101965760003560e01c80638312787a116100e1578063c87b56dd1161008a578063e8a3d48511610064578063e8a3d48514610490578063e985e9c5146104a5578063eedfdd54146104ee578063f9c4e8891461050157600080fd5b8063c87b56dd1461044a578063d35b3d271461046a578063d849a0231461047d57600080fd5b806395d89b41116100bb57806395d89b41146103f5578063a22cb4651461040a578063b88d4fde1461042a57600080fd5b80638312787a146103af5780638c1fc0bb146103c25780639156618c146103e257600080fd5b806342842e0e116101435780634f558e791161011d5780634f558e79146103295780636352211e1461036157806370a082311461038157600080fd5b806342842e0e146102b557806346cab5cb146102d5578063481c6a75146102f557600080fd5b8063095ea7b311610174578063095ea7b31461024057806323b872dd146102625780632e89bac41461028257600080fd5b806301ffc9a71461019b57806306fdde03146101d0578063081812fc146101f2575b600080fd5b3480156101a757600080fd5b506101bb6101b6366004612ca0565b610521565b60405190151581526020015b60405180910390f35b3480156101dc57600080fd5b506101e5610606565b6040516101c79190612d0d565b3480156101fe57600080fd5b5061022861020d366004612d20565b6000908152600360205260409020546001600160a01b031690565b6040516001600160a01b0390911681526020016101c7565b34801561024c57600080fd5b5061026061025b366004612d4e565b61066f565b005b34801561026e57600080fd5b5061026061027d366004612d7a565b610766565b610295610290366004612e31565b610957565b604080516001600160a01b039384168152929091166020830152016101c7565b3480156102c157600080fd5b506102606102d0366004612d7a565b610c47565b3480156102e157600080fd5b506101bb6102f0366004612ebc565b610d5d565b34801561030157600080fd5b506102287f000000000000000000000000000000000000000000000000000000000000000081565b34801561033557600080fd5b506101bb610344366004612d20565b6000908152600160205260409020546001600160a01b0316151590565b34801561036d57600080fd5b5061022861037c366004612d20565b610d71565b34801561038d57600080fd5b506103a161039c366004612ebc565b610dc0565b6040519081526020016101c7565b6102606103bd366004612ed9565b610e1e565b3480156103ce57600080fd5b506101bb6103dd366004612ebc565b610eca565b6102286103f0366004612f2e565b610fd1565b34801561040157600080fd5b506101e56111ec565b34801561041657600080fd5b50610260610425366004612f7a565b611250565b34801561043657600080fd5b50610260610445366004612fb3565b6112da565b34801561045657600080fd5b506101e5610465366004612d20565b6113e5565b610228610478366004613052565b6114fb565b61029561048b3660046130a2565b6116bc565b34801561049c57600080fd5b506101e5611943565b3480156104b157600080fd5b506101bb6104c03660046130fc565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6102606104fc36600461312a565b6119d1565b34801561050d57600080fd5b5061022861051c366004613160565b611a3d565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806105b457507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061060057507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b606061066a7f0000000000000000000000000000000000000000000000000000000000000000604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020820152815190820190915260ff909116815290565b905090565b6000818152600160205260409020546001600160a01b03163381148015906106bb57506001600160a01b038116600090815260046020908152604080832033845290915290205460ff16155b156106f2576040517f3201fe7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526003602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000818152600160205260409020546001600160a01b038481169116146107b9576040517f9d2d273100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382166107f9576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b0384161480159061083657506001600160a01b038316600090815260046020908152604080832033845290915290205460ff16155b801561085957506000818152600360205260409020546001600160a01b03163314155b15610890576040517f3201fe7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03808416600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905593861680835284832080546001908101909155868452825284832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168317909155600390925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a45b505050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a8084cbf6109966020890189612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156109f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190613195565b610a4b576040517ec71f0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016634ef175b3610a876020890189612ebc565b610a946020890189612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa158015610af7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1b9190613195565b610b51576040517fc1ccf5a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b62610b5d8761323a565b611b3c565b9150610b6e8286611c91565b90506000610bcf33838787808060200260200160405190810160405280939291908181526020016000905b82821015610bc557610bb6608083028601368190038101906132f3565b81526020019060010190610b99565b5050505050611dfb565b90506001600160a01b03821663439fab9182610bee60208a018a61336c565b6040518463ffffffff1660e01b8152600401610c0b9291906133fc565b6000604051808303818588803b158015610c2457600080fd5b505af1158015610c38573d6000803e3d6000fd5b50505050505094509492505050565b610c52838383610766565b813b15158015610d2657506040517f150b7a02000000000000000000000000000000000000000000000000000000008082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610cdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d019190613410565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b15610952576040517f521005a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106006001600160a01b038316610344565b6000818152600160205260408120546001600160a01b031680610600576040517f9d2d273100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160a01b038216610e02576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526002602052604090205490565b610e2783610eca565b610e5d576040517fae5ca00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610eb233858585808060200260200160405190810160405280939291908181526020016000905b82821015610bc557610ea3608083028601368190038101906132f3565b81526020019060010190610e86565b90508015610ec457610ec4338261215a565b50505050565b6000816001600160a01b031663ff9b3acf6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610f26575060408051601f3d908101601f19168201909252610f239181019061342d565b60015b610f3257506000919050565b610f3b81610d5d565b8015610fc557506040517f8c1fc0bb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152821690638c1fc0bb90602401602060405180830381865afa158015610fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc59190613195565b9392505050565b919050565b6000610fdc85610d5d565b611012576040517f127453d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634ef175b361104a876121aa565b6110576020880188612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa1580156110ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110de9190613195565b611114576040517fc1ccf5a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61111e8585611c91565b9050600061117533838686808060200260200160405190810160405280939291908181526020016000905b82821015610bc557611166608083028601368190038101906132f3565b81526020019060010190611149565b90506001600160a01b03821663439fab9182611194602089018961336c565b6040518463ffffffff1660e01b81526004016111b19291906133fc565b6000604051808303818588803b1580156111ca57600080fd5b505af11580156111de573d6000803e3d6000fd5b505050505050949350505050565b606061066a7f0000000000000000000000000000000000000000000000000000000000000000604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020820152815190820190915260ff909116815290565b3360008181526004602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112e5858585610766565b833b151580156113a757506040517f150b7a0200000000000000000000000000000000000000000000000000000000808252906001600160a01b0386169063150b7a029061133f9033908a9089908990899060040161344a565b6020604051808303816000875af115801561135e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113829190613410565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b156113de576040517f521005a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b6040517f59437a500000000000000000000000000000000000000000000000000000000081523060048201526060907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906359437a5090602401602060405180830381865afa158015611465573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611489919061342d565b6001600160a01b031663c87b56dd836040518263ffffffff1660e01b81526004016114b691815260200190565b600060405180830381865afa1580156114d3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610600919081019061347d565b600061150683610d5d565b61153c576040517f127453d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316634ef175b3611574856121aa565b6115816020860186612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa1580156115e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116089190613195565b61163e576040517fc1ccf5a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116488383611c91565b90506001600160a01b03811663439fab9134611667602086018661336c565b6040518463ffffffff1660e01b81526004016116849291906133fc565b6000604051808303818588803b15801561169d57600080fd5b505af11580156116b1573d6000803e3d6000fd5b505050505092915050565b6000806001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a8084cbf6116fb6020870187612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177b9190613195565b6117b0576040517ec71f0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016634ef175b36117ec6020870187612ebc565b6117f96020870187612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa15801561185c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118809190613195565b6118b6576040517fc1ccf5a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118c2610b5d8561323a565b91506118ce8284611c91565b90506001600160a01b03811663439fab91346118ed602087018761336c565b6040518463ffffffff1660e01b815260040161190a9291906133fc565b6000604051808303818588803b15801561192357600080fd5b505af1158015611937573d6000803e3d6000fd5b50505050509250929050565b60008054611950906134f4565b80601f016020809104026020016040519081016040528092919081815260200182805461197c906134f4565b80156119c95780601f1061199e576101008083540402835291602001916119c9565b820191906000526020600020905b8154815290600101906020018083116119ac57829003601f168201915b505050505081565b6119da82610eca565b611a10576040517fae5ca00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611a2b3384611a26368690038601866132f3565b6121bf565b9050801561095257610952338261215a565b60006001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001663a8084cbf611a7b6020850185612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afb9190613195565b611b30576040517ec71f0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610600610b5d8361323a565b6000611b5482600001516001600160a01b03166123b2565b9050611b69336001600160a01b038316612402565b806001600160a01b0316336001600160a01b03167fc3480ff86b71d5d5b239f776a04bca0fb7a8a2c9bd1e65a58f5a23f3e1162733836001600160a01b03166304baa00b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c009190613541565b60405190815260200160405180910390a360208201516040517f439fab910000000000000000000000000000000000000000000000000000000081526001600160a01b0383169163439fab9191611c5a9190600401612d0d565b600060405180830381600087803b158015611c7457600080fd5b505af1158015611c88573d6000803e3d6000fd5b50505050919050565b60006001600160a01b0383166393a2612e611caf6020850185612ebc565b611cbc604086018661336c565b336040518563ffffffff1660e01b8152600401611cdc949392919061355a565b6020604051808303816000875af1158015611cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1f919061342d565b9050806001600160a01b0316836001600160a01b0316336001600160a01b03167f030be75cf115496881f1b9f14f5a63b854edae16ea17e7ed5f5dcf160cfe76f7846001600160a01b03166304baa00b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc29190613541565b611dcf604088018861336c565b611ddc60608a018a61336c565b604051611ded959493929190613592565b60405180910390a492915050565b805160009034828267ffffffffffffffff811115611e1b57611e1b6131b2565b604051908082528060200260200182016040528015611e44578160200160208202803683370190505b50905060008367ffffffffffffffff811115611e6257611e626131b2565b604051908082528060200260200182016040528015611e8b578160200160208202803683370190505b50905060005b84811015611ff057611ebb878281518110611eae57611eae6135cb565b6020026020010151612515565b838281518110611ecd57611ecd6135cb565b602002602001018181525050868181518110611eeb57611eeb6135cb565b602002602001015160600151828281518110611f0957611f096135cb565b60209081029190910101526000878281518110611f2857611f286135cb565b6020026020010151600001516003811115611f4557611f456135fa565b03611fc45783878281518110611f5d57611f5d6135cb565b6020026020010151606001511115611fa1576040517f5471cb3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b868181518110611fb357611fb36135cb565b602002602001015160600151840393505b611fe8878281518110611fd957611fd96135cb565b60200260200101518a8a6125fc565b600101611e91565b507f1cc362bfb03948adecf4698b05902529bf123f9ed9276871556588ebefd6b0168888886040516120249392919061368c565b60405180910390a16040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f993b75c20000000000000000000000000000000000000000000000000000000060048201526001600160a01b038816906301ffc9a790602401602060405180830381865afa1580156120a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120cd9190613195565b1561214e576040517f9c4cd98c0000000000000000000000000000000000000000000000000000000081526001600160a01b03881690639c4cd98c9061211b908b9086908690600401613733565b600060405180830381600087803b15801561213557600080fd5b505af1158015612149573d6000803e3d6000fd5b505050505b50909695505050505050565b61216381612771565b60008060008060008587612710f1905080610952576040517f46fcf95700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006014600b6000843c505060005160601c90565b60003481835160038111156121d6576121d66135fa565b03612221578083606001511115612219576040517f5471cb3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606083015190035b61222c8386866125fc565b7f0c5390f032aa0964c2e8c386e05dc4d77b64d5b20dd0a4c05037654446a19b6b85858560405161225f93929190613771565b60405180910390a16040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f993b75c20000000000000000000000000000000000000000000000000000000060048201526001600160a01b038516906301ffc9a790602401602060405180830381865afa1580156122e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123089190613195565b156123aa57836001600160a01b0316630577ac4e8661232686612515565b60608701516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561239157600080fd5b505af11580156123a5573d6000803e3d6000fd5b505050505b949350505050565b60006c5af43d3d93803e602a57fd5bf36021528160145273602c3d8160093d39f33d3d3d3d363d3d37363d736000526035600c6000f09050600060215280610fcc5763301164256000526004601cfd5b6001600160a01b038216612442576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600160205260409020546001600160a01b031615612491576040517fdfa4c0d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821660008181526002602090815260408083208054600190810190915585845290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000808251600381111561252b5761252b6135fa565b036125435781516003811115610600576106006135fa565b600182516003811115612558576125586135fa565b0361258b5781516020808401516040516125739392016137d4565b60405160208183030381529060405261060090613813565b815160208084015160408086015190516125d5930160609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000168252601482015260340190565b60405160208183030381529060405280519060200120604051602001612573929190613855565b600083516003811115612611576126116135fa565b0361266f57604083015160208401516001600160a01b03161715612661576040517f2de52bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61095281846060015161215a565b600183516003811115612684576126846135fa565b036126d9576040830151156126c5576040517f2de52bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109528360200151838386606001516127ae565b6002835160038111156126ee576126ee6135fa565b0361270c5761095283602001518460400151848487606001516127f5565b600383516003811115612721576127216135fa565b0361273f5761095283602001518460400151848487606001516128ba565b6040517f4ed63ade00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036127ab576040517fccd1eba200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b6127b781612771565b306001600160a01b038416036127e0576127db6001600160a01b038516838361291d565b610ec4565b610ec46001600160a01b0385168484846129c6565b8060011461282f576040517fe362007300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018690528616906323b872dd906064015b600060405180830381600087803b15801561289b57600080fd5b505af11580156128af573d6000803e3d6000fd5b505050505050505050565b6128c381612771565b604080516000815260208101918290527ff242432a000000000000000000000000000000000000000000000000000000009091526001600160a01b0386169063f242432a906128819086908690899087906024810161386f565b6040516001600160a01b0383166024820152604481018290526109529084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612a17565b6040516001600160a01b0380851660248301528316604482015260648101829052610ec49085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612962565b6000612a6c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612b1b9092919063ffffffff16565b8051909150156109525780806020019051810190612a8a9190613195565b610952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60606123aa848460008585600080866001600160a01b03168587604051612b4291906138a7565b60006040518083038185875af1925050503d8060008114612b7f576040519150601f19603f3d011682016040523d82523d6000602084013e612b84565b606091505b5091509150612b9587838387612ba0565b979650505050505050565b60608315612c29578251600003612c22576001600160a01b0385163b612c22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612b12565b50816123aa565b6123aa8383815115612c3e5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b129190612d0d565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146127ab57600080fd5b600060208284031215612cb257600080fd5b8135610fc581612c72565b60005b83811015612cd8578181015183820152602001612cc0565b50506000910152565b60008151808452612cf9816020860160208601612cbd565b601f01601f19169290920160200192915050565b602081526000610fc56020830184612ce1565b600060208284031215612d3257600080fd5b5035919050565b6001600160a01b03811681146127ab57600080fd5b60008060408385031215612d6157600080fd5b8235612d6c81612d39565b946020939093013593505050565b600080600060608486031215612d8f57600080fd5b8335612d9a81612d39565b92506020840135612daa81612d39565b929592945050506040919091013590565b600060408284031215612dcd57600080fd5b50919050565b600060808284031215612dcd57600080fd5b60008083601f840112612df757600080fd5b50813567ffffffffffffffff811115612e0f57600080fd5b6020830191508360208260071b8501011115612e2a57600080fd5b9250929050565b60008060008060608587031215612e4757600080fd5b843567ffffffffffffffff80821115612e5f57600080fd5b612e6b88838901612dbb565b95506020870135915080821115612e8157600080fd5b612e8d88838901612dd3565b94506040870135915080821115612ea357600080fd5b50612eb087828801612de5565b95989497509550505050565b600060208284031215612ece57600080fd5b8135610fc581612d39565b600080600060408486031215612eee57600080fd5b8335612ef981612d39565b9250602084013567ffffffffffffffff811115612f1557600080fd5b612f2186828701612de5565b9497909650939450505050565b60008060008060608587031215612f4457600080fd5b8435612f4f81612d39565b9350602085013567ffffffffffffffff80821115612e8157600080fd5b80151581146127ab57600080fd5b60008060408385031215612f8d57600080fd5b8235612f9881612d39565b91506020830135612fa881612f6c565b809150509250929050565b600080600080600060808688031215612fcb57600080fd5b8535612fd681612d39565b94506020860135612fe681612d39565b935060408601359250606086013567ffffffffffffffff8082111561300a57600080fd5b818801915088601f83011261301e57600080fd5b81358181111561302d57600080fd5b89602082850101111561303f57600080fd5b9699959850939650602001949392505050565b6000806040838503121561306557600080fd5b823561307081612d39565b9150602083013567ffffffffffffffff81111561308c57600080fd5b61309885828601612dd3565b9150509250929050565b600080604083850312156130b557600080fd5b823567ffffffffffffffff808211156130cd57600080fd5b6130d986838701612dbb565b935060208501359150808211156130ef57600080fd5b5061309885828601612dd3565b6000806040838503121561310f57600080fd5b823561311a81612d39565b91506020830135612fa881612d39565b60008060a0838503121561313d57600080fd5b823561314881612d39565b91506131578460208501612dd3565b90509250929050565b60006020828403121561317257600080fd5b813567ffffffffffffffff81111561318957600080fd5b6123aa84828501612dbb565b6000602082840312156131a757600080fd5b8151610fc581612f6c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561320a5761320a6131b2565b604052919050565b600067ffffffffffffffff82111561322c5761322c6131b2565b50601f01601f191660200190565b60006040823603121561324c57600080fd5b6040516040810167ffffffffffffffff8282108183111715613270576132706131b2565b816040528435915061328182612d39565b908252602090848201358181111561329857600080fd5b8501905036601f8201126132ab57600080fd5b80356132be6132b982613212565b6131e1565b81815236848385010111156132d257600080fd5b81848401858301376000918101840191909152918301919091525092915050565b60006080828403121561330557600080fd5b6040516080810181811067ffffffffffffffff82111715613328576133286131b2565b60405282356004811061333a57600080fd5b8152602083013561334a81612d39565b6020820152604083810135908201526060928301359281019290925250919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126133a157600080fd5b83018035915067ffffffffffffffff8211156133bc57600080fd5b602001915036819003821315612e2a57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b6020815260006123aa6020830184866133d1565b60006020828403121561342257600080fd5b8151610fc581612c72565b60006020828403121561343f57600080fd5b8151610fc581612d39565b60006001600160a01b03808816835280871660208401525084604083015260806060830152612b956080830184866133d1565b60006020828403121561348f57600080fd5b815167ffffffffffffffff8111156134a657600080fd5b8201601f810184136134b757600080fd5b80516134c56132b982613212565b8181528560208385010111156134da57600080fd5b6134eb826020830160208601612cbd565b95945050505050565b600181811c9082168061350857607f821691505b602082108103612dcd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006020828403121561355357600080fd5b5051919050565b60006001600160a01b0380871683526060602084015261357e6060840186886133d1565b915080841660408401525095945050505050565b8581526060602082015260006135ac6060830186886133d1565b82810360408401526135bf8185876133d1565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b805160048110613662577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82526020818101516001600160a01b03169083015260408082015190830152606090810151910152565b6000606082016001600160a01b03808716845260208187168186015260606040860152829150855180845260809350838601925081870160005b828110156136e9576136d9858351613629565b93850193908301906001016136c6565b50929998505050505050505050565b600081518084526020808501945080840160005b838110156137285781518752958201959082019060010161370c565b509495945050505050565b6001600160a01b038416815260606020820152600061375560608301856136f8565b828103604084015261376781856136f8565b9695505050505050565b6001600160a01b0384811682528316602082015260c081016123aa6040830184613629565b600481106137cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60f81b9052565b6137de8184613796565b60609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166001820152601501919050565b80516020808301519190811015612dcd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b61385f8184613796565b6001810191909152602101919050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152612b9560a0830184612ce1565b600082516138b9818460208701612cbd565b919091019291505056fea164736f6c6343000815000a697066733a2f2f6261666b726569616765786e32776276357436337932786266366d6d637833726b747271787273797a6635676c356c3763326c6d33626b716a6334000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a

Deployed Bytecode

0x6080604052600436106101965760003560e01c80638312787a116100e1578063c87b56dd1161008a578063e8a3d48511610064578063e8a3d48514610490578063e985e9c5146104a5578063eedfdd54146104ee578063f9c4e8891461050157600080fd5b8063c87b56dd1461044a578063d35b3d271461046a578063d849a0231461047d57600080fd5b806395d89b41116100bb57806395d89b41146103f5578063a22cb4651461040a578063b88d4fde1461042a57600080fd5b80638312787a146103af5780638c1fc0bb146103c25780639156618c146103e257600080fd5b806342842e0e116101435780634f558e791161011d5780634f558e79146103295780636352211e1461036157806370a082311461038157600080fd5b806342842e0e146102b557806346cab5cb146102d5578063481c6a75146102f557600080fd5b8063095ea7b311610174578063095ea7b31461024057806323b872dd146102625780632e89bac41461028257600080fd5b806301ffc9a71461019b57806306fdde03146101d0578063081812fc146101f2575b600080fd5b3480156101a757600080fd5b506101bb6101b6366004612ca0565b610521565b60405190151581526020015b60405180910390f35b3480156101dc57600080fd5b506101e5610606565b6040516101c79190612d0d565b3480156101fe57600080fd5b5061022861020d366004612d20565b6000908152600360205260409020546001600160a01b031690565b6040516001600160a01b0390911681526020016101c7565b34801561024c57600080fd5b5061026061025b366004612d4e565b61066f565b005b34801561026e57600080fd5b5061026061027d366004612d7a565b610766565b610295610290366004612e31565b610957565b604080516001600160a01b039384168152929091166020830152016101c7565b3480156102c157600080fd5b506102606102d0366004612d7a565b610c47565b3480156102e157600080fd5b506101bb6102f0366004612ebc565b610d5d565b34801561030157600080fd5b506102287f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a81565b34801561033557600080fd5b506101bb610344366004612d20565b6000908152600160205260409020546001600160a01b0316151590565b34801561036d57600080fd5b5061022861037c366004612d20565b610d71565b34801561038d57600080fd5b506103a161039c366004612ebc565b610dc0565b6040519081526020016101c7565b6102606103bd366004612ed9565b610e1e565b3480156103ce57600080fd5b506101bb6103dd366004612ebc565b610eca565b6102286103f0366004612f2e565b610fd1565b34801561040157600080fd5b506101e56111ec565b34801561041657600080fd5b50610260610425366004612f7a565b611250565b34801561043657600080fd5b50610260610445366004612fb3565b6112da565b34801561045657600080fd5b506101e5610465366004612d20565b6113e5565b610228610478366004613052565b6114fb565b61029561048b3660046130a2565b6116bc565b34801561049c57600080fd5b506101e5611943565b3480156104b157600080fd5b506101bb6104c03660046130fc565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6102606104fc36600461312a565b6119d1565b34801561050d57600080fd5b5061022861051c366004613160565b611a3d565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806105b457507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b8061060057507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b606061066a7f50726f7020486f7573650000000000000000000000000000000000000000000a604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020820152815190820190915260ff909116815290565b905090565b6000818152600160205260409020546001600160a01b03163381148015906106bb57506001600160a01b038116600090815260046020908152604080832033845290915290205460ff16155b156106f2576040517f3201fe7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526003602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000818152600160205260409020546001600160a01b038481169116146107b9576040517f9d2d273100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0382166107f9576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b336001600160a01b0384161480159061083657506001600160a01b038316600090815260046020908152604080832033845290915290205460ff16155b801561085957506000818152600360205260409020546001600160a01b03163314155b15610890576040517f3201fe7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03808416600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905593861680835284832080546001908101909155868452825284832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168317909155600390925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a45b505050565b6000806001600160a01b037f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a1663a8084cbf6109966020890189612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa1580156109f2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a169190613195565b610a4b576040517ec71f0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a16634ef175b3610a876020890189612ebc565b610a946020890189612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa158015610af7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1b9190613195565b610b51576040517fc1ccf5a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b62610b5d8761323a565b611b3c565b9150610b6e8286611c91565b90506000610bcf33838787808060200260200160405190810160405280939291908181526020016000905b82821015610bc557610bb6608083028601368190038101906132f3565b81526020019060010190610b99565b5050505050611dfb565b90506001600160a01b03821663439fab9182610bee60208a018a61336c565b6040518463ffffffff1660e01b8152600401610c0b9291906133fc565b6000604051808303818588803b158015610c2457600080fd5b505af1158015610c38573d6000803e3d6000fd5b50505050505094509492505050565b610c52838383610766565b813b15158015610d2657506040517f150b7a02000000000000000000000000000000000000000000000000000000008082523360048301526001600160a01b03858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015610cdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d019190613410565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b15610952576040517f521005a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006106006001600160a01b038316610344565b6000818152600160205260408120546001600160a01b031680610600576040517f9d2d273100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006001600160a01b038216610e02576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526002602052604090205490565b610e2783610eca565b610e5d576040517fae5ca00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610eb233858585808060200260200160405190810160405280939291908181526020016000905b82821015610bc557610ea3608083028601368190038101906132f3565b81526020019060010190610e86565b90508015610ec457610ec4338261215a565b50505050565b6000816001600160a01b031663ff9b3acf6040518163ffffffff1660e01b8152600401602060405180830381865afa925050508015610f26575060408051601f3d908101601f19168201909252610f239181019061342d565b60015b610f3257506000919050565b610f3b81610d5d565b8015610fc557506040517f8c1fc0bb0000000000000000000000000000000000000000000000000000000081526001600160a01b038481166004830152821690638c1fc0bb90602401602060405180830381865afa158015610fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc59190613195565b9392505050565b919050565b6000610fdc85610d5d565b611012576040517f127453d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a6001600160a01b0316634ef175b361104a876121aa565b6110576020880188612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa1580156110ba573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110de9190613195565b611114576040517fc1ccf5a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61111e8585611c91565b9050600061117533838686808060200260200160405190810160405280939291908181526020016000905b82821015610bc557611166608083028601368190038101906132f3565b81526020019060010190611149565b90506001600160a01b03821663439fab9182611194602089018961336c565b6040518463ffffffff1660e01b81526004016111b19291906133fc565b6000604051808303818588803b1580156111ca57600080fd5b505af11580156111de573d6000803e3d6000fd5b505050505050949350505050565b606061066a7f50524f5000000000000000000000000000000000000000000000000000000004604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083166020820152815190820190915260ff909116815290565b3360008181526004602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6112e5858585610766565b833b151580156113a757506040517f150b7a0200000000000000000000000000000000000000000000000000000000808252906001600160a01b0386169063150b7a029061133f9033908a9089908990899060040161344a565b6020604051808303816000875af115801561135e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113829190613410565b7fffffffff000000000000000000000000000000000000000000000000000000001614155b156113de576040517f521005a600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050505050565b6040517f59437a500000000000000000000000000000000000000000000000000000000081523060048201526060907f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a6001600160a01b0316906359437a5090602401602060405180830381865afa158015611465573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611489919061342d565b6001600160a01b031663c87b56dd836040518263ffffffff1660e01b81526004016114b691815260200190565b600060405180830381865afa1580156114d3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610600919081019061347d565b600061150683610d5d565b61153c576040517f127453d000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a6001600160a01b0316634ef175b3611574856121aa565b6115816020860186612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa1580156115e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116089190613195565b61163e576040517fc1ccf5a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6116488383611c91565b90506001600160a01b03811663439fab9134611667602086018661336c565b6040518463ffffffff1660e01b81526004016116849291906133fc565b6000604051808303818588803b15801561169d57600080fd5b505af11580156116b1573d6000803e3d6000fd5b505050505092915050565b6000806001600160a01b037f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a1663a8084cbf6116fb6020870187612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611757573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177b9190613195565b6117b0576040517ec71f0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b037f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a16634ef175b36117ec6020870187612ebc565b6117f96020870187612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381865afa15801561185c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118809190613195565b6118b6576040517fc1ccf5a300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6118c2610b5d8561323a565b91506118ce8284611c91565b90506001600160a01b03811663439fab91346118ed602087018761336c565b6040518463ffffffff1660e01b815260040161190a9291906133fc565b6000604051808303818588803b15801561192357600080fd5b505af1158015611937573d6000803e3d6000fd5b50505050509250929050565b60008054611950906134f4565b80601f016020809104026020016040519081016040528092919081815260200182805461197c906134f4565b80156119c95780601f1061199e576101008083540402835291602001916119c9565b820191906000526020600020905b8154815290600101906020018083116119ac57829003601f168201915b505050505081565b6119da82610eca565b611a10576040517fae5ca00d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611a2b3384611a26368690038601866132f3565b6121bf565b9050801561095257610952338261215a565b60006001600160a01b037f000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a1663a8084cbf611a7b6020850185612ebc565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015611ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611afb9190613195565b611b30576040517ec71f0500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610600610b5d8361323a565b6000611b5482600001516001600160a01b03166123b2565b9050611b69336001600160a01b038316612402565b806001600160a01b0316336001600160a01b03167fc3480ff86b71d5d5b239f776a04bca0fb7a8a2c9bd1e65a58f5a23f3e1162733836001600160a01b03166304baa00b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611bdc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c009190613541565b60405190815260200160405180910390a360208201516040517f439fab910000000000000000000000000000000000000000000000000000000081526001600160a01b0383169163439fab9191611c5a9190600401612d0d565b600060405180830381600087803b158015611c7457600080fd5b505af1158015611c88573d6000803e3d6000fd5b50505050919050565b60006001600160a01b0383166393a2612e611caf6020850185612ebc565b611cbc604086018661336c565b336040518563ffffffff1660e01b8152600401611cdc949392919061355a565b6020604051808303816000875af1158015611cfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1f919061342d565b9050806001600160a01b0316836001600160a01b0316336001600160a01b03167f030be75cf115496881f1b9f14f5a63b854edae16ea17e7ed5f5dcf160cfe76f7846001600160a01b03166304baa00b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc29190613541565b611dcf604088018861336c565b611ddc60608a018a61336c565b604051611ded959493929190613592565b60405180910390a492915050565b805160009034828267ffffffffffffffff811115611e1b57611e1b6131b2565b604051908082528060200260200182016040528015611e44578160200160208202803683370190505b50905060008367ffffffffffffffff811115611e6257611e626131b2565b604051908082528060200260200182016040528015611e8b578160200160208202803683370190505b50905060005b84811015611ff057611ebb878281518110611eae57611eae6135cb565b6020026020010151612515565b838281518110611ecd57611ecd6135cb565b602002602001018181525050868181518110611eeb57611eeb6135cb565b602002602001015160600151828281518110611f0957611f096135cb565b60209081029190910101526000878281518110611f2857611f286135cb565b6020026020010151600001516003811115611f4557611f456135fa565b03611fc45783878281518110611f5d57611f5d6135cb565b6020026020010151606001511115611fa1576040517f5471cb3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b868181518110611fb357611fb36135cb565b602002602001015160600151840393505b611fe8878281518110611fd957611fd96135cb565b60200260200101518a8a6125fc565b600101611e91565b507f1cc362bfb03948adecf4698b05902529bf123f9ed9276871556588ebefd6b0168888886040516120249392919061368c565b60405180910390a16040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f993b75c20000000000000000000000000000000000000000000000000000000060048201526001600160a01b038816906301ffc9a790602401602060405180830381865afa1580156120a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120cd9190613195565b1561214e576040517f9c4cd98c0000000000000000000000000000000000000000000000000000000081526001600160a01b03881690639c4cd98c9061211b908b9086908690600401613733565b600060405180830381600087803b15801561213557600080fd5b505af1158015612149573d6000803e3d6000fd5b505050505b50909695505050505050565b61216381612771565b60008060008060008587612710f1905080610952576040517f46fcf95700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006014600b6000843c505060005160601c90565b60003481835160038111156121d6576121d66135fa565b03612221578083606001511115612219576040517f5471cb3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b606083015190035b61222c8386866125fc565b7f0c5390f032aa0964c2e8c386e05dc4d77b64d5b20dd0a4c05037654446a19b6b85858560405161225f93929190613771565b60405180910390a16040517f01ffc9a70000000000000000000000000000000000000000000000000000000081527f993b75c20000000000000000000000000000000000000000000000000000000060048201526001600160a01b038516906301ffc9a790602401602060405180830381865afa1580156122e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123089190613195565b156123aa57836001600160a01b0316630577ac4e8661232686612515565b60608701516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b03909316600484015260248301919091526044820152606401600060405180830381600087803b15801561239157600080fd5b505af11580156123a5573d6000803e3d6000fd5b505050505b949350505050565b60006c5af43d3d93803e602a57fd5bf36021528160145273602c3d8160093d39f33d3d3d3d363d3d37363d736000526035600c6000f09050600060215280610fcc5763301164256000526004601cfd5b6001600160a01b038216612442576040517f66e7950900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600160205260409020546001600160a01b031615612491576040517fdfa4c0d500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b03821660008181526002602090815260408083208054600190810190915585845290915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000808251600381111561252b5761252b6135fa565b036125435781516003811115610600576106006135fa565b600182516003811115612558576125586135fa565b0361258b5781516020808401516040516125739392016137d4565b60405160208183030381529060405261060090613813565b815160208084015160408086015190516125d5930160609290921b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000168252601482015260340190565b60405160208183030381529060405280519060200120604051602001612573929190613855565b600083516003811115612611576126116135fa565b0361266f57604083015160208401516001600160a01b03161715612661576040517f2de52bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61095281846060015161215a565b600183516003811115612684576126846135fa565b036126d9576040830151156126c5576040517f2de52bb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6109528360200151838386606001516127ae565b6002835160038111156126ee576126ee6135fa565b0361270c5761095283602001518460400151848487606001516127f5565b600383516003811115612721576127216135fa565b0361273f5761095283602001518460400151848487606001516128ba565b6040517f4ed63ade00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b806000036127ab576040517fccd1eba200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b6127b781612771565b306001600160a01b038416036127e0576127db6001600160a01b038516838361291d565b610ec4565b610ec46001600160a01b0385168484846129c6565b8060011461282f576040517fe362007300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301528381166024830152604482018690528616906323b872dd906064015b600060405180830381600087803b15801561289b57600080fd5b505af11580156128af573d6000803e3d6000fd5b505050505050505050565b6128c381612771565b604080516000815260208101918290527ff242432a000000000000000000000000000000000000000000000000000000009091526001600160a01b0386169063f242432a906128819086908690899087906024810161386f565b6040516001600160a01b0383166024820152604481018290526109529084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b60408051601f198184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152612a17565b6040516001600160a01b0380851660248301528316604482015260648101829052610ec49085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401612962565b6000612a6c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612b1b9092919063ffffffff16565b8051909150156109525780806020019051810190612a8a9190613195565b610952576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60606123aa848460008585600080866001600160a01b03168587604051612b4291906138a7565b60006040518083038185875af1925050503d8060008114612b7f576040519150601f19603f3d011682016040523d82523d6000602084013e612b84565b606091505b5091509150612b9587838387612ba0565b979650505050505050565b60608315612c29578251600003612c22576001600160a01b0385163b612c22576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401612b12565b50816123aa565b6123aa8383815115612c3e5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b129190612d0d565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146127ab57600080fd5b600060208284031215612cb257600080fd5b8135610fc581612c72565b60005b83811015612cd8578181015183820152602001612cc0565b50506000910152565b60008151808452612cf9816020860160208601612cbd565b601f01601f19169290920160200192915050565b602081526000610fc56020830184612ce1565b600060208284031215612d3257600080fd5b5035919050565b6001600160a01b03811681146127ab57600080fd5b60008060408385031215612d6157600080fd5b8235612d6c81612d39565b946020939093013593505050565b600080600060608486031215612d8f57600080fd5b8335612d9a81612d39565b92506020840135612daa81612d39565b929592945050506040919091013590565b600060408284031215612dcd57600080fd5b50919050565b600060808284031215612dcd57600080fd5b60008083601f840112612df757600080fd5b50813567ffffffffffffffff811115612e0f57600080fd5b6020830191508360208260071b8501011115612e2a57600080fd5b9250929050565b60008060008060608587031215612e4757600080fd5b843567ffffffffffffffff80821115612e5f57600080fd5b612e6b88838901612dbb565b95506020870135915080821115612e8157600080fd5b612e8d88838901612dd3565b94506040870135915080821115612ea357600080fd5b50612eb087828801612de5565b95989497509550505050565b600060208284031215612ece57600080fd5b8135610fc581612d39565b600080600060408486031215612eee57600080fd5b8335612ef981612d39565b9250602084013567ffffffffffffffff811115612f1557600080fd5b612f2186828701612de5565b9497909650939450505050565b60008060008060608587031215612f4457600080fd5b8435612f4f81612d39565b9350602085013567ffffffffffffffff80821115612e8157600080fd5b80151581146127ab57600080fd5b60008060408385031215612f8d57600080fd5b8235612f9881612d39565b91506020830135612fa881612f6c565b809150509250929050565b600080600080600060808688031215612fcb57600080fd5b8535612fd681612d39565b94506020860135612fe681612d39565b935060408601359250606086013567ffffffffffffffff8082111561300a57600080fd5b818801915088601f83011261301e57600080fd5b81358181111561302d57600080fd5b89602082850101111561303f57600080fd5b9699959850939650602001949392505050565b6000806040838503121561306557600080fd5b823561307081612d39565b9150602083013567ffffffffffffffff81111561308c57600080fd5b61309885828601612dd3565b9150509250929050565b600080604083850312156130b557600080fd5b823567ffffffffffffffff808211156130cd57600080fd5b6130d986838701612dbb565b935060208501359150808211156130ef57600080fd5b5061309885828601612dd3565b6000806040838503121561310f57600080fd5b823561311a81612d39565b91506020830135612fa881612d39565b60008060a0838503121561313d57600080fd5b823561314881612d39565b91506131578460208501612dd3565b90509250929050565b60006020828403121561317257600080fd5b813567ffffffffffffffff81111561318957600080fd5b6123aa84828501612dbb565b6000602082840312156131a757600080fd5b8151610fc581612f6c565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561320a5761320a6131b2565b604052919050565b600067ffffffffffffffff82111561322c5761322c6131b2565b50601f01601f191660200190565b60006040823603121561324c57600080fd5b6040516040810167ffffffffffffffff8282108183111715613270576132706131b2565b816040528435915061328182612d39565b908252602090848201358181111561329857600080fd5b8501905036601f8201126132ab57600080fd5b80356132be6132b982613212565b6131e1565b81815236848385010111156132d257600080fd5b81848401858301376000918101840191909152918301919091525092915050565b60006080828403121561330557600080fd5b6040516080810181811067ffffffffffffffff82111715613328576133286131b2565b60405282356004811061333a57600080fd5b8152602083013561334a81612d39565b6020820152604083810135908201526060928301359281019290925250919050565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18436030181126133a157600080fd5b83018035915067ffffffffffffffff8211156133bc57600080fd5b602001915036819003821315612e2a57600080fd5b818352818160208501375060006020828401015260006020601f19601f840116840101905092915050565b6020815260006123aa6020830184866133d1565b60006020828403121561342257600080fd5b8151610fc581612c72565b60006020828403121561343f57600080fd5b8151610fc581612d39565b60006001600160a01b03808816835280871660208401525084604083015260806060830152612b956080830184866133d1565b60006020828403121561348f57600080fd5b815167ffffffffffffffff8111156134a657600080fd5b8201601f810184136134b757600080fd5b80516134c56132b982613212565b8181528560208385010111156134da57600080fd5b6134eb826020830160208601612cbd565b95945050505050565b600181811c9082168061350857607f821691505b602082108103612dcd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006020828403121561355357600080fd5b5051919050565b60006001600160a01b0380871683526060602084015261357e6060840186886133d1565b915080841660408401525095945050505050565b8581526060602082015260006135ac6060830186886133d1565b82810360408401526135bf8185876133d1565b98975050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b805160048110613662577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b82526020818101516001600160a01b03169083015260408082015190830152606090810151910152565b6000606082016001600160a01b03808716845260208187168186015260606040860152829150855180845260809350838601925081870160005b828110156136e9576136d9858351613629565b93850193908301906001016136c6565b50929998505050505050505050565b600081518084526020808501945080840160005b838110156137285781518752958201959082019060010161370c565b509495945050505050565b6001600160a01b038416815260606020820152600061375560608301856136f8565b828103604084015261376781856136f8565b9695505050505050565b6001600160a01b0384811682528316602082015260c081016123aa6040830184613629565b600481106137cd577f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60f81b9052565b6137de8184613796565b60609190911b7fffffffffffffffffffffffffffffffffffffffff000000000000000000000000166001820152601501919050565b80516020808301519190811015612dcd577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60209190910360031b1b16919050565b61385f8184613796565b6001810191909152602101919050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152612b9560a0830184612ce1565b600082516138b9818460208701612cbd565b919091019291505056fea164736f6c6343000815000a

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

000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a

-----Decoded View---------------
Arg [0] : _manager (address): 0xE867928874439b6C48fB42e908BA0519f287932A

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e867928874439b6c48fb42e908ba0519f287932a


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.