ETH Price: $2,631.16 (+0.09%)
Gas: 2 Gwei

Contract

0xe60dACF44055A60666B40a5c1855A3Fb6E0461ab
 
Transaction Hash
Method
Block
From
To
Cancel Order165830482023-02-08 9:04:35549 days ago1675847075IN
0xe60dACF4...b6E0461ab
0 ETH0.0027619126.34735135
Cancel Order165830462023-02-08 9:04:11549 days ago1675847051IN
0xe60dACF4...b6E0461ab
0 ETH0.0024162826.57887836
Cancel Order165830442023-02-08 9:03:35549 days ago1675847015IN
0xe60dACF4...b6E0461ab
0 ETH0.0019054824.09805703
Cancel Order165830412023-02-08 9:02:59549 days ago1675846979IN
0xe60dACF4...b6E0461ab
0 ETH0.002060424.80260371
Cancel Order165830342023-02-08 9:01:35549 days ago1675846895IN
0xe60dACF4...b6E0461ab
0 ETH0.0024452723.32679282
Cancel Order165830292023-02-08 9:00:35549 days ago1675846835IN
0xe60dACF4...b6E0461ab
0 ETH0.0021188524.9100652
Sell NFT165780712023-02-07 16:23:35549 days ago1675787015IN
0xe60dACF4...b6E0461ab
0 ETH0.0039160839.66543085
Sell NFT165770322023-02-07 12:54:35549 days ago1675774475IN
0xe60dACF4...b6E0461ab
0 ETH0.0023497227.55180691
Sell NFT165770112023-02-07 12:49:59549 days ago1675774199IN
0xe60dACF4...b6E0461ab
0 ETH0.0021554625.27395733
Sell NFT165770092023-02-07 12:49:35549 days ago1675774175IN
0xe60dACF4...b6E0461ab
0 ETH0.0024293923.46603895
Sell NFT165770052023-02-07 12:48:47549 days ago1675774127IN
0xe60dACF4...b6E0461ab
0 ETH0.0024471723.63779047
Sell NFT165769972023-02-07 12:47:11549 days ago1675774031IN
0xe60dACF4...b6E0461ab
0 ETH0.002340922.61131675
Sell NFT165769942023-02-07 12:46:35549 days ago1675773995IN
0xe60dACF4...b6E0461ab
0 ETH0.0008177123.14767208
Sell NFT165769932023-02-07 12:46:23549 days ago1675773983IN
0xe60dACF4...b6E0461ab
0 ETH0.0023542322.7401081
Sell NFT165769182023-02-07 12:31:11549 days ago1675773071IN
0xe60dACF4...b6E0461ab
0 ETH0.003326428.23105185
Sell NFT165769072023-02-07 12:28:59549 days ago1675772939IN
0xe60dACF4...b6E0461ab
0 ETH0.0017598121.86542142
Sell NFT165767122023-02-07 11:49:47550 days ago1675770587IN
0xe60dACF4...b6E0461ab
0 ETH0.0029841125.08247399
Buy NFT For Toke...165766692023-02-07 11:41:11550 days ago1675770071IN
0xe60dACF4...b6E0461ab
0 ETH0.0041295923.888747
Sell NFT165766202023-02-07 11:31:11550 days ago1675769471IN
0xe60dACF4...b6E0461ab
0 ETH0.002012125
Buy NFT For Toke...165759082023-02-07 9:07:47550 days ago1675760867IN
0xe60dACF4...b6E0461ab
0 ETH0.0030648324.99563498
New Order165755462023-02-07 7:55:11550 days ago1675756511IN
0xe60dACF4...b6E0461ab
0 ETH0.0092487723.85402494
Cancel Order165755422023-02-07 7:54:23550 days ago1675756463IN
0xe60dACF4...b6E0461ab
0 ETH0.0022278621.80500683
New Order165755392023-02-07 7:53:35550 days ago1675756415IN
0xe60dACF4...b6E0461ab
0 ETH0.0081461724.89874366
Cancel Order165754532023-02-07 7:36:11550 days ago1675755371IN
0xe60dACF4...b6E0461ab
0 ETH0.0022019721.98197198
New Order165753682023-02-07 7:19:11550 days ago1675754351IN
0xe60dACF4...b6E0461ab
0 ETH0.0074054719.33867895
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:
TwoPaws

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 7 : TwoPaws.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/IERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";

// https://twitter.com/TwoPawsDefi
// https://twopaws.io/

//TOKENOMIC TOKEN 2PAW.
//Total supply 100M
//Add uniswap 75% supply token / 4 ETH, 25% team .
//LP token Burn (0) address.
//Tax: buy and sales of 2PAW over 80k are taxed at 20%; transfers over 80k are taxed at 1%.
//No tax on buy and sales and transfer of < 80k 2PAW.
//Auto-added Liquidity: 1.25% of tokens are auto-added to the pair if it has an overabundance of tokens. Liquidity not added from (number of sales NFTDAO * 30000) + 2.5m is used to buy back NFT.
//All tax proceeds are allocated to the protocol for incentives.

//TOKENOMIC PROTOCOL
//The protocol collects 0.3% of the loan amount if it is taken.
//The protocol distributes the 2PAW token from buy and sales of the token and NFT buy/sell itself, stimulating orders.
//NFT Buy 40000 2PAW / Sell 30000 2PAW
//Only NFT holders can place reward orders!
//1 NFT = 1 Reward order !
//NFTDAO holders are entitled to all the proceeds of the protocol after the sale of 1650 NFTDAO.
//The owner will change to the DAO contract address!
//Reward Formula: Repayment date must be 21 days from now (repayment date + loan amount/ denominator)*(repayment date + loan amount/ denominator).
//Only the DAO can add new denominator & tokens or change them.

// WT - Wrong Timestamp
// WR - Wrong Role
// NC - No Contracts
// WA - Wrong Amount
// WS - Wrong Status
// WLF - Wrong Lender Fee
// WTP - Wrong Tokens Pair
// TF - Transfer Filed
// LCB - The Lender cannot be the Borrower
// BCL - The Borrower cannot be the Lender
// CF - Cancel Filed
// BR - Only Borrower Can Repay
// LL - Only Lender Can Liquidate Order
// IB - Insufficient Tokens Balance
// EA - Empty Array
// ETF - Ether Transfer Filed
// LI - Locked NFTId
// 0A - Zero Address

library TransferHelper {
    function safeApprove(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: APPROVE_FAILED');
    }

    function safeTransfer(address token, address to, uint value) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FAILED');
    }

    function safeTransferFrom(address token, address from, address to, uint value) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper: TRANSFER_FROM_FAILED');
    }

    function safeTransferETH(address to, uint value) internal {
        (bool success,) = to.call{value : value}(new bytes(0));
        require(success, 'TransferHelper: ETH_TRANSFER_FAILED');
    }
}

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint) external;
}

interface IPawToken is IERC20 {
    function devLocked() external view returns (bool);
}

contract TwoPaws is Ownable, ERC721Holder {
    enum Status {
        OPEN,
        WORKING,
        CLOSED,
        CANCELED
    }
    enum Role {
        SUPPLY,
        BORROW
    }
    struct SupportedTokenSettings {
        bool isRewarded;
        uint256 denominator;
    }

    struct Order {
        uint256 id;
        address lender;
        address borrower;
        address loanToken;
        uint256 loanAmount;
        address collateralToken;
        uint256 collateralAmount;
        uint256 lenderFeeAmount;
        uint256[] timestamps;
        uint256 rewardAmount;
        uint256 NFTId;
        Status status;
        Role role;
    }

    address public governanceContract;
    IPawToken public protocolToken;
    IERC721A public protocolNFT;
    uint256 public protocolTokenDecimals = 18;
    mapping(uint256 => bool) public lockedProtocolNFTs;
    // Orders
    uint256 public ordersCount;
    mapping(uint256 => Order) public orders;
    // DAO
    address[] public supportedTokens;
    mapping(address => SupportedTokenSettings) public supportedTokensSettings;
    uint256 public protocolNFTBuyPrice = 40000 * 10 ** protocolTokenDecimals;
    uint256 public protocolNFTSellPrice = 30000 * 10 ** protocolTokenDecimals;
    uint256 public exchangeFeePercent = 20;
    uint256 public DAOFeePercent = 30; // 0,3%

    event NewOrder(uint256 indexed orderId, Order order);
    event OrderStatusChange(uint256 indexed orderId, Status status);

    modifier noContracts() {
        require(msg.sender == tx.origin, "NC");
        _;
    }

    function init(address _protocolToken, address _protocolNFT, address _governanceContract) public onlyOwner {
        require (address(protocolToken) == address(0));
        protocolToken = IPawToken(_protocolToken);
        protocolNFT = IERC721A(_protocolNFT);
        governanceContract = _governanceContract;
    }

    function newOrder(
        address _loanToken,
        uint256 _loanAmount,
        address _collateralToken,
        uint256 _collateralAmount,
        uint256 _lenderFeeAmount,
        uint256[] memory _timestamps,
        Role _role,
        uint256 NFTId
    ) public noContracts returns (uint256 orderId) {
        require(msg.sender != address(0), "0A");
        require(
            _timestamps[0] > block.timestamp &&
            _timestamps[1] > block.timestamp &&
            _timestamps[1] > _timestamps[0],
            "WTS"
        );
        require(_role == Role.SUPPLY || _role == Role.BORROW, "WR");
        require(_loanAmount > 0 && _collateralAmount > 0, "WA");
        require(
            (_loanToken != address(0)) &&
            (_collateralToken != address(0)) &&
            (_loanToken != _collateralToken)
        , "WTP");
        uint256 rewardAmount = 0;
        if (NFTId < protocolNFT.totalSupply()) {
            address NFTOwner = protocolNFT.ownerOf(NFTId);
            if (
                NFTOwner == msg.sender &&
                supportedTokensSettings[_loanToken].isRewarded &&
                supportedTokensSettings[_collateralToken].isRewarded &&
                !lockedProtocolNFTs[NFTId]
            ) {
                rewardAmount = _calcRewardAmount(_timestamps[0], _loanToken, _loanAmount);
                lockedProtocolNFTs[NFTId] = rewardAmount == 0 ? false : true;
            } else {
                NFTId = type(uint256).max;
            }
        }
        uint256 amount;
        uint256 DAOFeeAmount;
        if (_role == Role.SUPPLY) {
            amount = _transferToProtocol(_loanToken, msg.sender, _loanAmount);
            DAOFeeAmount = amount * DAOFeePercent / 10000;
            require(_lenderFeeAmount + DAOFeeAmount < amount, "WA");
        } else if (_role == Role.BORROW) {
            amount = _transferToProtocol(_collateralToken, msg.sender, _collateralAmount);
            DAOFeeAmount = _loanAmount * DAOFeePercent / 10000;
            require(_lenderFeeAmount + DAOFeeAmount < _loanAmount, "WA");
        }
        orderId = ordersCount;
        Order memory order;
        order = Order(
            orderId,
            _role == Role.SUPPLY ? msg.sender : address(0),
            _role == Role.BORROW ? msg.sender : address(0),
            _loanToken,
            _role == Role.SUPPLY ? amount : _loanAmount,
            _collateralToken,
            _role == Role.BORROW ? amount : _collateralAmount,
            _lenderFeeAmount,
            _timestamps,
            rewardAmount,
            NFTId,
            Status.OPEN,
            _role
        );
        orders[orderId] = order;
        ordersCount++;
        emit NewOrder(orderId, order);
        return orderId;
    }

    function _transferToProtocol(address _token, address _sender, uint256 _amount) public returns (uint256 amount) {
        uint256 balanceBefore = IERC20(_token).balanceOf(address(this));
        TransferHelper.safeTransferFrom(_token, _sender, address(this), _amount);
        uint256 balanceAfter = IERC20(_token).balanceOf(address(this));
        require((balanceAfter - balanceBefore) > 0, "TF");
        return balanceAfter - balanceBefore;
    }


    function _calcRewardAmount(uint256 repayTimestamp, address _loanToken, uint256 _loanAmount) internal view returns (uint256 rewardAmount){
        uint256 daysAmount = (repayTimestamp - block.timestamp) / 1 days;
        uint256 addDays;
        if (supportedTokensSettings[_loanToken].denominator != 0) {
            addDays = _loanAmount / supportedTokensSettings[_loanToken].denominator;
            addDays = addDays > 100 ? 100 : addDays;
        }
        if ((daysAmount != 0) && (daysAmount >= 20)) {
            rewardAmount = ((daysAmount + addDays) ** 2) * 10 ** protocolTokenDecimals;
        } else {
            rewardAmount = 0;
        }

    }

    function getOrder(uint256 _orderId) public noContracts {
        if (orders[_orderId].role == Role.SUPPLY) {
            _getSupplyOrder(_orderId);
        } else if (orders[_orderId].role == Role.BORROW) {
            _getBorrowOrder(_orderId);
        }
        emit OrderStatusChange(_orderId, orders[_orderId].status);
    }

    function _getSupplyOrder(uint256 _orderId) private {
        require(
            block.timestamp < orders[_orderId].timestamps[1],
            "WT"
        );
        require(msg.sender != address(0), "0A");
        require(orders[_orderId].status == Status.OPEN, "WS");
        orders[_orderId].status = Status.WORKING;
        require(
            msg.sender != orders[_orderId].lender,
            "LCB"
        );
        uint256 amount = _transferToProtocol(
            orders[_orderId].collateralToken,
            msg.sender,
            orders[_orderId].collateralAmount
        );
        orders[_orderId].collateralAmount = amount;
        uint256 DAOFeeAmount = orders[_orderId].loanAmount * DAOFeePercent / 10000;
        TransferHelper.safeTransfer(
            orders[_orderId].loanToken,
            msg.sender,
            orders[_orderId].loanAmount - (DAOFeeAmount + orders[_orderId].lenderFeeAmount)
        );
        TransferHelper.safeTransfer(
            orders[_orderId].loanToken,
            owner(),
            DAOFeeAmount
        );
        if (orders[_orderId].lenderFeeAmount > 0) {
            TransferHelper.safeTransfer(
                orders[_orderId].loanToken,
                orders[_orderId].lender,
                orders[_orderId].lenderFeeAmount
            );
        }
        orders[_orderId].borrower = msg.sender;
    }

    function _getBorrowOrder(uint256 _orderId) private {
        require(
            block.timestamp < orders[_orderId].timestamps[1],
            "WT"
        );
        require(msg.sender != address(0), "0A");
        require(orders[_orderId].status == Status.OPEN, "WS");
        orders[_orderId].status = Status.WORKING;
        require(
            msg.sender != orders[_orderId].borrower,
            "BCL"
        );
        uint256 amount = _transferToProtocol(
            orders[_orderId].loanToken,
            msg.sender,
            orders[_orderId].loanAmount
        );
        orders[_orderId].loanAmount = amount;
        uint256 DAOFeeAmount = amount * DAOFeePercent / 10000;
        require(orders[_orderId].lenderFeeAmount + DAOFeeAmount < amount, "WA");
        TransferHelper.safeTransfer(
            orders[_orderId].loanToken,
            orders[_orderId].borrower,
            amount - (orders[_orderId].lenderFeeAmount + DAOFeeAmount)
        );
        TransferHelper.safeTransfer(
            orders[_orderId].loanToken,
            owner(),
            DAOFeeAmount
        );
        if (orders[_orderId].lenderFeeAmount > 0) {
            TransferHelper.safeTransfer(
                orders[_orderId].loanToken,
                msg.sender,
                orders[_orderId].lenderFeeAmount
            );
        }
        orders[_orderId].lender = msg.sender;
    }

    function cancelOrder(uint256 _orderId) public noContracts {
        require(orders[_orderId].status == Status.OPEN, "WS");
        orders[_orderId].status = Status.CANCELED;
        require(
            (orders[_orderId].role == Role.SUPPLY && orders[_orderId].lender == msg.sender) ||
            (orders[_orderId].role == Role.BORROW && orders[_orderId].borrower == msg.sender),
            "CF"
        );
        uint256 amount = orders[_orderId].role == Role.SUPPLY
        ? orders[_orderId].loanAmount
        : orders[_orderId].collateralAmount;

        orders[_orderId].role == Role.SUPPLY
        ? TransferHelper.safeTransfer(orders[_orderId].loanToken, msg.sender, amount)
        : TransferHelper.safeTransfer(orders[_orderId].collateralToken, msg.sender, amount);

        lockedProtocolNFTs[orders[_orderId].NFTId] = false;
        emit OrderStatusChange(_orderId, orders[_orderId].status);
    }

    function repayOrder(uint256 _orderId) public noContracts {
        require(orders[_orderId].status == Status.WORKING, "WS");
        orders[_orderId].status = Status.CLOSED;
        require(
            orders[_orderId].timestamps[0] < block.timestamp &&
            block.timestamp < orders[_orderId].timestamps[1],
            "WT"
        );
        require(orders[_orderId].borrower == msg.sender, "BR");
        uint256 amount = _transferToProtocol(
            orders[_orderId].loanToken,
            msg.sender,
            orders[_orderId].loanAmount
        );
        TransferHelper.safeTransfer(
            orders[_orderId].loanToken,
            orders[_orderId].lender,
            amount
        );
        TransferHelper.safeTransfer(
            orders[_orderId].collateralToken,
            orders[_orderId].borrower,
            orders[_orderId].collateralAmount
        );
        _reward(orders[_orderId].borrower, orders[_orderId].rewardAmount);
        lockedProtocolNFTs[orders[_orderId].NFTId] = false;
        emit OrderStatusChange(_orderId, orders[_orderId].status);
    }

    function liquidateOrder(uint256 _orderId) public noContracts {
        require(orders[_orderId].status == Status.WORKING, "WS");
        orders[_orderId].status = Status.CLOSED;
        require(block.timestamp > orders[_orderId].timestamps[1], "WT");
        require(orders[_orderId].lender == msg.sender, "LL");
        TransferHelper.safeTransfer(
            orders[_orderId].collateralToken,
            orders[_orderId].lender,
            orders[_orderId].collateralAmount
        );
        _reward(orders[_orderId].lender, orders[_orderId].rewardAmount);

        lockedProtocolNFTs[orders[_orderId].NFTId] = false;
        emit OrderStatusChange(_orderId, orders[_orderId].status);
    }

    function _reward(address _to, uint256 _amount) private {
        if (_amount > 0) return;
        uint256 contractBalance = protocolToken.balanceOf(address(this));
        uint256 lockedNFT = protocolNFT.totalSupply() - protocolNFT.balanceOf(address(this));
        uint256 lockedTokens = (protocolNFTSellPrice * lockedNFT);
        if (contractBalance > lockedTokens + _amount) {
            require(protocolToken.transfer(_to, _amount), "TF");
        }

    }

    function buyNFTForTokens(uint256[] memory _tokensIds) public {
        require(_tokensIds.length > 0, "EA");
        uint256 NFTCount = _tokensIds.length;
        uint256 protocolTokensAmount = NFTCount * protocolNFTBuyPrice;
        require(protocolToken.transferFrom(msg.sender, address(this), protocolTokensAmount), "TF");
        for (uint256 i = 0; i < NFTCount; i++) {
            protocolNFT.transferFrom(address(this), msg.sender, _tokensIds[i]);
        }
    }

    function sellNFT(uint256[] memory _tokensIds) public {
        require(_tokensIds.length > 0, "EA");
        uint256 NFTCount = _tokensIds.length;
        for (uint256 i = 0; i < NFTCount; i++) {
            require(!lockedProtocolNFTs[_tokensIds[i]], "LI");
            protocolNFT.transferFrom(msg.sender, address(this), _tokensIds[i]);
        }
        uint256 protocolTokensAmount = NFTCount * protocolNFTSellPrice;
        require(protocolToken.transfer(msg.sender, protocolTokensAmount), "TF");
    }

    function getAllOrders() public view returns (Order[] memory allOrders) {
        allOrders = new Order[](ordersCount);
        for (uint256 i = 0; i < ordersCount; i++) {
            Order storage order = orders[i];
            allOrders[i] = order;
        }
        return allOrders;
    }

    function getSupportedTokens() public view returns (address[] memory allTokens){
        allTokens = new address[](supportedTokens.length);
        for (uint256 i = 0; i < supportedTokens.length; i++) {
            address token = supportedTokens[i];
            allTokens[i] = token;
        }
        return allTokens;
    }

    //DAO
    function transferOwnershipToDAO() public {
        require(!protocolToken.devLocked());
        require(protocolNFT.balanceOf(address(this)) < 900);
        _transferOwnership(governanceContract);
    }

    function addSupportedToken(address _tokenAddress, uint256 _denominator) public onlyOwner {
        for (uint256 i = 0; i < supportedTokens.length; i++) {
            require(supportedTokens[i] != _tokenAddress);
        }
        supportedTokens.push(_tokenAddress);
        supportedTokensSettings[_tokenAddress].isRewarded = true;
        supportedTokensSettings[_tokenAddress].denominator = _denominator;
    }

    function setTokenReward(address _tokenAddress, bool _flag, uint256 _denominator) public onlyOwner {
        supportedTokensSettings[_tokenAddress].isRewarded = _flag;
        supportedTokensSettings[_tokenAddress].denominator = _denominator;
    }

    function changeProtocolNFTSellPrice(uint256 _protocolNFTSellPrice) public onlyOwner {
        require(
            _protocolNFTSellPrice < 30000 * 10 ** protocolTokenDecimals
            && _protocolNFTSellPrice >= 20000 * 10 ** protocolTokenDecimals
        );
        protocolNFTSellPrice = _protocolNFTSellPrice;
    }

    function changeDAOFeePercent(uint256 _DAOFeePercent) public onlyOwner {
        require(_DAOFeePercent >= 10 && _DAOFeePercent <= 150);
        DAOFeePercent = _DAOFeePercent;
    }

    function changeFeePercent(uint256 _exchangeFeePercent) public onlyOwner {
        require(_exchangeFeePercent <= 20 && _exchangeFeePercent > 0);
        exchangeFeePercent = _exchangeFeePercent;
    }

    function withdraw() public onlyOwner returns (bytes memory){
        (, bytes memory resp) = owner().call{value : address(this).balance}("");
        return resp;
    }

    receive() external payable {
    }
}

File 2 of 7 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../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.
 *
 * By default, the owner account will be the one that deploys the contract. 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;

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 7 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 5 of 7 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

File 6 of 7 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

File 7 of 7 : IERC721A.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

interface IERC721A {
    function totalSupply() external view returns (uint256);
    function tokenByIndex(uint256 index) external view returns (uint256);
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
    function balanceOf(address owner) external view returns (uint256);
    function ownerOf(uint256 tokenId) external view returns (address);
    function name() external view returns (string memory);
    function symbol() external view returns (string memory);
    function tokenURI(uint256 tokenId) external view returns (string memory);
    function approve(address to, uint256 tokenId) external;
    function getApproved(uint256 tokenId) external view returns (address);
    function setApprovalForAll(address operator, bool approved) external;
    function isApprovedForAll(address owner, address operator) external view returns (bool);
    function transferFrom(address from, address to, uint256 tokenId) external;
    function safeTransferFrom(address from, address to, uint256 tokenId) external;
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) external;
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderId","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"lender","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"address","name":"loanToken","type":"address"},{"internalType":"uint256","name":"loanAmount","type":"uint256"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"uint256","name":"collateralAmount","type":"uint256"},{"internalType":"uint256","name":"lenderFeeAmount","type":"uint256"},{"internalType":"uint256[]","name":"timestamps","type":"uint256[]"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"NFTId","type":"uint256"},{"internalType":"enum TwoPaws.Status","name":"status","type":"uint8"},{"internalType":"enum TwoPaws.Role","name":"role","type":"uint8"}],"indexed":false,"internalType":"struct TwoPaws.Order","name":"order","type":"tuple"}],"name":"NewOrder","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"orderId","type":"uint256"},{"indexed":false,"internalType":"enum TwoPaws.Status","name":"status","type":"uint8"}],"name":"OrderStatusChange","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"},{"inputs":[],"name":"DAOFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"_transferToProtocol","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"uint256","name":"_denominator","type":"uint256"}],"name":"addSupportedToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokensIds","type":"uint256[]"}],"name":"buyNFTForTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_orderId","type":"uint256"}],"name":"cancelOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_DAOFeePercent","type":"uint256"}],"name":"changeDAOFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_exchangeFeePercent","type":"uint256"}],"name":"changeFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_protocolNFTSellPrice","type":"uint256"}],"name":"changeProtocolNFTSellPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"exchangeFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllOrders","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"lender","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"address","name":"loanToken","type":"address"},{"internalType":"uint256","name":"loanAmount","type":"uint256"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"uint256","name":"collateralAmount","type":"uint256"},{"internalType":"uint256","name":"lenderFeeAmount","type":"uint256"},{"internalType":"uint256[]","name":"timestamps","type":"uint256[]"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"NFTId","type":"uint256"},{"internalType":"enum TwoPaws.Status","name":"status","type":"uint8"},{"internalType":"enum TwoPaws.Role","name":"role","type":"uint8"}],"internalType":"struct TwoPaws.Order[]","name":"allOrders","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_orderId","type":"uint256"}],"name":"getOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getSupportedTokens","outputs":[{"internalType":"address[]","name":"allTokens","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governanceContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_protocolToken","type":"address"},{"internalType":"address","name":"_protocolNFT","type":"address"},{"internalType":"address","name":"_governanceContract","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_orderId","type":"uint256"}],"name":"liquidateOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"lockedProtocolNFTs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_loanToken","type":"address"},{"internalType":"uint256","name":"_loanAmount","type":"uint256"},{"internalType":"address","name":"_collateralToken","type":"address"},{"internalType":"uint256","name":"_collateralAmount","type":"uint256"},{"internalType":"uint256","name":"_lenderFeeAmount","type":"uint256"},{"internalType":"uint256[]","name":"_timestamps","type":"uint256[]"},{"internalType":"enum TwoPaws.Role","name":"_role","type":"uint8"},{"internalType":"uint256","name":"NFTId","type":"uint256"}],"name":"newOrder","outputs":[{"internalType":"uint256","name":"orderId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"orders","outputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"lender","type":"address"},{"internalType":"address","name":"borrower","type":"address"},{"internalType":"address","name":"loanToken","type":"address"},{"internalType":"uint256","name":"loanAmount","type":"uint256"},{"internalType":"address","name":"collateralToken","type":"address"},{"internalType":"uint256","name":"collateralAmount","type":"uint256"},{"internalType":"uint256","name":"lenderFeeAmount","type":"uint256"},{"internalType":"uint256","name":"rewardAmount","type":"uint256"},{"internalType":"uint256","name":"NFTId","type":"uint256"},{"internalType":"enum TwoPaws.Status","name":"status","type":"uint8"},{"internalType":"enum TwoPaws.Role","name":"role","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ordersCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolNFT","outputs":[{"internalType":"contract IERC721A","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolNFTBuyPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolNFTSellPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolToken","outputs":[{"internalType":"contract IPawToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"protocolTokenDecimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_orderId","type":"uint256"}],"name":"repayOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokensIds","type":"uint256[]"}],"name":"sellNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tokenAddress","type":"address"},{"internalType":"bool","name":"_flag","type":"bool"},{"internalType":"uint256","name":"_denominator","type":"uint256"}],"name":"setTokenReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"supportedTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"supportedTokensSettings","outputs":[{"internalType":"bool","name":"isRewarded","type":"bool"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"transferOwnershipToDAO","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052601260048190556200001890600a620001d9565b6200002690619c40620001ee565b600a55600454600a6200003a9190620001d9565b6200004890617530620001ee565b600b556014600c55601e600d553480156200006257600080fd5b506200006e3362000074565b62000210565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052601160045260246000fd5b600181815b808511156200011b578160001904821115620000ff57620000ff620000c4565b808516156200010d57918102915b93841c9390800290620000df565b509250929050565b6000826200013457506001620001d3565b816200014357506000620001d3565b81600181146200015c5760028114620001675762000187565b6001915050620001d3565b60ff8411156200017b576200017b620000c4565b50506001821b620001d3565b5060208310610133831016604e8410600b8410161715620001ac575081810a620001d3565b620001b88383620000da565b8060001904821115620001cf57620001cf620000c4565b0290505b92915050565b6000620001e7838362000123565b9392505050565b60008160001904831182151516156200020b576200020b620000c4565b500290565b613ab680620002206000396000f3fe6080604052600436106102385760003560e01c80637f68c7db11610138578063a85c38ef116100b0578063d09ef2411161007f578063d46b82b911610064578063d46b82b91461075b578063f2884e661461077b578063f2fde38b1461079157600080fd5b8063d09ef24114610719578063d3c7c2c71461073957600080fd5b8063a85c38ef1461061b578063b01f3c5f146106c3578063b172b222146106d9578063c6255626146106f957600080fd5b80638d6e3cc611610107578063902c7d73116100ec578063902c7d73146105c557806398b4ac6f146105e5578063a6be70ed146105fb57600080fd5b80638d6e3cc6146105875780638da5cb5b146105a757600080fd5b80637f68c7db1461051c578063808c36331461053c57806384e944a51461055257806385bdee9b1461057257600080fd5b806334eddf3e116101cb578063514fcac71161019a578063715018a61161017f578063715018a6146104c55780637bea0d1c146104da5780637d789653146104fc57600080fd5b8063514fcac7146104855780635b4f9ecf146104a557600080fd5b806334eddf3e1461040d57806335daa7311461042d5780633ccfd60b146104435780634d8e3d3b1461046557600080fd5b80631a465fe1116102075780631a465fe114610351578063212e3792146103895780632c2a47d2146103ad5780633176c206146103ed57600080fd5b8063039c7d58146102445780630edfe41b1461029a578063150b7a02146102bc578063184b95591461033157600080fd5b3661023f57005b600080fd5b34801561025057600080fd5b5061027e61025f3660046131ac565b6009602052600090815260409020805460019091015460ff9091169082565b6040805192151583526020830191909152015b60405180910390f35b3480156102a657600080fd5b506102ba6102b5366004613297565b6107b1565b005b3480156102c857600080fd5b506103006102d73660046132d4565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610291565b34801561033d57600080fd5b506102ba61034c366004613398565b610a01565b34801561035d57600080fd5b50600254610371906001600160a01b031681565b6040516001600160a01b039091168152602001610291565b34801561039557600080fd5b5061039f60045481565b604051908152602001610291565b3480156103b957600080fd5b506103dd6103c83660046133e3565b60056020526000908152604090205460ff1681565b6040519015158152602001610291565b3480156103f957600080fd5b5061039f6104083660046133fc565b610a5e565b34801561041957600080fd5b506102ba6104283660046133e3565b611277565b34801561043957600080fd5b5061039f60065481565b34801561044f57600080fd5b5061045861129e565b60405161029191906134c2565b34801561047157600080fd5b506102ba6104803660046134f5565b611302565b34801561049157600080fd5b506102ba6104a03660046133e3565b6113d0565b3480156104b157600080fd5b506102ba6104c03660046133e3565b6116b3565b3480156104d157600080fd5b506102ba611913565b3480156104e657600080fd5b506104ef611927565b604051610291919061368f565b34801561050857600080fd5b506102ba6105173660046136ff565b611b0f565b34801561052857600080fd5b506102ba610537366004613297565b611b46565b34801561054857600080fd5b5061039f600a5481565b34801561055e57600080fd5b506102ba61056d3660046133e3565b611d16565b34801561057e57600080fd5b506102ba611f51565b34801561059357600080fd5b506102ba6105a23660046133e3565b61205f565b3480156105b357600080fd5b506000546001600160a01b0316610371565b3480156105d157600080fd5b5061039f6105e0366004613740565b612087565b3480156105f157600080fd5b5061039f600d5481565b34801561060757600080fd5b506102ba6106163660046133e3565b6121c1565b34801561062757600080fd5b506106ab6106363660046133e3565b60076020819052600091825260409091208054600182015460028301546003840154600485015460058601546006870154978701546009880154600a890154600b9099015497996001600160a01b03978816999688169895881697949693909416949192909160ff808216916101009004168c565b6040516102919c9b9a99989796959493929190613770565b3480156106cf57600080fd5b5061039f600b5481565b3480156106e557600080fd5b50600154610371906001600160a01b031681565b34801561070557600080fd5b506103716107143660046133e3565b612218565b34801561072557600080fd5b506102ba6107343660046133e3565b612242565b34801561074557600080fd5b5061074e612337565b60405161029191906137f2565b34801561076757600080fd5b50600354610371906001600160a01b031681565b34801561078757600080fd5b5061039f600c5481565b34801561079d57600080fd5b506102ba6107ac3660046131ac565b612401565b60008151116107ec5760405162461bcd60e51b8152602060048201526002602482015261454160f01b60448201526064015b60405180910390fd5b805160005b81811015610944576005600084838151811061080f5761080f61383f565b60209081029190910181015182528101919091526040016000205460ff161561087a5760405162461bcd60e51b815260206004820152600260248201527f4c4900000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b60035483516001600160a01b03909116906323b872dd90339030908790869081106108a7576108a761383f565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561091957600080fd5b505af115801561092d573d6000803e3d6000fd5b50505050808061093c9061386b565b9150506107f1565b506000600b54826109559190613884565b60025460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156109a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cb91906138a3565b6109fc5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016107e3565b505050565b610a09612491565b6002546001600160a01b031615610a1f57600080fd5b600280546001600160a01b039485166001600160a01b031991821617909155600380549385169382169390931790925560018054919093169116179055565b6000333214610a945760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b33610ac65760405162461bcd60e51b8152602060048201526002602482015261304160f01b60448201526064016107e3565b4284600081518110610ada57610ada61383f565b6020026020010151118015610b0857504284600181518110610afe57610afe61383f565b6020026020010151115b8015610b47575083600081518110610b2257610b2261383f565b602002602001015184600181518110610b3d57610b3d61383f565b6020026020010151115b610b935760405162461bcd60e51b815260206004820152600360248201527f575453000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b6000836001811115610ba757610ba761355c565b1480610bc457506001836001811115610bc257610bc261355c565b145b610c105760405162461bcd60e51b815260206004820152600260248201527f575200000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b600088118015610c205750600086115b610c515760405162461bcd60e51b8152602060048201526002602482015261574160f01b60448201526064016107e3565b6001600160a01b03891615801590610c7157506001600160a01b03871615155b8015610c8f5750866001600160a01b0316896001600160a01b031614155b610cdb5760405162461bcd60e51b815260206004820152600360248201527f575450000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b600354604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6291906138c0565b831015610ec7576003546040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018590526000916001600160a01b031690636352211e90602401602060405180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df091906138d9565b90506001600160a01b03811633148015610e2257506001600160a01b038b1660009081526009602052604090205460ff165b8015610e4657506001600160a01b03891660009081526009602052604090205460ff165b8015610e61575060008481526005602052604090205460ff16155b15610ebf57610e8b86600081518110610e7c57610e7c61383f565b60200260200101518c8c6124eb565b91508115610e9a576001610e9d565b60005b6000858152600560205260409020805460ff1916911515919091179055610ec5565b60001993505b505b60008080866001811115610edd57610edd61355c565b03610f4e57610eed8c338d612087565b9150612710600d5483610f009190613884565b610f0a91906138f6565b905081610f17828a613918565b10610f495760405162461bcd60e51b8152602060048201526002602482015261574160f01b60448201526064016107e3565b610fce565b6001866001811115610f6257610f6261355c565b03610fce57610f728a338b612087565b9150612710600d548c610f859190613884565b610f8f91906138f6565b90508a610f9c828a613918565b10610fce5760405162461bcd60e51b8152602060048201526002602482015261574160f01b60448201526064016107e3565b6006549350610fdb6130a4565b604080516101a081019091528581526020810160008960018111156110025761100261355c565b1461100e576000611010565b335b6001600160a01b0316815260200160018960018111156110325761103261355c565b1461103e576000611040565b335b6001600160a01b0390811682528f166020820152604001600089600181111561106b5761106b61355c565b14611076578d611078565b845b81526001600160a01b038d16602082015260400160018960018111156110a0576110a061355c565b146110ab578b6110ad565b845b81526020018a8152602001898152602001858152602001878152602001600060038111156110dd576110dd61355c565b81526020018860018111156110f4576110f461355c565b905260008681526007602081815260409283902084518155848201516001820180546001600160a01b03199081166001600160a01b0393841617909155948601516002830180548716918316919091179055606086015160038301805487169183169190911790556080860151600483015560a086015160058301805490961691161790935560c0840151600684015560e084015191830191909155610100830151805193945084936111ad9260088501920190613140565b506101208201516009820155610140820151600a820155610160820151600b8201805460ff191660018360038111156111e8576111e861355c565b0217905550610180820151600b8201805461ff0019166101008360018111156112135761121361355c565b021790555050600680549150600061122a8361386b565b9190505550847f03e365dd112bef43ca06187ff8cc9f93cdbdd741e25a3c4ca597c5897a602dba8260405161125f9190613931565b60405180910390a25050505098975050505050505050565b61127f612491565b601481111580156112905750600081115b61129957600080fd5b600c55565b60606112a8612491565b600080546040516001600160a01b039091169047908381818185875af1925050503d80600081146112f5576040519150601f19603f3d011682016040523d82523d6000602084013e6112fa565b606091505b509250505090565b61130a612491565b60005b60085481101561136557826001600160a01b0316600882815481106113345761133461383f565b6000918252602090912001546001600160a01b03160361135357600080fd5b8061135d8161386b565b91505061130d565b506008805460018181019092557ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b039094166001600160a01b031990941684179055600092835260096020526040909220805460ff19168317815590910155565b3332146114045760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b6000818152600760205260408120600b015460ff16600381111561142a5761142a61355c565b1461145c5760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260408120600b01805460ff19166003179081905560ff6101009091041660018111156114945761149461355c565b1480156114ba57506000818152600760205260409020600101546001600160a01b031633145b80611513575060016000828152600760205260409020600b0154610100900460ff1660018111156114ed576114ed61355c565b14801561151357506000818152600760205260409020600201546001600160a01b031633145b61155f5760405162461bcd60e51b815260206004820152600260248201527f434600000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b6000806000838152600760205260409020600b0154610100900460ff16600181111561158d5761158d61355c565b146115a9576000828152600760205260409020600601546115bc565b6000828152600760205260409020600401545b9050600080838152600760205260409020600b0154610100900460ff1660018111156115ea576115ea61355c565b1461161a57600082815260076020526040902060050154611615906001600160a01b031633836125bf565b611640565b600082815260076020526040902060030154611640906001600160a01b031633836125bf565b6000828152600760208181526040808420600a810154855260058352818520805460ff1916905593869052919052600b90910154905183917f72f882a81dc3bcca9aaf9ac75afe6818f3d546de69767153fdfef2f8976258f4916116a79160ff1690613944565b60405180910390a25050565b3332146116e75760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b60016000828152600760205260409020600b015460ff16600381111561170f5761170f61355c565b146117415760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260408120600b8101805460ff1916600217905560080180544292906117725761177261383f565b90600052602060002001541080156117b757506000818152600760205260409020600801805460019081106117a9576117a961383f565b906000526020600020015442105b6117e85760405162461bcd60e51b815260206004820152600260248201526115d560f21b60448201526064016107e3565b6000818152600760205260409020600201546001600160a01b031633146118515760405162461bcd60e51b815260206004820152600260248201527f425200000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b6000818152600760205260408120600381015460049091015461187f916001600160a01b0316903390612087565b600083815260076020526040902060038101546001909101549192506118b2916001600160a01b039182169116836125bf565b6000828152600760205260409020600581015460028201546006909201546118e7926001600160a01b039283169216906125bf565b60008281526007602052604090206002810154600990910154611640916001600160a01b0316906126ef565b61191b612491565b6119256000612926565b565b606060065467ffffffffffffffff811115611944576119446131d0565b60405190808252806020026020018201604052801561197d57816020015b61196a6130a4565b8152602001906001900390816119625790505b50905060005b600654811015611b0b5760008181526007602081815260409283902083516101a0810185528154815260018201546001600160a01b039081168285015260028301548116828701526003830154811660608301526004830154608083015260058301541660a0820152600682015460c08201529281015460e08401526008810180548551818502810185019096528086529194859361010086019391929190830182828015611a5157602002820191906000526020600020905b815481526020019060010190808311611a3d575b505050918352505060098201546020820152600a8201546040820152600b82015460609091019060ff166003811115611a8c57611a8c61355c565b6003811115611a9d57611a9d61355c565b8152602001600b820160019054906101000a900460ff166001811115611ac557611ac561355c565b6001811115611ad657611ad661355c565b81525050838381518110611aec57611aec61383f565b6020026020010181905250508080611b039061386b565b915050611983565b5090565b611b17612491565b6001600160a01b03929092166000908152600960205260409020805460ff191691151591909117815560010155565b6000815111611b7c5760405162461bcd60e51b8152602060048201526002602482015261454160f01b60448201526064016107e3565b8051600a54600090611b8e9083613884565b6002546040516323b872dd60e01b8152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c0a91906138a3565b611c3b5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016107e3565b60005b82811015611d105760035484516001600160a01b03909116906323b872dd9030903390889086908110611c7357611c7361383f565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015611ce557600080fd5b505af1158015611cf9573d6000803e3d6000fd5b505050508080611d089061386b565b915050611c3e565b50505050565b333214611d4a5760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b60016000828152600760205260409020600b015460ff166003811115611d7257611d7261355c565b14611da45760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260409020600b8101805460ff1916600217905560080180546001908110611dd757611dd761383f565b90600052602060002001544211611e155760405162461bcd60e51b815260206004820152600260248201526115d560f21b60448201526064016107e3565b6000818152600760205260409020600101546001600160a01b03163314611e7e5760405162461bcd60e51b815260206004820152600260248201527f4c4c00000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b600081815260076020526040902060058101546001820154600690920154611eb3926001600160a01b039283169216906125bf565b60008181526007602052604090206001810154600990910154611edf916001600160a01b0316906126ef565b6000818152600760208181526040808420600a810154855260058352818520805460ff1916905593859052919052600b90910154905182917f72f882a81dc3bcca9aaf9ac75afe6818f3d546de69767153fdfef2f8976258f491611f469160ff1690613944565b60405180910390a250565b600260009054906101000a90046001600160a01b03166001600160a01b0316633764863c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fa4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc891906138a3565b15611fd257600080fd5b6003546040516370a0823160e01b8152306004820152610384916001600160a01b0316906370a0823190602401602060405180830381865afa15801561201c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204091906138c0565b1061204a57600080fd5b600154611925906001600160a01b0316612926565b612067612491565b600a8110158015612079575060968111155b61208257600080fd5b600d55565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156120d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f491906138c0565b905061210285853086612976565b6040516370a0823160e01b81523060048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa158015612149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216d91906138c0565b9050600061217b8383613952565b116121ad5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016107e3565b6121b78282613952565b9695505050505050565b6121c9612491565b6004546121d790600a613a49565b6121e390617530613884565b8110801561220a57506004546121fa90600a613a49565b61220690614e20613884565b8110155b61221357600080fd5b600b55565b6008818154811061222857600080fd5b6000918252602090912001546001600160a01b0316905081565b3332146122765760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b600080828152600760205260409020600b0154610100900460ff1660018111156122a2576122a261355c565b036122b5576122b081612ad4565b6122f0565b60016000828152600760205260409020600b0154610100900460ff1660018111156122e2576122e261355c565b036122f0576122f081612da5565b60008181526007602052604090819020600b0154905182917f72f882a81dc3bcca9aaf9ac75afe6818f3d546de69767153fdfef2f8976258f491611f469160ff1690613944565b60085460609067ffffffffffffffff811115612355576123556131d0565b60405190808252806020026020018201604052801561237e578160200160208202803683370190505b50905060005b600854811015611b0b576000600882815481106123a3576123a361383f565b9060005260206000200160009054906101000a90046001600160a01b03169050808383815181106123d6576123d661383f565b6001600160a01b039092166020928302919091019091015250806123f98161386b565b915050612384565b612409612491565b6001600160a01b0381166124855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107e3565b61248e81612926565b50565b6000546001600160a01b031633146119255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107e3565b600080620151806124fc4287613952565b61250691906138f6565b6001600160a01b0385166000908152600960205260408120600101549192509015612567576001600160a01b03851660009081526009602052604090206001015461255190856138f6565b9050606481116125615780612564565b60645b90505b8115801590612577575060148210155b156125b15760045461258a90600a613a49565b60026125968385613918565b6125a09190613a55565b6125aa9190613884565b92506125b6565b600092505b50509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b17905291516000928392908716916126309190613a64565b6000604051808303816000865af19150503d806000811461266d576040519150601f19603f3d011682016040523d82523d6000602084013e612672565b606091505b509150915081801561269c57508051158061269c57508080602001905181019061269c91906138a3565b6126e85760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016107e3565b5050505050565b80156126f9575050565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612742573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061276691906138c0565b6003546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d891906138c0565b600360009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561282b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284f91906138c0565b6128599190613952565b9050600081600b5461286b9190613884565b90506128778482613918565b8311156126e85760025460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529091169063a9059cbb906044016020604051808303816000875af11580156128d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f591906138a3565b6126e85760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016107e3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b17905291516000928392908816916129ef9190613a64565b6000604051808303816000865af19150503d8060008114612a2c576040519150601f19603f3d011682016040523d82523d6000602084013e612a31565b606091505b5091509150818015612a5b575080511580612a5b575080806020019051810190612a5b91906138a3565b612acc5760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f464160448201527f494c45440000000000000000000000000000000000000000000000000000000060648201526084016107e3565b505050505050565b600081815260076020526040902060080180546001908110612af857612af861383f565b90600052602060002001544210612b365760405162461bcd60e51b815260206004820152600260248201526115d560f21b60448201526064016107e3565b33612b685760405162461bcd60e51b8152602060048201526002602482015261304160f01b60448201526064016107e3565b6000818152600760205260408120600b015460ff166003811115612b8e57612b8e61355c565b14612bc05760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260409020600b8101805460ff1916600190811790915501546001600160a01b03163303612c395760405162461bcd60e51b815260206004820152600360248201527f4c4342000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b60008181526007602052604081206005810154600690910154612c67916001600160a01b0316903390612087565b600083815260076020526040812060068101839055600d54600490910154929350909161271091612c9791613884565b612ca191906138f6565b60008481526007602081905260409091206003810154910154919250612cfa916001600160a01b03909116903390612cd99085613918565b600087815260076020526040902060040154612cf59190613952565b6125bf565b600083815260076020526040902060030154612d31906001600160a01b0316612d2b6000546001600160a01b031690565b836125bf565b6000838152600760208190526040909120015415612d80576000838152600760208190526040909120600381015460018201549190920154612d80926001600160a01b039081169216906125bf565b5050600090815260076020526040902060020180546001600160a01b03191633179055565b600081815260076020526040902060080180546001908110612dc957612dc961383f565b90600052602060002001544210612e075760405162461bcd60e51b815260206004820152600260248201526115d560f21b60448201526064016107e3565b33612e395760405162461bcd60e51b8152602060048201526002602482015261304160f01b60448201526064016107e3565b6000818152600760205260408120600b015460ff166003811115612e5f57612e5f61355c565b14612e915760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260409020600b8101805460ff19166001179055600201546001600160a01b03163303612f095760405162461bcd60e51b815260206004820152600360248201527f42434c000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b60008181526007602052604081206003810154600490910154612f37916001600160a01b0316903390612087565b6000838152600760205260408120600401829055600d549192509061271090612f609084613884565b612f6a91906138f6565b905081816007600086815260200190815260200160002060070154612f8f9190613918565b10612fc15760405162461bcd60e51b8152602060048201526002602482015261574160f01b60448201526064016107e3565b6000838152600760208190526040909120600381015460028201549190920154613008926001600160a01b03908116921690612ffe908590613918565b612cf59086613952565b600083815260076020526040902060030154613039906001600160a01b0316612d2b6000546001600160a01b031690565b600083815260076020819052604090912001541561307f576000838152600760208190526040909120600381015491015461307f916001600160a01b03169033906125bf565b5050600090815260076020526040902060010180546001600160a01b03191633179055565b604051806101a001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160006001600160a01b031681526020016000815260200160008152602001606081526020016000815260200160008152602001600060038111156131345761313461355c565b81526020016000905290565b82805482825590600052602060002090810192821561317b579160200282015b8281111561317b578251825591602001919060010190613160565b50611b0b9291505b80821115611b0b5760008155600101613183565b6001600160a01b038116811461248e57600080fd5b6000602082840312156131be57600080fd5b81356131c981613197565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561320f5761320f6131d0565b604052919050565b600082601f83011261322857600080fd5b8135602067ffffffffffffffff821115613244576132446131d0565b8160051b6132538282016131e6565b928352848101820192828101908785111561326d57600080fd5b83870192505b8483101561328c57823582529183019190830190613273565b979650505050505050565b6000602082840312156132a957600080fd5b813567ffffffffffffffff8111156132c057600080fd5b6132cc84828501613217565b949350505050565b600080600080608085870312156132ea57600080fd5b84356132f581613197565b935060208581013561330681613197565b935060408601359250606086013567ffffffffffffffff8082111561332a57600080fd5b818801915088601f83011261333e57600080fd5b813581811115613350576133506131d0565b613362601f8201601f191685016131e6565b9150808252898482850101111561337857600080fd5b808484018584013760008482840101525080935050505092959194509250565b6000806000606084860312156133ad57600080fd5b83356133b881613197565b925060208401356133c881613197565b915060408401356133d881613197565b809150509250925092565b6000602082840312156133f557600080fd5b5035919050565b600080600080600080600080610100898b03121561341957600080fd5b883561342481613197565b975060208901359650604089013561343b81613197565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561346557600080fd5b6134718b828c01613217565b93505060c08901356002811061348657600080fd5b8092505060e089013590509295985092959890939650565b60005b838110156134b95781810151838201526020016134a1565b50506000910152565b60208152600082518060208401526134e181604085016020870161349e565b601f01601f19169190910160400192915050565b6000806040838503121561350857600080fd5b823561351381613197565b946020939093013593505050565b600081518084526020808501945080840160005b8381101561355157815187529582019590820190600101613535565b509495945050505050565b634e487b7160e01b600052602160045260246000fd5b600481106135825761358261355c565b9052565b600281106135825761358261355c565b60006101a08251845260208301516135b960208601826001600160a01b03169052565b5060408301516135d460408601826001600160a01b03169052565b5060608301516135ef60608601826001600160a01b03169052565b506080830151608085015260a083015161361460a08601826001600160a01b03169052565b5060c083015160c085015260e083015160e085015261010080840151828287015261364183870182613521565b925050506101208084015181860152506101408084015181860152506101608084015161367082870182613572565b50506101808084015161368582870182613586565b5090949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156136e457603f198886030184526136d2858351613596565b945092850192908501906001016136b6565b5092979650505050505050565b801515811461248e57600080fd5b60008060006060848603121561371457600080fd5b833561371f81613197565b9250602084013561372f816136f1565b929592945050506040919091013590565b60008060006060848603121561375557600080fd5b833561376081613197565b9250602084013561372f81613197565b6000610180820190508d82526001600160a01b03808e166020840152808d166040840152808c1660608401528a6080840152808a1660a0840152508760c08301528660e083015285610100830152846101208301526137d3610140830185613572565b6137e1610160830184613586565b9d9c50505050505050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138335783516001600160a01b03168352928401929184019160010161380e565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161387d5761387d613855565b5060010190565b600081600019048311821515161561389e5761389e613855565b500290565b6000602082840312156138b557600080fd5b81516131c9816136f1565b6000602082840312156138d257600080fd5b5051919050565b6000602082840312156138eb57600080fd5b81516131c981613197565b60008261391357634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561392b5761392b613855565b92915050565b6020815260006131c96020830184613596565b6020810161392b8284613572565b8181038181111561392b5761392b613855565b600181815b808511156139a057816000190482111561398657613986613855565b8085161561399357918102915b93841c939080029061396a565b509250929050565b6000826139b75750600161392b565b816139c45750600061392b565b81600181146139da57600281146139e457613a00565b600191505061392b565b60ff8411156139f5576139f5613855565b50506001821b61392b565b5060208310610133831016604e8410600b8410161715613a23575081810a61392b565b613a2d8383613965565b8060001904821115613a4157613a41613855565b029392505050565b60006131c983836139a8565b60006131c960ff8416836139a8565b60008251613a7681846020870161349e565b919091019291505056fea26469706673582212209e52b55eb983b8800d1c47651e7222389288524680a0c52d18ed95b13673318b64736f6c63430008100033

Deployed Bytecode

0x6080604052600436106102385760003560e01c80637f68c7db11610138578063a85c38ef116100b0578063d09ef2411161007f578063d46b82b911610064578063d46b82b91461075b578063f2884e661461077b578063f2fde38b1461079157600080fd5b8063d09ef24114610719578063d3c7c2c71461073957600080fd5b8063a85c38ef1461061b578063b01f3c5f146106c3578063b172b222146106d9578063c6255626146106f957600080fd5b80638d6e3cc611610107578063902c7d73116100ec578063902c7d73146105c557806398b4ac6f146105e5578063a6be70ed146105fb57600080fd5b80638d6e3cc6146105875780638da5cb5b146105a757600080fd5b80637f68c7db1461051c578063808c36331461053c57806384e944a51461055257806385bdee9b1461057257600080fd5b806334eddf3e116101cb578063514fcac71161019a578063715018a61161017f578063715018a6146104c55780637bea0d1c146104da5780637d789653146104fc57600080fd5b8063514fcac7146104855780635b4f9ecf146104a557600080fd5b806334eddf3e1461040d57806335daa7311461042d5780633ccfd60b146104435780634d8e3d3b1461046557600080fd5b80631a465fe1116102075780631a465fe114610351578063212e3792146103895780632c2a47d2146103ad5780633176c206146103ed57600080fd5b8063039c7d58146102445780630edfe41b1461029a578063150b7a02146102bc578063184b95591461033157600080fd5b3661023f57005b600080fd5b34801561025057600080fd5b5061027e61025f3660046131ac565b6009602052600090815260409020805460019091015460ff9091169082565b6040805192151583526020830191909152015b60405180910390f35b3480156102a657600080fd5b506102ba6102b5366004613297565b6107b1565b005b3480156102c857600080fd5b506103006102d73660046132d4565b7f150b7a0200000000000000000000000000000000000000000000000000000000949350505050565b6040517fffffffff000000000000000000000000000000000000000000000000000000009091168152602001610291565b34801561033d57600080fd5b506102ba61034c366004613398565b610a01565b34801561035d57600080fd5b50600254610371906001600160a01b031681565b6040516001600160a01b039091168152602001610291565b34801561039557600080fd5b5061039f60045481565b604051908152602001610291565b3480156103b957600080fd5b506103dd6103c83660046133e3565b60056020526000908152604090205460ff1681565b6040519015158152602001610291565b3480156103f957600080fd5b5061039f6104083660046133fc565b610a5e565b34801561041957600080fd5b506102ba6104283660046133e3565b611277565b34801561043957600080fd5b5061039f60065481565b34801561044f57600080fd5b5061045861129e565b60405161029191906134c2565b34801561047157600080fd5b506102ba6104803660046134f5565b611302565b34801561049157600080fd5b506102ba6104a03660046133e3565b6113d0565b3480156104b157600080fd5b506102ba6104c03660046133e3565b6116b3565b3480156104d157600080fd5b506102ba611913565b3480156104e657600080fd5b506104ef611927565b604051610291919061368f565b34801561050857600080fd5b506102ba6105173660046136ff565b611b0f565b34801561052857600080fd5b506102ba610537366004613297565b611b46565b34801561054857600080fd5b5061039f600a5481565b34801561055e57600080fd5b506102ba61056d3660046133e3565b611d16565b34801561057e57600080fd5b506102ba611f51565b34801561059357600080fd5b506102ba6105a23660046133e3565b61205f565b3480156105b357600080fd5b506000546001600160a01b0316610371565b3480156105d157600080fd5b5061039f6105e0366004613740565b612087565b3480156105f157600080fd5b5061039f600d5481565b34801561060757600080fd5b506102ba6106163660046133e3565b6121c1565b34801561062757600080fd5b506106ab6106363660046133e3565b60076020819052600091825260409091208054600182015460028301546003840154600485015460058601546006870154978701546009880154600a890154600b9099015497996001600160a01b03978816999688169895881697949693909416949192909160ff808216916101009004168c565b6040516102919c9b9a99989796959493929190613770565b3480156106cf57600080fd5b5061039f600b5481565b3480156106e557600080fd5b50600154610371906001600160a01b031681565b34801561070557600080fd5b506103716107143660046133e3565b612218565b34801561072557600080fd5b506102ba6107343660046133e3565b612242565b34801561074557600080fd5b5061074e612337565b60405161029191906137f2565b34801561076757600080fd5b50600354610371906001600160a01b031681565b34801561078757600080fd5b5061039f600c5481565b34801561079d57600080fd5b506102ba6107ac3660046131ac565b612401565b60008151116107ec5760405162461bcd60e51b8152602060048201526002602482015261454160f01b60448201526064015b60405180910390fd5b805160005b81811015610944576005600084838151811061080f5761080f61383f565b60209081029190910181015182528101919091526040016000205460ff161561087a5760405162461bcd60e51b815260206004820152600260248201527f4c4900000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b60035483516001600160a01b03909116906323b872dd90339030908790869081106108a7576108a761383f565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b15801561091957600080fd5b505af115801561092d573d6000803e3d6000fd5b50505050808061093c9061386b565b9150506107f1565b506000600b54826109559190613884565b60025460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303816000875af11580156109a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cb91906138a3565b6109fc5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016107e3565b505050565b610a09612491565b6002546001600160a01b031615610a1f57600080fd5b600280546001600160a01b039485166001600160a01b031991821617909155600380549385169382169390931790925560018054919093169116179055565b6000333214610a945760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b33610ac65760405162461bcd60e51b8152602060048201526002602482015261304160f01b60448201526064016107e3565b4284600081518110610ada57610ada61383f565b6020026020010151118015610b0857504284600181518110610afe57610afe61383f565b6020026020010151115b8015610b47575083600081518110610b2257610b2261383f565b602002602001015184600181518110610b3d57610b3d61383f565b6020026020010151115b610b935760405162461bcd60e51b815260206004820152600360248201527f575453000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b6000836001811115610ba757610ba761355c565b1480610bc457506001836001811115610bc257610bc261355c565b145b610c105760405162461bcd60e51b815260206004820152600260248201527f575200000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b600088118015610c205750600086115b610c515760405162461bcd60e51b8152602060048201526002602482015261574160f01b60448201526064016107e3565b6001600160a01b03891615801590610c7157506001600160a01b03871615155b8015610c8f5750866001600160a01b0316896001600160a01b031614155b610cdb5760405162461bcd60e51b815260206004820152600360248201527f575450000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b600354604080517f18160ddd00000000000000000000000000000000000000000000000000000000815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610d3e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6291906138c0565b831015610ec7576003546040517f6352211e000000000000000000000000000000000000000000000000000000008152600481018590526000916001600160a01b031690636352211e90602401602060405180830381865afa158015610dcc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df091906138d9565b90506001600160a01b03811633148015610e2257506001600160a01b038b1660009081526009602052604090205460ff165b8015610e4657506001600160a01b03891660009081526009602052604090205460ff165b8015610e61575060008481526005602052604090205460ff16155b15610ebf57610e8b86600081518110610e7c57610e7c61383f565b60200260200101518c8c6124eb565b91508115610e9a576001610e9d565b60005b6000858152600560205260409020805460ff1916911515919091179055610ec5565b60001993505b505b60008080866001811115610edd57610edd61355c565b03610f4e57610eed8c338d612087565b9150612710600d5483610f009190613884565b610f0a91906138f6565b905081610f17828a613918565b10610f495760405162461bcd60e51b8152602060048201526002602482015261574160f01b60448201526064016107e3565b610fce565b6001866001811115610f6257610f6261355c565b03610fce57610f728a338b612087565b9150612710600d548c610f859190613884565b610f8f91906138f6565b90508a610f9c828a613918565b10610fce5760405162461bcd60e51b8152602060048201526002602482015261574160f01b60448201526064016107e3565b6006549350610fdb6130a4565b604080516101a081019091528581526020810160008960018111156110025761100261355c565b1461100e576000611010565b335b6001600160a01b0316815260200160018960018111156110325761103261355c565b1461103e576000611040565b335b6001600160a01b0390811682528f166020820152604001600089600181111561106b5761106b61355c565b14611076578d611078565b845b81526001600160a01b038d16602082015260400160018960018111156110a0576110a061355c565b146110ab578b6110ad565b845b81526020018a8152602001898152602001858152602001878152602001600060038111156110dd576110dd61355c565b81526020018860018111156110f4576110f461355c565b905260008681526007602081815260409283902084518155848201516001820180546001600160a01b03199081166001600160a01b0393841617909155948601516002830180548716918316919091179055606086015160038301805487169183169190911790556080860151600483015560a086015160058301805490961691161790935560c0840151600684015560e084015191830191909155610100830151805193945084936111ad9260088501920190613140565b506101208201516009820155610140820151600a820155610160820151600b8201805460ff191660018360038111156111e8576111e861355c565b0217905550610180820151600b8201805461ff0019166101008360018111156112135761121361355c565b021790555050600680549150600061122a8361386b565b9190505550847f03e365dd112bef43ca06187ff8cc9f93cdbdd741e25a3c4ca597c5897a602dba8260405161125f9190613931565b60405180910390a25050505098975050505050505050565b61127f612491565b601481111580156112905750600081115b61129957600080fd5b600c55565b60606112a8612491565b600080546040516001600160a01b039091169047908381818185875af1925050503d80600081146112f5576040519150601f19603f3d011682016040523d82523d6000602084013e6112fa565b606091505b509250505090565b61130a612491565b60005b60085481101561136557826001600160a01b0316600882815481106113345761133461383f565b6000918252602090912001546001600160a01b03160361135357600080fd5b8061135d8161386b565b91505061130d565b506008805460018181019092557ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30180546001600160a01b039094166001600160a01b031990941684179055600092835260096020526040909220805460ff19168317815590910155565b3332146114045760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b6000818152600760205260408120600b015460ff16600381111561142a5761142a61355c565b1461145c5760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260408120600b01805460ff19166003179081905560ff6101009091041660018111156114945761149461355c565b1480156114ba57506000818152600760205260409020600101546001600160a01b031633145b80611513575060016000828152600760205260409020600b0154610100900460ff1660018111156114ed576114ed61355c565b14801561151357506000818152600760205260409020600201546001600160a01b031633145b61155f5760405162461bcd60e51b815260206004820152600260248201527f434600000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b6000806000838152600760205260409020600b0154610100900460ff16600181111561158d5761158d61355c565b146115a9576000828152600760205260409020600601546115bc565b6000828152600760205260409020600401545b9050600080838152600760205260409020600b0154610100900460ff1660018111156115ea576115ea61355c565b1461161a57600082815260076020526040902060050154611615906001600160a01b031633836125bf565b611640565b600082815260076020526040902060030154611640906001600160a01b031633836125bf565b6000828152600760208181526040808420600a810154855260058352818520805460ff1916905593869052919052600b90910154905183917f72f882a81dc3bcca9aaf9ac75afe6818f3d546de69767153fdfef2f8976258f4916116a79160ff1690613944565b60405180910390a25050565b3332146116e75760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b60016000828152600760205260409020600b015460ff16600381111561170f5761170f61355c565b146117415760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260408120600b8101805460ff1916600217905560080180544292906117725761177261383f565b90600052602060002001541080156117b757506000818152600760205260409020600801805460019081106117a9576117a961383f565b906000526020600020015442105b6117e85760405162461bcd60e51b815260206004820152600260248201526115d560f21b60448201526064016107e3565b6000818152600760205260409020600201546001600160a01b031633146118515760405162461bcd60e51b815260206004820152600260248201527f425200000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b6000818152600760205260408120600381015460049091015461187f916001600160a01b0316903390612087565b600083815260076020526040902060038101546001909101549192506118b2916001600160a01b039182169116836125bf565b6000828152600760205260409020600581015460028201546006909201546118e7926001600160a01b039283169216906125bf565b60008281526007602052604090206002810154600990910154611640916001600160a01b0316906126ef565b61191b612491565b6119256000612926565b565b606060065467ffffffffffffffff811115611944576119446131d0565b60405190808252806020026020018201604052801561197d57816020015b61196a6130a4565b8152602001906001900390816119625790505b50905060005b600654811015611b0b5760008181526007602081815260409283902083516101a0810185528154815260018201546001600160a01b039081168285015260028301548116828701526003830154811660608301526004830154608083015260058301541660a0820152600682015460c08201529281015460e08401526008810180548551818502810185019096528086529194859361010086019391929190830182828015611a5157602002820191906000526020600020905b815481526020019060010190808311611a3d575b505050918352505060098201546020820152600a8201546040820152600b82015460609091019060ff166003811115611a8c57611a8c61355c565b6003811115611a9d57611a9d61355c565b8152602001600b820160019054906101000a900460ff166001811115611ac557611ac561355c565b6001811115611ad657611ad661355c565b81525050838381518110611aec57611aec61383f565b6020026020010181905250508080611b039061386b565b915050611983565b5090565b611b17612491565b6001600160a01b03929092166000908152600960205260409020805460ff191691151591909117815560010155565b6000815111611b7c5760405162461bcd60e51b8152602060048201526002602482015261454160f01b60448201526064016107e3565b8051600a54600090611b8e9083613884565b6002546040516323b872dd60e01b8152336004820152306024820152604481018390529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015611be6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c0a91906138a3565b611c3b5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016107e3565b60005b82811015611d105760035484516001600160a01b03909116906323b872dd9030903390889086908110611c7357611c7361383f565b60209081029190910101516040517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015611ce557600080fd5b505af1158015611cf9573d6000803e3d6000fd5b505050508080611d089061386b565b915050611c3e565b50505050565b333214611d4a5760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b60016000828152600760205260409020600b015460ff166003811115611d7257611d7261355c565b14611da45760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260409020600b8101805460ff1916600217905560080180546001908110611dd757611dd761383f565b90600052602060002001544211611e155760405162461bcd60e51b815260206004820152600260248201526115d560f21b60448201526064016107e3565b6000818152600760205260409020600101546001600160a01b03163314611e7e5760405162461bcd60e51b815260206004820152600260248201527f4c4c00000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b600081815260076020526040902060058101546001820154600690920154611eb3926001600160a01b039283169216906125bf565b60008181526007602052604090206001810154600990910154611edf916001600160a01b0316906126ef565b6000818152600760208181526040808420600a810154855260058352818520805460ff1916905593859052919052600b90910154905182917f72f882a81dc3bcca9aaf9ac75afe6818f3d546de69767153fdfef2f8976258f491611f469160ff1690613944565b60405180910390a250565b600260009054906101000a90046001600160a01b03166001600160a01b0316633764863c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611fa4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc891906138a3565b15611fd257600080fd5b6003546040516370a0823160e01b8152306004820152610384916001600160a01b0316906370a0823190602401602060405180830381865afa15801561201c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061204091906138c0565b1061204a57600080fd5b600154611925906001600160a01b0316612926565b612067612491565b600a8110158015612079575060968111155b61208257600080fd5b600d55565b6040516370a0823160e01b815230600482015260009081906001600160a01b038616906370a0823190602401602060405180830381865afa1580156120d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120f491906138c0565b905061210285853086612976565b6040516370a0823160e01b81523060048201526000906001600160a01b038716906370a0823190602401602060405180830381865afa158015612149573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061216d91906138c0565b9050600061217b8383613952565b116121ad5760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016107e3565b6121b78282613952565b9695505050505050565b6121c9612491565b6004546121d790600a613a49565b6121e390617530613884565b8110801561220a57506004546121fa90600a613a49565b61220690614e20613884565b8110155b61221357600080fd5b600b55565b6008818154811061222857600080fd5b6000918252602090912001546001600160a01b0316905081565b3332146122765760405162461bcd60e51b81526020600482015260026024820152614e4360f01b60448201526064016107e3565b600080828152600760205260409020600b0154610100900460ff1660018111156122a2576122a261355c565b036122b5576122b081612ad4565b6122f0565b60016000828152600760205260409020600b0154610100900460ff1660018111156122e2576122e261355c565b036122f0576122f081612da5565b60008181526007602052604090819020600b0154905182917f72f882a81dc3bcca9aaf9ac75afe6818f3d546de69767153fdfef2f8976258f491611f469160ff1690613944565b60085460609067ffffffffffffffff811115612355576123556131d0565b60405190808252806020026020018201604052801561237e578160200160208202803683370190505b50905060005b600854811015611b0b576000600882815481106123a3576123a361383f565b9060005260206000200160009054906101000a90046001600160a01b03169050808383815181106123d6576123d661383f565b6001600160a01b039092166020928302919091019091015250806123f98161386b565b915050612384565b612409612491565b6001600160a01b0381166124855760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016107e3565b61248e81612926565b50565b6000546001600160a01b031633146119255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016107e3565b600080620151806124fc4287613952565b61250691906138f6565b6001600160a01b0385166000908152600960205260408120600101549192509015612567576001600160a01b03851660009081526009602052604090206001015461255190856138f6565b9050606481116125615780612564565b60645b90505b8115801590612577575060148210155b156125b15760045461258a90600a613a49565b60026125968385613918565b6125a09190613a55565b6125aa9190613884565b92506125b6565b600092505b50509392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b17905291516000928392908716916126309190613a64565b6000604051808303816000865af19150503d806000811461266d576040519150601f19603f3d011682016040523d82523d6000602084013e612672565b606091505b509150915081801561269c57508051158061269c57508080602001905181019061269c91906138a3565b6126e85760405162461bcd60e51b815260206004820152601f60248201527f5472616e7366657248656c7065723a205452414e534645525f4641494c45440060448201526064016107e3565b5050505050565b80156126f9575050565b6002546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015612742573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061276691906138c0565b6003546040516370a0823160e01b81523060048201529192506000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156127b4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127d891906138c0565b600360009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561282b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284f91906138c0565b6128599190613952565b9050600081600b5461286b9190613884565b90506128778482613918565b8311156126e85760025460405163a9059cbb60e01b81526001600160a01b038781166004830152602482018790529091169063a9059cbb906044016020604051808303816000875af11580156128d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128f591906138a3565b6126e85760405162461bcd60e51b81526020600482015260026024820152612a2360f11b60448201526064016107e3565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b17905291516000928392908816916129ef9190613a64565b6000604051808303816000865af19150503d8060008114612a2c576040519150601f19603f3d011682016040523d82523d6000602084013e612a31565b606091505b5091509150818015612a5b575080511580612a5b575080806020019051810190612a5b91906138a3565b612acc5760405162461bcd60e51b8152602060048201526024808201527f5472616e7366657248656c7065723a205452414e534645525f46524f4d5f464160448201527f494c45440000000000000000000000000000000000000000000000000000000060648201526084016107e3565b505050505050565b600081815260076020526040902060080180546001908110612af857612af861383f565b90600052602060002001544210612b365760405162461bcd60e51b815260206004820152600260248201526115d560f21b60448201526064016107e3565b33612b685760405162461bcd60e51b8152602060048201526002602482015261304160f01b60448201526064016107e3565b6000818152600760205260408120600b015460ff166003811115612b8e57612b8e61355c565b14612bc05760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260409020600b8101805460ff1916600190811790915501546001600160a01b03163303612c395760405162461bcd60e51b815260206004820152600360248201527f4c4342000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b60008181526007602052604081206005810154600690910154612c67916001600160a01b0316903390612087565b600083815260076020526040812060068101839055600d54600490910154929350909161271091612c9791613884565b612ca191906138f6565b60008481526007602081905260409091206003810154910154919250612cfa916001600160a01b03909116903390612cd99085613918565b600087815260076020526040902060040154612cf59190613952565b6125bf565b600083815260076020526040902060030154612d31906001600160a01b0316612d2b6000546001600160a01b031690565b836125bf565b6000838152600760208190526040909120015415612d80576000838152600760208190526040909120600381015460018201549190920154612d80926001600160a01b039081169216906125bf565b5050600090815260076020526040902060020180546001600160a01b03191633179055565b600081815260076020526040902060080180546001908110612dc957612dc961383f565b90600052602060002001544210612e075760405162461bcd60e51b815260206004820152600260248201526115d560f21b60448201526064016107e3565b33612e395760405162461bcd60e51b8152602060048201526002602482015261304160f01b60448201526064016107e3565b6000818152600760205260408120600b015460ff166003811115612e5f57612e5f61355c565b14612e915760405162461bcd60e51b8152602060048201526002602482015261575360f01b60448201526064016107e3565b6000818152600760205260409020600b8101805460ff19166001179055600201546001600160a01b03163303612f095760405162461bcd60e51b815260206004820152600360248201527f42434c000000000000000000000000000000000000000000000000000000000060448201526064016107e3565b60008181526007602052604081206003810154600490910154612f37916001600160a01b0316903390612087565b6000838152600760205260408120600401829055600d549192509061271090612f609084613884565b612f6a91906138f6565b905081816007600086815260200190815260200160002060070154612f8f9190613918565b10612fc15760405162461bcd60e51b8152602060048201526002602482015261574160f01b60448201526064016107e3565b6000838152600760208190526040909120600381015460028201549190920154613008926001600160a01b03908116921690612ffe908590613918565b612cf59086613952565b600083815260076020526040902060030154613039906001600160a01b0316612d2b6000546001600160a01b031690565b600083815260076020819052604090912001541561307f576000838152600760208190526040909120600381015491015461307f916001600160a01b03169033906125bf565b5050600090815260076020526040902060010180546001600160a01b03191633179055565b604051806101a001604052806000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000815260200160006001600160a01b031681526020016000815260200160008152602001606081526020016000815260200160008152602001600060038111156131345761313461355c565b81526020016000905290565b82805482825590600052602060002090810192821561317b579160200282015b8281111561317b578251825591602001919060010190613160565b50611b0b9291505b80821115611b0b5760008155600101613183565b6001600160a01b038116811461248e57600080fd5b6000602082840312156131be57600080fd5b81356131c981613197565b9392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561320f5761320f6131d0565b604052919050565b600082601f83011261322857600080fd5b8135602067ffffffffffffffff821115613244576132446131d0565b8160051b6132538282016131e6565b928352848101820192828101908785111561326d57600080fd5b83870192505b8483101561328c57823582529183019190830190613273565b979650505050505050565b6000602082840312156132a957600080fd5b813567ffffffffffffffff8111156132c057600080fd5b6132cc84828501613217565b949350505050565b600080600080608085870312156132ea57600080fd5b84356132f581613197565b935060208581013561330681613197565b935060408601359250606086013567ffffffffffffffff8082111561332a57600080fd5b818801915088601f83011261333e57600080fd5b813581811115613350576133506131d0565b613362601f8201601f191685016131e6565b9150808252898482850101111561337857600080fd5b808484018584013760008482840101525080935050505092959194509250565b6000806000606084860312156133ad57600080fd5b83356133b881613197565b925060208401356133c881613197565b915060408401356133d881613197565b809150509250925092565b6000602082840312156133f557600080fd5b5035919050565b600080600080600080600080610100898b03121561341957600080fd5b883561342481613197565b975060208901359650604089013561343b81613197565b9550606089013594506080890135935060a089013567ffffffffffffffff81111561346557600080fd5b6134718b828c01613217565b93505060c08901356002811061348657600080fd5b8092505060e089013590509295985092959890939650565b60005b838110156134b95781810151838201526020016134a1565b50506000910152565b60208152600082518060208401526134e181604085016020870161349e565b601f01601f19169190910160400192915050565b6000806040838503121561350857600080fd5b823561351381613197565b946020939093013593505050565b600081518084526020808501945080840160005b8381101561355157815187529582019590820190600101613535565b509495945050505050565b634e487b7160e01b600052602160045260246000fd5b600481106135825761358261355c565b9052565b600281106135825761358261355c565b60006101a08251845260208301516135b960208601826001600160a01b03169052565b5060408301516135d460408601826001600160a01b03169052565b5060608301516135ef60608601826001600160a01b03169052565b506080830151608085015260a083015161361460a08601826001600160a01b03169052565b5060c083015160c085015260e083015160e085015261010080840151828287015261364183870182613521565b925050506101208084015181860152506101408084015181860152506101608084015161367082870182613572565b50506101808084015161368582870182613586565b5090949350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156136e457603f198886030184526136d2858351613596565b945092850192908501906001016136b6565b5092979650505050505050565b801515811461248e57600080fd5b60008060006060848603121561371457600080fd5b833561371f81613197565b9250602084013561372f816136f1565b929592945050506040919091013590565b60008060006060848603121561375557600080fd5b833561376081613197565b9250602084013561372f81613197565b6000610180820190508d82526001600160a01b03808e166020840152808d166040840152808c1660608401528a6080840152808a1660a0840152508760c08301528660e083015285610100830152846101208301526137d3610140830185613572565b6137e1610160830184613586565b9d9c50505050505050505050505050565b6020808252825182820181905260009190848201906040850190845b818110156138335783516001600160a01b03168352928401929184019160010161380e565b50909695505050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820161387d5761387d613855565b5060010190565b600081600019048311821515161561389e5761389e613855565b500290565b6000602082840312156138b557600080fd5b81516131c9816136f1565b6000602082840312156138d257600080fd5b5051919050565b6000602082840312156138eb57600080fd5b81516131c981613197565b60008261391357634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561392b5761392b613855565b92915050565b6020815260006131c96020830184613596565b6020810161392b8284613572565b8181038181111561392b5761392b613855565b600181815b808511156139a057816000190482111561398657613986613855565b8085161561399357918102915b93841c939080029061396a565b509250929050565b6000826139b75750600161392b565b816139c45750600061392b565b81600181146139da57600281146139e457613a00565b600191505061392b565b60ff8411156139f5576139f5613855565b50506001821b61392b565b5060208310610133831016604e8410600b8410161715613a23575081810a61392b565b613a2d8383613965565b8060001904821115613a4157613a41613855565b029392505050565b60006131c983836139a8565b60006131c960ff8416836139a8565b60008251613a7681846020870161349e565b919091019291505056fea26469706673582212209e52b55eb983b8800d1c47651e7222389288524680a0c52d18ed95b13673318b64736f6c63430008100033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.