Contract 0x5eF046F040944581Cb4dD4652BBB3fA9bA120F09

 
 
Txn Hash
Method
Block
From
To
Value
0xfeb61ae96375e8f3f6ed0c184cdba5624bb3b5ba8779024766f5ab34e0ebe5f40x60806040115378372020-12-27 19:55:24640 days 13 hrs ago0xa71a51a4863a2f9c2a83a9feb284595020cc80a7 IN  Create: NFTDAOFactory0 Ether0.2112276440
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NFTDAOFactory

Compiler Version
v0.6.5+commit.f956cc89

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-12-27
*/

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;


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

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
      * @dev Safely transfers `tokenId` token from `from` to `to`.
      *
      * Requirements:
      *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
      * - `tokenId` token must exist and be owned by `from`.
      * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
      * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
      *
      * Emits a {Transfer} event.
      */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external;
}

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

        return c;
    }

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

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

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

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

        return c;
    }

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

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

library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// SPDX-License-Identifier: MIT
contract NFTDAO is IERC20 {

    /// @notice using Openzeppelin contracts for SafeMath and Address
    using SafeMath for uint256;
    using Address for address;

    /// @notice presenting the total supply
    uint256 private _totalSupply;

    /// @notice presenting the amount burned
    uint256 public _burnedSupply;

    /// @notice representing the name of the governance token
    string public _name;

    /// @notice representing the symbol of the governance token
    string public _symbol;

    /// @notice representing the decimals of the governance token
    uint8 public immutable _decimals = 18;

    /// @notice a record of balance of a specific account by address
    mapping(address => uint256) private _balances;

    /// a record of allowances for a specific address by address to address mapping
    mapping(address => mapping(address => uint256)) private _allowances;

    /// presenting the shares for sale
    uint256 public _sharesForSale;

    /// @notice the nft used to create the dao contract
    IERC721 public _nftAddress;

    /// @notice struct for raised nfts
    struct _raisedNftStruct {
        IERC721 nftaddress;
        uint tokenid;
    }

    /// @notice array for raised nfts
    _raisedNftStruct[] public _raisedNftArray;

    /// @notice the token id identifying the nft token
    uint256 public _tokenId;

    /// @notice the owner and creator of the contract
    address public _owner;

    /// @notice the buyout price. once its met, all nfts will be transferred to the buyer, all tokens will be burned
    uint256 public _buyoutPrice;

    /// @notice representing the governance contract of the nft
    address public _governor;

    /// @notice representing the timelock address of the nft for the governor
    address public _timelock;

    /// @notice A record of each accounts delegate
    mapping (address => address) public delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint256 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping (address => mapping (uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping (address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)");

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    /// @notice A record of states for signing / validating signatures
    mapping (address => uint) public nonces;

    /// @notice the buyer address of the dao when sold
    address public BuyerAddress;

    /// init of the contract
    bool public _init;

    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance);

    /// @notice An event thats emitted when the buyout price is changed
    event BuyoutChanged(uint previousPrice, uint newPrice);

    /// @notice An event thats emitted when the governor has changed
    event GovernorChanged(address oldGovernor, address newGovernor);

    constructor (IERC721 nftAddress_, address owner_, uint256 tokenId_, uint256 totalSupply_, string memory name_, string memory symbol_, uint256 buyoutPrice_) public {
        _nftAddress = nftAddress_;
        _owner = owner_;
        _tokenId = tokenId_;
        _totalSupply = totalSupply_ * 10 ** 18;
        _name = name_;
        _symbol = symbol_;
        _buyoutPrice = buyoutPrice_;
        _sharesForSale = 0;
        _init = false;
		_balances[_owner] = _totalSupply;
		emit Transfer(address(0), owner_, _totalSupply);
    }
    function init(address governorFactory, address timelockFactory, uint256 timelockinit ) public returns (bool) {
        require(msg.sender == _owner, "NFTDAO: init requires owner");
        _governor = GovernorFactoryInterface(governorFactory).GovernorMint(address(this), _totalSupply);
        _timelock = TimelockFactoryInterface(timelockFactory).TimelockMint(_governor, timelockinit);
        GovernorInstance(_governor).init(_timelock);
        _nftAddress.transferFrom(_owner, address(this), _tokenId);
        _init = true;
        return true;
    }

    /**
    * @dev Destroys `amount` tokens from `account`, reducing
    * and updating burnd tokens for abstraction
    *
    */
    function _burn(uint256 amount) internal {
        _totalSupply -= amount;
    }

    function burnForETH() public {
        uint256 balance = balanceOf(msg.sender);
        _balances[msg.sender] = 0;
        uint256 contractBalalance = address(this).balance;
        uint256 cashout = contractBalalance.mul(balance).div(_totalSupply);
        _burn(balance);
        msg.sender.transfer(cashout);
		emit Transfer(msg.sender, address(0), balance);
    }

    function Buyshares(uint256 amount) public payable {
        require(_sharesForSale >= amount, "NFTDAO: dont have enough shares");
        require(msg.value >= amount.mul(_buyoutPrice).div(_totalSupply), "NFTDAO: Sent amount too low");

        _balances[msg.sender] += amount;
        _sharesForSale -= amount;

        uint256 cost = msg.value - amount.mul(_buyoutPrice).div(_totalSupply);
        msg.sender.transfer(cost);
    }

    function buyout() public payable {
        require(msg.value >= _buyoutPrice, "NFTDAO: buyout price not yet met");
        
        uint256 balance = _balances[msg.sender];
        _balances[msg.sender] = 0;
        
        
        uint256 cost = msg.value - (_buyoutPrice.mul((_totalSupply.sub(balance)).div(_totalSupply)));
	    _burn(balance);
	
        _nftAddress.approve(msg.sender, _tokenId);
        _nftAddress.transferFrom(address(this), msg.sender, _tokenId);
        BuyerAddress = msg.sender;
        msg.sender.transfer(cost);
		emit Transfer(msg.sender, address(0), balance);
    }
    function buyoutTransfer(uint256 min, uint256 max) public {
        require(msg.sender == BuyerAddress, "NFTDAO: buyout price not yet met");
        for (uint i=min; i<max; i++) {
            _raisedNftArray[i].nftaddress.approve(msg.sender, _raisedNftArray[i].tokenid);
            _raisedNftArray[i].nftaddress.transferFrom(address(this), msg.sender, _raisedNftArray[i].tokenid);
        }
    }
    function burnSharesForSale(uint256 amount) public returns (bool success) {
        address sender=msg.sender;
        require(sender == _timelock, "NFTDAO: Only Timelock of the NFT can call burnShares");
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(_sharesForSale >= amount, "NFTDAO: Cant burn more shares than available for sale");

        _burn(amount);
        _sharesForSale -= amount;

        emit Transfer(sender, address(0), amount);
        return true;
    }

    function _mint(uint256 amount) internal {
        _totalSupply = _totalSupply + amount;
    }

    function mintSharesForSale(uint256 amount) public returns (bool success) {
        address sender=msg.sender;
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(sender == _timelock, "NFTDAO: Only Timelock of the NFT can call mintShares");

        _mint(amount);
        _sharesForSale += amount;

        emit Transfer(address(0), address(this), amount);
        return true;
    }

    function changeBuyoutPrice (uint256 amount) public returns (bool success) {
        address sender=msg.sender;
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(sender == _timelock, "NFTDAO: Only Timelock of the NFT can change buyout price");

        uint256 old_buyout = _buyoutPrice;

        _buyoutPrice = amount;
        emit BuyoutChanged(old_buyout, _buyoutPrice);
        return true;
    }

    function changeGovernor (address newgov) public returns (bool success) {
        address sender=msg.sender;
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(sender == _timelock, "NFTDAO: Only Timelock of the NFT can change govenor");

        address old_gov = _governor;

        _governor = newgov;
        emit GovernorChanged(old_gov, newgov);
        return true;
    }

    function addNft(IERC721 new_nft, uint256 tokenid) public returns (bool success) {
        address sender=msg.sender;
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(sender == _timelock, "NFTDAO: Only Timelock of the NFT can call add nft");

        _raisedNftStruct memory temp_struct;
        temp_struct.nftaddress = new_nft;
        temp_struct.tokenid = tokenid;

        _raisedNftArray.push(temp_struct);
        return true;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view returns (uint8) {
        return _decimals;
    }

    /**
    * @dev See {IERC20-totalSupply}.
    */
    function totalSupply() public override view returns (uint256) {
        return _totalSupply;
    }

    /**
    * @dev See {IERC20-balanceOf}. Uses burn abstraction for balance updates without gas and universally.
    */
    function balanceOf(address account) public override view returns (uint256) {
        return
        (_balances[account] * _totalSupply) / (_totalSupply - _burnedSupply);
    }

    /**
    * @dev See {IERC20-transfer}.
    *
    * Requirements:
    *
    * - `recipient` cannot be the zero address.
    * - the caller must have a balance of at least `amount`.
    */
    function transfer(address dst, uint256 rawAmount) external override returns (bool) {
        uint256 amount = rawAmount;
        _transferTokens(msg.sender, dst, amount);
        return true;
    }


    /**
    * fallback function for collection funds
    */
    fallback() external payable {

    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender)
    public
    override
    view
    returns (uint256)
    {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount)
    public
    override
    returns (bool)
    {
        _approve(msg.sender, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero ress.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(address src, address dst, uint256 rawAmount) external override returns (bool) {
        address spender = msg.sender;
        uint256 spenderAllowance = _allowances[src][spender];
        uint256 amount = rawAmount;

        if (spender != src && spenderAllowance != uint256(-1)) {
            uint256 newAllowance = spenderAllowance.sub(amount, "NFTDAO::transferFrom: transfer amount exceeds spender allowance");
            _allowances[src][spender] = newAllowance;

            //emit Approval(src, spender, newAllowance);
        }

        _transferTokens(src, dst, amount);
        return true;
    }


    /**
 * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
 *
 * This is internal function is equivalent to `approve`, and can be used to
 * e.g. set automatic allowances for certain subsystems, etc.
 *
 * Emits an {Approval} event.
 *
 * Requirements:
 *
 * - `owner` cannot be the zero address.
 * - `spender` cannot be the zero address.
 */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");
        _balances[sender] = _balances[sender].sub(
            amount,
            "ERC20: transfer amount exceeds balance"
        );
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) public {
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public {
        bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(_name)), getChainId(), address(this)));
        bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));
        bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), "NFTDAO::delegateBySig: invalid signature");
        require(nonce == nonces[signatory]++, "NFTDAO::delegateBySig: invalid nonce");
        require(now <= expiry, "NFTDAO::delegateBySig: signature expired");
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint256) {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint blockNumber) public view returns (uint256) {
        require(blockNumber < block.number, "NFTDAO::getPriorVotes: not yet determined");

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        address currentDelegate = delegates[delegator];
        uint256 delegatorBalance = _balances[delegator];
        delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveDelegates(currentDelegate, delegatee, delegatorBalance);
    }

    function _transferTokens(address src, address dst, uint256 amount) internal {
        require(src != address(0), "NFTDAO::_transferTokens: cannot transfer from the zero address");
        require(dst != address(0), "NFTDAO::_transferTokens: cannot transfer to the zero address");

        _balances[src] = _balances[src].sub( amount, "NFTDAO::_transferTokens: transfer amount exceeds balance");
        _balances[dst] = _balances[dst].add( amount);
        emit Transfer(src, dst, amount);

        _moveDelegates(delegates[src], delegates[dst], amount);
    }

    function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint256 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint256 srcRepNew = srcRepOld.sub( amount, "NFTDAO::_moveVotes: vote amount underflows");
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint256 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint256 dstRepNew = dstRepOld.add(amount);
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes) internal {
        uint32 blockNumber = safe32(block.number, "NFTDAO::_writeCheckpoint: block number exceeds 32 bits");

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }


    function getChainId() internal pure returns (uint) {
        uint256 chainId;
        assembly { chainId := chainid() }
        return chainId;
    }

}

interface TimelockFactoryInterface {
    function TimelockMint(address admin_,uint delay_) external returns (address);
}

interface GovernorFactoryInterface {
    function GovernorMint(address nft_, uint supply_) external returns (address);
	
}

interface GovernorInstance {
	function init(address timelock) external;
}

/// @notice contract factory for the timelock interface
contract NFTDAOFactory {

    /// @notice event for creation
    event NewNFTDAO(address deployed);

    constructor() public {
    }

    /// minting function
    function NFTDAOMint(
        IERC721 nftAddress_,
        address owner_,
        uint256 tokenId_,
        uint256 totalSupply_,
        string memory name_,
        string memory symbol_,
        uint256 buyoutPrice_
    ) public returns (address) {
        NFTDAO newContract = new NFTDAO(
            nftAddress_,
            owner_,
            tokenId_,
            totalSupply_,
            name_,
            symbol_,
            buyoutPrice_
        );
        emit NewNFTDAO(address(newContract));
        return address(newContract);
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"deployed","type":"address"}],"name":"NewNFTDAO","type":"event"},{"inputs":[{"internalType":"contract IERC721","name":"nftAddress_","type":"address"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"tokenId_","type":"uint256"},{"internalType":"uint256","name":"totalSupply_","type":"uint256"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint256","name":"buyoutPrice_","type":"uint256"}],"name":"NFTDAOMint","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50615eea806100206000396000f3fe60806040523480156200001157600080fd5b50600436106200002e5760003560e01c80639f1faf4f1462000033575b600080fd5b6200005160048036038101906200004b9190620001aa565b62000069565b6040516200006091906200030e565b60405180910390f35b600080888888888888886040516200008190620000fb565b62000093979695949392919062000348565b604051809103906000f080158015620000b0573d6000803e3d6000fd5b5090507f518e1a310449aa1e3558385e2981b0a469d7a13b1a54d4c6827803685859ed2881604051620000e491906200032b565b60405180910390a180915050979650505050505050565b61591080620005a583390190565b6000813590506200011a8162000556565b92915050565b600081359050620001318162000570565b92915050565b600082601f8301126200014957600080fd5b8135620001606200015a8262000401565b620003d3565b915080825260208301602083018583830111156200017d57600080fd5b6200018a83828462000500565b50505092915050565b600081359050620001a4816200058a565b92915050565b600080600080600080600060e0888a031215620001c657600080fd5b6000620001d68a828b0162000120565b9750506020620001e98a828b0162000109565b9650506040620001fc8a828b0162000193565b95505060606200020f8a828b0162000193565b945050608088013567ffffffffffffffff8111156200022d57600080fd5b6200023b8a828b0162000137565b93505060a088013567ffffffffffffffff8111156200025957600080fd5b620002678a828b0162000137565b92505060c06200027a8a828b0162000193565b91505092959891949750929550565b62000294816200049c565b82525050565b620002a5816200044a565b82525050565b620002b681620004b0565b82525050565b6000620002c9826200042e565b620002d5818562000439565b9350620002e78185602086016200050f565b620002f28162000545565b840191505092915050565b620003088162000492565b82525050565b60006020820190506200032560008301846200029a565b92915050565b600060208201905062000342600083018462000289565b92915050565b600060e0820190506200035f600083018a620002ab565b6200036e60208301896200029a565b6200037d6040830188620002fd565b6200038c6060830187620002fd565b8181036080830152620003a08186620002bc565b905081810360a0830152620003b68185620002bc565b9050620003c760c0830184620002fd565b98975050505050505050565b6000604051905081810181811067ffffffffffffffff82111715620003f757600080fd5b8060405250919050565b600067ffffffffffffffff8211156200041957600080fd5b601f19601f8301169050602081019050919050565b600081519050919050565b600082825260208201905092915050565b6000620004578262000472565b9050919050565b60006200046b826200044a565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000620004a982620004d8565b9050919050565b6000620004bd82620004c4565b9050919050565b6000620004d18262000472565b9050919050565b6000620004e582620004ec565b9050919050565b6000620004f98262000472565b9050919050565b82818337600083830152505050565b60005b838110156200052f57808201518184015260208101905062000512565b838111156200053f576000848401525b50505050565b6000601f19601f8301169050919050565b62000561816200044a565b81146200056d57600080fd5b50565b6200057b816200045e565b81146200058757600080fd5b50565b620005958162000492565b8114620005a157600080fd5b5056fe60a0604052601260ff1660809060ff1660f81b8152503480156200002257600080fd5b50604051620059103803806200591083398181016040528101906200004891906200036d565b86600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555084600981905550670de0b6b3a764000084026000819055508260029080519060200190620000fa9291906200021d565b508160039080519060200190620001139291906200021d565b5080600b8190555060006006819055506000601260146101000a81548160ff02191690831515021790555060005460046000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508573ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000546040516200020891906200045d565b60405180910390a350505050505050620005ab565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200026057805160ff191683800117855562000291565b8280016001018555821562000291579182015b828111156200029057825182559160200191906001019062000273565b5b509050620002a09190620002a4565b5090565b620002c991905b80821115620002c5576000816000905550600101620002ab565b5090565b90565b600081519050620002dd816200055d565b92915050565b600081519050620002f48162000577565b92915050565b600082601f8301126200030c57600080fd5b8151620003236200031d82620004a8565b6200047a565b915080825260208301602083018583830111156200034057600080fd5b6200034d83828462000527565b50505092915050565b600081519050620003678162000591565b92915050565b600080600080600080600060e0888a0312156200038957600080fd5b6000620003998a828b01620002e3565b9750506020620003ac8a828b01620002cc565b9650506040620003bf8a828b0162000356565b9550506060620003d28a828b0162000356565b945050608088015167ffffffffffffffff811115620003f057600080fd5b620003fe8a828b01620002fa565b93505060a088015167ffffffffffffffff8111156200041c57600080fd5b6200042a8a828b01620002fa565b92505060c06200043d8a828b0162000356565b91505092959891949750929550565b62000457816200051d565b82525050565b60006020820190506200047460008301846200044c565b92915050565b6000604051905081810181811067ffffffffffffffff821117156200049e57600080fd5b8060405250919050565b600067ffffffffffffffff821115620004c057600080fd5b601f19601f8301169050602081019050919050565b6000620004e282620004fd565b9050919050565b6000620004f682620004d5565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015620005475780820151818401526020810190506200052a565b8381111562000557576000848401525b50505050565b6200056881620004d5565b81146200057457600080fd5b50565b6200058281620004e9565b81146200058e57600080fd5b50565b6200059c816200051d565b8114620005a857600080fd5b50565b60805160f81c615342620005ce6000398061134e528061137452506153426000f3fe6080604052600436106102605760003560e01c8063782d6fe111610144578063b09f1266116100b6578063d28d88521161007a578063d28d88521461094c578063dd62ed3e14610977578063e4c0aaf4146109b4578063e59ad9b0146109f1578063e7a324dc14610a2f578063f1127ed814610a5a57610261565b8063b09f126614610865578063b2bdfa7b14610890578063b349b973146108bb578063b4b5ea57146108e6578063c3cda5201461092357610261565b80639526084311610108578063952608431461076057806395d89b411461078b578063a3e59316146107b6578063a65d6155146107e1578063a9059cbb1461080c578063aac7d1f41461084957610261565b8063782d6fe11461062f5780637dc8777d1461066c5780637ecebe00146106a957806386863ec6146106e6578063869b64e11461072357610261565b8063313ce567116101dd578063587cde1e116101a1578063587cde1e1461051a5780635c19a95c146105575780635c4bfa10146105805780636fcfff451461058a57806370a08231146105c7578063712b6e4b1461060457610261565b8063313ce5671461045757806332424aa314610482578063324436ac146104ad57806354febdd9146104c4578063560e1899146104ef57610261565b806323b872dd1161022457806323b872dd1461035e5780632470db161461039b57806324822514146103c457806328b0eb0f146103ef5780632a9583a11461042c57610261565b806306fdde0314610263578063095ea7b31461028e57806309692110146102cb57806318160ddd1461030857806320606b701461033357610261565b5b005b34801561026f57600080fd5b50610278610a98565b6040516102859190614cc4565b60405180910390f35b34801561029a57600080fd5b506102b560048036038101906102b09190613e26565b610b3a565b6040516102c29190614b7b565b60405180910390f35b3480156102d757600080fd5b506102f260048036038101906102ed9190613f63565b610b51565b6040516102ff9190614b7b565b60405180910390f35b34801561031457600080fd5b5061031d610d25565b60405161032a9190614f86565b60405180910390f35b34801561033f57600080fd5b50610348610d2e565b6040516103559190614b96565b60405180910390f35b34801561036a57600080fd5b5061038560048036038101906103809190613dd7565b610d45565b6040516103929190614b7b565b60405180910390f35b3480156103a757600080fd5b506103c260048036038101906103bd9190613f8c565b610eff565b005b3480156103d057600080fd5b506103d9611143565b6040516103e69190614f86565b60405180910390f35b3480156103fb57600080fd5b5061041660048036038101906104119190613f27565b611149565b6040516104239190614b7b565b60405180910390f35b34801561043857600080fd5b50610441611324565b60405161044e9190614a77565b60405180910390f35b34801561046357600080fd5b5061046c61134a565b604051610479919061500e565b60405180910390f35b34801561048e57600080fd5b50610497611372565b6040516104a4919061500e565b60405180910390f35b3480156104b957600080fd5b506104c2611396565b005b3480156104d057600080fd5b506104d96114d3565b6040516104e69190614f86565b60405180910390f35b3480156104fb57600080fd5b506105046114d9565b6040516105119190614a77565b60405180910390f35b34801561052657600080fd5b50610541600480360381019061053c9190613d49565b6114ff565b60405161054e9190614a77565b60405180910390f35b34801561056357600080fd5b5061057e60048036038101906105799190613d49565b611532565b005b61058861153f565b005b34801561059657600080fd5b506105b160048036038101906105ac9190613d49565b61186f565b6040516105be9190614fca565b60405180910390f35b3480156105d357600080fd5b506105ee60048036038101906105e99190613d49565b611892565b6040516105fb9190614f86565b60405180910390f35b34801561061057600080fd5b506106196118ee565b6040516106269190614f86565b60405180910390f35b34801561063b57600080fd5b5061065660048036038101906106519190613e26565b6118f4565b6040516106639190614f86565b60405180910390f35b34801561067857600080fd5b50610693600480360381019061068e9190613f63565b611ca3565b6040516106a09190614b7b565b60405180910390f35b3480156106b557600080fd5b506106d060048036038101906106cb9190613d49565b611dfd565b6040516106dd9190614f86565b60405180910390f35b3480156106f257600080fd5b5061070d60048036038101906107089190613dd7565b611e15565b60405161071a9190614b7b565b60405180910390f35b34801561072f57600080fd5b5061074a60048036038101906107459190613f63565b6121ef565b6040516107579190614b7b565b60405180910390f35b34801561076c57600080fd5b5061077561237e565b6040516107829190614a77565b60405180910390f35b34801561079757600080fd5b506107a06123a4565b6040516107ad9190614cc4565b60405180910390f35b3480156107c257600080fd5b506107cb612446565b6040516107d89190614f86565b60405180910390f35b3480156107ed57600080fd5b506107f661244c565b6040516108039190614c80565b60405180910390f35b34801561081857600080fd5b50610833600480360381019061082e9190613e26565b612472565b6040516108409190614b7b565b60405180910390f35b610863600480360381019061085e9190613f63565b61248e565b005b34801561087157600080fd5b5061087a612615565b6040516108879190614cc4565b60405180910390f35b34801561089c57600080fd5b506108a56126b3565b6040516108b29190614a77565b60405180910390f35b3480156108c757600080fd5b506108d06126d9565b6040516108dd9190614b7b565b60405180910390f35b3480156108f257600080fd5b5061090d60048036038101906109089190613d49565b6126ec565b60405161091a9190614f86565b60405180910390f35b34801561092f57600080fd5b5061094a60048036038101906109459190613e62565b6127c2565b005b34801561095857600080fd5b50610961612a3f565b60405161096e9190614cc4565b60405180910390f35b34801561098357600080fd5b5061099e60048036038101906109999190613d9b565b612add565b6040516109ab9190614f86565b60405180910390f35b3480156109c057600080fd5b506109db60048036038101906109d69190613d49565b612b64565b6040516109e89190614b7b565b60405180910390f35b3480156109fd57600080fd5b50610a186004803603810190610a139190613f63565b612d16565b604051610a26929190614c9b565b60405180910390f35b348015610a3b57600080fd5b50610a44612d67565b604051610a519190614b96565b60405180910390f35b348015610a6657600080fd5b50610a816004803603810190610a7c9190613eeb565b612d7e565b604051610a8f929190614fe5565b60405180910390f35b606060028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b305780601f10610b0557610100808354040283529160200191610b30565b820191906000526020600020905b815481529060010190602001808311610b1357829003601f168201915b5050505050905090565b6000610b47338484612dbf565b6001905092915050565b600080339050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610be7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bde90614f26565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4e90614ec6565b60405180910390fd5b826006541015610c9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c9390614e66565b60405180910390fd5b610ca583612f8a565b82600660008282540392505081905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051610d139190614f86565b60405180910390a36001915050919050565b60008054905090565b604051610d3a90614a4d565b604051809103902081565b6000803390506000600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008490508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610e2d57507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214155b15610ee6576000610e61826040518060600160405280603f81526020016152ce603f913985612f9c9092919063ffffffff16565b905080600560008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b610ef1878783612ff7565b600193505050509392505050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f8f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8690614e06565b60405180910390fd5b60008290505b8181101561113e5760088181548110610faa57fe5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3336008848154811061100557fe5b9060005260206000209060020201600101546040518363ffffffff1660e01b8152600401611034929190614ac9565b600060405180830381600087803b15801561104e57600080fd5b505af1158015611062573d6000803e3d6000fd5b505050506008818154811061107357fe5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3033600885815481106110cf57fe5b9060005260206000209060020201600101546040518463ffffffff1660e01b81526004016110ff93929190614a92565b600060405180830381600087803b15801561111957600080fd5b505af115801561112d573d6000803e3d6000fd5b505050508080600101915050610f95565b505050565b60095481565b600080339050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156111bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b690614ec6565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461124f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161124690614dc6565b60405180910390fd5b611257613c66565b84816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505083816020018181525050600881908060018154018082558091505060019003906000526020600020906002020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155505060019250505092915050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007f0000000000000000000000000000000000000000000000000000000000000000905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006113a133611892565b90506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060004790506000611416600054611408858561334e90919063ffffffff16565b6133be90919063ffffffff16565b905061142183612f8a565b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611467573d6000803e3d6000fd5b50600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516114c69190614f86565b60405180910390a3505050565b600b5481565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600e6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61153c3382613408565b50565b600b54341015611584576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157b90614e06565b60405180910390fd5b6000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600061164c61163b60005461162d856000546135b090919063ffffffff16565b6133be90919063ffffffff16565b600b5461334e90919063ffffffff16565b3403905061165982612f8a565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3336009546040518363ffffffff1660e01b81526004016116b8929190614ac9565b600060405180830381600087803b1580156116d257600080fd5b505af11580156116e6573d6000803e3d6000fd5b50505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd30336009546040518463ffffffff1660e01b815260040161174b93929190614a92565b600060405180830381600087803b15801561176557600080fd5b505af1158015611779573d6000803e3d6000fd5b5050505033601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611804573d6000803e3d6000fd5b50600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516118639190614f86565b60405180910390a35050565b60106020528060005260406000206000915054906101000a900463ffffffff1681565b600060015460005403600054600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205402816118e657fe5b049050919050565b60065481565b6000438210611938576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192f90614f46565b60405180910390fd5b6000601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff1614156119a5576000915050611c9d565b82600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1611611a8f57600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060010154915050611c9d565b82600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008063ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff161115611b10576000915050611c9d565b600080905060006001830390505b8163ffffffff168163ffffffff161115611c37576000600283830363ffffffff1681611b4657fe5b0482039050611b53613c96565b600f60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff168152602001600182015481525050905086816000015163ffffffff161415611c0f57806020015195505050505050611c9d565b86816000015163ffffffff161015611c2957819350611c30565b6001820392505b5050611b1e565b600f60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206001015493505050505b92915050565b600080339050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611d19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d1090614ec6565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611da9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611da090614e86565b60405180910390fd5b6000600b54905083600b819055507f438008f3ae0c4975f7be1471910d42cdb54e5990eac7cdb6b93a37ba0894123381600b54604051611dea929190614fa1565b60405180910390a1600192505050919050565b60116020528060005260406000206000915090505481565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ea7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9e90614d06565b60405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff16639632f82f306000546040518363ffffffff1660e01b8152600401611ee4929190614ac9565b602060405180830381600087803b158015611efe57600080fd5b505af1158015611f12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f369190613d72565b600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff16631a88a4e8600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401611fd3929190614b52565b602060405180830381600087803b158015611fed57600080fd5b505af1158015612001573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120259190613d72565b600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166319ab453c600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b81526004016120e29190614a77565b600060405180830381600087803b1580156120fc57600080fd5b505af1158015612110573d6000803e3d6000fd5b50505050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16306009546040518463ffffffff1660e01b815260040161219793929190614b1b565b600060405180830381600087803b1580156121b157600080fd5b505af11580156121c5573d6000803e3d6000fd5b505050506001601260146101000a81548160ff021916908315150217905550600190509392505050565b600080339050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612265576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225c90614ec6565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146122f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122ec90614f06565b60405180910390fd5b6122fe836135fa565b826006600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161236c9190614f86565b60405180910390a36001915050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561243c5780601f106124115761010080835404028352916020019161243c565b820191906000526020600020905b81548152906001019060200180831161241f57829003601f168201915b5050505050905090565b60015481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080829050612483338583612ff7565b600191505092915050565b8060065410156124d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ca90614e26565b60405180910390fd5b6124fc6000546124ee600b548461334e90919063ffffffff16565b6133be90919063ffffffff16565b34101561253e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161253590614d86565b60405180910390fd5b80600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508060066000828254039250508190555060006125c66000546125b8600b548561334e90919063ffffffff16565b6133be90919063ffffffff16565b340390503373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612610573d6000803e3d6000fd5b505050565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126ab5780601f10612680576101008083540402835291602001916126ab565b820191906000526020600020905b81548152906001019060200180831161268e57829003601f168201915b505050505081565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601260149054906101000a900460ff1681565b600080601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff16116127565760006127ba565b600f60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff168152602001908152602001600020600101545b915050919050565b60006040516127d090614a4d565b604051809103902060026040516127e791906149ff565b60405180910390206127f7613608565b3060405160200161280b9493929190614bf6565b604051602081830303815290604052805190602001209050600060405161283190614a62565b604051809103902088888860405160200161284f9493929190614bb1565b6040516020818303038152906040528051906020012090506000828260405160200161287c929190614a16565b6040516020818303038152906040528051906020012090506000600182888888604051600081526020016040526040516128b99493929190614c3b565b6020604051602081039080840390855afa1580156128db573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612957576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161294e90614d26565b60405180910390fd5b601160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008154809291906001019190505589146129e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129dd90614ce6565b60405180910390fd5b87421115612a29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a2090614f66565b60405180910390fd5b612a33818b613408565b50505050505050505050565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612ad55780601f10612aaa57610100808354040283529160200191612ad5565b820191906000526020600020905b815481529060010190602001808311612ab857829003601f168201915b505050505081565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080339050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612bda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612bd190614ec6565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614612c6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c6190614d46565b60405180910390fd5b6000600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905083600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fde4b3f61490b74c0ed6237523974fe299126bbbf8a8a7482fd220104c59b0c848185604051612d03929190614af2565b60405180910390a1600192505050919050565b60088181548110612d2357fe5b90600052602060002090600202016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b604051612d7390614a62565b604051809103902081565b600f602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060010154905082565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612e2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e2690614ee6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612e9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e9690614d66565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051612f7d9190614f86565b60405180910390a3505050565b80600080828254039250508190555050565b6000838311158290612fe4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612fdb9190614cc4565b60405180910390fd5b5060008385039050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161305e90614e46565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156130d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016130ce90614de6565b60405180910390fd5b6131438160405180606001604052806038815260200161523660389139600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612f9c9092919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131d881600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461361590919063ffffffff16565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516132789190614f86565b60405180910390a3613349600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168361366a565b505050565b60008083141561336157600090506133b8565b600082840290508284828161337257fe5b04146133b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016133aa90614ea6565b60405180910390fd5b809150505b92915050565b600061340083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613921565b905092915050565b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46135aa82848361366a565b50505050565b60006135f283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612f9c565b905092915050565b806000540160008190555050565b6000804690508091505090565b600080828401905083811015613660576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161365790614da6565b60405180910390fd5b8091505092915050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156136a65750600081115b1561391c57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146137f0576000601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff16116137495760006137ad565b600f60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff168152602001908152602001600020600101545b905060006137de846040518060600160405280602a81526020016152a4602a913984612f9c9092919063ffffffff16565b90506137ec86848484613982565b5050505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461391b576000601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff161161388e5760006138f2565b600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff168152602001908152602001600020600101545b90506000613909848361361590919063ffffffff16565b905061391785848484613982565b5050505b5b505050565b60008083118290613968576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161395f9190614cc4565b60405180910390fd5b50600083858161397457fe5b049050809150509392505050565b60006139a64360405180606001604052806036815260200161526e60369139613c10565b905060008463ffffffff16118015613a3b57508063ffffffff16600f60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16145b15613aac5781600f60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060010181905550613bb9565b60405180604001604052808263ffffffff16815260200183815250600f60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008663ffffffff1663ffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff1602179055506020820151816001015590505060018401601060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505b8473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248484604051613c01929190614fa1565b60405180910390a25050505050565b600064010000000083108290613c5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401613c539190614cc4565b60405180910390fd5b5082905092915050565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b6040518060400160405280600063ffffffff168152602001600081525090565b600081359050613cc5816151ab565b92915050565b600081519050613cda816151ab565b92915050565b600081359050613cef816151c2565b92915050565b600081359050613d04816151d9565b92915050565b600081359050613d19816151f0565b92915050565b600081359050613d2e81615207565b92915050565b600081359050613d438161521e565b92915050565b600060208284031215613d5b57600080fd5b6000613d6984828501613cb6565b91505092915050565b600060208284031215613d8457600080fd5b6000613d9284828501613ccb565b91505092915050565b60008060408385031215613dae57600080fd5b6000613dbc85828601613cb6565b9250506020613dcd85828601613cb6565b9150509250929050565b600080600060608486031215613dec57600080fd5b6000613dfa86828701613cb6565b9350506020613e0b86828701613cb6565b9250506040613e1c86828701613d0a565b9150509250925092565b60008060408385031215613e3957600080fd5b6000613e4785828601613cb6565b9250506020613e5885828601613d0a565b9150509250929050565b60008060008060008060c08789031215613e7b57600080fd5b6000613e8989828a01613cb6565b9650506020613e9a89828a01613d0a565b9550506040613eab89828a01613d0a565b9450506060613ebc89828a01613d34565b9350506080613ecd89828a01613ce0565b92505060a0613ede89828a01613ce0565b9150509295509295509295565b60008060408385031215613efe57600080fd5b6000613f0c85828601613cb6565b9250506020613f1d85828601613d1f565b9150509250929050565b60008060408385031215613f3a57600080fd5b6000613f4885828601613cf5565b9250506020613f5985828601613d0a565b9150509250929050565b600060208284031215613f7557600080fd5b6000613f8384828501613d0a565b91505092915050565b60008060408385031215613f9f57600080fd5b6000613fad85828601613d0a565b9250506020613fbe85828601613d0a565b9150509250929050565b613fd181615103565b82525050565b613fe081615082565b82525050565b613fef81615070565b82525050565b613ffe81615094565b82525050565b61400d816150a0565b82525050565b61402461401f826150a0565b615190565b82525050565b600081546001811660008114614047576001811461406c576140b0565b607f60028304166140588187615049565b955060ff19831686528086019350506140b0565b6002820461407a8187615049565b955061408585615029565b60005b828110156140a757815481890152600182019150602081019050614088565b82880195505050505b505092915050565b6140c181615115565b82525050565b60006140d28261503e565b6140dc8185615054565b93506140ec81856020860161515d565b6140f58161519a565b840191505092915050565b600061410d602483615054565b91507f4e465444414f3a3a64656c656761746542795369673a20696e76616c6964206e60008301527f6f6e6365000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614173601b83615054565b91507f4e465444414f3a20696e6974207265717569726573206f776e657200000000006000830152602082019050919050565b60006141b3602883615054565b91507f4e465444414f3a3a64656c656761746542795369673a20696e76616c6964207360008301527f69676e61747572650000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614219603383615054565b91507f4e465444414f3a204f6e6c792054696d656c6f636b206f6620746865204e465460008301527f2063616e206368616e676520676f76656e6f72000000000000000000000000006020830152604082019050919050565b600061427f602283615054565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006142e5601b83615054565b91507f4e465444414f3a2053656e7420616d6f756e7420746f6f206c6f7700000000006000830152602082019050919050565b6000614325600283615065565b91507f19010000000000000000000000000000000000000000000000000000000000006000830152600282019050919050565b6000614365601b83615054565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b60006143a5603183615054565b91507f4e465444414f3a204f6e6c792054696d656c6f636b206f6620746865204e465460008301527f2063616e2063616c6c20616464206e66740000000000000000000000000000006020830152604082019050919050565b600061440b603c83615054565b91507f4e465444414f3a3a5f7472616e73666572546f6b656e733a2063616e6e6f742060008301527f7472616e7366657220746f20746865207a65726f2061646472657373000000006020830152604082019050919050565b6000614471602083615054565b91507f4e465444414f3a206275796f7574207072696365206e6f7420796574206d65746000830152602082019050919050565b60006144b1601f83615054565b91507f4e465444414f3a20646f6e74206861766520656e6f75676820736861726573006000830152602082019050919050565b60006144f1603e83615054565b91507f4e465444414f3a3a5f7472616e73666572546f6b656e733a2063616e6e6f742060008301527f7472616e736665722066726f6d20746865207a65726f206164647265737300006020830152604082019050919050565b6000614557604383615065565b91507f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353660008301527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208301527f63742900000000000000000000000000000000000000000000000000000000006040830152604382019050919050565b60006145e3603583615054565b91507f4e465444414f3a2043616e74206275726e206d6f72652073686172657320746860008301527f616e20617661696c61626c6520666f722073616c6500000000000000000000006020830152604082019050919050565b6000614649603883615054565b91507f4e465444414f3a204f6e6c792054696d656c6f636b206f6620746865204e465460008301527f2063616e206368616e6765206275796f757420707269636500000000000000006020830152604082019050919050565b60006146af602183615054565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000614715602583615054565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061477b602483615054565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006147e1603a83615065565b91507f44656c65676174696f6e28616464726573732064656c6567617465652c75696e60008301527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020830152603a82019050919050565b6000614847603483615054565b91507f4e465444414f3a204f6e6c792054696d656c6f636b206f6620746865204e465460008301527f2063616e2063616c6c206d696e745368617265730000000000000000000000006020830152604082019050919050565b60006148ad603483615054565b91507f4e465444414f3a204f6e6c792054696d656c6f636b206f6620746865204e465460008301527f2063616e2063616c6c206275726e5368617265730000000000000000000000006020830152604082019050919050565b6000614913602983615054565b91507f4e465444414f3a3a6765745072696f72566f7465733a206e6f7420796574206460008301527f657465726d696e656400000000000000000000000000000000000000000000006020830152604082019050919050565b6000614979602883615054565b91507f4e465444414f3a3a64656c656761746542795369673a207369676e617475726560008301527f20657870697265640000000000000000000000000000000000000000000000006020830152604082019050919050565b6149db816150dc565b82525050565b6149ea816150e6565b82525050565b6149f9816150f6565b82525050565b6000614a0b828461402a565b915081905092915050565b6000614a2182614318565b9150614a2d8285614013565b602082019150614a3d8284614013565b6020820191508190509392505050565b6000614a588261454a565b9150819050919050565b6000614a6d826147d4565b9150819050919050565b6000602082019050614a8c6000830184613fe6565b92915050565b6000606082019050614aa76000830186613fc8565b614ab46020830185613fc8565b614ac160408301846149d2565b949350505050565b6000604082019050614ade6000830185613fc8565b614aeb60208301846149d2565b9392505050565b6000604082019050614b076000830185613fe6565b614b146020830184613fe6565b9392505050565b6000606082019050614b306000830186613fe6565b614b3d6020830185613fc8565b614b4a60408301846149d2565b949350505050565b6000604082019050614b676000830185613fe6565b614b7460208301846149d2565b9392505050565b6000602082019050614b906000830184613ff5565b92915050565b6000602082019050614bab6000830184614004565b92915050565b6000608082019050614bc66000830187614004565b614bd36020830186613fe6565b614be060408301856149d2565b614bed60608301846149d2565b95945050505050565b6000608082019050614c0b6000830187614004565b614c186020830186614004565b614c2560408301856149d2565b614c326060830184613fd7565b95945050505050565b6000608082019050614c506000830187614004565b614c5d60208301866149f0565b614c6a6040830185614004565b614c776060830184614004565b95945050505050565b6000602082019050614c9560008301846140b8565b92915050565b6000604082019050614cb060008301856140b8565b614cbd60208301846149d2565b9392505050565b60006020820190508181036000830152614cde81846140c7565b905092915050565b60006020820190508181036000830152614cff81614100565b9050919050565b60006020820190508181036000830152614d1f81614166565b9050919050565b60006020820190508181036000830152614d3f816141a6565b9050919050565b60006020820190508181036000830152614d5f8161420c565b9050919050565b60006020820190508181036000830152614d7f81614272565b9050919050565b60006020820190508181036000830152614d9f816142d8565b9050919050565b60006020820190508181036000830152614dbf81614358565b9050919050565b60006020820190508181036000830152614ddf81614398565b9050919050565b60006020820190508181036000830152614dff816143fe565b9050919050565b60006020820190508181036000830152614e1f81614464565b9050919050565b60006020820190508181036000830152614e3f816144a4565b9050919050565b60006020820190508181036000830152614e5f816144e4565b9050919050565b60006020820190508181036000830152614e7f816145d6565b9050919050565b60006020820190508181036000830152614e9f8161463c565b9050919050565b60006020820190508181036000830152614ebf816146a2565b9050919050565b60006020820190508181036000830152614edf81614708565b9050919050565b60006020820190508181036000830152614eff8161476e565b9050919050565b60006020820190508181036000830152614f1f8161483a565b9050919050565b60006020820190508181036000830152614f3f816148a0565b9050919050565b60006020820190508181036000830152614f5f81614906565b9050919050565b60006020820190508181036000830152614f7f8161496c565b9050919050565b6000602082019050614f9b60008301846149d2565b92915050565b6000604082019050614fb660008301856149d2565b614fc360208301846149d2565b9392505050565b6000602082019050614fdf60008301846149e1565b92915050565b6000604082019050614ffa60008301856149e1565b61500760208301846149d2565b9392505050565b600060208201905061502360008301846149f0565b92915050565b60008190508160005260206000209050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b600081905092915050565b600061507b826150bc565b9050919050565b600061508d826150bc565b9050919050565b60008115159050919050565b6000819050919050565b60006150b582615070565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b600061510e82615139565b9050919050565b600061512082615127565b9050919050565b6000615132826150bc565b9050919050565b60006151448261514b565b9050919050565b6000615156826150bc565b9050919050565b60005b8381101561517b578082015181840152602081019050615160565b8381111561518a576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b6151b481615070565b81146151bf57600080fd5b50565b6151cb816150a0565b81146151d657600080fd5b50565b6151e2816150aa565b81146151ed57600080fd5b50565b6151f9816150dc565b811461520457600080fd5b50565b615210816150e6565b811461521b57600080fd5b50565b615227816150f6565b811461523257600080fd5b5056fe4e465444414f3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e63654e465444414f3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d626572206578636565647320333220626974734e465444414f3a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f77734e465444414f3a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365a26469706673582212200dfa089eca93502dcc0e4bb02c5b5d21e6c1d901b99e114730d7dbee1dcff59e64736f6c63430006050033a2646970667358221220ddc14cfd79ba3d8630287540c48e483092fa753bcdb900c1afeb495ddb8b277564736f6c63430006050033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.