Contract Address Details

0xB42DD79C056d4b511c07c29d4c35403b47bE29B9

Contract Name
PrivateExitModule
Creator
0x5befa2–df5471 at 0x8b2ff8–b6fae5
Balance
0 Fuse
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
22503408
Contract name:
PrivateExitModule




Optimization enabled
true
Compiler version
v0.8.6+commit.11564f7e




Optimization runs
200
EVM Version
default




Verified at
2022-04-15T09:19:49.812943Z

Contract source code

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

// File @openzeppelin/contracts/token/ERC20/IERC20.sol@v4.5.0

// SPDX-License-Identifier: GPL-2.0-or-later
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `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);

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

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


// File @openzeppelin/contracts/utils/Address.sol@v4.5.0


// OpenZeppelin Contracts (last updated v4.5.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 functionCall(target, data, "Address: low-level call failed");
    }

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

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

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

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

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

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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


// File @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol@v4.5.0


// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;


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

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

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

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

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

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

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

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


// File @openzeppelin/contracts/security/ReentrancyGuard.sol@v4.5.0


// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}


// File contracts/interfaces/ILP.sol


pragma solidity ^0.8.6;

interface ILP {
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function mint(address _to, uint256 _amount) external returns (bool);

    function mintable() external view returns (bool);

    function burnable() external view returns (bool);

    function mintableStatusFrozen() external view returns (bool);

    function burnableStatusFrozen() external view returns (bool);

    function burn(
        uint256 _amount,
        address[] memory _tokens,
        address[] memory _adapters,
        address[] memory _pools
    ) external returns (bool);
}


// File contracts/interfaces/IDao.sol


pragma solidity ^0.8.6;

interface IDao {
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function lp() external view returns (address);

    function burnLp(
        address _recipient,
        uint256 _share,
        address[] memory _tokens,
        address[] memory _adapters,
        address[] memory _pools
    ) external returns (bool);

    function setLp(address _lp) external returns (bool);

    function quorum() external view returns (uint8);

    function executedTx(bytes32 _txHash) external view returns (bool);

    function mintable() external view returns (bool);

    function burnable() external view returns (bool);

    function numberOfPermitted() external view returns (uint256);

    function numberOfAdapters() external view returns (uint256);

    function executePermitted(
        address _target,
        bytes calldata _data,
        uint256 _value
    ) external returns (bool);
}


// File contracts/modules/PrivateExitModule.sol


pragma solidity ^0.8.6;






contract PrivateExitModule is ReentrancyGuard {
    using SafeERC20 for IERC20;
    using Address for address payable;

    struct PrivateExitOffer {
        bool isActive;
        address recipient;
        uint256 lpAmount;
        uint256 ethAmount;
        address[] tokenAddresses;
        uint256[] tokenAmounts;
    }

    mapping(address => mapping(uint256 => PrivateExitOffer))
        public privateExitOffers; // privateExitOffers[dao][offerId]

    mapping(address => uint256) public numberOfPrivateOffers;

    event PrivateExit(
        address indexed recipient,
        uint256 indexed lpAmount,
        uint256 ethAmount,
        address[] tokenAddresses,
        uint256[] tokenAmounts
    );

    function createPrivateExitOffer(
        address _recipient,
        uint256 _lpAmount,
        uint256 _ethAmount,
        address[] memory _tokenAddresses,
        uint256[] memory _tokenAmounts
    ) external returns (bool success) {
        require(
            _tokenAddresses.length == _tokenAmounts.length,
            "PrivateExitModule: Invalid Tokens"
        );

        privateExitOffers[msg.sender][
            numberOfPrivateOffers[msg.sender]
        ] = PrivateExitOffer({
            isActive: true,
            recipient: _recipient,
            lpAmount: _lpAmount,
            ethAmount: _ethAmount,
            tokenAddresses: _tokenAddresses,
            tokenAmounts: _tokenAmounts
        });

        numberOfPrivateOffers[msg.sender]++;

        return true;
    }

    function disablePrivateExitOffer(uint256 _offerId)
        external
        returns (bool success)
    {
        require(
            privateExitOffers[msg.sender][_offerId].isActive == true,
            "PrivateExitModule: Already Disabled"
        );

        privateExitOffers[msg.sender][_offerId].isActive = false;

        return true;
    }

    function privateExit(address _daoAddress, uint256 _offerId)
        external
        nonReentrant
        returns (bool success)
    {
        PrivateExitOffer storage offer = privateExitOffers[_daoAddress][
            _offerId
        ];

        require(offer.isActive, "PrivateExitModule: Offer is Disabled");

        offer.isActive = false;

        require(
            offer.recipient == msg.sender,
            "PrivateExitModule: Invalid Recipient"
        );

        IDao dao = IDao(_daoAddress);

        address lpAddress = dao.lp();

        bool burnableStatus = ILP(lpAddress).burnable();

        require(
            burnableStatus || !ILP(lpAddress).burnableStatusFrozen(),
            "PrivateExitModule: LP is not Burnable"
        );

        if (!burnableStatus) {
            dao.executePermitted(
                lpAddress,
                abi.encodeWithSignature("changeBurnable(bool)", true),
                0
            );
        }

        IERC20(lpAddress).safeTransferFrom(
            msg.sender,
            address(this),
            offer.lpAmount
        );

        IERC20(lpAddress).approve(lpAddress, offer.lpAmount);

        address[] memory emptyAddressArray = new address[](0);

        ILP(lpAddress).burn(
            offer.lpAmount,
            emptyAddressArray,
            emptyAddressArray,
            emptyAddressArray
        );

        for (uint256 i = 0; i < offer.tokenAddresses.length; i++) {
            if (offer.tokenAmounts[i] > 0) {
                dao.executePermitted(
                    offer.tokenAddresses[i],
                    abi.encodeWithSignature(
                        "transfer(address,uint256)",
                        msg.sender,
                        offer.tokenAmounts[i]
                    ),
                    0
                );
            }
        }

        if (offer.ethAmount > 0) {
            dao.executePermitted(msg.sender, "", offer.ethAmount);
        }

        if (!burnableStatus) {
            dao.executePermitted(
                lpAddress,
                abi.encodeWithSignature("changeBurnable(bool)", false),
                0
            );
        }

        emit PrivateExit(
            offer.recipient,
            offer.lpAmount,
            offer.ethAmount,
            offer.tokenAddresses,
            offer.tokenAmounts
        );

        return true;
    }

    function getOffers(address _dao)
        external
        view
        returns (PrivateExitOffer[] memory)
    {
        PrivateExitOffer[] memory offers = new PrivateExitOffer[](
            numberOfPrivateOffers[_dao]
        );

        for (uint256 i = 0; i < numberOfPrivateOffers[_dao]; i++) {
            offers[i] = privateExitOffers[_dao][i];
        }

        return offers;
    }

    event Received(address indexed, uint256);

    receive() external payable {
        payable(msg.sender).sendValue(msg.value);

        emit Received(msg.sender, msg.value);
    }
}
        

Contract ABI

[{"type":"event","name":"PrivateExit","inputs":[{"type":"address","name":"recipient","internalType":"address","indexed":true},{"type":"uint256","name":"lpAmount","internalType":"uint256","indexed":true},{"type":"uint256","name":"ethAmount","internalType":"uint256","indexed":false},{"type":"address[]","name":"tokenAddresses","internalType":"address[]","indexed":false},{"type":"uint256[]","name":"tokenAmounts","internalType":"uint256[]","indexed":false}],"anonymous":false},{"type":"event","name":"Received","inputs":[{"type":"address","name":"","internalType":"address","indexed":true},{"type":"uint256","name":"","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"success","internalType":"bool"}],"name":"createPrivateExitOffer","inputs":[{"type":"address","name":"_recipient","internalType":"address"},{"type":"uint256","name":"_lpAmount","internalType":"uint256"},{"type":"uint256","name":"_ethAmount","internalType":"uint256"},{"type":"address[]","name":"_tokenAddresses","internalType":"address[]"},{"type":"uint256[]","name":"_tokenAmounts","internalType":"uint256[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"success","internalType":"bool"}],"name":"disablePrivateExitOffer","inputs":[{"type":"uint256","name":"_offerId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct PrivateExitModule.PrivateExitOffer[]","components":[{"type":"bool","name":"isActive","internalType":"bool"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"lpAmount","internalType":"uint256"},{"type":"uint256","name":"ethAmount","internalType":"uint256"},{"type":"address[]","name":"tokenAddresses","internalType":"address[]"},{"type":"uint256[]","name":"tokenAmounts","internalType":"uint256[]"}]}],"name":"getOffers","inputs":[{"type":"address","name":"_dao","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"numberOfPrivateOffers","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"success","internalType":"bool"}],"name":"privateExit","inputs":[{"type":"address","name":"_daoAddress","internalType":"address"},{"type":"uint256","name":"_offerId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"isActive","internalType":"bool"},{"type":"address","name":"recipient","internalType":"address"},{"type":"uint256","name":"lpAmount","internalType":"uint256"},{"type":"uint256","name":"ethAmount","internalType":"uint256"}],"name":"privateExitOffers","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"receive","stateMutability":"payable"}]
            

Deployed ByteCode

0x6080604052600436106100595760003560e01c80632d86c000146100a45780633c0f968d146100da57806355715d1c1461011557806394f9e86e14610145578063979d9513146101655780639a3fab74146101e757600080fd5b3661009f576100683334610207565b60405134815233907f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f885258749060200160405180910390a2005b600080fd5b3480156100b057600080fd5b506100c46100bf366004611363565b61032a565b6040516100d191906115b5565b60405180910390f35b3480156100e657600080fd5b506101076100f5366004611363565b60026020526000908152604090205481565b6040519081526020016100d1565b34801561012157600080fd5b5061013561013036600461139d565b61053e565b60405190151581526020016100d1565b34801561015157600080fd5b506101356101603660046113c9565b610d8a565b34801561017157600080fd5b506101bd61018036600461139d565b6001602081815260009384526040808520909152918352912080549181015460029091015460ff83169261010090046001600160a01b0316919084565b6040805194151585526001600160a01b0390931660208501529183015260608201526080016100d1565b3480156101f357600080fd5b506101356102023660046114dc565b610ee7565b8047101561025c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064015b60405180910390fd5b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146102a9576040519150601f19603f3d011682016040523d82523d6000602084013e6102ae565b606091505b50509050806103255760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610253565b505050565b6001600160a01b0381166000908152600260205260408120546060919067ffffffffffffffff81111561035f5761035f611844565b6040519080825280602002602001820160405280156103d457816020015b6103c16040518060c0016040528060001515815260200160006001600160a01b03168152602001600081526020016000815260200160608152602001606081525090565b81526020019060019003908161037d5790505b50905060005b6001600160a01b038416600090815260026020526040902054811015610537576001600160a01b038085166000908152600160208181526040808420868552825292839020835160c081018552815460ff8116151582526101009004909516858301529182015484840152600282015460608501526003820180548451818402810184019095528085529293608086019390928301828280156104a657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610488575b50505050508152602001600482018054806020026020016040519081016040528092919081815260200182805480156104fe57602002820191906000526020600020905b8154815260200190600101908083116104ea575b5050505050815250508282815181106105195761051961182e565b6020026020010181905250808061052f90611805565b9150506103da565b5092915050565b6000600260005414156105935760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610253565b600260009081556001600160a01b03841681526001602090815260408083208584529091529020805460ff166106175760405162461bcd60e51b8152602060048201526024808201527f50726976617465457869744d6f64756c653a204f666665722069732044697361604482015263189b195960e21b6064820152608401610253565b805460ff191680825561010090046001600160a01b031633146106885760405162461bcd60e51b8152602060048201526024808201527f50726976617465457869744d6f64756c653a20496e76616c69642052656369706044820152631a595b9d60e21b6064820152608401610253565b60008490506000816001600160a01b031663313c06a06040518163ffffffff1660e01b815260040160206040518083038186803b1580156106c857600080fd5b505afa1580156106dc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107009190611380565b90506000816001600160a01b031663a07c7ce46040518163ffffffff1660e01b815260040160206040518083038186803b15801561073d57600080fd5b505afa158015610751573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077591906114ba565b905080806107f15750816001600160a01b031663f7dab5176040518163ffffffff1660e01b815260040160206040518083038186803b1580156107b757600080fd5b505afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef91906114ba565b155b61084b5760405162461bcd60e51b815260206004820152602560248201527f50726976617465457869744d6f64756c653a204c50206973206e6f74204275726044820152646e61626c6560d81b6064820152608401610253565b8061091157604051600160248201526001600160a01b0384169063d293aba490849060440160408051601f198184030181529181526020820180516001600160e01b031663c91f2ef960e01b1790525160e084901b6001600160e01b03191681526108bd929190600090600401611581565b602060405180830381600087803b1580156108d757600080fd5b505af11580156108eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061090f91906114ba565b505b600184015461092e906001600160a01b0384169033903090610f87565b600184015460405163095ea7b360e01b81526001600160a01b03841660048201819052602482019290925263095ea7b390604401602060405180830381600087803b15801561097c57600080fd5b505af1158015610990573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b491906114ba565b5060408051600081526020810191829052600186015463ec5a4bdd60e01b909252906001600160a01b0384169063ec5a4bdd906109f790848080602481016116b0565b602060405180830381600087803b158015610a1157600080fd5b505af1158015610a25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4991906114ba565b5060005b6003860154811015610bb3576000866004018281548110610a7057610a7061182e565b90600052602060002001541115610ba157846001600160a01b031663d293aba4876003018381548110610aa557610aa561182e565b9060005260206000200160009054906101000a90046001600160a01b031633896004018581548110610ad957610ad961182e565b6000918252602090912001546040516001600160a01b039092166024830152604482015260640160408051601f198184030181529181526020820180516001600160e01b031663a9059cbb60e01b1790525160e084901b6001600160e01b0319168152610b4d929190600090600401611581565b602060405180830381600087803b158015610b6757600080fd5b505af1158015610b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9f91906114ba565b505b80610bab81611805565b915050610a4d565b50600285015415610c545760028501546040516334a4eae960e21b8152336004820152606060248201526000606482015260448101919091526001600160a01b0385169063d293aba490608401602060405180830381600087803b158015610c1a57600080fd5b505af1158015610c2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5291906114ba565b505b81610d1a57604051600060248201526001600160a01b0385169063d293aba490859060440160408051601f198184030181529181526020820180516001600160e01b031663c91f2ef960e01b1790525160e084901b6001600160e01b0319168152610cc6929190600090600401611581565b602060405180830381600087803b158015610ce057600080fd5b505af1158015610cf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1891906114ba565b505b6001850154855460028701546040516101009092046001600160a01b0316917fec0e4b5fdea15b6868601c11a9a0eb9c2780abb56980ab32ded0304cbee3a2f391610d6e9160038b019060048c01906116ef565b60405180910390a3600195505050505050600160005592915050565b60008151835114610de75760405162461bcd60e51b815260206004820152602160248201527f50726976617465457869744d6f64756c653a20496e76616c696420546f6b656e6044820152607360f81b6064820152608401610253565b6040805160c08101825260018082526001600160a01b0389811660208085019182528486018b8152606086018b8152608087018b815260a088018b905233600090815287855289812060028087528b83205483529086529990208851815496516001600160a81b0319909716901515610100600160a81b031916176101009690971695909502959095178455905194830194909455925194810194909455518051929392610e9b926003850192019061123c565b5060a08201518051610eb79160048401916020909101906112a1565b50503360009081526002602052604081208054925090610ed683611805565b909155506001979650505050505050565b33600090815260016020818152604080842085855290915282205460ff16151514610f605760405162461bcd60e51b815260206004820152602360248201527f50726976617465457869744d6f64756c653a20416c72656164792044697361626044820152621b195960ea1b6064820152608401610253565b50336000908152600160208181526040808420948452939052919020805460ff1916905590565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610fe1908590610fe7565b50505050565b600061103c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166110b99092919063ffffffff16565b805190915015610325578080602001905181019061105a91906114ba565b6103255760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610253565b60606110c884846000856110d2565b90505b9392505050565b6060824710156111335760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610253565b6001600160a01b0385163b61118a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610253565b600080866001600160a01b031685876040516111a69190611565565b60006040518083038185875af1925050503d80600081146111e3576040519150601f19603f3d011682016040523d82523d6000602084013e6111e8565b606091505b50915091506111f8828286611203565b979650505050505050565b606083156112125750816110cb565b8251156112225782518084602001fd5b8160405162461bcd60e51b8152600401610253919061169d565b828054828255906000526020600020908101928215611291579160200282015b8281111561129157825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061125c565b5061129d9291506112dc565b5090565b828054828255906000526020600020908101928215611291579160200282015b828111156112915782518255916020019190600101906112c1565b5b8082111561129d57600081556001016112dd565b600082601f83011261130257600080fd5b81356020611317611312836117b5565b611784565b80838252828201915082860187848660051b890101111561133757600080fd5b60005b858110156113565781358452928401929084019060010161133a565b5090979650505050505050565b60006020828403121561137557600080fd5b81356110cb8161185a565b60006020828403121561139257600080fd5b81516110cb8161185a565b600080604083850312156113b057600080fd5b82356113bb8161185a565b946020939093013593505050565b600080600080600060a086880312156113e157600080fd5b85356113ec8161185a565b9450602086810135945060408701359350606087013567ffffffffffffffff8082111561141857600080fd5b818901915089601f83011261142c57600080fd5b813561143a611312826117b5565b8082825285820191508585018d878560051b880101111561145a57600080fd5b600095505b838610156114865780356114728161185a565b83526001959095019491860191860161145f565b5096505050608089013592508083111561149f57600080fd5b50506114ad888289016112f1565b9150509295509295909350565b6000602082840312156114cc57600080fd5b815180151581146110cb57600080fd5b6000602082840312156114ee57600080fd5b5035919050565b600081518084526020808501945080840160005b8381101561152e5781516001600160a01b031687529582019590820190600101611509565b509495945050505050565b600081518084526115518160208601602086016117d9565b601f01601f19169290920160200192915050565b600082516115778184602087016117d9565b9190910192915050565b6001600160a01b03841681526060602082018190526000906115a590830185611539565b9050826040830152949350505050565b60006020808301818452808551808352604092508286019150828160051b8701018488016000805b8481101561168e57898403603f190186528251805115158552888101516001600160a01b03168986015287810151888601526060808201519086015260808082015160c08288018190529190611635838901826114f5565b60a094850151898203958a01959095528451808252948d0194879450908d01925090505b808310156116795783518252928b019260019290920191908b0190611659565b50978a019795505050918701916001016115dd565b50919998505050505050505050565b6020815260006110cb6020830184611539565b8481526080602082015260006116c960808301866114f5565b82810360408401526116db81866114f5565b905082810360608401526111f881856114f5565b600060608201858352602060608185015281865480845260808601915060009350878452828420845b8281101561173d5781546001600160a01b031684529284019260019182019101611718565b50505084810360408601528554808252868452828420918301905b8085101561177757825482526001948501949092019190830190611758565b5098975050505050505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156117ad576117ad611844565b604052919050565b600067ffffffffffffffff8211156117cf576117cf611844565b5060051b60200190565b60005b838110156117f45781810151838201526020016117dc565b83811115610fe15750506000910152565b600060001982141561182757634e487b7160e01b600052601160045260246000fd5b5060010190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461186f57600080fd5b5056fea26469706673582212203567b0824b0d146c413872d0f0d66c4aada297d2d37225301e5a6212a9971a5e64736f6c63430008060033