Address Details
contract

0x0741614e8832A3497E2fB7ee344bbd25CbB00C96

Contract Name
FactoryWedding
Creator
0x067b6e–041cd7 at 0xd203a0–fb13ed
Balance
0 CELO ( )
Locked CELO Balance
0.00 CELO
Voting CELO Balance
0.00 CELO
Pending Unlocked Gold
0.00 CELO
Tokens
Fetching tokens...
Transactions
2 Transactions
Transfers
0 Transfers
Gas Used
90,490
Last Balance Update
12976108
This contract has been verified via Sourcify. View contract in Sourcify repository
Contract name:
FactoryWedding




Optimization enabled
true
Compiler version
v0.8.10+commit.fc410830




Optimization runs
25000
EVM Version
london




Verified at
2022-08-19T15:50:29.715293Z

project:/contracts/wedding/FactoryWedding.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import "./Wedding.sol";
import "../IController.sol";

contract FactoryWedding is ReentrancyGuard {
    using SafeERC20 for IERC20;

    IController public immutable CONTROLLER;

    mapping (address => uint256) public price;

    event NewContract(address contractAddress, address firstPartner, address secondPartner);

    modifier canSetPrice {
        require(CONTROLLER.canSetPrice(msg.sender), "Cannot set price");
        _;
    }

    constructor(IController _controller) {
        CONTROLLER = _controller;
    }

    function setPrice(address _token, uint256 _price) external canSetPrice {
        price[_token] = _price;
    }

    function deployWedding(
        address tokenToPay,
        address _firstPartner, address _secondPartner,
        uint256 _decisionTimeWithdrawal, uint256 _decisionTimeDivorce,
        uint8 _percentageToProposingWhenDisputed
    ) external nonReentrant {
        uint256 _price = price[tokenToPay];
        require(_price > 0, "Wrong payment method");
        IERC20(tokenToPay).safeTransferFrom(msg.sender, CONTROLLER.feeReceiver(), _price);
        Wedding _wedding = new Wedding(_firstPartner, _secondPartner, _decisionTimeWithdrawal, _decisionTimeDivorce, _percentageToProposingWhenDisputed);
        emit NewContract(address(_wedding), _firstPartner, _secondPartner);
    }
}
        

/_openzeppelin/contracts/security/ReentrancyGuard.sol

// SPDX-License-Identifier: MIT

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 make 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;
    }
}
          

/_openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

/_openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

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

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

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

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

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

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

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

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

/_openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/project_/contracts/IController.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

interface IController {

    function feeReceiver() external view returns(address);

    function canSetPrice(address) external view returns(bool);
}
          

/project_/contracts/wedding/Wedding.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

contract Wedding is ReentrancyGuard {
    using SafeERC20 for IERC20;

    address public firstPartner;
    address public secondPartner;

    uint256 public decisionTimeWithdrawal;
    uint256 public decisionTimeDivorce;

    uint8 public percentageToProposingWhenDisputed;

    uint256 public divorceTimestamp;
    address public divorceProposedBy;
    bool public divorceDisputed;

    bool public withdrawalProposalPending;
    WithdrawalProposal public activeWithdrawalProposal;

    mapping (IERC20 => bool[2]) public partsTakenAfterDivorce;

    struct WithdrawalProposal {
        IERC20 token;
        address receiver;
        uint256 amount;
        address proposedBy;
        uint256 timestamp;
    }

    event WithdrawalProposed(address token, address receiver, uint256 amount, address proposedBy);
    event DivorceProposed(address proposedBy, uint256 timestamp);
    event WithdrawalStatus(bool agreed, address executedBy);
    event DivorceStatus(bool agreed);

    modifier onlyCouple() {
        require(msg.sender == firstPartner || msg.sender == secondPartner, "Not a couple");
        _;
    }

    modifier divorceNotProposed() {
        require(divorceTimestamp == 0, "Divorce already proposed");
        _;
    }

    modifier divorceProposedAndNotDone() {
        require(divorceTimestamp > 0, "Divorce not proposed");
        require(block.timestamp < divorceTimestamp, "Already divorced");
        _;
    }

    modifier checkAndDelete() {
        require(withdrawalProposalPending, "Already executed or not proposed yet");
        withdrawalProposalPending = false;
        _;
    }

    constructor(address _firstPartner, address _secondPartner, uint256 _decisionTimeWithdrawal, uint256 _decisionTimeDivorce, uint8 _percentageToProposingWhenDisputed) {
        require(_firstPartner != _secondPartner, "Cannot use same address");
        require(_percentageToProposingWhenDisputed <= 100, "Percentage cannot be higher than 100");
        firstPartner = _firstPartner;
        secondPartner = _secondPartner;
        decisionTimeWithdrawal = _decisionTimeWithdrawal;
        decisionTimeDivorce = _decisionTimeDivorce;
        percentageToProposingWhenDisputed = _percentageToProposingWhenDisputed;
    }

    function proposeWithdrawal(address _token, address _receiver, uint256 _amount) external onlyCouple divorceNotProposed {
        require(!withdrawalProposalPending, "Proposal already pending");
        activeWithdrawalProposal.token = IERC20(_token);
        activeWithdrawalProposal.receiver = _receiver;
        activeWithdrawalProposal.amount = _amount;
        activeWithdrawalProposal.proposedBy = msg.sender;
        activeWithdrawalProposal.timestamp = block.timestamp;
        withdrawalProposalPending = true;
        emit WithdrawalProposed(_token, _receiver, _amount, msg.sender);
    }

    function executeWithdrawalProposal() external onlyCouple divorceNotProposed nonReentrant checkAndDelete {
        require(activeWithdrawalProposal.proposedBy != msg.sender || activeWithdrawalProposal.timestamp + decisionTimeWithdrawal < block.timestamp, "Proposal must be done by another partner or decision time must run out");
        activeWithdrawalProposal.token.safeTransfer(activeWithdrawalProposal.receiver, activeWithdrawalProposal.amount);
        delete activeWithdrawalProposal;
        emit WithdrawalStatus(true, msg.sender);
    }

    function rejectWithdrawalProposal() external onlyCouple divorceNotProposed checkAndDelete {
        require(activeWithdrawalProposal.proposedBy != msg.sender, "Proposal must be done by another partner");
        require(activeWithdrawalProposal.timestamp + decisionTimeWithdrawal >= block.timestamp, "Decision time ran out");
        delete activeWithdrawalProposal;
        emit WithdrawalStatus(false, msg.sender);
    }

    function proposeDivorce() external onlyCouple divorceNotProposed {
        divorceTimestamp = block.timestamp + decisionTimeDivorce;
        divorceProposedBy = msg.sender;
        emit DivorceProposed(msg.sender, divorceTimestamp);
    }

    function agreeWithDivorce() external onlyCouple divorceProposedAndNotDone {
        require(divorceProposedBy != msg.sender, "Other partner must agree");
        divorceTimestamp = block.timestamp;
        emit DivorceStatus(true);
    }

    function disputeDivorce() external onlyCouple divorceProposedAndNotDone {
        require(divorceProposedBy != msg.sender, "Other partner must dispute");
        divorceDisputed = true;
        divorceTimestamp = block.timestamp;
        emit DivorceStatus(false);
    }

    function getFundsAfterDivorce(address[] calldata _tokens) external onlyCouple nonReentrant {
        require(divorceTimestamp > 0 && block.timestamp >= divorceTimestamp, "Not divorced");
        uint256 share;
        uint8 ID;
        uint8 mirrorID;
        if (msg.sender == divorceProposedBy) {
            mirrorID = 1;
        }
        else {
            ID = 1;
        }
        if (divorceDisputed) {
            if (ID == 0) {
                share = percentageToProposingWhenDisputed;
            }
            else {
                share = 100 - percentageToProposingWhenDisputed;
            }
        }
        else {
            share = 50;
        }
        for (uint256 i; i < _tokens.length; i++) {
            IERC20 currentToken = IERC20(_tokens[i]);
            if (!partsTakenAfterDivorce[currentToken][ID]) {
                uint256 toTransfer = currentToken.balanceOf(address(this));
                if (!partsTakenAfterDivorce[currentToken][mirrorID]) {
                    toTransfer = (toTransfer * share) / 100;
                }
                if (toTransfer > 0) {
                    try currentToken.transfer(msg.sender, toTransfer) {
                        partsTakenAfterDivorce[currentToken][ID] = true;
                    }
                    catch {}
                }
            }
        }
    }
}
          

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_controller","internalType":"contract IController"}]},{"type":"event","name":"NewContract","inputs":[{"type":"address","name":"contractAddress","internalType":"address","indexed":false},{"type":"address","name":"firstPartner","internalType":"address","indexed":false},{"type":"address","name":"secondPartner","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IController"}],"name":"CONTROLLER","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deployWedding","inputs":[{"type":"address","name":"tokenToPay","internalType":"address"},{"type":"address","name":"_firstPartner","internalType":"address"},{"type":"address","name":"_secondPartner","internalType":"address"},{"type":"uint256","name":"_decisionTimeWithdrawal","internalType":"uint256"},{"type":"uint256","name":"_decisionTimeDivorce","internalType":"uint256"},{"type":"uint8","name":"_percentageToProposingWhenDisputed","internalType":"uint8"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"price","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPrice","inputs":[{"type":"address","name":"_token","internalType":"address"},{"type":"uint256","name":"_price","internalType":"uint256"}]}]
              

Contract Creation Code

0x60a060405234801561001057600080fd5b5060405161294f38038061294f83398101604081905261002f91610045565b60016000556001600160a01b0316608052610075565b60006020828403121561005757600080fd5b81516001600160a01b038116811461006e57600080fd5b9392505050565b6080516128b261009d6000396000818160b001528181610125015261033d01526128b26000f3fe608060405234801561001057600080fd5b506004361061004b5760003560e01c8062e4768b14610050578063aea9107814610065578063bcfb9b1b14610098578063ee0fc121146100ab575b600080fd5b61006361005e366004610889565b6100f7565b005b6100856100733660046108b5565b60016020526000908152604090205481565b6040519081526020015b60405180910390f35b6100636100a63660046108d2565b610239565b6100d27f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008f565b6040517fa386c7360000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169063a386c73690602401602060405180830381865afa158015610181573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a59190610948565b610210576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f43616e6e6f74207365742070726963650000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260016020526040902055565b600260005414156102a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610207565b6002600090815573ffffffffffffffffffffffffffffffffffffffff871681526001602052604090205480610337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f57726f6e67207061796d656e74206d6574686f640000000000000000000000006044820152606401610207565b6103e9337f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663b3f006746040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ca919061096a565b73ffffffffffffffffffffffffffffffffffffffff8a169190846104bf565b600086868686866040516103fc90610857565b73ffffffffffffffffffffffffffffffffffffffff95861681529490931660208501526040840191909152606083015260ff16608082015260a001604051809103906000f080158015610453573d6000803e3d6000fd5b506040805173ffffffffffffffffffffffffffffffffffffffff83811682528a8116602083015289168183015290519192507f242b9ba590bfc22930b72d44626c4330e114ca64e27a1c789febf7081437f128919081900360600190a150506001600055505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261055490859061055a565b50505050565b60006105bc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661066b9092919063ffffffff16565b80519091501561066657808060200190518101906105da9190610948565b610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610207565b505050565b606061067a8484600085610684565b90505b9392505050565b606082471015610716576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610207565b843b61077e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610207565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516107a791906109b3565b60006040518083038185875af1925050503d80600081146107e4576040519150601f19603f3d011682016040523d82523d6000602084013e6107e9565b606091505b50915091506107f9828286610804565b979650505050505050565b6060831561081357508161067d565b8251156108235782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020791906109cf565b611e5c80610a2183390190565b73ffffffffffffffffffffffffffffffffffffffff8116811461088657600080fd5b50565b6000806040838503121561089c57600080fd5b82356108a781610864565b946020939093013593505050565b6000602082840312156108c757600080fd5b813561067d81610864565b60008060008060008060c087890312156108eb57600080fd5b86356108f681610864565b9550602087013561090681610864565b9450604087013561091681610864565b9350606087013592506080870135915060a087013560ff8116811461093a57600080fd5b809150509295509295509295565b60006020828403121561095a57600080fd5b8151801515811461067d57600080fd5b60006020828403121561097c57600080fd5b815161067d81610864565b60005b838110156109a257818101518382015260200161098a565b838111156105545750506000910152565b600082516109c5818460208701610987565b9190910192915050565b60208152600082518060208401526109ee816040850160208701610987565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe60806040523480156200001157600080fd5b5060405162001e5c38038062001e5c83398101604081905262000034916200016d565b60016000556001600160a01b0385811690851614156200009b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207573652073616d65206164647265737300000000000000000060448201526064015b60405180910390fd5b60648160ff161115620000fd5760405162461bcd60e51b8152602060048201526024808201527f50657263656e746167652063616e6e6f7420626520686967686572207468616e6044820152630203130360e41b606482015260840162000092565b600180546001600160a01b03199081166001600160a01b03978816179091556002805490911694909516939093179093556003556004919091556005805460ff191660ff909216919091179055620001d4565b80516001600160a01b03811681146200016857600080fd5b919050565b600080600080600060a086880312156200018657600080fd5b620001918662000150565b9450620001a16020870162000150565b93506040860151925060608601519150608086015160ff81168114620001c657600080fd5b809150509295509295909350565b611c7880620001e46000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063a433e3a5116100b2578063bcbb01db11610081578063d0df0ff811610066578063d0df0ff8146102f6578063e409166f1461031c578063e987d6201461032457600080fd5b8063bcbb01db146102b7578063bef631ba146102d757600080fd5b8063a433e3a5146101e8578063a6ad6411146101f1578063aca47a991461026a578063ace15ede146102af57600080fd5b806353289240116101095780636a4fb884116100ee5780636a4fb884146101c45780636f26fc5d146101cc57806388468e87146101d557600080fd5b806353289240146101a557806368cfe1d9146101ad57600080fd5b8063302711861461013b578063366a420c1461014557806345039cea1461017f578063501cc13b14610192575b600080fd5b610143610344565b005b60075461016a9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b61014361018d3660046118fc565b6106b4565b61016a6101a0366004611996565b610b45565b610143610b7e565b6101b660045481565b604051908152602001610176565b610143610d4d565b6101b660065481565b6101436101e33660046119c2565b610e9c565b6101b660035481565b600854600954600a54600b54600c546102269473ffffffffffffffffffffffffffffffffffffffff9081169481169392169085565b6040805173ffffffffffffffffffffffffffffffffffffffff968716815294861660208601528401929092529092166060820152608081019190915260a001610176565b60015461028a9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610176565b6101436110d6565b60025461028a9073ffffffffffffffffffffffffffffffffffffffff1681565b6005546102e49060ff1681565b60405160ff9091168152602001610176565b60075461016a907501000000000000000000000000000000000000000000900460ff1681565b6101436113d2565b60075461028a9073ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331480610381575060025473ffffffffffffffffffffffffffffffffffffffff1633145b6103d25760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600654156104225760405162461bcd60e51b815260206004820152601860248201527f4469766f72636520616c72656164792070726f706f736564000000000000000060448201526064016103c9565b600260005414156104755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103c9565b60026000556007547501000000000000000000000000000000000000000000900460ff1661050a5760405162461bcd60e51b8152602060048201526024808201527f416c7265616479206578656375746564206f72206e6f742070726f706f73656460448201527f207965740000000000000000000000000000000000000000000000000000000060648201526084016103c9565b600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055600b5473ffffffffffffffffffffffffffffffffffffffff16331415806105675750600354600c54429161056591611a32565b105b6105ff5760405162461bcd60e51b815260206004820152604660248201527f50726f706f73616c206d75737420626520646f6e6520627920616e6f7468657260448201527f20706172746e6572206f72206465636973696f6e2074696d65206d757374207260648201527f756e206f75740000000000000000000000000000000000000000000000000000608482015260a4016103c9565b600954600a5460085461062d9273ffffffffffffffffffffffffffffffffffffffff918216929116906115da565b600880547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560098054821690556000600a819055600b8054909216909155600c5560408051600181523360208201527febe3d51f601820a7e6aeee99c81127c783484ee9118cec8ef3bc47003e452db2910160405180910390a16001600055565b60015473ffffffffffffffffffffffffffffffffffffffff163314806106f1575060025473ffffffffffffffffffffffffffffffffffffffff1633145b61073d5760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b600260005414156107905760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103c9565b6002600055600654158015906107a857506006544210155b6107f45760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206469766f72636564000000000000000000000000000000000000000060448201526064016103c9565b6007546000908190819073ffffffffffffffffffffffffffffffffffffffff1633141561082357506001610828565b600191505b60075474010000000000000000000000000000000000000000900460ff161561087b5760ff82166108605760055460ff169250610880565b6005546108719060ff166064611a4a565b60ff169250610880565b603292505b60005b84811015610b3857600086868381811061089f5761089f611a6d565b90506020020160208101906108b49190611a9c565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d6020526040902090915060ff8516600281106108f0576108f0611a6d565b602081049091015460ff601f9092166101000a900416610b25576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ab9565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600d6020526040902090915060ff8516600281106109d7576109d7611a6d565b602081049091015460ff601f9092166101000a900416610a0a5760646109fd8783611ad2565b610a079190611b0f565b90505b8015610b23576040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff83169063a9059cbb906044016020604051808303816000875af1925050508015610abd575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610aba91810190611b4a565b60015b610ac657610b23565b5073ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020526040902060019060ff871660028110610b0357610b03611a6d565b602091828204019190066101000a81548160ff0219169083151502179055505b505b5080610b3081611b6c565b915050610883565b5050600160005550505050565b600d6020528160005260406000208160028110610b6157600080fd5b602081049091015460ff601f9092166101000a9004169150829050565b60015473ffffffffffffffffffffffffffffffffffffffff16331480610bbb575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610c075760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b600060065411610c595760405162461bcd60e51b815260206004820152601460248201527f4469766f726365206e6f742070726f706f73656400000000000000000000000060448201526064016103c9565b6006544210610caa5760405162461bcd60e51b815260206004820152601060248201527f416c7265616479206469766f726365640000000000000000000000000000000060448201526064016103c9565b60075473ffffffffffffffffffffffffffffffffffffffff16331415610d125760405162461bcd60e51b815260206004820152601860248201527f4f7468657220706172746e6572206d757374206167726565000000000000000060448201526064016103c9565b42600655604051600181527f7dead3c2ac1f1f73f74a5cd3113dc797ad672a832f13146983d916f398b3426a906020015b60405180910390a1565b60015473ffffffffffffffffffffffffffffffffffffffff16331480610d8a575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610dd65760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b60065415610e265760405162461bcd60e51b815260206004820152601860248201527f4469766f72636520616c72656164792070726f706f736564000000000000000060448201526064016103c9565b600454610e339042611a32565b6006819055600780547fffffffffffffffffffffffff000000000000000000000000000000000000000016339081179091556040805191825260208201929092527f9d41277361f2dd9cb25a5f0583dfab134da8e17b0e311a97d34cb622708e256e9101610d43565b60015473ffffffffffffffffffffffffffffffffffffffff16331480610ed9575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610f255760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b60065415610f755760405162461bcd60e51b815260206004820152601860248201527f4469766f72636520616c72656164792070726f706f736564000000000000000060448201526064016103c9565b6007547501000000000000000000000000000000000000000000900460ff1615610fe15760405162461bcd60e51b815260206004820152601860248201527f50726f706f73616c20616c72656164792070656e64696e67000000000000000060448201526064016103c9565b6008805473ffffffffffffffffffffffffffffffffffffffff8581167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556009805491861691831682179055600a849055600b80549092163390811790925542600c55600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055604080519384526020840191909152820183905260608201527f977f8d65e0f663caa7146961ed4e21d702c909e5e5f45b83027c6ef1ef1cb30d9060800160405180910390a1505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331480611113575060025473ffffffffffffffffffffffffffffffffffffffff1633145b61115f5760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b600654156111af5760405162461bcd60e51b815260206004820152601860248201527f4469766f72636520616c72656164792070726f706f736564000000000000000060448201526064016103c9565b6007547501000000000000000000000000000000000000000000900460ff1661123f5760405162461bcd60e51b8152602060048201526024808201527f416c7265616479206578656375746564206f72206e6f742070726f706f73656460448201527f207965740000000000000000000000000000000000000000000000000000000060648201526084016103c9565b600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055600b5473ffffffffffffffffffffffffffffffffffffffff163314156112f55760405162461bcd60e51b815260206004820152602860248201527f50726f706f73616c206d75737420626520646f6e6520627920616e6f7468657260448201527f20706172746e657200000000000000000000000000000000000000000000000060648201526084016103c9565b600354600c54429161130691611a32565b10156113545760405162461bcd60e51b815260206004820152601560248201527f4465636973696f6e2074696d652072616e206f7574000000000000000000000060448201526064016103c9565b600880547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560098054821690556000600a819055600b8054909216909155600c819055604080519182523360208301527febe3d51f601820a7e6aeee99c81127c783484ee9118cec8ef3bc47003e452db29101610d43565b60015473ffffffffffffffffffffffffffffffffffffffff1633148061140f575060025473ffffffffffffffffffffffffffffffffffffffff1633145b61145b5760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b6000600654116114ad5760405162461bcd60e51b815260206004820152601460248201527f4469766f726365206e6f742070726f706f73656400000000000000000000000060448201526064016103c9565b60065442106114fe5760405162461bcd60e51b815260206004820152601060248201527f416c7265616479206469766f726365640000000000000000000000000000000060448201526064016103c9565b60075473ffffffffffffffffffffffffffffffffffffffff163314156115665760405162461bcd60e51b815260206004820152601a60248201527f4f7468657220706172746e6572206d757374206469737075746500000000000060448201526064016103c9565b600780547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905542600655604051600081527f7dead3c2ac1f1f73f74a5cd3113dc797ad672a832f13146983d916f398b3426a90602001610d43565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261166790849061166c565b505050565b60006116ce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661175e9092919063ffffffff16565b80519091501561166757808060200190518101906116ec9190611b4a565b6116675760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103c9565b606061176d8484600085611777565b90505b9392505050565b6060824710156117ef5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103c9565b843b61183d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103c9565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516118669190611bd5565b60006040518083038185875af1925050503d80600081146118a3576040519150601f19603f3d011682016040523d82523d6000602084013e6118a8565b606091505b50915091506118b88282866118c3565b979650505050505050565b606083156118d2575081611770565b8251156118e25782518084602001fd5b8160405162461bcd60e51b81526004016103c99190611bf1565b6000806020838503121561190f57600080fd5b823567ffffffffffffffff8082111561192757600080fd5b818501915085601f83011261193b57600080fd5b81358181111561194a57600080fd5b8660208260051b850101111561195f57600080fd5b60209290920196919550909350505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461199357600080fd5b50565b600080604083850312156119a957600080fd5b82356119b481611971565b946020939093013593505050565b6000806000606084860312156119d757600080fd5b83356119e281611971565b925060208401356119f281611971565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611a4557611a45611a03565b500190565b600060ff821660ff841680821015611a6457611a64611a03565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215611aae57600080fd5b813561177081611971565b600060208284031215611acb57600080fd5b5051919050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b0a57611b0a611a03565b500290565b600082611b45577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215611b5c57600080fd5b8151801515811461177057600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611b9e57611b9e611a03565b5060010190565b60005b83811015611bc0578181015183820152602001611ba8565b83811115611bcf576000848401525b50505050565b60008251611be7818460208701611ba5565b9190910192915050565b6020815260008251806020840152611c10816040850160208701611ba5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122006630e00a56dc7679c1f7afaecf6380ebf6188e68c41d94d075c7b76a49696af64736f6c634300080a0033a2646970667358221220b87c5dc5dffb31ae9ec4fec5788d59b7168aa677d9cfaf40e8f8374325dca6a764736f6c634300080a0033000000000000000000000000d584e695d6bc250084d1fc472792a2e0e1303d4c

Deployed ByteCode

0x608060405234801561001057600080fd5b506004361061004b5760003560e01c8062e4768b14610050578063aea9107814610065578063bcfb9b1b14610098578063ee0fc121146100ab575b600080fd5b61006361005e366004610889565b6100f7565b005b6100856100733660046108b5565b60016020526000908152604090205481565b6040519081526020015b60405180910390f35b6100636100a63660046108d2565b610239565b6100d27f000000000000000000000000d584e695d6bc250084d1fc472792a2e0e1303d4c81565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161008f565b6040517fa386c7360000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000d584e695d6bc250084d1fc472792a2e0e1303d4c73ffffffffffffffffffffffffffffffffffffffff169063a386c73690602401602060405180830381865afa158015610181573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a59190610948565b610210576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f43616e6e6f74207365742070726963650000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff909116600090815260016020526040902055565b600260005414156102a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610207565b6002600090815573ffffffffffffffffffffffffffffffffffffffff871681526001602052604090205480610337576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f57726f6e67207061796d656e74206d6574686f640000000000000000000000006044820152606401610207565b6103e9337f000000000000000000000000d584e695d6bc250084d1fc472792a2e0e1303d4c73ffffffffffffffffffffffffffffffffffffffff1663b3f006746040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ca919061096a565b73ffffffffffffffffffffffffffffffffffffffff8a169190846104bf565b600086868686866040516103fc90610857565b73ffffffffffffffffffffffffffffffffffffffff95861681529490931660208501526040840191909152606083015260ff16608082015260a001604051809103906000f080158015610453573d6000803e3d6000fd5b506040805173ffffffffffffffffffffffffffffffffffffffff83811682528a8116602083015289168183015290519192507f242b9ba590bfc22930b72d44626c4330e114ca64e27a1c789febf7081437f128919081900360600190a150506001600055505050505050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905261055490859061055a565b50505050565b60006105bc826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661066b9092919063ffffffff16565b80519091501561066657808060200190518101906105da9190610948565b610666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610207565b505050565b606061067a8484600085610684565b90505b9392505050565b606082471015610716576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610207565b843b61077e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610207565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516107a791906109b3565b60006040518083038185875af1925050503d80600081146107e4576040519150601f19603f3d011682016040523d82523d6000602084013e6107e9565b606091505b50915091506107f9828286610804565b979650505050505050565b6060831561081357508161067d565b8251156108235782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161020791906109cf565b611e5c80610a2183390190565b73ffffffffffffffffffffffffffffffffffffffff8116811461088657600080fd5b50565b6000806040838503121561089c57600080fd5b82356108a781610864565b946020939093013593505050565b6000602082840312156108c757600080fd5b813561067d81610864565b60008060008060008060c087890312156108eb57600080fd5b86356108f681610864565b9550602087013561090681610864565b9450604087013561091681610864565b9350606087013592506080870135915060a087013560ff8116811461093a57600080fd5b809150509295509295509295565b60006020828403121561095a57600080fd5b8151801515811461067d57600080fd5b60006020828403121561097c57600080fd5b815161067d81610864565b60005b838110156109a257818101518382015260200161098a565b838111156105545750506000910152565b600082516109c5818460208701610987565b9190910192915050565b60208152600082518060208401526109ee816040850160208701610987565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fe60806040523480156200001157600080fd5b5060405162001e5c38038062001e5c83398101604081905262000034916200016d565b60016000556001600160a01b0385811690851614156200009b5760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207573652073616d65206164647265737300000000000000000060448201526064015b60405180910390fd5b60648160ff161115620000fd5760405162461bcd60e51b8152602060048201526024808201527f50657263656e746167652063616e6e6f7420626520686967686572207468616e6044820152630203130360e41b606482015260840162000092565b600180546001600160a01b03199081166001600160a01b03978816179091556002805490911694909516939093179093556003556004919091556005805460ff191660ff909216919091179055620001d4565b80516001600160a01b03811681146200016857600080fd5b919050565b600080600080600060a086880312156200018657600080fd5b620001918662000150565b9450620001a16020870162000150565b93506040860151925060608601519150608086015160ff81168114620001c657600080fd5b809150509295509295909350565b611c7880620001e46000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c8063a433e3a5116100b2578063bcbb01db11610081578063d0df0ff811610066578063d0df0ff8146102f6578063e409166f1461031c578063e987d6201461032457600080fd5b8063bcbb01db146102b7578063bef631ba146102d757600080fd5b8063a433e3a5146101e8578063a6ad6411146101f1578063aca47a991461026a578063ace15ede146102af57600080fd5b806353289240116101095780636a4fb884116100ee5780636a4fb884146101c45780636f26fc5d146101cc57806388468e87146101d557600080fd5b806353289240146101a557806368cfe1d9146101ad57600080fd5b8063302711861461013b578063366a420c1461014557806345039cea1461017f578063501cc13b14610192575b600080fd5b610143610344565b005b60075461016a9074010000000000000000000000000000000000000000900460ff1681565b60405190151581526020015b60405180910390f35b61014361018d3660046118fc565b6106b4565b61016a6101a0366004611996565b610b45565b610143610b7e565b6101b660045481565b604051908152602001610176565b610143610d4d565b6101b660065481565b6101436101e33660046119c2565b610e9c565b6101b660035481565b600854600954600a54600b54600c546102269473ffffffffffffffffffffffffffffffffffffffff9081169481169392169085565b6040805173ffffffffffffffffffffffffffffffffffffffff968716815294861660208601528401929092529092166060820152608081019190915260a001610176565b60015461028a9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610176565b6101436110d6565b60025461028a9073ffffffffffffffffffffffffffffffffffffffff1681565b6005546102e49060ff1681565b60405160ff9091168152602001610176565b60075461016a907501000000000000000000000000000000000000000000900460ff1681565b6101436113d2565b60075461028a9073ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331480610381575060025473ffffffffffffffffffffffffffffffffffffffff1633145b6103d25760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064015b60405180910390fd5b600654156104225760405162461bcd60e51b815260206004820152601860248201527f4469766f72636520616c72656164792070726f706f736564000000000000000060448201526064016103c9565b600260005414156104755760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103c9565b60026000556007547501000000000000000000000000000000000000000000900460ff1661050a5760405162461bcd60e51b8152602060048201526024808201527f416c7265616479206578656375746564206f72206e6f742070726f706f73656460448201527f207965740000000000000000000000000000000000000000000000000000000060648201526084016103c9565b600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055600b5473ffffffffffffffffffffffffffffffffffffffff16331415806105675750600354600c54429161056591611a32565b105b6105ff5760405162461bcd60e51b815260206004820152604660248201527f50726f706f73616c206d75737420626520646f6e6520627920616e6f7468657260448201527f20706172746e6572206f72206465636973696f6e2074696d65206d757374207260648201527f756e206f75740000000000000000000000000000000000000000000000000000608482015260a4016103c9565b600954600a5460085461062d9273ffffffffffffffffffffffffffffffffffffffff918216929116906115da565b600880547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560098054821690556000600a819055600b8054909216909155600c5560408051600181523360208201527febe3d51f601820a7e6aeee99c81127c783484ee9118cec8ef3bc47003e452db2910160405180910390a16001600055565b60015473ffffffffffffffffffffffffffffffffffffffff163314806106f1575060025473ffffffffffffffffffffffffffffffffffffffff1633145b61073d5760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b600260005414156107905760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103c9565b6002600055600654158015906107a857506006544210155b6107f45760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206469766f72636564000000000000000000000000000000000000000060448201526064016103c9565b6007546000908190819073ffffffffffffffffffffffffffffffffffffffff1633141561082357506001610828565b600191505b60075474010000000000000000000000000000000000000000900460ff161561087b5760ff82166108605760055460ff169250610880565b6005546108719060ff166064611a4a565b60ff169250610880565b603292505b60005b84811015610b3857600086868381811061089f5761089f611a6d565b90506020020160208101906108b49190611a9c565b73ffffffffffffffffffffffffffffffffffffffff81166000908152600d6020526040902090915060ff8516600281106108f0576108f0611a6d565b602081049091015460ff601f9092166101000a900416610b25576040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610977573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099b9190611ab9565b73ffffffffffffffffffffffffffffffffffffffff83166000908152600d6020526040902090915060ff8516600281106109d7576109d7611a6d565b602081049091015460ff601f9092166101000a900416610a0a5760646109fd8783611ad2565b610a079190611b0f565b90505b8015610b23576040517fa9059cbb0000000000000000000000000000000000000000000000000000000081523360048201526024810182905273ffffffffffffffffffffffffffffffffffffffff83169063a9059cbb906044016020604051808303816000875af1925050508015610abd575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252610aba91810190611b4a565b60015b610ac657610b23565b5073ffffffffffffffffffffffffffffffffffffffff82166000908152600d6020526040902060019060ff871660028110610b0357610b03611a6d565b602091828204019190066101000a81548160ff0219169083151502179055505b505b5080610b3081611b6c565b915050610883565b5050600160005550505050565b600d6020528160005260406000208160028110610b6157600080fd5b602081049091015460ff601f9092166101000a9004169150829050565b60015473ffffffffffffffffffffffffffffffffffffffff16331480610bbb575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610c075760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b600060065411610c595760405162461bcd60e51b815260206004820152601460248201527f4469766f726365206e6f742070726f706f73656400000000000000000000000060448201526064016103c9565b6006544210610caa5760405162461bcd60e51b815260206004820152601060248201527f416c7265616479206469766f726365640000000000000000000000000000000060448201526064016103c9565b60075473ffffffffffffffffffffffffffffffffffffffff16331415610d125760405162461bcd60e51b815260206004820152601860248201527f4f7468657220706172746e6572206d757374206167726565000000000000000060448201526064016103c9565b42600655604051600181527f7dead3c2ac1f1f73f74a5cd3113dc797ad672a832f13146983d916f398b3426a906020015b60405180910390a1565b60015473ffffffffffffffffffffffffffffffffffffffff16331480610d8a575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610dd65760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b60065415610e265760405162461bcd60e51b815260206004820152601860248201527f4469766f72636520616c72656164792070726f706f736564000000000000000060448201526064016103c9565b600454610e339042611a32565b6006819055600780547fffffffffffffffffffffffff000000000000000000000000000000000000000016339081179091556040805191825260208201929092527f9d41277361f2dd9cb25a5f0583dfab134da8e17b0e311a97d34cb622708e256e9101610d43565b60015473ffffffffffffffffffffffffffffffffffffffff16331480610ed9575060025473ffffffffffffffffffffffffffffffffffffffff1633145b610f255760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b60065415610f755760405162461bcd60e51b815260206004820152601860248201527f4469766f72636520616c72656164792070726f706f736564000000000000000060448201526064016103c9565b6007547501000000000000000000000000000000000000000000900460ff1615610fe15760405162461bcd60e51b815260206004820152601860248201527f50726f706f73616c20616c72656164792070656e64696e67000000000000000060448201526064016103c9565b6008805473ffffffffffffffffffffffffffffffffffffffff8581167fffffffffffffffffffffffff000000000000000000000000000000000000000092831681179093556009805491861691831682179055600a849055600b80549092163390811790925542600c55600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055604080519384526020840191909152820183905260608201527f977f8d65e0f663caa7146961ed4e21d702c909e5e5f45b83027c6ef1ef1cb30d9060800160405180910390a1505050565b60015473ffffffffffffffffffffffffffffffffffffffff16331480611113575060025473ffffffffffffffffffffffffffffffffffffffff1633145b61115f5760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b600654156111af5760405162461bcd60e51b815260206004820152601860248201527f4469766f72636520616c72656164792070726f706f736564000000000000000060448201526064016103c9565b6007547501000000000000000000000000000000000000000000900460ff1661123f5760405162461bcd60e51b8152602060048201526024808201527f416c7265616479206578656375746564206f72206e6f742070726f706f73656460448201527f207965740000000000000000000000000000000000000000000000000000000060648201526084016103c9565b600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055600b5473ffffffffffffffffffffffffffffffffffffffff163314156112f55760405162461bcd60e51b815260206004820152602860248201527f50726f706f73616c206d75737420626520646f6e6520627920616e6f7468657260448201527f20706172746e657200000000000000000000000000000000000000000000000060648201526084016103c9565b600354600c54429161130691611a32565b10156113545760405162461bcd60e51b815260206004820152601560248201527f4465636973696f6e2074696d652072616e206f7574000000000000000000000060448201526064016103c9565b600880547fffffffffffffffffffffffff000000000000000000000000000000000000000090811690915560098054821690556000600a819055600b8054909216909155600c819055604080519182523360208301527febe3d51f601820a7e6aeee99c81127c783484ee9118cec8ef3bc47003e452db29101610d43565b60015473ffffffffffffffffffffffffffffffffffffffff1633148061140f575060025473ffffffffffffffffffffffffffffffffffffffff1633145b61145b5760405162461bcd60e51b815260206004820152600c60248201527f4e6f74206120636f75706c65000000000000000000000000000000000000000060448201526064016103c9565b6000600654116114ad5760405162461bcd60e51b815260206004820152601460248201527f4469766f726365206e6f742070726f706f73656400000000000000000000000060448201526064016103c9565b60065442106114fe5760405162461bcd60e51b815260206004820152601060248201527f416c7265616479206469766f726365640000000000000000000000000000000060448201526064016103c9565b60075473ffffffffffffffffffffffffffffffffffffffff163314156115665760405162461bcd60e51b815260206004820152601a60248201527f4f7468657220706172746e6572206d757374206469737075746500000000000060448201526064016103c9565b600780547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff167401000000000000000000000000000000000000000017905542600655604051600081527f7dead3c2ac1f1f73f74a5cd3113dc797ad672a832f13146983d916f398b3426a90602001610d43565b6040805173ffffffffffffffffffffffffffffffffffffffff8416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb0000000000000000000000000000000000000000000000000000000017905261166790849061166c565b505050565b60006116ce826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661175e9092919063ffffffff16565b80519091501561166757808060200190518101906116ec9190611b4a565b6116675760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016103c9565b606061176d8484600085611777565b90505b9392505050565b6060824710156117ef5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016103c9565b843b61183d5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016103c9565b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516118669190611bd5565b60006040518083038185875af1925050503d80600081146118a3576040519150601f19603f3d011682016040523d82523d6000602084013e6118a8565b606091505b50915091506118b88282866118c3565b979650505050505050565b606083156118d2575081611770565b8251156118e25782518084602001fd5b8160405162461bcd60e51b81526004016103c99190611bf1565b6000806020838503121561190f57600080fd5b823567ffffffffffffffff8082111561192757600080fd5b818501915085601f83011261193b57600080fd5b81358181111561194a57600080fd5b8660208260051b850101111561195f57600080fd5b60209290920196919550909350505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461199357600080fd5b50565b600080604083850312156119a957600080fd5b82356119b481611971565b946020939093013593505050565b6000806000606084860312156119d757600080fd5b83356119e281611971565b925060208401356119f281611971565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115611a4557611a45611a03565b500190565b600060ff821660ff841680821015611a6457611a64611a03565b90039392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060208284031215611aae57600080fd5b813561177081611971565b600060208284031215611acb57600080fd5b5051919050565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611b0a57611b0a611a03565b500290565b600082611b45577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600060208284031215611b5c57600080fd5b8151801515811461177057600080fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611b9e57611b9e611a03565b5060010190565b60005b83811015611bc0578181015183820152602001611ba8565b83811115611bcf576000848401525b50505050565b60008251611be7818460208701611ba5565b9190910192915050565b6020815260008251806020840152611c10816040850160208701611ba5565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016919091016040019291505056fea264697066735822122006630e00a56dc7679c1f7afaecf6380ebf6188e68c41d94d075c7b76a49696af64736f6c634300080a0033a2646970667358221220b87c5dc5dffb31ae9ec4fec5788d59b7168aa677d9cfaf40e8f8374325dca6a764736f6c634300080a0033