Sepolia Testnet

Contract

0x3920BC35c3afA2EF95268F9ACc0A84e750484f1A
Transaction Hash
Method
Block
From
To
Request Order Fo...70359622024-11-08 10:45:12127 days ago1731062712IN
0x3920BC35...750484f1A
0 ETH0.001408196.80575775
Request Order Fo...70170682024-11-05 13:16:48130 days ago1730812608IN
0x3920BC35...750484f1A
0 ETH0.0031056813.67749622
Request Order Fo...70170642024-11-05 13:16:00130 days ago1730812560IN
0x3920BC35...750484f1A
0 ETH0.0028471913.80861347
Settle Order70170252024-11-05 13:07:24130 days ago1730812044IN
0x3920BC35...750484f1A
0 ETH0.0013898513.86752098
Update Price70170072024-11-05 13:03:48130 days ago1730811828IN
0x3920BC35...750484f1A
0 ETH0.0008547214.82870304
Fulfill Order70169922024-11-05 13:00:24130 days ago1730811624IN
0x3920BC35...750484f1A
0 ETH0.0021473516.74090248
Fulfill Order70169782024-11-05 12:57:00130 days ago1730811420IN
0x3920BC35...750484f1A
0 ETH0.0018307514.27265085
Fulfill Order70169632024-11-05 12:53:24130 days ago1730811204IN
0x3920BC35...750484f1A
0 ETH0.0018113612.46034917
Request Order Fo...70169502024-11-05 12:50:48130 days ago1730811048IN
0x3920BC35...750484f1A
0 ETH0.002154910.41455927
Fulfill Order Fo...70169402024-11-05 12:48:48130 days ago1730810928IN
0x3920BC35...750484f1A
0 ETH0.001395410.50168987
Fulfill Order70169232024-11-05 12:45:24130 days ago1730810724IN
0x3920BC35...750484f1A
0 ETH0.0016875412.66035116
Request Order Fo...70169192024-11-05 12:44:36130 days ago1730810676IN
0x3920BC35...750484f1A
0 ETH0.0026823413.02211851
Request Order Fo...70169162024-11-05 12:43:48130 days ago1730810628IN
0x3920BC35...750484f1A
0 ETH0.0020630110.8213153
Settle Order70164972024-11-05 11:13:24130 days ago1730805204IN
0x3920BC35...750484f1A
0 ETH0.0011782316.43445665
Settle Order70164942024-11-05 11:12:48130 days ago1730805168IN
0x3920BC35...750484f1A
0 ETH0.0013065718.22452783
Settle Order70164912024-11-05 11:12:12130 days ago1730805132IN
0x3920BC35...750484f1A
0 ETH0.0013711919.12595081
Settle Order70164892024-11-05 11:11:48130 days ago1730805108IN
0x3920BC35...750484f1A
0 ETH0.0016436718.51126582
Settle Order70164872024-11-05 11:11:24130 days ago1730805084IN
0x3920BC35...750484f1A
0 ETH0.0012188517.00102014
Settle Order70164812024-11-05 11:10:12130 days ago1730805012IN
0x3920BC35...750484f1A
0 ETH0.0011649116.24866917
Settle Order70164792024-11-05 11:09:48130 days ago1730804988IN
0x3920BC35...750484f1A
0 ETH0.0013305416.00679142
Settle Order70164742024-11-05 11:08:48130 days ago1730804928IN
0x3920BC35...750484f1A
0 ETH0.0010028513.98824577
Settle Order70164682024-11-05 11:07:36130 days ago1730804856IN
0x3920BC35...750484f1A
0 ETH0.0010129414.13359041
Settle Order70164652024-11-05 11:07:00130 days ago1730804820IN
0x3920BC35...750484f1A
0 ETH0.0012653914.25111882
Settle Order70164632024-11-05 11:06:36130 days ago1730804796IN
0x3920BC35...750484f1A
0 ETH0.0009547213.31684746
Settle Order70164612024-11-05 11:06:00130 days ago1730804760IN
0x3920BC35...750484f1A
0 ETH0.0010932412.31394128
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Linear

Compiler Version
v0.8.25+commit.b61c2a91

Optimization Enabled:
No with 200 runs

Other Settings:
paris EvmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : Linear.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {ILinear} from "./interfaces/ILinear.sol";

contract Linear is Ownable, ILinear {
    using SafeERC20 for IERC20;

    /// @notice Basis points. Used to calculate the amount of fee.
    uint256 public constant BIPS = 100_00;

    /// @notice The state of the contract
    ContractState public contractState = ContractState.Active;

    /// @notice The mapping to store all the orders
    mapping(bytes32 => Order) public orders;
    /// @notice The counter to generate unique order IDs
    uint256 private nonce;

    /// @notice The address where the fees are sent
    address payable public feeAddress;

    /// @notice Holders of this token will receive discounts on fees
    address public immutable discountToken;

    /// @notice The token used for purchases
    address public immutable purchaseToken;

    /// @notice The number of decimals for the purchase token
    uint8 public immutable decimalPurchaseToken;

    /// @notice The amount of token threshold after which the discount applies
    uint256 public discountThreshold = 10_000 ether;

    /// @notice The percentage of fees charged per transaction (in basis points, 100 = 1%)
    uint256 public feePercentage = 1_00; // 1%

    /// @notice The percentage discount on fees for holders of the discountToken (in basis points, 100 = 1%)
    uint256 public feeDiscountPercentage = 20_00; // 20%

    /**
     * @notice Initializes the contract with the fee address, purchase token, decimal for purchase token and initial owner
     * @param _feeAddress The address where fees are sent
     * @param _purchaseToken The token used for purchases
     * @param _initialOwner The initial owner of the contract
     */
    constructor(
        address _feeAddress,
        address _discountToken,
        address _purchaseToken,
        address _initialOwner
    ) Ownable(_initialOwner) {
        if (_feeAddress == address(0)) revert IncorrectAddress("Fee address cannot be 0");
        if (!isContract(_discountToken)) revert IncorrectAddress("Discount token address must be a contract address");
        if (!isContract(_purchaseToken)) revert IncorrectAddress("Purchase token address must be a contract address");
        feeAddress = payable(_feeAddress);

        discountToken = _discountToken;
        purchaseToken = _purchaseToken;
        decimalPurchaseToken = ERC20(_purchaseToken).decimals();
    }

    /**
     * @dev The modifier to ensure the contract is not paused
     */
    modifier whenNotPaused() {
        if (contractState != ContractState.Active) {
            revert ContractIsPaused();
        }
        _;
    }

    /**
     * @dev The modifier to ensure the contract is paused
     */
    modifier whenNotActive() {
        if (contractState != ContractState.Paused) {
            revert ContractIsActive();
        }
        _;
    }

    /**
     * @dev The modifier to ensure the sender is not the whitelisted address
     * @param _whitelistedAddress The whitelisted address to check
     */
    modifier senderNotWhitelisted(address _whitelistedAddress) {
        if (_whitelistedAddress == msg.sender) {
            revert IncorrectAddress("whitelist address cannot be sender address");
        }
        _;
    }

    /**
     * @dev The modifier to ensure the sender matches the whitelisted address
     * @param _whitelistedAddress The whitelisted address to check
     */
    modifier checkWhitelist(address _whitelistedAddress) {
        if (_whitelistedAddress != address(0) && _whitelistedAddress != msg.sender) {
            revert IncorrectAddress("Sender address must be whitelisted address");
        }
        _;
    }

    /**
     * @dev The modifier to ensure the requester is not the sender
     * @param _requester The requester address to check
     */
    modifier notOwnerCalling(address _requester) {
        if (_requester == msg.sender) {
            revert IncorrectAddress("Requester address is sender address");
        }
        _;
    }

    /**
     * @dev The modifier to ensure the order exists
     * @param _address The address to check for the existence of an order
     */
    modifier orderExists(address _address) {
        if (_address == address(0)) revert ErrorInOrder("Order doesn't exist");
        _;
    }

    /**
     * @dev The modifier to ensure the caller is the creator of the order
     * @param _requester The requester address to check
     */
    modifier onlyCreator(address _requester) {
        if (_requester != msg.sender) revert IncorrectAddress("Call only creator of the order");
        _;
    }

    /**
     * @dev The modifier to ensure the order is open
     * @param _state The state of the order
     */
    modifier onlyOpenOrder(OrderState _state) {
        if (_state != OrderState.Open) revert ErrorInOrder("Order already fulfilled or cancelled");
        _;
    }

    /// ================================ External functions ================================ ///

    /**
     * @notice External function sets the fee percentage for transactions
     * @param _feePercentage The new fee percentage (in basis points, 100 = 1%)
     */
    function setFees(uint256 _feePercentage) external onlyOwner {
        if (_feePercentage > 10_00) revert ErrorInAmount("Fee percentage must be less than 10%");
        feePercentage = _feePercentage;
    }

    /**
     * @notice External function creates an order for an NFT
     * @param nftContractAddress The address of the NFT contract
     * @param tokenId The ID of the token
     * @param amountUSD The amount in USD for the order
     * @param whitelistedAddress The whitelisted address
     */
    function requestOrderForNFT(
        address nftContractAddress,
        uint256 tokenId,
        uint256 amountUSD,
        address whitelistedAddress
    ) external whenNotPaused senderNotWhitelisted(whitelistedAddress) returns (bytes32) {
        if (amountUSD == 0) {
            revert ErrorInAmount("Amount must be greater than 0");
        }

        bytes32 orderId = keccak256(abi.encodePacked("Linear", ++nonce));

        Order storage order = orders[orderId];
        order.requester = msg.sender;
        order.tokenAddress = nftContractAddress;
        order.tokenId = tokenId;
        order.whitelistedAddress = whitelistedAddress;
        order.requestedTokenAmount = amountUSD;

        order.isNFT = true;
        order.state = OrderState.Open;

        IERC721(nftContractAddress).transferFrom(msg.sender, address(this), tokenId);
        emit OrderCreated(orders[orderId], orderId);
        return orderId;
    }

    /**
     * @notice External function creates an order for ERC20 tokens
     * @param tokenAddress The address of the ERC20 token contract
     * @param requesterTokenAmount The amount of tokens from the requester
     * @param requestedTokenAmount The amount of tokens requested
     * @param partiallyFillable Whether the order is partially fillable
     * @param whitelistedAddress The whitelisted address
     */
    function requestOrderForERC20(
        address tokenAddress,
        uint256 requesterTokenAmount,
        uint256 requestedTokenAmount,
        bool partiallyFillable,
        address whitelistedAddress
    ) external whenNotPaused senderNotWhitelisted(whitelistedAddress) returns (bytes32) {
        IERC20 token = IERC20(tokenAddress);
        if (requestedTokenAmount == 0) {
            revert ErrorInAmount("Requested token amount must be greater than 0");
        }
        if (requesterTokenAmount == 0) {
            revert ErrorInAmount("Token amount must be greater than 0");
        }

        bytes32 orderId = keccak256(abi.encodePacked("Linear", ++nonce));

        Order storage order = orders[orderId];
        order.requester = msg.sender;
        order.tokenAddress = tokenAddress;
        order.partiallyFillable = partiallyFillable;
        order.whitelistedAddress = whitelistedAddress;
        order.state = OrderState.Open;
        order.initialTokens = requesterTokenAmount;
        order.availableTokens = requesterTokenAmount;

        if (partiallyFillable) {
            order.pricePerToken = getPricePerToken(requestedTokenAmount, requesterTokenAmount);
        } else {
            order.requestedTokenAmount = requestedTokenAmount;
        }

        uint256 oldBalanceContract = token.balanceOf(address(this));

        token.safeTransferFrom(msg.sender, address(this), requesterTokenAmount);

        if (token.balanceOf(address(this)) - oldBalanceContract < requesterTokenAmount) {
            revert TokenTransferFailed("Token transfer failed: incorrect balance");
        }

        emit OrderCreated(orders[orderId], orderId);

        return orderId;
    }

    /**
     * @notice External function for fulfilling an order to buy an NFT
     * @param orderId The ID of the order to fulfill
     */
    function fulfillOrderForNFT(
        bytes32 orderId
    )
        external
        whenNotPaused
        checkWhitelist(orders[orderId].whitelistedAddress)
        notOwnerCalling(orders[orderId].requester)
        orderExists(orders[orderId].requester)
        onlyOpenOrder(orders[orderId].state)
    {
        Order storage order = orders[orderId];

        if(!order.isNFT) revert ErrorInOrder("Order is not an NFT order");

        processFees(order.requester, order.requestedTokenAmount);

        order.state = OrderState.Fulfilled;

        IERC721(order.tokenAddress).safeTransferFrom(address(this), msg.sender, order.tokenId);

        emit OrderFulfilled(orders[orderId], orderId, Fill(msg.sender, 1, 1, order.requestedTokenAmount));
    }

    /**
     * @notice External function for fulfilling an order to buy an ERC20 tokens
     * @param orderId The ID of the order to fulfill
     * @param proposedAmount The proposed amount to fulfill
     */
    function fulfillOrder(
        bytes32 orderId,
        uint256 proposedAmount
    )
        external
        whenNotPaused
        checkWhitelist(orders[orderId].whitelistedAddress)
        notOwnerCalling(orders[orderId].requester)
        orderExists(orders[orderId].requester)
        onlyOpenOrder(orders[orderId].state)
    {
        Order storage order = orders[orderId];

        if (order.isNFT) revert ErrorInOrder("Order is an NFT order");

        if (proposedAmount == 0) revert ErrorInAmount("Token amount must be greater than 0");

        uint256 tokensToFulfill;
        if (order.partiallyFillable) {
            tokensToFulfill = (proposedAmount *  order.pricePerToken) / 10 ** decimalPurchaseToken;
            if (tokensToFulfill > order.availableTokens) revert ErrorInAmount("Insufficient tokens");
        } else {
            if (proposedAmount != order.requestedTokenAmount) revert ErrorInAmount("No partial fills permitted");
            tokensToFulfill = order.availableTokens;
        }

        address tokenAddress = order.tokenAddress;

        order.availableTokens -= tokensToFulfill;
        order.fulfilledToken += tokensToFulfill;

        if (order.availableTokens == 0) {
            order.state = OrderState.Fulfilled;
        }

        if (order.partiallyFillable) {
            processFees(order.requester, proposedAmount);
        } else {
            processFees(order.requester, order.requestedTokenAmount);
        }

        IERC20(tokenAddress).safeTransfer(msg.sender, tokensToFulfill);

        emit OrderFulfilled(
            orders[orderId],
            orderId,
            Fill(msg.sender, tokensToFulfill, proposedAmount, tokensToFulfill)
        );
    }

    /**
     * @notice External function settles an order, returning any remaining tokens to the requester
     * @param orderId The ID of the order to settle
     */
    function settleOrder(
        bytes32 orderId
    ) external orderExists(orders[orderId].requester) onlyCreator(orders[orderId].requester) {
        Order storage order = orders[orderId];

        if (order.state == OrderState.Settled) revert ErrorInOrder("Order already settled");
        if (order.state != OrderState.Open) revert ErrorInOrder("Order cannot be settled");

        order.state = OrderState.Settled;

        if (order.isNFT) {
            IERC721(order.tokenAddress).safeTransferFrom(address(this), order.requester, order.tokenId);
        } else {
            uint256 availableTokens = order.availableTokens;
            order.availableTokens = 0;
            IERC20(order.tokenAddress).safeTransfer(order.requester, availableTokens);
        }
        
        emit OrderSettled(order, orderId);
    }

    /**
     * @notice External function updates the price of an order
     * @param orderId The ID of the order to update
     * @param newAmountForOrder The new amount for the order
     */
    function updatePrice(
        bytes32 orderId,
        uint256 newAmountForOrder
    ) external whenNotPaused orderExists(orders[orderId].requester) onlyCreator(orders[orderId].requester) {
        Order storage order = orders[orderId];

        if (order.state != OrderState.Open) revert ErrorInOrder("Order cannot be updated");

        if (order.partiallyFillable) {
            order.pricePerToken = getPricePerToken(newAmountForOrder, order.availableTokens);
        } else {
            order.requestedTokenAmount = newAmountForOrder;
        }

        emit OrderPriceUpdated(order, orderId, newAmountForOrder);
    }

    /**
     * @notice External function pauses the contract, disabling certain functions
     */
    function pauseContract() external onlyOwner whenNotPaused {
        contractState = ContractState.Paused;
    }

    /**
     * @notice External function unpauses the contract, enabling certain functions
     */
    function unpauseContract() external onlyOwner whenNotActive {
        contractState = ContractState.Active;
    }

    /**
     * @notice External function sets a new fee address
     * @param _feeAddress The new fee address
     */
    function setFeeAddress(address payable _feeAddress) external onlyOwner {
        if (_feeAddress == address(0)) revert IncorrectAddress("Fee address cannot be 0");
        if (_feeAddress == feeAddress) revert IncorrectAddress("Fee address cannot be same as current fee address");
        feeAddress = _feeAddress;
    }

    /**
     * @notice External function sets the fee discount percentage for holders of the discountToken
     * @param _feeDiscountPercentage The new fee discount percentage (in basis points, 100 = 1%)
     */
    function setFeeDiscountPercentage(uint256 _feeDiscountPercentage) external onlyOwner {
        if (_feeDiscountPercentage > BIPS) revert ErrorInAmount("Fee discount percentage must be less than 100%");
        feeDiscountPercentage = _feeDiscountPercentage;
    }

    /**
     * @notice External function sets the discount token threshold
     * @param _discountThreshold The new amount of token threshold after which the discount applies
     */
    function setDiscountThreshold(uint256 _discountThreshold) external onlyOwner {
        if (_discountThreshold == 0) revert ErrorInAmount("Discount threshold can't be zero");
        discountThreshold = _discountThreshold;
    }

    /**
     * @notice Public function that check if the discount applies for a given user
     * @param _user The user to check for discount eligibility
     * @return bool True if the account is eligible for the discount, false otherwise
     */
    function getDiscountEligible(address _user) public view returns (bool) {
        uint256 tokenBalance = ERC20(discountToken).balanceOf(_user);
        return tokenBalance >= discountThreshold;
    }

    /// ================================ Private functions ================================ ///

    /**
     * @notice Private function processes the fees for a transaction
     * @param _requester The requester address
     * @param _amount The amount to process fees for
     */
    function processFees(address _requester, uint256 _amount) private {
        uint256 feeAmount = (_amount * feePercentage) / BIPS;

        if (getDiscountEligible(_requester)) {
            feeAmount = feeAmount * (BIPS - feeDiscountPercentage) / BIPS;
        }

        uint256 amountAfterFee = _amount - feeAmount;

        IERC20(purchaseToken).safeTransferFrom(msg.sender, _requester, amountAfterFee);

        if (feeAmount > 0) {
            IERC20(purchaseToken).safeTransferFrom(msg.sender, feeAddress, feeAmount);
        }
    }

    /**
     * @notice Private function checks if an address is a contract
     * @param _address The address to check
     */
    function isContract(address _address) private view returns (bool) {
        uint32 size;
        assembly {
            size := extcodesize(_address)
        }
        return (size > 0);
    }

    /**
     * @notice Private function for calculating the price per token
     * @param _requestedAmount The amount of tokens from the requester
     * @param _requesterAmount The amount of tokens requested
     */
    function getPricePerToken(uint256 _requestedAmount, uint256 _requesterAmount) private view returns (uint256) {
        return _requesterAmount * (10 ** decimalPurchaseToken) / _requestedAmount;
    }
}

File 2 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 3 of 13 : draft-IERC6093.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;

/**
 * @dev Standard ERC20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}

File 4 of 13 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

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

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

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

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
     * true using the following override:
     * ```
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

File 5 of 13 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 6 of 13 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

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

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

File 7 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

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

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

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

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}

File 8 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

File 9 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.20;

import {IERC165} from "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(address from, address to, uint256 tokenId) external;

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

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

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

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

File 10 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

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

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

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

File 11 of 13 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

File 12 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)

pragma solidity ^0.8.20;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 13 : ILinear.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.25;

interface ILinear {
    enum ContractState {
        Active, // Represents the active state of the contract
        Paused // Represents the paused state of the contract
    }

    enum OrderState {
        Open, // Represents the state when an order is open and available for fulfillment
        Fulfilled, // Represents the state when an order has been successfully fulfilled
        Settled // Represents the state when an order has been settled
    }

    struct Fill {
        address fulfiller; // The address of the fulfiller who received tokens
        uint256 tokensReceived; // The amount of tokens received by the fulfiller
        uint256 tokenFulfilled; // The amount of tokens fulfilled
        uint256 pricePerToken; // The price per token
    }

    struct Withdrawal {
        uint256 withdrawAmount; // The withdrawal amount
        uint256 feeAmount; // The fee amount
        uint256 refundedTokens; // The refunded tokens
    }

    struct Order {
        address requester; // The address of the requester
        address whitelistedAddress; // The whitelisted address allowed for fulfillment
        address tokenAddress; // The address of the token
        uint256 tokenId; // The ID of the token
        uint256 initialTokens; // The initial amount of tokens
        uint256 availableTokens; // The available amount of tokens
        uint256 requestedTokenAmount; // The requested amount of tokens
        uint256 fulfilledToken; // The amount of tokens fulfilled
        uint256 pricePerToken; // The price per token
        bool partiallyFillable; // Indicates if the order is partially fillable
        bool isNFT; // Indicates if it's an NFT order
        OrderState state; // The state of the order
    }

    /// ================================ Errors ================================ ///

    /// @notice Reverts if the contract is paused
    error ContractIsPaused();
    /// @notice Reverts if the contract is paused
    error ContractIsActive();
    /// @notice Reverts if there is an error in the amount
    error ErrorInAmount(string error);
    /// @notice Reverts if there is an error in the token
    error ErrorInToken(string error);
    /// @notice Reverts if the allowance is insufficient
    error AllowanceLess(string error);
    /// @notice Reverts if the address is incorrect
    error IncorrectAddress(string error);
    /// @notice Reverts if token transfer fails
    error TokenTransferFailed(string error);
    /// @notice Reverts if there is an error in the order
    error ErrorInOrder(string error);
    /// @notice Reverts if the caller is unauthorized
    error Unauthorized(address caller);

    /// ================================ Events ================================ ///

    /// @notice Emitted when an order is created
    event OrderCreated(Order order, bytes32 indexed orderId);
    /// @notice Emitted when the price of an order is updated
    event OrderPriceUpdated(Order order, bytes32 indexed orderId, uint256 newPrice);
    /// @notice Emitted when an order is fulfilled
    event OrderFulfilled(Order order, bytes32 indexed orderId, Fill fill);
    /// @notice Emitted when an order is settled
    event OrderSettled(Order order, bytes32 indexed orderId);
    /// @notice Emitted when transfer tax is recorded
    event TransferTaxRecorded(address tokenAddress, uint256 transferTax);
}

Settings
{
  "evmVersion": "paris",
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_feeAddress","type":"address"},{"internalType":"address","name":"_discountToken","type":"address"},{"internalType":"address","name":"_purchaseToken","type":"address"},{"internalType":"address","name":"_initialOwner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"string","name":"error","type":"string"}],"name":"AllowanceLess","type":"error"},{"inputs":[],"name":"ContractIsActive","type":"error"},{"inputs":[],"name":"ContractIsPaused","type":"error"},{"inputs":[{"internalType":"string","name":"error","type":"string"}],"name":"ErrorInAmount","type":"error"},{"inputs":[{"internalType":"string","name":"error","type":"string"}],"name":"ErrorInOrder","type":"error"},{"inputs":[{"internalType":"string","name":"error","type":"string"}],"name":"ErrorInToken","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"string","name":"error","type":"string"}],"name":"IncorrectAddress","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"string","name":"error","type":"string"}],"name":"TokenTransferFailed","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"address","name":"whitelistedAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"initialTokens","type":"uint256"},{"internalType":"uint256","name":"availableTokens","type":"uint256"},{"internalType":"uint256","name":"requestedTokenAmount","type":"uint256"},{"internalType":"uint256","name":"fulfilledToken","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bool","name":"isNFT","type":"bool"},{"internalType":"enum ILinear.OrderState","name":"state","type":"uint8"}],"indexed":false,"internalType":"struct ILinear.Order","name":"order","type":"tuple"},{"indexed":true,"internalType":"bytes32","name":"orderId","type":"bytes32"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"address","name":"whitelistedAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"initialTokens","type":"uint256"},{"internalType":"uint256","name":"availableTokens","type":"uint256"},{"internalType":"uint256","name":"requestedTokenAmount","type":"uint256"},{"internalType":"uint256","name":"fulfilledToken","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bool","name":"isNFT","type":"bool"},{"internalType":"enum ILinear.OrderState","name":"state","type":"uint8"}],"indexed":false,"internalType":"struct ILinear.Order","name":"order","type":"tuple"},{"indexed":true,"internalType":"bytes32","name":"orderId","type":"bytes32"},{"components":[{"internalType":"address","name":"fulfiller","type":"address"},{"internalType":"uint256","name":"tokensReceived","type":"uint256"},{"internalType":"uint256","name":"tokenFulfilled","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"}],"indexed":false,"internalType":"struct ILinear.Fill","name":"fill","type":"tuple"}],"name":"OrderFulfilled","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"address","name":"whitelistedAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"initialTokens","type":"uint256"},{"internalType":"uint256","name":"availableTokens","type":"uint256"},{"internalType":"uint256","name":"requestedTokenAmount","type":"uint256"},{"internalType":"uint256","name":"fulfilledToken","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bool","name":"isNFT","type":"bool"},{"internalType":"enum ILinear.OrderState","name":"state","type":"uint8"}],"indexed":false,"internalType":"struct ILinear.Order","name":"order","type":"tuple"},{"indexed":true,"internalType":"bytes32","name":"orderId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"OrderPriceUpdated","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"address","name":"whitelistedAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"initialTokens","type":"uint256"},{"internalType":"uint256","name":"availableTokens","type":"uint256"},{"internalType":"uint256","name":"requestedTokenAmount","type":"uint256"},{"internalType":"uint256","name":"fulfilledToken","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bool","name":"isNFT","type":"bool"},{"internalType":"enum ILinear.OrderState","name":"state","type":"uint8"}],"indexed":false,"internalType":"struct ILinear.Order","name":"order","type":"tuple"},{"indexed":true,"internalType":"bytes32","name":"orderId","type":"bytes32"}],"name":"OrderSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"transferTax","type":"uint256"}],"name":"TransferTaxRecorded","type":"event"},{"inputs":[],"name":"BIPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractState","outputs":[{"internalType":"enum ILinear.ContractState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimalPurchaseToken","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discountThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"discountToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeDiscountPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"orderId","type":"bytes32"},{"internalType":"uint256","name":"proposedAmount","type":"uint256"}],"name":"fulfillOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"orderId","type":"bytes32"}],"name":"fulfillOrderForNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"getDiscountEligible","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"orders","outputs":[{"internalType":"address","name":"requester","type":"address"},{"internalType":"address","name":"whitelistedAddress","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"initialTokens","type":"uint256"},{"internalType":"uint256","name":"availableTokens","type":"uint256"},{"internalType":"uint256","name":"requestedTokenAmount","type":"uint256"},{"internalType":"uint256","name":"fulfilledToken","type":"uint256"},{"internalType":"uint256","name":"pricePerToken","type":"uint256"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"bool","name":"isNFT","type":"bool"},{"internalType":"enum ILinear.OrderState","name":"state","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"purchaseToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"requesterTokenAmount","type":"uint256"},{"internalType":"uint256","name":"requestedTokenAmount","type":"uint256"},{"internalType":"bool","name":"partiallyFillable","type":"bool"},{"internalType":"address","name":"whitelistedAddress","type":"address"}],"name":"requestOrderForERC20","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftContractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amountUSD","type":"uint256"},{"internalType":"address","name":"whitelistedAddress","type":"address"}],"name":"requestOrderForNFT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_discountThreshold","type":"uint256"}],"name":"setDiscountThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_feeAddress","type":"address"}],"name":"setFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feeDiscountPercentage","type":"uint256"}],"name":"setFeeDiscountPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_feePercentage","type":"uint256"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"orderId","type":"bytes32"}],"name":"settleOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpauseContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"orderId","type":"bytes32"},{"internalType":"uint256","name":"newAmountForOrder","type":"uint256"}],"name":"updatePrice","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e060405260008060146101000a81548160ff021916908360018111156100295761002861040e565b5b021790555069021e19e0c9bab240000060045560646005556107d060065534801561005357600080fd5b50604051614e62380380614e62833981810160405281019061007591906104a0565b80600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036100e85760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016100df9190610516565b60405180910390fd5b6100f78161033160201b60201c565b50600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610167576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161015e9061058e565b60405180910390fd5b610176836103f560201b60201c565b6101b5576040517fab7826de0000000000000000000000000000000000000000000000000000000081526004016101ac90610620565b60405180910390fd5b6101c4826103f560201b60201c565b610203576040517fab7826de0000000000000000000000000000000000000000000000000000000081526004016101fa906106b2565b60405180910390fd5b83600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1660a08173ffffffffffffffffffffffffffffffffffffffff16815250508173ffffffffffffffffffffffffffffffffffffffff1663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031b919061070b565b60ff1660c08160ff168152505050505050610738565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080823b905060008163ffffffff1611915050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061046d82610442565b9050919050565b61047d81610462565b811461048857600080fd5b50565b60008151905061049a81610474565b92915050565b600080600080608085870312156104ba576104b961043d565b5b60006104c88782880161048b565b94505060206104d98782880161048b565b93505060406104ea8782880161048b565b92505060606104fb8782880161048b565b91505092959194509250565b61051081610462565b82525050565b600060208201905061052b6000830184610507565b92915050565b600082825260208201905092915050565b7f46656520616464726573732063616e6e6f742062652030000000000000000000600082015250565b6000610578601783610531565b915061058382610542565b602082019050919050565b600060208201905081810360008301526105a78161056b565b9050919050565b7f446973636f756e7420746f6b656e2061646472657373206d757374206265206160008201527f20636f6e74726163742061646472657373000000000000000000000000000000602082015250565b600061060a603183610531565b9150610615826105ae565b604082019050919050565b60006020820190508181036000830152610639816105fd565b9050919050565b7f507572636861736520746f6b656e2061646472657373206d757374206265206160008201527f20636f6e74726163742061646472657373000000000000000000000000000000602082015250565b600061069c603183610531565b91506106a782610640565b604082019050919050565b600060208201905081810360008301526106cb8161068f565b9050919050565b600060ff82169050919050565b6106e8816106d2565b81146106f357600080fd5b50565b600081519050610705816106df565b92915050565b6000602082840312156107215761072061043d565b5b600061072f848285016106f6565b91505092915050565b60805160a05160c0516146d861078a60003960008181610e4401528181611b850152612714015260008181611f2301528181612912015261298a0152600081816104fe015261255b01526146d86000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80638da5cb5b116100de578063bd56194a11610097578063e2c2c00a11610071578063e2c2c00a14610430578063ea61226c1461044c578063f2fde38b1461046a578063f7050031146104865761018e565b8063bd56194a146103d8578063cb0856bb146103f6578063cda9b12f146104145761018e565b80638da5cb5b1461031d57806397bd2e9d1461033b5780639c3f1e9014610357578063a001ecdd14610392578063a95c4d62146103b0578063b33712c5146103ce5761018e565b80635b0072a61161014b5780635f704f3e116101255780635f704f3e146102bd578063715018a6146102d957806385209ee0146102e35780638705fcd4146103015761018e565b80635b0072a61461023f5780635c3863281461026f5780635f4294691461028d5761018e565b80630b4dc8ca14610193578063248d6429146101af5780633d18678e146101df57806341275358146101fb578063439766ce1461021957806349085d8c14610223575b600080fd5b6101ad60048036038101906101a89190612c67565b6104a4565b005b6101c960048036038101906101c49190612cf2565b6104f9565b6040516101d69190612d3a565b60405180910390f35b6101f960048036038101906101f49190612c67565b6105a6565b005b6102036105fd565b6040516102109190612d76565b60405180910390f35b610221610623565b005b61023d60048036038101906102389190612dc7565b6106c5565b005b61025960048036038101906102549190612df4565b610ae0565b6040516102669190612e6a565b60405180910390f35b610277610e42565b6040516102849190612ea1565b60405180910390f35b6102a760048036038101906102a29190612ee8565b610e66565b6040516102b49190612e6a565b60405180910390f35b6102d760048036038101906102d29190612f63565b61133c565b005b6102e1611600565b005b6102eb611614565b6040516102f8919061301a565b60405180910390f35b61031b60048036038101906103169190613061565b611627565b005b610325611772565b604051610332919061309d565b60405180910390f35b61035560048036038101906103509190612f63565b61179b565b005b610371600480360381019061036c9190612dc7565b611e34565b6040516103899c9b9a9998979695949392919061310f565b60405180910390f35b61039a611f1b565b6040516103a791906131c9565b60405180910390f35b6103b8611f21565b6040516103c5919061309d565b60405180910390f35b6103d6611f45565b005b6103e0611fe5565b6040516103ed91906131c9565b60405180910390f35b6103fe611feb565b60405161040b91906131c9565b60405180910390f35b61042e60048036038101906104299190612c67565b611ff1565b005b61044a60048036038101906104459190612dc7565b612048565b005b610454612559565b604051610461919061309d565b60405180910390f35b610484600480360381019061047f9190612cf2565b61257d565b005b61048e612603565b60405161049b91906131c9565b60405180910390f35b6104ac612609565b600081036104ef576040517fe2bd639d0000000000000000000000000000000000000000000000000000000081526004016104e690613241565b60405180910390fd5b8060048190555050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401610555919061309d565b602060405180830381865afa158015610572573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105969190613276565b9050600454811015915050919050565b6105ae612609565b6103e88111156105f3576040517fe2bd639d0000000000000000000000000000000000000000000000000000000081526004016105ea90613315565b60405180910390fd5b8060058190555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61062b612609565b6000600181111561063f5761063e612fa3565b5b600060149054906101000a900460ff16600181111561066157610660612fa3565b5b14610698576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600060146101000a81548160ff021916908360018111156106be576106bd612fa3565b5b0217905550565b6001600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361076b576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161076290613381565b60405180910390fd5b6001600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610810576040517fab7826de000000000000000000000000000000000000000000000000000000008152600401610807906133ed565b60405180910390fd5b600060016000858152602001908152602001600020905060028081111561083a57610839612fa3565b5b8160090160029054906101000a900460ff16600281111561085e5761085d612fa3565b5b0361089e576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161089590613459565b60405180910390fd5b600060028111156108b2576108b1612fa3565b5b8160090160029054906101000a900460ff1660028111156108d6576108d5612fa3565b5b14610916576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161090d906134c5565b60405180910390fd5b60028160090160026101000a81548160ff0219169083600281111561093e5761093d612fa3565b5b02179055508060090160019054906101000a900460ff1615610a1a578060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e308360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600301546040518463ffffffff1660e01b81526004016109e3939291906134e5565b600060405180830381600087803b1580156109fd57600080fd5b505af1158015610a11573d6000803e3d6000fd5b50505050610aa2565b60008160050154905060008260050181905550610aa08260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166126909092919063ffffffff16565b505b837f1ebe2042aa36647ec46359960c209975b172c78c7b3b3ac09c37a44166ba507f82604051610ad291906137af565b60405180910390a250505050565b6000806001811115610af557610af4612fa3565b5b600060149054906101000a900460ff166001811115610b1757610b16612fa3565b5b14610b4e576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b813373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610bbd576040517fab7826de000000000000000000000000000000000000000000000000000000008152600401610bb49061383d565b60405180910390fd5b60008403610c00576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401610bf7906138a9565b60405180910390fd5b6000600260008154610c11906138f8565b919050819055604051602001610c2791906139b8565b6040516020818303038152906040528051906020012090506000600160008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550878160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550868160030181905550848160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085816006018190555060018160090160016101000a81548160ff02191690831515021790555060008160090160026101000a81548160ff02191690836002811115610d7657610d75612fa3565b5b02179055508773ffffffffffffffffffffffffffffffffffffffff166323b872dd33308a6040518463ffffffff1660e01b8152600401610db8939291906134e5565b600060405180830381600087803b158015610dd257600080fd5b505af1158015610de6573d6000803e3d6000fd5b50505050817f5b0c37f386e94d8731079862e85a9c05f60a53fac37519b0361885f2c707598e60016000858152602001908152602001600020604051610e2c9190613b48565b60405180910390a2819350505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000806001811115610e7b57610e7a612fa3565b5b600060149054906101000a900460ff166001811115610e9d57610e9c612fa3565b5b14610ed4576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b813373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f43576040517fab7826de000000000000000000000000000000000000000000000000000000008152600401610f3a9061383d565b60405180910390fd5b600087905060008603610f8b576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401610f8290613bd6565b60405180910390fd5b60008703610fce576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401610fc590613c68565b60405180910390fd5b6000600260008154610fdf906138f8565b919050819055604051602001610ff591906139b8565b6040516020818303038152906040528051906020012090506000600160008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550898160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550868160090160006101000a81548160ff021916908315150217905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008160090160026101000a81548160ff0219169083600281111561113157611130612fa3565b5b0217905550888160040181905550888160050181905550861561116557611158888a61270f565b816008018190555061116f565b8781600601819055505b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111aa919061309d565b602060405180830381865afa1580156111c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111eb9190613276565b905061121a33308c8773ffffffffffffffffffffffffffffffffffffffff1661275c909392919063ffffffff16565b89818573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611255919061309d565b602060405180830381865afa158015611272573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112969190613276565b6112a09190613c88565b10156112e1576040517f1483bcd60000000000000000000000000000000000000000000000000000000081526004016112d890613d2e565b60405180910390fd5b827f5b0c37f386e94d8731079862e85a9c05f60a53fac37519b0361885f2c707598e600160008681526020019081526020016000206040516113239190613b48565b60405180910390a2829550505050505095945050505050565b600060018111156113505761134f612fa3565b5b600060149054906101000a900460ff16600181111561137257611371612fa3565b5b146113a9576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361144f576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161144690613381565b60405180910390fd5b6001600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146114f4576040517fab7826de0000000000000000000000000000000000000000000000000000000081526004016114eb906133ed565b60405180910390fd5b60006001600086815260200190815260200160002090506000600281111561151f5761151e612fa3565b5b8160090160029054906101000a900460ff16600281111561154357611542612fa3565b5b14611583576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161157a90613d9a565b60405180910390fd5b8060090160009054906101000a900460ff16156115b5576115a884826005015461270f565b81600801819055506115bf565b8381600601819055505b847f5cccdf8f586a0e3e8620f29c9523918774505784f52f97ceb6d0e99879a211f082866040516115f1929190613dba565b60405180910390a25050505050565b611608612609565b61161260006127de565b565b600060149054906101000a900460ff1681565b61162f612609565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361169e576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161169590613e31565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361172e576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161172590613ec3565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600060018111156117af576117ae612fa3565b5b600060149054906101000a900460ff1660018111156117d1576117d0612fa3565b5b14611808576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156118a857503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b156118e8576040517fab7826de0000000000000000000000000000000000000000000000000000000081526004016118df90613f55565b60405180910390fd5b6001600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361198d576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161198490613fe7565b60405180910390fd5b6001600085815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a33576040517f64633e22000000000000000000000000000000000000000000000000000000008152600401611a2a90613381565b60405180910390fd5b6001600086815260200190815260200160002060090160029054906101000a900460ff1660006002811115611a6b57611a6a612fa3565b5b816002811115611a7e57611a7d612fa3565b5b14611abe576040517f64633e22000000000000000000000000000000000000000000000000000000008152600401611ab590614079565b60405180910390fd5b60006001600088815260200190815260200160002090508060090160019054906101000a900460ff1615611b27576040517f64633e22000000000000000000000000000000000000000000000000000000008152600401611b1e906140e5565b60405180910390fd5b60008603611b6a576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401611b6190613c68565b60405180910390fd5b60008160090160009054906101000a900460ff1615611c18577f0000000000000000000000000000000000000000000000000000000000000000600a611bb09190614238565b826008015488611bc09190614283565b611bca91906142f4565b90508160050154811115611c13576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401611c0a90614371565b60405180910390fd5b611c66565b81600601548714611c5e576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401611c55906143dd565b60405180910390fd5b816005015490505b60008260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081836005016000828254611ca39190613c88565b9250508190555081836007016000828254611cbe91906143fd565b925050819055506000836005015403611cff5760018360090160026101000a81548160ff02191690836002811115611cf957611cf8612fa3565b5b02179055505b8260090160009054906101000a900460ff1615611d4957611d448360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16896128a2565b611d7c565b611d7b8360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600601546128a2565b5b611da733838373ffffffffffffffffffffffffffffffffffffffff166126909092919063ffffffff16565b887fe653ee2bd7ea056746784cecfb3fd041a95f178c377259bdf1ca1a590f3b37aa600160008c815260200190815260200160002060405180608001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018c815260200186815250604051611e21929190614486565b60405180910390a2505050505050505050565b60016020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154908060040154908060050154908060060154908060070154908060080154908060090160009054906101000a900460ff16908060090160019054906101000a900460ff16908060090160029054906101000a900460ff1690508c565b60055481565b7f000000000000000000000000000000000000000000000000000000000000000081565b611f4d612609565b600180811115611f6057611f5f612fa3565b5b600060149054906101000a900460ff166001811115611f8257611f81612fa3565b5b14611fb9576040517f1cbb4d8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060146101000a81548160ff02191690836001811115611fde57611fdd612fa3565b5b0217905550565b60065481565b60045481565b611ff9612609565b61271081111561203e576040517fe2bd639d00000000000000000000000000000000000000000000000000000000815260040161203590614523565b60405180910390fd5b8060068190555050565b6000600181111561205c5761205b612fa3565b5b600060149054906101000a900460ff16600181111561207e5761207d612fa3565b5b146120b5576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600082815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561215557503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b15612195576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161218c90613f55565b60405180910390fd5b6001600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361223a576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161223190613fe7565b60405180910390fd5b6001600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036122e0576040517f64633e220000000000000000000000000000000000000000000000000000000081526004016122d790613381565b60405180910390fd5b6001600085815260200190815260200160002060090160029054906101000a900460ff166000600281111561231857612317612fa3565b5b81600281111561232b5761232a612fa3565b5b1461236b576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161236290614079565b60405180910390fd5b60006001600087815260200190815260200160002090508060090160019054906101000a900460ff166123d3576040517f64633e220000000000000000000000000000000000000000000000000000000081526004016123ca9061458f565b60405180910390fd5b6124058160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600601546128a2565b60018160090160026101000a81548160ff0219169083600281111561242d5761242c612fa3565b5b02179055508060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e303384600301546040518463ffffffff1660e01b8152600401612497939291906134e5565b600060405180830381600087803b1580156124b157600080fd5b505af11580156124c5573d6000803e3d6000fd5b50505050857fe653ee2bd7ea056746784cecfb3fd041a95f178c377259bdf1ca1a590f3b37aa6001600089815260200190815260200160002060405180608001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200160018152602001600181526020018560060154815250604051612549929190614486565b60405180910390a2505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b612585612609565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036125f75760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016125ee919061309d565b60405180910390fd5b612600816127de565b50565b61271081565b6126116129d6565b73ffffffffffffffffffffffffffffffffffffffff1661262f611772565b73ffffffffffffffffffffffffffffffffffffffff161461268e576126526129d6565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401612685919061309d565b60405180910390fd5b565b61270a838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016126c39291906145af565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506129de565b505050565b6000827f0000000000000000000000000000000000000000000000000000000000000000600a61273f9190614238565b8361274a9190614283565b61275491906142f4565b905092915050565b6127d8848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401612791939291906134e5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506129de565b50505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000612710600554836128b59190614283565b6128bf91906142f4565b90506128ca836104f9565b156128fa576127106006546127106128e29190613c88565b826128ed9190614283565b6128f791906142f4565b90505b600081836129089190613c88565b90506129573385837f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661275c909392919063ffffffff16565b60008211156129d0576129cf33600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16847f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1661275c909392919063ffffffff16565b5b50505050565b600033905090565b6000612a09828473ffffffffffffffffffffffffffffffffffffffff16612a7590919063ffffffff16565b90506000815114158015612a2e575080806020019051810190612a2c91906145ed565b155b15612a7057826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401612a67919061309d565b60405180910390fd5b505050565b6060612a8383836000612a8b565b905092915050565b606081471015612ad257306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401612ac9919061309d565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051612afb919061468b565b60006040518083038185875af1925050503d8060008114612b38576040519150601f19603f3d011682016040523d82523d6000602084013e612b3d565b606091505b5091509150612b4d868383612b58565b925050509392505050565b606082612b6d57612b6882612be7565b612bdf565b60008251148015612b95575060008473ffffffffffffffffffffffffffffffffffffffff163b145b15612bd757836040517f9996b315000000000000000000000000000000000000000000000000000000008152600401612bce919061309d565b60405180910390fd5b819050612be0565b5b9392505050565b600081511115612bfa5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080fd5b6000819050919050565b612c4481612c31565b8114612c4f57600080fd5b50565b600081359050612c6181612c3b565b92915050565b600060208284031215612c7d57612c7c612c2c565b5b6000612c8b84828501612c52565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612cbf82612c94565b9050919050565b612ccf81612cb4565b8114612cda57600080fd5b50565b600081359050612cec81612cc6565b92915050565b600060208284031215612d0857612d07612c2c565b5b6000612d1684828501612cdd565b91505092915050565b60008115159050919050565b612d3481612d1f565b82525050565b6000602082019050612d4f6000830184612d2b565b92915050565b6000612d6082612c94565b9050919050565b612d7081612d55565b82525050565b6000602082019050612d8b6000830184612d67565b92915050565b6000819050919050565b612da481612d91565b8114612daf57600080fd5b50565b600081359050612dc181612d9b565b92915050565b600060208284031215612ddd57612ddc612c2c565b5b6000612deb84828501612db2565b91505092915050565b60008060008060808587031215612e0e57612e0d612c2c565b5b6000612e1c87828801612cdd565b9450506020612e2d87828801612c52565b9350506040612e3e87828801612c52565b9250506060612e4f87828801612cdd565b91505092959194509250565b612e6481612d91565b82525050565b6000602082019050612e7f6000830184612e5b565b92915050565b600060ff82169050919050565b612e9b81612e85565b82525050565b6000602082019050612eb66000830184612e92565b92915050565b612ec581612d1f565b8114612ed057600080fd5b50565b600081359050612ee281612ebc565b92915050565b600080600080600060a08688031215612f0457612f03612c2c565b5b6000612f1288828901612cdd565b9550506020612f2388828901612c52565b9450506040612f3488828901612c52565b9350506060612f4588828901612ed3565b9250506080612f5688828901612cdd565b9150509295509295909350565b60008060408385031215612f7a57612f79612c2c565b5b6000612f8885828601612db2565b9250506020612f9985828601612c52565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110612fe357612fe2612fa3565b5b50565b6000819050612ff482612fd2565b919050565b600061300482612fe6565b9050919050565b61301481612ff9565b82525050565b600060208201905061302f600083018461300b565b92915050565b61303e81612d55565b811461304957600080fd5b50565b60008135905061305b81613035565b92915050565b60006020828403121561307757613076612c2c565b5b60006130858482850161304c565b91505092915050565b61309781612cb4565b82525050565b60006020820190506130b2600083018461308e565b92915050565b6130c181612c31565b82525050565b600381106130d8576130d7612fa3565b5b50565b60008190506130e9826130c7565b919050565b60006130f9826130db565b9050919050565b613109816130ee565b82525050565b600061018082019050613125600083018f61308e565b613132602083018e61308e565b61313f604083018d61308e565b61314c606083018c6130b8565b613159608083018b6130b8565b61316660a083018a6130b8565b61317360c08301896130b8565b61318060e08301886130b8565b61318e6101008301876130b8565b61319c610120830186612d2b565b6131aa610140830185612d2b565b6131b8610160830184613100565b9d9c50505050505050505050505050565b60006020820190506131de60008301846130b8565b92915050565b600082825260208201905092915050565b7f446973636f756e74207468726573686f6c642063616e2774206265207a65726f600082015250565b600061322b6020836131e4565b9150613236826131f5565b602082019050919050565b6000602082019050818103600083015261325a8161321e565b9050919050565b60008151905061327081612c3b565b92915050565b60006020828403121561328c5761328b612c2c565b5b600061329a84828501613261565b91505092915050565b7f4665652070657263656e74616765206d757374206265206c657373207468616e60008201527f2031302500000000000000000000000000000000000000000000000000000000602082015250565b60006132ff6024836131e4565b915061330a826132a3565b604082019050919050565b6000602082019050818103600083015261332e816132f2565b9050919050565b7f4f7264657220646f65736e277420657869737400000000000000000000000000600082015250565b600061336b6013836131e4565b915061337682613335565b602082019050919050565b6000602082019050818103600083015261339a8161335e565b9050919050565b7f43616c6c206f6e6c792063726561746f72206f6620746865206f726465720000600082015250565b60006133d7601e836131e4565b91506133e2826133a1565b602082019050919050565b60006020820190508181036000830152613406816133ca565b9050919050565b7f4f7264657220616c726561647920736574746c65640000000000000000000000600082015250565b60006134436015836131e4565b915061344e8261340d565b602082019050919050565b6000602082019050818103600083015261347281613436565b9050919050565b7f4f726465722063616e6e6f7420626520736574746c6564000000000000000000600082015250565b60006134af6017836131e4565b91506134ba82613479565b602082019050919050565b600060208201905081810360008301526134de816134a2565b9050919050565b60006060820190506134fa600083018661308e565b613507602083018561308e565b61351460408301846130b8565b949350505050565b60008160001c9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061355c6135578361351c565b613529565b9050919050565b61356c81612cb4565b82525050565b6000819050919050565b600061358f61358a8361351c565b613572565b9050919050565b61359f81612c31565b82525050565b600060ff82169050919050565b60006135c56135c08361351c565b6135a5565b9050919050565b6135d581612d1f565b82525050565b60008160081c9050919050565b60006135fb6135f6836135db565b6135a5565b9050919050565b60008160101c9050919050565b600060ff82169050919050565b600061362f61362a83613602565b61360f565b9050919050565b61363f816130ee565b82525050565b6101808201600080830154905061365b81613549565b6136686000860182613563565b506001830154905061367981613549565b6136866020860182613563565b506002830154905061369781613549565b6136a46040860182613563565b50600383015490506136b58161357c565b6136c26060860182613596565b50600483015490506136d38161357c565b6136e06080860182613596565b50600583015490506136f18161357c565b6136fe60a0860182613596565b506006830154905061370f8161357c565b61371c60c0860182613596565b506007830154905061372d8161357c565b61373a60e0860182613596565b506008830154905061374b8161357c565b613759610100860182613596565b506009830154905061376a816135b2565b6137786101208601826135cc565b50613782816135e8565b6137906101408601826135cc565b5061379a8161361c565b6137a8610160860182613636565b5050505050565b6000610180820190506137c56000830184613645565b92915050565b7f77686974656c69737420616464726573732063616e6e6f742062652073656e6460008201527f6572206164647265737300000000000000000000000000000000000000000000602082015250565b6000613827602a836131e4565b9150613832826137cb565b604082019050919050565b600060208201905081810360008301526138568161381a565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b6000613893601d836131e4565b915061389e8261385d565b602082019050919050565b600060208201905081810360008301526138c281613886565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061390382612c31565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613935576139346138c9565b5b600182019050919050565b600081905092915050565b7f4c696e6561720000000000000000000000000000000000000000000000000000600082015250565b6000613981600683613940565b915061398c8261394b565b600682019050919050565b6000819050919050565b6139b26139ad82612c31565b613997565b82525050565b60006139c382613974565b91506139cf82846139a1565b60208201915081905092915050565b610180820160008083015490506139f481613549565b613a016000860182613563565b5060018301549050613a1281613549565b613a1f6020860182613563565b5060028301549050613a3081613549565b613a3d6040860182613563565b5060038301549050613a4e8161357c565b613a5b6060860182613596565b5060048301549050613a6c8161357c565b613a796080860182613596565b5060058301549050613a8a8161357c565b613a9760a0860182613596565b5060068301549050613aa88161357c565b613ab560c0860182613596565b5060078301549050613ac68161357c565b613ad360e0860182613596565b5060088301549050613ae48161357c565b613af2610100860182613596565b5060098301549050613b03816135b2565b613b116101208601826135cc565b50613b1b816135e8565b613b296101408601826135cc565b50613b338161361c565b613b41610160860182613636565b5050505050565b600061018082019050613b5e60008301846139de565b92915050565b7f52657175657374656420746f6b656e20616d6f756e74206d757374206265206760008201527f726561746572207468616e203000000000000000000000000000000000000000602082015250565b6000613bc0602d836131e4565b9150613bcb82613b64565b604082019050919050565b60006020820190508181036000830152613bef81613bb3565b9050919050565b7f546f6b656e20616d6f756e74206d75737420626520677265617465722074686160008201527f6e20300000000000000000000000000000000000000000000000000000000000602082015250565b6000613c526023836131e4565b9150613c5d82613bf6565b604082019050919050565b60006020820190508181036000830152613c8181613c45565b9050919050565b6000613c9382612c31565b9150613c9e83612c31565b9250828203905081811115613cb657613cb56138c9565b5b92915050565b7f546f6b656e207472616e73666572206661696c65643a20696e636f727265637460008201527f2062616c616e6365000000000000000000000000000000000000000000000000602082015250565b6000613d186028836131e4565b9150613d2382613cbc565b604082019050919050565b60006020820190508181036000830152613d4781613d0b565b9050919050565b7f4f726465722063616e6e6f742062652075706461746564000000000000000000600082015250565b6000613d846017836131e4565b9150613d8f82613d4e565b602082019050919050565b60006020820190508181036000830152613db381613d77565b9050919050565b60006101a082019050613dd06000830185613645565b613dde6101808301846130b8565b9392505050565b7f46656520616464726573732063616e6e6f742062652030000000000000000000600082015250565b6000613e1b6017836131e4565b9150613e2682613de5565b602082019050919050565b60006020820190508181036000830152613e4a81613e0e565b9050919050565b7f46656520616464726573732063616e6e6f742062652073616d6520617320637560008201527f7272656e74206665652061646472657373000000000000000000000000000000602082015250565b6000613ead6031836131e4565b9150613eb882613e51565b604082019050919050565b60006020820190508181036000830152613edc81613ea0565b9050919050565b7f53656e6465722061646472657373206d7573742062652077686974656c69737460008201527f6564206164647265737300000000000000000000000000000000000000000000602082015250565b6000613f3f602a836131e4565b9150613f4a82613ee3565b604082019050919050565b60006020820190508181036000830152613f6e81613f32565b9050919050565b7f52657175657374657220616464726573732069732073656e646572206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613fd16023836131e4565b9150613fdc82613f75565b604082019050919050565b6000602082019050818103600083015261400081613fc4565b9050919050565b7f4f7264657220616c72656164792066756c66696c6c6564206f722063616e636560008201527f6c6c656400000000000000000000000000000000000000000000000000000000602082015250565b60006140636024836131e4565b915061406e82614007565b604082019050919050565b6000602082019050818103600083015261409281614056565b9050919050565b7f4f7264657220697320616e204e4654206f726465720000000000000000000000600082015250565b60006140cf6015836131e4565b91506140da82614099565b602082019050919050565b600060208201905081810360008301526140fe816140c2565b9050919050565b60008160011c9050919050565b6000808291508390505b600185111561415c57808604811115614138576141376138c9565b5b60018516156141475780820291505b808102905061415585614105565b945061411c565b94509492505050565b6000826141755760019050614231565b816141835760009050614231565b816001811461419957600281146141a3576141d2565b6001915050614231565b60ff8411156141b5576141b46138c9565b5b8360020a9150848211156141cc576141cb6138c9565b5b50614231565b5060208310610133831016604e8410600b84101617156142075782820a905083811115614202576142016138c9565b5b614231565b6142148484846001614112565b9250905081840481111561422b5761422a6138c9565b5b81810290505b9392505050565b600061424382612c31565b915061424e83612e85565b925061427b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484614165565b905092915050565b600061428e82612c31565b915061429983612c31565b92508282026142a781612c31565b915082820484148315176142be576142bd6138c9565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006142ff82612c31565b915061430a83612c31565b92508261431a576143196142c5565b5b828204905092915050565b7f496e73756666696369656e7420746f6b656e7300000000000000000000000000600082015250565b600061435b6013836131e4565b915061436682614325565b602082019050919050565b6000602082019050818103600083015261438a8161434e565b9050919050565b7f4e6f207061727469616c2066696c6c73207065726d6974746564000000000000600082015250565b60006143c7601a836131e4565b91506143d282614391565b602082019050919050565b600060208201905081810360008301526143f6816143ba565b9050919050565b600061440882612c31565b915061441383612c31565b925082820190508082111561442b5761442a6138c9565b5b92915050565b6080820160008201516144476000850182613563565b50602082015161445a6020850182613596565b50604082015161446d6040850182613596565b5060608201516144806060850182613596565b50505050565b60006102008201905061449c60008301856139de565b6144aa610180830184614431565b9392505050565b7f46656520646973636f756e742070657263656e74616765206d7573742062652060008201527f6c657373207468616e2031303025000000000000000000000000000000000000602082015250565b600061450d602e836131e4565b9150614518826144b1565b604082019050919050565b6000602082019050818103600083015261453c81614500565b9050919050565b7f4f72646572206973206e6f7420616e204e4654206f7264657200000000000000600082015250565b60006145796019836131e4565b915061458482614543565b602082019050919050565b600060208201905081810360008301526145a88161456c565b9050919050565b60006040820190506145c4600083018561308e565b6145d160208301846130b8565b9392505050565b6000815190506145e781612ebc565b92915050565b60006020828403121561460357614602612c2c565b5b6000614611848285016145d8565b91505092915050565b600081519050919050565b600081905092915050565b60005b8381101561464e578082015181840152602081019050614633565b60008484015250505050565b60006146658261461a565b61466f8185614625565b935061467f818560208601614630565b80840191505092915050565b6000614697828461465a565b91508190509291505056fea2646970667358221220c97d5e03b12b44c8fdf6a087779bc243d08869163109feb2b96ce6d77e836caf64736f6c63430008190033000000000000000000000000e017ac5593dc60b0c4c8fbf854b8b7a1238fef9000000000000000000000000049b34183b2f1f450516be42698008da5af988563000000000000000000000000a1831abfecc01d04d1474249fd48d266a1242d81000000000000000000000000e017ac5593dc60b0c4c8fbf854b8b7a1238fef90

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061018e5760003560e01c80638da5cb5b116100de578063bd56194a11610097578063e2c2c00a11610071578063e2c2c00a14610430578063ea61226c1461044c578063f2fde38b1461046a578063f7050031146104865761018e565b8063bd56194a146103d8578063cb0856bb146103f6578063cda9b12f146104145761018e565b80638da5cb5b1461031d57806397bd2e9d1461033b5780639c3f1e9014610357578063a001ecdd14610392578063a95c4d62146103b0578063b33712c5146103ce5761018e565b80635b0072a61161014b5780635f704f3e116101255780635f704f3e146102bd578063715018a6146102d957806385209ee0146102e35780638705fcd4146103015761018e565b80635b0072a61461023f5780635c3863281461026f5780635f4294691461028d5761018e565b80630b4dc8ca14610193578063248d6429146101af5780633d18678e146101df57806341275358146101fb578063439766ce1461021957806349085d8c14610223575b600080fd5b6101ad60048036038101906101a89190612c67565b6104a4565b005b6101c960048036038101906101c49190612cf2565b6104f9565b6040516101d69190612d3a565b60405180910390f35b6101f960048036038101906101f49190612c67565b6105a6565b005b6102036105fd565b6040516102109190612d76565b60405180910390f35b610221610623565b005b61023d60048036038101906102389190612dc7565b6106c5565b005b61025960048036038101906102549190612df4565b610ae0565b6040516102669190612e6a565b60405180910390f35b610277610e42565b6040516102849190612ea1565b60405180910390f35b6102a760048036038101906102a29190612ee8565b610e66565b6040516102b49190612e6a565b60405180910390f35b6102d760048036038101906102d29190612f63565b61133c565b005b6102e1611600565b005b6102eb611614565b6040516102f8919061301a565b60405180910390f35b61031b60048036038101906103169190613061565b611627565b005b610325611772565b604051610332919061309d565b60405180910390f35b61035560048036038101906103509190612f63565b61179b565b005b610371600480360381019061036c9190612dc7565b611e34565b6040516103899c9b9a9998979695949392919061310f565b60405180910390f35b61039a611f1b565b6040516103a791906131c9565b60405180910390f35b6103b8611f21565b6040516103c5919061309d565b60405180910390f35b6103d6611f45565b005b6103e0611fe5565b6040516103ed91906131c9565b60405180910390f35b6103fe611feb565b60405161040b91906131c9565b60405180910390f35b61042e60048036038101906104299190612c67565b611ff1565b005b61044a60048036038101906104459190612dc7565b612048565b005b610454612559565b604051610461919061309d565b60405180910390f35b610484600480360381019061047f9190612cf2565b61257d565b005b61048e612603565b60405161049b91906131c9565b60405180910390f35b6104ac612609565b600081036104ef576040517fe2bd639d0000000000000000000000000000000000000000000000000000000081526004016104e690613241565b60405180910390fd5b8060048190555050565b6000807f00000000000000000000000049b34183b2f1f450516be42698008da5af98856373ffffffffffffffffffffffffffffffffffffffff166370a08231846040518263ffffffff1660e01b8152600401610555919061309d565b602060405180830381865afa158015610572573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105969190613276565b9050600454811015915050919050565b6105ae612609565b6103e88111156105f3576040517fe2bd639d0000000000000000000000000000000000000000000000000000000081526004016105ea90613315565b60405180910390fd5b8060058190555050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b61062b612609565b6000600181111561063f5761063e612fa3565b5b600060149054906101000a900460ff16600181111561066157610660612fa3565b5b14610698576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600060146101000a81548160ff021916908360018111156106be576106bd612fa3565b5b0217905550565b6001600082815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361076b576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161076290613381565b60405180910390fd5b6001600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610810576040517fab7826de000000000000000000000000000000000000000000000000000000008152600401610807906133ed565b60405180910390fd5b600060016000858152602001908152602001600020905060028081111561083a57610839612fa3565b5b8160090160029054906101000a900460ff16600281111561085e5761085d612fa3565b5b0361089e576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161089590613459565b60405180910390fd5b600060028111156108b2576108b1612fa3565b5b8160090160029054906101000a900460ff1660028111156108d6576108d5612fa3565b5b14610916576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161090d906134c5565b60405180910390fd5b60028160090160026101000a81548160ff0219169083600281111561093e5761093d612fa3565b5b02179055508060090160019054906101000a900460ff1615610a1a578060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e308360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600301546040518463ffffffff1660e01b81526004016109e3939291906134e5565b600060405180830381600087803b1580156109fd57600080fd5b505af1158015610a11573d6000803e3d6000fd5b50505050610aa2565b60008160050154905060008260050181905550610aa08260000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828460020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166126909092919063ffffffff16565b505b837f1ebe2042aa36647ec46359960c209975b172c78c7b3b3ac09c37a44166ba507f82604051610ad291906137af565b60405180910390a250505050565b6000806001811115610af557610af4612fa3565b5b600060149054906101000a900460ff166001811115610b1757610b16612fa3565b5b14610b4e576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b813373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610bbd576040517fab7826de000000000000000000000000000000000000000000000000000000008152600401610bb49061383d565b60405180910390fd5b60008403610c00576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401610bf7906138a9565b60405180910390fd5b6000600260008154610c11906138f8565b919050819055604051602001610c2791906139b8565b6040516020818303038152906040528051906020012090506000600160008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550878160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550868160030181905550848160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555085816006018190555060018160090160016101000a81548160ff02191690831515021790555060008160090160026101000a81548160ff02191690836002811115610d7657610d75612fa3565b5b02179055508773ffffffffffffffffffffffffffffffffffffffff166323b872dd33308a6040518463ffffffff1660e01b8152600401610db8939291906134e5565b600060405180830381600087803b158015610dd257600080fd5b505af1158015610de6573d6000803e3d6000fd5b50505050817f5b0c37f386e94d8731079862e85a9c05f60a53fac37519b0361885f2c707598e60016000858152602001908152602001600020604051610e2c9190613b48565b60405180910390a2819350505050949350505050565b7f000000000000000000000000000000000000000000000000000000000000000681565b6000806001811115610e7b57610e7a612fa3565b5b600060149054906101000a900460ff166001811115610e9d57610e9c612fa3565b5b14610ed4576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b813373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610f43576040517fab7826de000000000000000000000000000000000000000000000000000000008152600401610f3a9061383d565b60405180910390fd5b600087905060008603610f8b576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401610f8290613bd6565b60405180910390fd5b60008703610fce576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401610fc590613c68565b60405180910390fd5b6000600260008154610fdf906138f8565b919050819055604051602001610ff591906139b8565b6040516020818303038152906040528051906020012090506000600160008381526020019081526020016000209050338160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550898160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550868160090160006101000a81548160ff021916908315150217905550858160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008160090160026101000a81548160ff0219169083600281111561113157611130612fa3565b5b0217905550888160040181905550888160050181905550861561116557611158888a61270f565b816008018190555061116f565b8781600601819055505b60008373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016111aa919061309d565b602060405180830381865afa1580156111c7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111eb9190613276565b905061121a33308c8773ffffffffffffffffffffffffffffffffffffffff1661275c909392919063ffffffff16565b89818573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611255919061309d565b602060405180830381865afa158015611272573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112969190613276565b6112a09190613c88565b10156112e1576040517f1483bcd60000000000000000000000000000000000000000000000000000000081526004016112d890613d2e565b60405180910390fd5b827f5b0c37f386e94d8731079862e85a9c05f60a53fac37519b0361885f2c707598e600160008681526020019081526020016000206040516113239190613b48565b60405180910390a2829550505050505095945050505050565b600060018111156113505761134f612fa3565b5b600060149054906101000a900460ff16600181111561137257611371612fa3565b5b146113a9576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361144f576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161144690613381565b60405180910390fd5b6001600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146114f4576040517fab7826de0000000000000000000000000000000000000000000000000000000081526004016114eb906133ed565b60405180910390fd5b60006001600086815260200190815260200160002090506000600281111561151f5761151e612fa3565b5b8160090160029054906101000a900460ff16600281111561154357611542612fa3565b5b14611583576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161157a90613d9a565b60405180910390fd5b8060090160009054906101000a900460ff16156115b5576115a884826005015461270f565b81600801819055506115bf565b8381600601819055505b847f5cccdf8f586a0e3e8620f29c9523918774505784f52f97ceb6d0e99879a211f082866040516115f1929190613dba565b60405180910390a25050505050565b611608612609565b61161260006127de565b565b600060149054906101000a900460ff1681565b61162f612609565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361169e576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161169590613e31565b60405180910390fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361172e576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161172590613ec3565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600060018111156117af576117ae612fa3565b5b600060149054906101000a900460ff1660018111156117d1576117d0612fa3565b5b14611808576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600083815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156118a857503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b156118e8576040517fab7826de0000000000000000000000000000000000000000000000000000000081526004016118df90613f55565b60405180910390fd5b6001600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361198d576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161198490613fe7565b60405180910390fd5b6001600085815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611a33576040517f64633e22000000000000000000000000000000000000000000000000000000008152600401611a2a90613381565b60405180910390fd5b6001600086815260200190815260200160002060090160029054906101000a900460ff1660006002811115611a6b57611a6a612fa3565b5b816002811115611a7e57611a7d612fa3565b5b14611abe576040517f64633e22000000000000000000000000000000000000000000000000000000008152600401611ab590614079565b60405180910390fd5b60006001600088815260200190815260200160002090508060090160019054906101000a900460ff1615611b27576040517f64633e22000000000000000000000000000000000000000000000000000000008152600401611b1e906140e5565b60405180910390fd5b60008603611b6a576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401611b6190613c68565b60405180910390fd5b60008160090160009054906101000a900460ff1615611c18577f0000000000000000000000000000000000000000000000000000000000000006600a611bb09190614238565b826008015488611bc09190614283565b611bca91906142f4565b90508160050154811115611c13576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401611c0a90614371565b60405180910390fd5b611c66565b81600601548714611c5e576040517fe2bd639d000000000000000000000000000000000000000000000000000000008152600401611c55906143dd565b60405180910390fd5b816005015490505b60008260020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081836005016000828254611ca39190613c88565b9250508190555081836007016000828254611cbe91906143fd565b925050819055506000836005015403611cff5760018360090160026101000a81548160ff02191690836002811115611cf957611cf8612fa3565b5b02179055505b8260090160009054906101000a900460ff1615611d4957611d448360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16896128a2565b611d7c565b611d7b8360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684600601546128a2565b5b611da733838373ffffffffffffffffffffffffffffffffffffffff166126909092919063ffffffff16565b887fe653ee2bd7ea056746784cecfb3fd041a95f178c377259bdf1ca1a590f3b37aa600160008c815260200190815260200160002060405180608001604052803373ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018c815260200186815250604051611e21929190614486565b60405180910390a2505050505050505050565b60016020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060030154908060040154908060050154908060060154908060070154908060080154908060090160009054906101000a900460ff16908060090160019054906101000a900460ff16908060090160029054906101000a900460ff1690508c565b60055481565b7f000000000000000000000000a1831abfecc01d04d1474249fd48d266a1242d8181565b611f4d612609565b600180811115611f6057611f5f612fa3565b5b600060149054906101000a900460ff166001811115611f8257611f81612fa3565b5b14611fb9576040517f1cbb4d8400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060146101000a81548160ff02191690836001811115611fde57611fdd612fa3565b5b0217905550565b60065481565b60045481565b611ff9612609565b61271081111561203e576040517fe2bd639d00000000000000000000000000000000000000000000000000000000815260040161203590614523565b60405180910390fd5b8060068190555050565b6000600181111561205c5761205b612fa3565b5b600060149054906101000a900460ff16600181111561207e5761207d612fa3565b5b146120b5576040517f6d39fcd000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600082815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415801561215557503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b15612195576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161218c90613f55565b60405180910390fd5b6001600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff160361223a576040517fab7826de00000000000000000000000000000000000000000000000000000000815260040161223190613fe7565b60405180910390fd5b6001600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036122e0576040517f64633e220000000000000000000000000000000000000000000000000000000081526004016122d790613381565b60405180910390fd5b6001600085815260200190815260200160002060090160029054906101000a900460ff166000600281111561231857612317612fa3565b5b81600281111561232b5761232a612fa3565b5b1461236b576040517f64633e2200000000000000000000000000000000000000000000000000000000815260040161236290614079565b60405180910390fd5b60006001600087815260200190815260200160002090508060090160019054906101000a900460ff166123d3576040517f64633e220000000000000000000000000000000000000000000000000000000081526004016123ca9061458f565b60405180910390fd5b6124058160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600601546128a2565b60018160090160026101000a81548160ff0219169083600281111561242d5761242c612fa3565b5b02179055508060020160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e303384600301546040518463ffffffff1660e01b8152600401612497939291906134e5565b600060405180830381600087803b1580156124b157600080fd5b505af11580156124c5573d6000803e3d6000fd5b50505050857fe653ee2bd7ea056746784cecfb3fd041a95f178c377259bdf1ca1a590f3b37aa6001600089815260200190815260200160002060405180608001604052803373ffffffffffffffffffffffffffffffffffffffff16815260200160018152602001600181526020018560060154815250604051612549929190614486565b60405180910390a2505050505050565b7f00000000000000000000000049b34183b2f1f450516be42698008da5af98856381565b612585612609565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036125f75760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016125ee919061309d565b60405180910390fd5b612600816127de565b50565b61271081565b6126116129d6565b73ffffffffffffffffffffffffffffffffffffffff1661262f611772565b73ffffffffffffffffffffffffffffffffffffffff161461268e576126526129d6565b6040517f118cdaa7000000000000000000000000000000000000000000000000000000008152600401612685919061309d565b60405180910390fd5b565b61270a838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85856040516024016126c39291906145af565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506129de565b505050565b6000827f0000000000000000000000000000000000000000000000000000000000000006600a61273f9190614238565b8361274a9190614283565b61275491906142f4565b905092915050565b6127d8848573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401612791939291906134e5565b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506129de565b50505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000612710600554836128b59190614283565b6128bf91906142f4565b90506128ca836104f9565b156128fa576127106006546127106128e29190613c88565b826128ed9190614283565b6128f791906142f4565b90505b600081836129089190613c88565b90506129573385837f000000000000000000000000a1831abfecc01d04d1474249fd48d266a1242d8173ffffffffffffffffffffffffffffffffffffffff1661275c909392919063ffffffff16565b60008211156129d0576129cf33600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16847f000000000000000000000000a1831abfecc01d04d1474249fd48d266a1242d8173ffffffffffffffffffffffffffffffffffffffff1661275c909392919063ffffffff16565b5b50505050565b600033905090565b6000612a09828473ffffffffffffffffffffffffffffffffffffffff16612a7590919063ffffffff16565b90506000815114158015612a2e575080806020019051810190612a2c91906145ed565b155b15612a7057826040517f5274afe7000000000000000000000000000000000000000000000000000000008152600401612a67919061309d565b60405180910390fd5b505050565b6060612a8383836000612a8b565b905092915050565b606081471015612ad257306040517fcd786059000000000000000000000000000000000000000000000000000000008152600401612ac9919061309d565b60405180910390fd5b6000808573ffffffffffffffffffffffffffffffffffffffff168486604051612afb919061468b565b60006040518083038185875af1925050503d8060008114612b38576040519150601f19603f3d011682016040523d82523d6000602084013e612b3d565b606091505b5091509150612b4d868383612b58565b925050509392505050565b606082612b6d57612b6882612be7565b612bdf565b60008251148015612b95575060008473ffffffffffffffffffffffffffffffffffffffff163b145b15612bd757836040517f9996b315000000000000000000000000000000000000000000000000000000008152600401612bce919061309d565b60405180910390fd5b819050612be0565b5b9392505050565b600081511115612bfa5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080fd5b6000819050919050565b612c4481612c31565b8114612c4f57600080fd5b50565b600081359050612c6181612c3b565b92915050565b600060208284031215612c7d57612c7c612c2c565b5b6000612c8b84828501612c52565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612cbf82612c94565b9050919050565b612ccf81612cb4565b8114612cda57600080fd5b50565b600081359050612cec81612cc6565b92915050565b600060208284031215612d0857612d07612c2c565b5b6000612d1684828501612cdd565b91505092915050565b60008115159050919050565b612d3481612d1f565b82525050565b6000602082019050612d4f6000830184612d2b565b92915050565b6000612d6082612c94565b9050919050565b612d7081612d55565b82525050565b6000602082019050612d8b6000830184612d67565b92915050565b6000819050919050565b612da481612d91565b8114612daf57600080fd5b50565b600081359050612dc181612d9b565b92915050565b600060208284031215612ddd57612ddc612c2c565b5b6000612deb84828501612db2565b91505092915050565b60008060008060808587031215612e0e57612e0d612c2c565b5b6000612e1c87828801612cdd565b9450506020612e2d87828801612c52565b9350506040612e3e87828801612c52565b9250506060612e4f87828801612cdd565b91505092959194509250565b612e6481612d91565b82525050565b6000602082019050612e7f6000830184612e5b565b92915050565b600060ff82169050919050565b612e9b81612e85565b82525050565b6000602082019050612eb66000830184612e92565b92915050565b612ec581612d1f565b8114612ed057600080fd5b50565b600081359050612ee281612ebc565b92915050565b600080600080600060a08688031215612f0457612f03612c2c565b5b6000612f1288828901612cdd565b9550506020612f2388828901612c52565b9450506040612f3488828901612c52565b9350506060612f4588828901612ed3565b9250506080612f5688828901612cdd565b9150509295509295909350565b60008060408385031215612f7a57612f79612c2c565b5b6000612f8885828601612db2565b9250506020612f9985828601612c52565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60028110612fe357612fe2612fa3565b5b50565b6000819050612ff482612fd2565b919050565b600061300482612fe6565b9050919050565b61301481612ff9565b82525050565b600060208201905061302f600083018461300b565b92915050565b61303e81612d55565b811461304957600080fd5b50565b60008135905061305b81613035565b92915050565b60006020828403121561307757613076612c2c565b5b60006130858482850161304c565b91505092915050565b61309781612cb4565b82525050565b60006020820190506130b2600083018461308e565b92915050565b6130c181612c31565b82525050565b600381106130d8576130d7612fa3565b5b50565b60008190506130e9826130c7565b919050565b60006130f9826130db565b9050919050565b613109816130ee565b82525050565b600061018082019050613125600083018f61308e565b613132602083018e61308e565b61313f604083018d61308e565b61314c606083018c6130b8565b613159608083018b6130b8565b61316660a083018a6130b8565b61317360c08301896130b8565b61318060e08301886130b8565b61318e6101008301876130b8565b61319c610120830186612d2b565b6131aa610140830185612d2b565b6131b8610160830184613100565b9d9c50505050505050505050505050565b60006020820190506131de60008301846130b8565b92915050565b600082825260208201905092915050565b7f446973636f756e74207468726573686f6c642063616e2774206265207a65726f600082015250565b600061322b6020836131e4565b9150613236826131f5565b602082019050919050565b6000602082019050818103600083015261325a8161321e565b9050919050565b60008151905061327081612c3b565b92915050565b60006020828403121561328c5761328b612c2c565b5b600061329a84828501613261565b91505092915050565b7f4665652070657263656e74616765206d757374206265206c657373207468616e60008201527f2031302500000000000000000000000000000000000000000000000000000000602082015250565b60006132ff6024836131e4565b915061330a826132a3565b604082019050919050565b6000602082019050818103600083015261332e816132f2565b9050919050565b7f4f7264657220646f65736e277420657869737400000000000000000000000000600082015250565b600061336b6013836131e4565b915061337682613335565b602082019050919050565b6000602082019050818103600083015261339a8161335e565b9050919050565b7f43616c6c206f6e6c792063726561746f72206f6620746865206f726465720000600082015250565b60006133d7601e836131e4565b91506133e2826133a1565b602082019050919050565b60006020820190508181036000830152613406816133ca565b9050919050565b7f4f7264657220616c726561647920736574746c65640000000000000000000000600082015250565b60006134436015836131e4565b915061344e8261340d565b602082019050919050565b6000602082019050818103600083015261347281613436565b9050919050565b7f4f726465722063616e6e6f7420626520736574746c6564000000000000000000600082015250565b60006134af6017836131e4565b91506134ba82613479565b602082019050919050565b600060208201905081810360008301526134de816134a2565b9050919050565b60006060820190506134fa600083018661308e565b613507602083018561308e565b61351460408301846130b8565b949350505050565b60008160001c9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061355c6135578361351c565b613529565b9050919050565b61356c81612cb4565b82525050565b6000819050919050565b600061358f61358a8361351c565b613572565b9050919050565b61359f81612c31565b82525050565b600060ff82169050919050565b60006135c56135c08361351c565b6135a5565b9050919050565b6135d581612d1f565b82525050565b60008160081c9050919050565b60006135fb6135f6836135db565b6135a5565b9050919050565b60008160101c9050919050565b600060ff82169050919050565b600061362f61362a83613602565b61360f565b9050919050565b61363f816130ee565b82525050565b6101808201600080830154905061365b81613549565b6136686000860182613563565b506001830154905061367981613549565b6136866020860182613563565b506002830154905061369781613549565b6136a46040860182613563565b50600383015490506136b58161357c565b6136c26060860182613596565b50600483015490506136d38161357c565b6136e06080860182613596565b50600583015490506136f18161357c565b6136fe60a0860182613596565b506006830154905061370f8161357c565b61371c60c0860182613596565b506007830154905061372d8161357c565b61373a60e0860182613596565b506008830154905061374b8161357c565b613759610100860182613596565b506009830154905061376a816135b2565b6137786101208601826135cc565b50613782816135e8565b6137906101408601826135cc565b5061379a8161361c565b6137a8610160860182613636565b5050505050565b6000610180820190506137c56000830184613645565b92915050565b7f77686974656c69737420616464726573732063616e6e6f742062652073656e6460008201527f6572206164647265737300000000000000000000000000000000000000000000602082015250565b6000613827602a836131e4565b9150613832826137cb565b604082019050919050565b600060208201905081810360008301526138568161381a565b9050919050565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b6000613893601d836131e4565b915061389e8261385d565b602082019050919050565b600060208201905081810360008301526138c281613886565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061390382612c31565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613935576139346138c9565b5b600182019050919050565b600081905092915050565b7f4c696e6561720000000000000000000000000000000000000000000000000000600082015250565b6000613981600683613940565b915061398c8261394b565b600682019050919050565b6000819050919050565b6139b26139ad82612c31565b613997565b82525050565b60006139c382613974565b91506139cf82846139a1565b60208201915081905092915050565b610180820160008083015490506139f481613549565b613a016000860182613563565b5060018301549050613a1281613549565b613a1f6020860182613563565b5060028301549050613a3081613549565b613a3d6040860182613563565b5060038301549050613a4e8161357c565b613a5b6060860182613596565b5060048301549050613a6c8161357c565b613a796080860182613596565b5060058301549050613a8a8161357c565b613a9760a0860182613596565b5060068301549050613aa88161357c565b613ab560c0860182613596565b5060078301549050613ac68161357c565b613ad360e0860182613596565b5060088301549050613ae48161357c565b613af2610100860182613596565b5060098301549050613b03816135b2565b613b116101208601826135cc565b50613b1b816135e8565b613b296101408601826135cc565b50613b338161361c565b613b41610160860182613636565b5050505050565b600061018082019050613b5e60008301846139de565b92915050565b7f52657175657374656420746f6b656e20616d6f756e74206d757374206265206760008201527f726561746572207468616e203000000000000000000000000000000000000000602082015250565b6000613bc0602d836131e4565b9150613bcb82613b64565b604082019050919050565b60006020820190508181036000830152613bef81613bb3565b9050919050565b7f546f6b656e20616d6f756e74206d75737420626520677265617465722074686160008201527f6e20300000000000000000000000000000000000000000000000000000000000602082015250565b6000613c526023836131e4565b9150613c5d82613bf6565b604082019050919050565b60006020820190508181036000830152613c8181613c45565b9050919050565b6000613c9382612c31565b9150613c9e83612c31565b9250828203905081811115613cb657613cb56138c9565b5b92915050565b7f546f6b656e207472616e73666572206661696c65643a20696e636f727265637460008201527f2062616c616e6365000000000000000000000000000000000000000000000000602082015250565b6000613d186028836131e4565b9150613d2382613cbc565b604082019050919050565b60006020820190508181036000830152613d4781613d0b565b9050919050565b7f4f726465722063616e6e6f742062652075706461746564000000000000000000600082015250565b6000613d846017836131e4565b9150613d8f82613d4e565b602082019050919050565b60006020820190508181036000830152613db381613d77565b9050919050565b60006101a082019050613dd06000830185613645565b613dde6101808301846130b8565b9392505050565b7f46656520616464726573732063616e6e6f742062652030000000000000000000600082015250565b6000613e1b6017836131e4565b9150613e2682613de5565b602082019050919050565b60006020820190508181036000830152613e4a81613e0e565b9050919050565b7f46656520616464726573732063616e6e6f742062652073616d6520617320637560008201527f7272656e74206665652061646472657373000000000000000000000000000000602082015250565b6000613ead6031836131e4565b9150613eb882613e51565b604082019050919050565b60006020820190508181036000830152613edc81613ea0565b9050919050565b7f53656e6465722061646472657373206d7573742062652077686974656c69737460008201527f6564206164647265737300000000000000000000000000000000000000000000602082015250565b6000613f3f602a836131e4565b9150613f4a82613ee3565b604082019050919050565b60006020820190508181036000830152613f6e81613f32565b9050919050565b7f52657175657374657220616464726573732069732073656e646572206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613fd16023836131e4565b9150613fdc82613f75565b604082019050919050565b6000602082019050818103600083015261400081613fc4565b9050919050565b7f4f7264657220616c72656164792066756c66696c6c6564206f722063616e636560008201527f6c6c656400000000000000000000000000000000000000000000000000000000602082015250565b60006140636024836131e4565b915061406e82614007565b604082019050919050565b6000602082019050818103600083015261409281614056565b9050919050565b7f4f7264657220697320616e204e4654206f726465720000000000000000000000600082015250565b60006140cf6015836131e4565b91506140da82614099565b602082019050919050565b600060208201905081810360008301526140fe816140c2565b9050919050565b60008160011c9050919050565b6000808291508390505b600185111561415c57808604811115614138576141376138c9565b5b60018516156141475780820291505b808102905061415585614105565b945061411c565b94509492505050565b6000826141755760019050614231565b816141835760009050614231565b816001811461419957600281146141a3576141d2565b6001915050614231565b60ff8411156141b5576141b46138c9565b5b8360020a9150848211156141cc576141cb6138c9565b5b50614231565b5060208310610133831016604e8410600b84101617156142075782820a905083811115614202576142016138c9565b5b614231565b6142148484846001614112565b9250905081840481111561422b5761422a6138c9565b5b81810290505b9392505050565b600061424382612c31565b915061424e83612e85565b925061427b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484614165565b905092915050565b600061428e82612c31565b915061429983612c31565b92508282026142a781612c31565b915082820484148315176142be576142bd6138c9565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006142ff82612c31565b915061430a83612c31565b92508261431a576143196142c5565b5b828204905092915050565b7f496e73756666696369656e7420746f6b656e7300000000000000000000000000600082015250565b600061435b6013836131e4565b915061436682614325565b602082019050919050565b6000602082019050818103600083015261438a8161434e565b9050919050565b7f4e6f207061727469616c2066696c6c73207065726d6974746564000000000000600082015250565b60006143c7601a836131e4565b91506143d282614391565b602082019050919050565b600060208201905081810360008301526143f6816143ba565b9050919050565b600061440882612c31565b915061441383612c31565b925082820190508082111561442b5761442a6138c9565b5b92915050565b6080820160008201516144476000850182613563565b50602082015161445a6020850182613596565b50604082015161446d6040850182613596565b5060608201516144806060850182613596565b50505050565b60006102008201905061449c60008301856139de565b6144aa610180830184614431565b9392505050565b7f46656520646973636f756e742070657263656e74616765206d7573742062652060008201527f6c657373207468616e2031303025000000000000000000000000000000000000602082015250565b600061450d602e836131e4565b9150614518826144b1565b604082019050919050565b6000602082019050818103600083015261453c81614500565b9050919050565b7f4f72646572206973206e6f7420616e204e4654206f7264657200000000000000600082015250565b60006145796019836131e4565b915061458482614543565b602082019050919050565b600060208201905081810360008301526145a88161456c565b9050919050565b60006040820190506145c4600083018561308e565b6145d160208301846130b8565b9392505050565b6000815190506145e781612ebc565b92915050565b60006020828403121561460357614602612c2c565b5b6000614611848285016145d8565b91505092915050565b600081519050919050565b600081905092915050565b60005b8381101561464e578082015181840152602081019050614633565b60008484015250505050565b60006146658261461a565b61466f8185614625565b935061467f818560208601614630565b80840191505092915050565b6000614697828461465a565b91508190509291505056fea2646970667358221220c97d5e03b12b44c8fdf6a087779bc243d08869163109feb2b96ce6d77e836caf64736f6c63430008190033

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

000000000000000000000000e017ac5593dc60b0c4c8fbf854b8b7a1238fef9000000000000000000000000049b34183b2f1f450516be42698008da5af988563000000000000000000000000a1831abfecc01d04d1474249fd48d266a1242d81000000000000000000000000e017ac5593dc60b0c4c8fbf854b8b7a1238fef90

-----Decoded View---------------
Arg [0] : _feeAddress (address): 0xe017AC5593dC60b0c4C8FbF854b8B7A1238feF90
Arg [1] : _discountToken (address): 0x49B34183b2f1F450516BE42698008DA5af988563
Arg [2] : _purchaseToken (address): 0xA1831AbfECC01d04d1474249Fd48d266a1242D81
Arg [3] : _initialOwner (address): 0xe017AC5593dC60b0c4C8FbF854b8B7A1238feF90

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000e017ac5593dc60b0c4c8fbf854b8b7a1238fef90
Arg [1] : 00000000000000000000000049b34183b2f1f450516be42698008da5af988563
Arg [2] : 000000000000000000000000a1831abfecc01d04d1474249fd48d266a1242d81
Arg [3] : 000000000000000000000000e017ac5593dc60b0c4c8fbf854b8b7a1238fef90


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

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