ETH Price: $2,070.61 (-0.51%)

Contract

0x867b62bEF16944bD38f91e8DD63a4F9eEa8300a8
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Direct Sell169233952023-03-28 4:13:231079 days ago1679976803IN
0x867b62bE...eEa8300a8
0.00001 ETH0.0030727320.89213752
Direct Sell169231262023-03-28 3:19:111079 days ago1679973551IN
0x867b62bE...eEa8300a8
0.00001 ETH0.0033489722.76854041
Direct Sell168940752023-03-24 1:24:471083 days ago1679621087IN
0x867b62bE...eEa8300a8
0.0002 ETH0.0022175915.07297251
Direct Sell168940542023-03-24 1:20:351083 days ago1679620835IN
0x867b62bE...eEa8300a8
0.002 ETH0.0028013515.65677531
Direct Sell168907242023-03-23 14:06:591084 days ago1679580419IN
0x867b62bE...eEa8300a8
0.00001 ETH0.0037881525.74806074
Direct Sell168681022023-03-20 9:50:231087 days ago1679305823IN
0x867b62bE...eEa8300a8
0.001 ETH0.0033223119.30053477
Process Orders B...168201852023-03-13 16:14:231094 days ago1678724063IN
0x867b62bE...eEa8300a8
0 ETH0.005641862.62613141
P2c Sell168201672023-03-13 16:10:351094 days ago1678723835IN
0x867b62bE...eEa8300a8
0.00001 ETH0.0100936368.2768464
P2c Sell168201152023-03-13 16:00:111094 days ago1678723211IN
0x867b62bE...eEa8300a8
0.00001 ETH0.0080221454.26453753
Direct Sell168197772023-03-13 14:51:471094 days ago1678719107IN
0x867b62bE...eEa8300a8
0.00006 ETH0.0210030763.94076344
Process Orders168197412023-03-13 14:44:231094 days ago1678718663IN
0x867b62bE...eEa8300a8
0 ETH0.0032462261.27950951
P2c Sell168191622023-03-13 12:46:351094 days ago1678711595IN
0x867b62bE...eEa8300a8
0.0001 ETH0.0028378119.19593778

Latest 24 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer169233952023-03-28 4:13:231079 days ago1679976803
0x867b62bE...eEa8300a8
0.0000005 ETH
Transfer169233952023-03-28 4:13:231079 days ago1679976803
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer169231262023-03-28 3:19:111079 days ago1679973551
0x867b62bE...eEa8300a8
0.0000005 ETH
Transfer169231262023-03-28 3:19:111079 days ago1679973551
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168940752023-03-24 1:24:471083 days ago1679621087
0x867b62bE...eEa8300a8
0.00001 ETH
Transfer168940752023-03-24 1:24:471083 days ago1679621087
0x867b62bE...eEa8300a8
0.00019 ETH
Transfer168940542023-03-24 1:20:351083 days ago1679620835
0x867b62bE...eEa8300a8
0.0001 ETH
Transfer168940542023-03-24 1:20:351083 days ago1679620835
0x867b62bE...eEa8300a8
0.00095 ETH
Transfer168940542023-03-24 1:20:351083 days ago1679620835
0x867b62bE...eEa8300a8
0.00095 ETH
Transfer168907242023-03-23 14:06:591084 days ago1679580419
0x867b62bE...eEa8300a8
0.0000005 ETH
Transfer168907242023-03-23 14:06:591084 days ago1679580419
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168681022023-03-20 9:50:231087 days ago1679305823
0x867b62bE...eEa8300a8
0.00005 ETH
Transfer168681022023-03-20 9:50:231087 days ago1679305823
0x867b62bE...eEa8300a8
0.00095 ETH
Transfer168201852023-03-13 16:14:231094 days ago1678724063
0x867b62bE...eEa8300a8
0.0000005 ETH
Transfer168201852023-03-13 16:14:231094 days ago1678724063
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168201852023-03-13 16:14:231094 days ago1678724063
0x867b62bE...eEa8300a8
0.00001 ETH
Transfer168197772023-03-13 14:51:471094 days ago1678719107
0x867b62bE...eEa8300a8
0.000003 ETH
Transfer168197772023-03-13 14:51:471094 days ago1678719107
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168197772023-03-13 14:51:471094 days ago1678719107
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168197772023-03-13 14:51:471094 days ago1678719107
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168197772023-03-13 14:51:471094 days ago1678719107
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168197772023-03-13 14:51:471094 days ago1678719107
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168197772023-03-13 14:51:471094 days ago1678719107
0x867b62bE...eEa8300a8
0.0000095 ETH
Transfer168197412023-03-13 14:44:231094 days ago1678718663
0x867b62bE...eEa8300a8
0.0001 ETH
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Krakatoa

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 1500 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./Additional.sol";

contract Krakatoa is Ownable, Additional {
    using ECDSA for bytes32;

    enum Status {Unknown, Pending, WithdrawnFee, Withdrawn, Refunded}

    event OrderStatus(uint64 indexed order, Status indexed status);

    struct Product {
        address seller;
        uint64 productId;
        uint256 price;
        uint256 nonce;
    }

    struct Order {
        uint256 price;
        uint256 fee;
        address buyer;
        Status status;
        address seller;
        uint64 product;
    }

    struct OrderInfo {
        uint256 price;
        uint256 fee;
        uint64 product;
        Status status;
    }

    mapping(uint64 => Order) private _orders;
    mapping(uint64 => uint) private _nonces;

    modifier checkSignature(bytes memory data, bytes memory signature) {
        require(signerRole() == keccak256(data).toEthSignedMessageHash().recover(signature), "KR: Invalid signature");
        _;
    }

    modifier checkRequest(uint64 orderId, uint256 finalTimestamp) {
        require(block.timestamp < finalTimestamp, "KR: Signed transaction expired");
        require(_orders[orderId].status == Status.Unknown, "KR: Order already processed");
        //Prevents to execute another transaction for the same order
        _orders[orderId].status = Status.Pending;
        _;
    }

    function directSell(uint64 orderId, Product[] calldata products, uint256 finalTimestamp, bytes calldata signature)
    external
    payable
    checkSignature(abi.encode(msg.sender, orderId, products, finalTimestamp), signature)
    checkRequest(orderId, finalTimestamp)
    {
        require(products.length > 0 && products.length < 255, "KR: Invalid products count");
        uint256 total = 0;
        uint256 fees = 0;

        for (uint8 i = 0; i < products.length; i++) {
            Product memory product = products[i];
            require(_nonces[product.productId] < product.nonce, "KR: Item already sold");
            require(product.seller != address(0), "KR: Wrong seller");
            total += product.price;
            uint256 fee = _getFee(products[i].price);
            fees += fee;
            _nonces[product.productId] = product.nonce;

            (bool success,) = payable(product.seller).call{value : product.price - fee}("");
            require(success, "KR: Unable to send funds");
        }

        require(total == msg.value, "KR: Wrong value");

        (bool success2,) = feeWallet().call{value : fees}("");
        require(success2, "KR: Unable to send fee");

        _orders[orderId].price = total;
        _orders[orderId].fee = fees;
        _orders[orderId].buyer = msg.sender;
        _orders[orderId].status = Status.Withdrawn;
        emit OrderStatus(orderId, Status.Withdrawn);
    }

    function p2cSell(uint64 orderId, Product calldata product, uint256 finalTimestamp, bytes calldata signature)
    external
    payable
    checkSignature(abi.encode(msg.sender, orderId, product, finalTimestamp), signature)
    checkRequest(orderId, finalTimestamp)
    {
        require(_nonces[product.productId] < product.nonce, "KR: Item already sold");
        require(product.price == msg.value, "KR: Invalid price");

        uint256 fee = _getFee(product.price);
        _nonces[product.productId] = product.nonce;
        _orders[orderId] = Order(product.price - fee, fee, msg.sender, Status.Pending, product.seller, product.productId);

        emit OrderStatus(orderId, Status.Pending);
    }

    function withdrawOrders(uint64[] calldata orders, bytes calldata signature)
    external
    checkSignature(abi.encode(orders), signature)
    {
        bool[] memory isWithdraw;
        _processOrders(orders, isWithdraw, 1);
    }

    function refundOrders(uint64[] calldata orders, bytes calldata signature)
    external
    checkSignature(abi.encode(orders), signature)
    {
        bool[] memory isWithdraw;
        _processOrders(orders, isWithdraw, 2);
    }

    function processOrders(uint64[] calldata orders, bool[] calldata isWithdraw, bytes calldata signature)
    external
    checkSignature(abi.encode(orders, isWithdraw), signature)
    {
        require(orders.length == isWithdraw.length, "KR: Invalid data");

        _processOrders(orders, isWithdraw, 0);
    }

    function _processOrders(uint64[] memory orders, bool[] memory isWithdraw, uint8 _type) internal {
        uint256 fee = 0;
        uint256 total = 0;

        for (uint8 i = 0; i < orders.length; ++i) {
            Order memory r = _orders[orders[i]];
            if (_type == 1 || (_type == 0 && isWithdraw[i])) {
                _orders[orders[i]].status = Status.Withdrawn;

                require(r.status == Status.Pending || r.status == Status.WithdrawnFee, "KR: Order already processed");
                require(r.seller == _msgSender(), "KR: Recipient of order is not seller");

                total += r.price;

                if (r.status != Status.WithdrawnFee) {
                    fee += r.fee;
                }

                emit OrderStatus(orders[i], Status.Withdrawn);
            } else {
                _orders[orders[i]].status = Status.Refunded;

                require(r.status == Status.Pending, "KR: Order already withdrawed");
                require(r.buyer == _msgSender(), "KR: Recipient of order is not buyer");

                total += r.price + r.fee;

                emit OrderStatus(orders[i], Status.Refunded);
            }
        }

        if (total > 0) {
            (bool success,) = payable(_msgSender()).call{value : total}("");
            require(success, "KR: Unable to send funds");
        }

        if (fee > 0) {
            (bool success2,) = feeWallet().call{value : fee}("");
            require(success2, "KR: Unable to send fee");
        }
    }

    function processOrdersByAdmin(uint64[] calldata orders, bool[] calldata isWithdraw, bytes calldata signature)
    external
    onlyAdmin
    checkSignature(abi.encode(orders, isWithdraw), signature)
    {
        require(orders.length == isWithdraw.length, "KR: Invalid data");

        uint256 fee = 0;

        for (uint8 i = 0; i < orders.length; ++i) {
            Order memory r = _orders[orders[i]];
            _orders[orders[i]].status = isWithdraw[i] ? Status.Withdrawn : Status.Refunded;
            require(r.status == Status.Pending || (isWithdraw[i] && r.status == Status.WithdrawnFee), "KR: Order already processed");

            if (isWithdraw[i]) {
                if (r.status != Status.WithdrawnFee) {
                    fee += r.fee;
                }
                (bool success1,) = payable(r.seller).call{value : r.price}("");
                require(success1, "KR: Unable to send funds");
            } else {
                (bool success2,) = payable(r.buyer).call{value : r.price + r.fee}("");
                require(success2, "KR: Unable to send funds");
            }

            emit OrderStatus(orders[i], isWithdraw[i] ? Status.Withdrawn : Status.Refunded);
        }

        if (fee > 0) {
            (bool success3,) = feeWallet().call{value : fee}("");
            require(success3, "KR: Unable to send fee");
        }
    }

    function withdrawFee(uint64[] calldata orders, bytes calldata signature)
    external
    onlyAdmin
    checkSignature(abi.encode(orders), signature)
    {
        address signer = keccak256(abi.encode(orders)).toEthSignedMessageHash().recover(signature);
        require(signerRole() == signer, "KR: Invalid signature");

        uint value = 0;

        for (uint16 i = 0; i < orders.length; ++i) {
            uint64 orderId = orders[i];
            require(_orders[orderId].status == Status.Pending, "KR: Order already processed");

            value += _orders[orderId].fee;
            _orders[orderId].status = Status.WithdrawnFee;

            emit OrderStatus(orderId, Status.WithdrawnFee);
        }

        (bool success,) = feeWallet().call{value : value}("");
        require(success, "KR: Unable to send fee");
    }


    function withdrawOrderTo(uint64[] calldata orders, address payable wallet, bytes calldata signature)
    external
    onlyOwner
    checkSignature(abi.encode(orders, wallet), signature)
    {
        uint value = 0;

        for (uint16 i = 0; i < orders.length; ++i) {
            Order memory r = _orders[orders[i]];
            _orders[orders[i]].status = Status.Withdrawn;

            require(r.status == Status.Pending || r.status == Status.WithdrawnFee, string.concat("KR: Order already processed: ", Strings.toString(orders[i])));

            value += r.price;
            
            if (r.status != Status.WithdrawnFee) {
                value += r.fee;
            }

            emit OrderStatus(orders[i], Status.Withdrawn);
        }

        (bool success,) = wallet.call{value : value}("");
        require(success, "KR: Unable to send funds");
    }

    function getOrder(uint64 orderId) external view returns (OrderInfo memory) {
        Order memory r = _orders[orderId];
        return OrderInfo(r.price, r.fee, r.product, r.status);
    }

    function getOrders(uint64[] calldata orderIds) external view returns (OrderInfo[] memory orders) {
        orders = new OrderInfo[](orderIds.length);
        for (uint8 i = 0; i < orderIds.length; ++i) {
            Order memory r = _orders[orderIds[i]];
            orders[i] = OrderInfo(r.price, r.fee, r.product, r.status);
        }
    }
}

// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";

contract Additional is Ownable {
    address private _feeWallet;
    address private _signerRole;
    address private _adminRole;
    uint16 private _commission;

    event CommissionChanged(uint16 indexed previousCommission, uint16 indexed newCommission);
    event FeeWalletChanged(address indexed previousOwner, address indexed newOwner);
    event SugnerRoleChanged(address indexed previousOwner, address indexed newOwner);
    event AdminRoleChanged(address indexed previousOwner, address indexed newOwner);

     modifier onlyAdmin() {
         require(_adminRole == _msgSender(), "KR: Caller is not the admin");
        _;
    }


    /**
    * @dev Initializes the contract setting the deployer as the initial fee wallet.
    */
    constructor() {
        _feeWallet = _msgSender();
        _signerRole = 0x2085DFc2619d10b1b5c0CeFDdf9fa13DFDeEAe3E;
        _adminRole = _msgSender();
        _commission = 500; //default comission 5%
    }

    function getCommission() external view returns (uint16) {
        return _commission;
    }

    /**
     * @dev Returns the address of the current fee wallet.
     */
    function getFeeWallet() external view returns (address) {
        return _feeWallet;
    }

    function feeWallet() internal view returns (address payable) {
        return payable(_feeWallet);
    }


    /**
     * @dev Returns the address of the current admin wallet.
     */
    function adminRole() public view returns (address) {
        return _adminRole;
    }


    /**
     * @dev Returns the address of the current backend wallet.
     */
    function signerRole() public view returns (address) {
        return _signerRole;
    }


    function changeCommission(uint16 commission_) external onlyAdmin {
        uint16 oldComission = _commission;
        _commission = commission_;

        emit CommissionChanged(oldComission, commission_);
    }
    

    /**
     * @dev Change fee wallet of the contract to a new account (`newFeeWallet`).
     * Can only be called by the current owner.
     */
    function changeFeeWallet(address newFeeWallet) external onlyOwner {
        require(newFeeWallet != address(0), "KR: new fee wallet is the zero address");
        address oldFeeWallet = _feeWallet;
        _feeWallet = newFeeWallet;
        emit FeeWalletChanged(oldFeeWallet, newFeeWallet);
    }


    function changeSignerRole(address newSignerRole) external onlyOwner {
        require(newSignerRole != address(0), "KR: new signer wallet is the zero address");
         address oldSignerRole = _signerRole;
        _signerRole = newSignerRole;
        emit SugnerRoleChanged(oldSignerRole, newSignerRole);
    }


    function changeAdminRole(address newAdminRole) external onlyOwner {
        require(newAdminRole != address(0), "KR: new admin wallet is the zero address");
         address oldAdminRole = _adminRole;
        _adminRole = newAdminRole;
        emit AdminRoleChanged(oldAdminRole, newAdminRole);
    }


    function getFeeValue(uint price) external view returns(uint, uint) { 
        uint fee = _getFee(price);
        return (fee,  price - fee);
    }

    function _getFee(uint price) internal view returns(uint) { 
        return price * _commission / 10000;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

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

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

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

Contract Security Audit

Contract ABI

API
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"AdminRoleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"previousCommission","type":"uint16"},{"indexed":true,"internalType":"uint16","name":"newCommission","type":"uint16"}],"name":"CommissionChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"FeeWalletChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint64","name":"order","type":"uint64"},{"indexed":true,"internalType":"enum Krakatoa.Status","name":"status","type":"uint8"}],"name":"OrderStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"SugnerRoleChanged","type":"event"},{"inputs":[],"name":"adminRole","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdminRole","type":"address"}],"name":"changeAdminRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"commission_","type":"uint16"}],"name":"changeCommission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newFeeWallet","type":"address"}],"name":"changeFeeWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newSignerRole","type":"address"}],"name":"changeSignerRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"orderId","type":"uint64"},{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint64","name":"productId","type":"uint64"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"internalType":"struct Krakatoa.Product[]","name":"products","type":"tuple[]"},{"internalType":"uint256","name":"finalTimestamp","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"directSell","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getCommission","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"getFeeValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFeeWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"orderId","type":"uint64"}],"name":"getOrder","outputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint64","name":"product","type":"uint64"},{"internalType":"enum Krakatoa.Status","name":"status","type":"uint8"}],"internalType":"struct Krakatoa.OrderInfo","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"orderIds","type":"uint64[]"}],"name":"getOrders","outputs":[{"components":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"fee","type":"uint256"},{"internalType":"uint64","name":"product","type":"uint64"},{"internalType":"enum Krakatoa.Status","name":"status","type":"uint8"}],"internalType":"struct Krakatoa.OrderInfo[]","name":"orders","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint64","name":"orderId","type":"uint64"},{"components":[{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint64","name":"productId","type":"uint64"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"internalType":"struct Krakatoa.Product","name":"product","type":"tuple"},{"internalType":"uint256","name":"finalTimestamp","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"p2cSell","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"orders","type":"uint64[]"},{"internalType":"bool[]","name":"isWithdraw","type":"bool[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"processOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"orders","type":"uint64[]"},{"internalType":"bool[]","name":"isWithdraw","type":"bool[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"processOrdersByAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"orders","type":"uint64[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"refundOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerRole","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"orders","type":"uint64[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"withdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"orders","type":"uint64[]"},{"internalType":"address payable","name":"wallet","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"withdrawOrderTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64[]","name":"orders","type":"uint64[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"withdrawOrders","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506200001d3362000080565b60018054336001600160a01b0319918216811790925560028054909116732085dfc2619d10b1b5c0cefddf9fa13dfdeeae3e179055600380546001600160a01b03929092166001600160b01b031990921691909117607d60a21b179055620000d0565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61408880620000e06000396000f3fe6080604052600436106101745760003560e01c80636c2d481f116100cb578063a7bc4ff51161007f578063d75d31bd11610059578063d75d31bd146103f6578063e65d6b4914610416578063f2fde38b1461044457600080fd5b8063a7bc4ff514610389578063ba99912b146103a9578063cdf9d07c146103c957600080fd5b806373a69076116100b057806373a69076146103165780638da5cb5b146103365780639bf4f86e1461035457600080fd5b80636c2d481f146102e3578063715018a61461030157600080fd5b80632f993fce1161012d578063474d2d8011610107578063474d2d80146102855780634ea76e7a146102a55780635459060d146102c557600080fd5b80632f993fce14610232578063326cb089146102455780633e4d03101461026557600080fd5b806307258b7c1161015e57806307258b7c146101d25780630d1fa516146101ff57806318355ce61461021257600080fd5b80629f2f3c1461017957806304b8c471146101b0575b600080fd5b34801561018557600080fd5b506003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101bc57600080fd5b506101d06101cb366004613779565b610464565b005b3480156101de57600080fd5b506101f26101ed3660046137e2565b61054c565b6040516101a7919061388a565b6101d061020d366004613937565b610734565b34801561021e57600080fd5b506101d061022d3660046139f2565b610da6565b6101d0610240366004613a16565b610e6e565b34801561025157600080fd5b506101d0610260366004613a91565b61136a565b34801561027157600080fd5b506101d0610280366004613779565b6114cc565b34801561029157600080fd5b506101d06102a0366004613779565b611598565b3480156102b157600080fd5b506101d06102c0366004613afd565b61167b565b3480156102d157600080fd5b506001546001600160a01b0316610193565b3480156102ef57600080fd5b506002546001600160a01b0316610193565b34801561030d57600080fd5b506101d0611dcb565b34801561032257600080fd5b506101d0610331366004613afd565b611ddf565b34801561034257600080fd5b506000546001600160a01b0316610193565b34801561036057600080fd5b5061037461036f366004613b78565b611fbf565b604080519283526020830191909152016101a7565b34801561039557600080fd5b506101d06103a4366004613b91565b611fe4565b3480156103b557600080fd5b506101d06103c4366004613a91565b61246d565b3480156103d557600080fd5b506103e96103e4366004613c05565b61291b565b6040516101a79190613c20565b34801561040257600080fd5b506101d0610411366004613a91565b612a42565b34801561042257600080fd5b50600354600160a01b900461ffff1660405161ffff90911681526020016101a7565b34801561045057600080fd5b506101d061045f366004613779565b612b9b565b61046c612c14565b6001600160a01b0381166104ed5760405162461bcd60e51b815260206004820152602860248201527f4b523a206e65772061646d696e2077616c6c657420697320746865207a65726f60448201527f206164647265737300000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f28a5ac5e3be62b0d2b66feeeb6e32d957e198be1d9cfb50a1c88ef4e843ee16b90600090a35050565b60608167ffffffffffffffff81111561056757610567613c2e565b6040519080825280602002602001820160405280156105c057816020015b6105ad6040805160808101825260008082526020820181905291810182905290606082015290565b8152602001906001900390816105855790505b50905060005b60ff811683111561072d5760006004600086868560ff168181106105ec576105ec613c44565b90506020020160208101906106019190613c05565b67ffffffffffffffff1681526020808201929092526040908101600020815160c0810183528154815260018201549381019390935260028101546001600160a01b03811692840192909252906060830190600160a01b900460ff16600481111561066d5761066d613824565b600481111561067e5761067e613824565b8152600391909101546001600160a01b038116602080840191909152600160a01b90910467ffffffffffffffff908116604093840152825160808101845284518152848301519281019290925260a0840151169181019190915260608083015192935090919082019060048111156106f8576106f8613824565b815250838360ff168151811061071057610710613c44565b6020026020010181905250508061072690613c70565b90506105c6565b5092915050565b338686868660405160200161074d959493929190613cd5565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c01905280519101206107e992508391505b90612c6e565b6001600160a01b03166108046002546001600160a01b031690565b6001600160a01b0316146108525760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b87858042106108a35760405162461bcd60e51b815260206004820152601e60248201527f4b523a205369676e6564207472616e73616374696f6e2065787069726564000060448201526064016104e4565b67ffffffffffffffff82166000908152600460208190526040822060020154600160a01b900460ff16908111156108dc576108dc613824565b146109295760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b67ffffffffffffffff82166000908152600460205260409020600201805460ff60a01b1916600160a01b1790558715801590610965575060ff88105b6109b15760405162461bcd60e51b815260206004820152601a60248201527f4b523a20496e76616c69642070726f647563747320636f756e7400000000000060448201526064016104e4565b60008060005b60ff81168b1115610bfe5760008c8c8360ff168181106109d9576109d9613c44565b9050608002018036038101906109ef9190613d43565b606081015160208083015167ffffffffffffffff1660009081526005909152604090205491925011610a635760405162461bcd60e51b815260206004820152601560248201527f4b523a204974656d20616c726561647920736f6c64000000000000000000000060448201526064016104e4565b80516001600160a01b0316610aba5760405162461bcd60e51b815260206004820152601060248201527f4b523a2057726f6e672073656c6c65720000000000000000000000000000000060448201526064016104e4565b6040810151610ac99085613dc5565b93506000610af48e8e8560ff16818110610ae557610ae5613c44565b90506080020160400135612c94565b9050610b008185613dc5565b9350816060015160056000846020015167ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002081905550600082600001516001600160a01b0316828460400151610b569190613ddd565b604051600081818185875af1925050503d8060008114610b92576040519150601f19603f3d011682016040523d82523d6000602084013e610b97565b606091505b5050905080610be85760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b5050508080610bf690613c70565b9150506109b7565b50348214610c4e5760405162461bcd60e51b815260206004820152600f60248201527f4b523a2057726f6e672076616c7565000000000000000000000000000000000060448201526064016104e4565b6000610c626001546001600160a01b031690565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114610cac576040519150601f19603f3d011682016040523d82523d6000602084013e610cb1565b606091505b5050905080610d025760405162461bcd60e51b815260206004820152601660248201527f4b523a20556e61626c6520746f2073656e64206665650000000000000000000060448201526064016104e4565b67ffffffffffffffff8d166000818152600460205260408082208681556001810186905560020180547fffffffffffffffffffffff000000000000000000000000000000000000000000163360ff60a01b1916177403000000000000000000000000000000000000000017905551600392917ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e91a350505050505050505050505050565b6003546001600160a01b03163314610e005760405162461bcd60e51b815260206004820152601b60248201527f4b523a2043616c6c6572206973206e6f74207468652061646d696e000000000060448201526064016104e4565b6003805461ffff838116600160a01b8181027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff85161790945560405193909204169182907f07d1ecb0b6fd1c556347c57a4035549a933093e3e5a0a63418dd3589c82749de90600090a35050565b33858585604051602001610e859493929190613df4565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c0190528051910120610f1f92508391506107e3565b6001600160a01b0316610f3a6002546001600160a01b031690565b6001600160a01b031614610f885760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b8685804210610fd95760405162461bcd60e51b815260206004820152601e60248201527f4b523a205369676e6564207472616e73616374696f6e2065787069726564000060448201526064016104e4565b67ffffffffffffffff82166000908152600460208190526040822060020154600160a01b900460ff169081111561101257611012613824565b1461105f5760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b67ffffffffffffffff8216600090815260046020526040902060020180546001919060ff60a01b1916600160a01b8302179055506060880135600560006110ac60408c0160208d01613c05565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020541061111c5760405162461bcd60e51b815260206004820152601560248201527f4b523a204974656d20616c726561647920736f6c64000000000000000000000060448201526064016104e4565b3488604001351461116f5760405162461bcd60e51b815260206004820152601160248201527f4b523a20496e76616c696420707269636500000000000000000000000000000060448201526064016104e4565b600061117e8960400135612c94565b905060608901356005600061119960408d0160208e01613c05565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055506040518060c00160405280828b604001356111da9190613ddd565b81526020810183905233604082015260600160018152602090810190611202908c018c613779565b6001600160a01b031681526020018a60200160208101906112239190613c05565b67ffffffffffffffff9081169091528b1660009081526004602081815260409283902084518155908401516001820155918301516002830180546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff1983168117825560608601519391927fffffffffffffffffffffff000000000000000000000000000000000000000000161790600160a01b9084908111156112c7576112c7613824565b021790555060808201516003909101805460a09093015167ffffffffffffffff16600160a01b027fffffffff000000000000000000000000000000000000000000000000000000009093166001600160a01b0390921691909117919091179055600160405167ffffffffffffffff8c16907ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e90600090a350505050505050505050565b838360405160200161137d929190613e78565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c019052805191012061141792508391506107e3565b6001600160a01b03166114326002546001600160a01b031690565b6001600160a01b0316146114805760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b60606114c387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525085925060029150612cbd9050565b50505050505050565b6114d4612c14565b6001600160a01b0381166115395760405162461bcd60e51b815260206004820152602660248201527f4b523a206e6577206665652077616c6c657420697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e4565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f9f4f5dce3c4d197b5d7496cb96e25f0a89809167195964b0daa3ef5fed63c00a90600090a35050565b6115a0612c14565b6001600160a01b03811661161c5760405162461bcd60e51b815260206004820152602960248201527f4b523a206e6577207369676e65722077616c6c657420697320746865207a657260448201527f6f2061646472657373000000000000000000000000000000000000000000000060648201526084016104e4565b600280546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907fbc7e15e08dcfc31330d43ba63a2e421072f5a4001ed5a7b73dd9b39021f9a19590600090a35050565b6003546001600160a01b031633146116d55760405162461bcd60e51b815260206004820152601b60248201527f4b523a2043616c6c6572206973206e6f74207468652061646d696e000000000060448201526064016104e4565b858585856040516020016116ec9493929190613ea4565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c019052805191012061178692508391506107e3565b6001600160a01b03166117a16002546001600160a01b031690565b6001600160a01b0316146117ef5760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b86851461183e5760405162461bcd60e51b815260206004820152601060248201527f4b523a20496e76616c696420646174610000000000000000000000000000000060448201526064016104e4565b6000805b60ff8116891115611d03576000600460008c8c8560ff1681811061186857611868613c44565b905060200201602081019061187d9190613c05565b67ffffffffffffffff1681526020808201929092526040908101600020815160c0810183528154815260018201549381019390935260028101546001600160a01b03811692840192909252906060830190600160a01b900460ff1660048111156118e9576118e9613824565b60048111156118fa576118fa613824565b8152600391909101546001600160a01b0381166020830152600160a01b900467ffffffffffffffff166040909101529050888860ff841681811061194057611940613c44565b90506020020160208101906119559190613f00565b611960576004611963565b60035b600460008d8d8660ff1681811061197c5761197c613c44565b90506020020160208101906119919190613c05565b67ffffffffffffffff1681526020810191909152604001600020600201805460ff60a01b1916600160a01b8360048111156119ce576119ce613824565b02179055506001816060015160048111156119eb576119eb613824565b1480611a3d575088888360ff16818110611a0757611a07613c44565b9050602002016020810190611a1c9190613f00565b8015611a3d5750600281606001516004811115611a3b57611a3b613824565b145b611a895760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b88888360ff16818110611a9e57611a9e613c44565b9050602002016020810190611ab39190613f00565b15611b9357600281606001516004811115611ad057611ad0613824565b14611ae7576020810151611ae49084613dc5565b92505b608081015181516040516000926001600160a01b031691908381818185875af1925050503d8060008114611b37576040519150601f19603f3d011682016040523d82523d6000602084013e611b3c565b606091505b5050905080611b8d5760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b50611c49565b6040810151602082015182516000926001600160a01b031691611bb591613dc5565b604051600081818185875af1925050503d8060008114611bf1576040519150601f19603f3d011682016040523d82523d6000602084013e611bf6565b606091505b5050905080611c475760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b505b88888360ff16818110611c5e57611c5e613c44565b9050602002016020810190611c739190613f00565b611c7e576004611c81565b60035b6004811115611c9257611c92613824565b8b8b8460ff16818110611ca757611ca7613c44565b9050602002016020810190611cbc9190613c05565b67ffffffffffffffff167ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e60405160405180910390a350611cfc81613c70565b9050611842565b508015611dc0576000611d1e6001546001600160a01b031690565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114611d68576040519150601f19603f3d011682016040523d82523d6000602084013e611d6d565b606091505b5050905080611dbe5760405162461bcd60e51b815260206004820152601660248201527f4b523a20556e61626c6520746f2073656e64206665650000000000000000000060448201526064016104e4565b505b505050505050505050565b611dd3612c14565b611ddd6000613317565b565b85858585604051602001611df69493929190613ea4565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c0190528051910120611e9092508391506107e3565b6001600160a01b0316611eab6002546001600160a01b031690565b6001600160a01b031614611ef95760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b868514611f485760405162461bcd60e51b815260206004820152601060248201527f4b523a20496e76616c696420646174610000000000000000000000000000000060448201526064016104e4565b611fb588888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201829052509250612cbd915050565b5050505050505050565b6000806000611fcd84612c94565b905080611fda8186613ddd565b9250925050915091565b611fec612c14565b84848460405160200161200193929190613f1b565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c019052805191012061209b92508391506107e3565b6001600160a01b03166120b66002546001600160a01b031690565b6001600160a01b0316146121045760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b6000805b61ffff81168811156123c9576000600460008b8b8561ffff1681811061213057612130613c44565b90506020020160208101906121459190613c05565b67ffffffffffffffff1681526020808201929092526040908101600020815160c0810183528154815260018201549381019390935260028101546001600160a01b03811692840192909252906060830190600160a01b900460ff1660048111156121b1576121b1613824565b60048111156121c2576121c2613824565b81526003918201546001600160a01b0381166020830152600160a01b900467ffffffffffffffff16604090910152909150600460008c8c61ffff871681811061220d5761220d613c44565b90506020020160208101906122229190613c05565b67ffffffffffffffff1681526020810191909152604001600020600201805460ff60a01b1916600160a01b83600481111561225f5761225f613824565b021790555060018160600151600481111561227c5761227c613824565b148061229d575060028160600151600481111561229b5761229b613824565b145b6122da8b8b8561ffff168181106122b6576122b6613c44565b90506020020160208101906122cb9190613c05565b67ffffffffffffffff16613374565b6040516020016122ea9190613f78565b604051602081830303815290604052906123175760405162461bcd60e51b81526004016104e49190613fbd565b5080516123249084613dc5565b925060028160600151600481111561233e5761233e613824565b146123555760208101516123529084613dc5565b92505b60038a8a8461ffff1681811061236d5761236d613c44565b90506020020160208101906123829190613c05565b67ffffffffffffffff167ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e60405160405180910390a3506123c281613ff0565b9050612108565b506000866001600160a01b03168260405160006040518083038185875af1925050503d8060008114612417576040519150601f19603f3d011682016040523d82523d6000602084013e61241c565b606091505b5050905080611dc05760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b6003546001600160a01b031633146124c75760405162461bcd60e51b815260206004820152601b60248201527f4b523a2043616c6c6572206973206e6f74207468652061646d696e000000000060448201526064016104e4565b83836040516020016124da929190613e78565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c019052805191012061257492508391506107e3565b6001600160a01b031661258f6002546001600160a01b031690565b6001600160a01b0316146125dd5760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b600061268f85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516107e3925061262f91508b908b90602001613e78565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b9050806001600160a01b03166126ad6002546001600160a01b031690565b6001600160a01b0316146126fb5760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b6000805b61ffff811688111561286657600089898361ffff1681811061272357612723613c44565b90506020020160208101906127389190613c05565b9050600167ffffffffffffffff8216600090815260046020819052604090912060020154600160a01b900460ff169081111561277657612776613824565b146127c35760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b67ffffffffffffffff81166000908152600460205260409020600101546127ea9084613dc5565b67ffffffffffffffff82166000818152600460205260408082206002908101805460ff60a01b1916740200000000000000000000000000000000000000001790559051939650927ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e9190a35061285f81613ff0565b90506126ff565b50600061287b6001546001600160a01b031690565b6001600160a01b03168260405160006040518083038185875af1925050503d80600081146128c5576040519150601f19603f3d011682016040523d82523d6000602084013e6128ca565b606091505b5050905080611dc05760405162461bcd60e51b815260206004820152601660248201527f4b523a20556e61626c6520746f2073656e64206665650000000000000000000060448201526064016104e4565b6129436040805160808101825260008082526020820181905291810182905290606082015290565b67ffffffffffffffff82166000908152600460208181526040808420815160c0810183528154815260018201549381019390935260028101546001600160a01b0381169284019290925291926060840191600160a01b900460ff16908111156129ae576129ae613824565b60048111156129bf576129bf613824565b8152600391909101546001600160a01b038116602080840191909152600160a01b90910467ffffffffffffffff908116604093840152825160808101845284518152848301519281019290925260a084015116918101919091526060808301519293509091908201906004811115612a3957612a39613824565b90529392505050565b8383604051602001612a55929190613e78565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c0190528051910120612aef92508391506107e3565b6001600160a01b0316612b0a6002546001600160a01b031690565b6001600160a01b031614612b585760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b60606114c387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525085925060019150612cbd9050565b612ba3612c14565b6001600160a01b038116612c085760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e4565b612c1181613317565b50565b6000546001600160a01b03163314611ddd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e4565b6000806000612c7d8585613414565b91509150612c8a81613459565b5090505b92915050565b60035460009061271090612cb390600160a01b900461ffff1684614011565b612c8e9190614030565b60008060005b85518160ff1610156131b357600060046000888460ff1681518110612cea57612cea613c44565b60209081029190910181015167ffffffffffffffff168252818101929092526040908101600020815160c0810183528154815260018201549381019390935260028101546001600160a01b03811692840192909252906060830190600160a01b900460ff166004811115612d6057612d60613824565b6004811115612d7157612d71613824565b8152600391909101546001600160a01b0381166020830152600160a01b900467ffffffffffffffff166040909101529050600160ff86161480612dd9575060ff8516158015612dd95750858260ff1681518110612dd057612dd0613c44565b60200260200101515b15612fe257600360046000898560ff1681518110612df957612df9613c44565b60209081029190910181015167ffffffffffffffff168252810191909152604001600020600201805460ff60a01b1916600160a01b836004811115612e4057612e40613824565b0217905550600181606001516004811115612e5d57612e5d613824565b1480612e7e5750600281606001516004811115612e7c57612e7c613824565b145b612eca5760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b60808101516001600160a01b03163314612f4b5760405162461bcd60e51b8152602060048201526024808201527f4b523a20526563697069656e74206f66206f72646572206973206e6f7420736560448201527f6c6c65720000000000000000000000000000000000000000000000000000000060648201526084016104e4565b8051612f579084613dc5565b9250600281606001516004811115612f7157612f71613824565b14612f88576020810151612f859085613dc5565b93505b6003878360ff1681518110612f9f57612f9f613c44565b602002602001015167ffffffffffffffff167ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e60405160405180910390a36131a2565b6004806000898560ff1681518110612ffc57612ffc613c44565b60209081029190910181015167ffffffffffffffff168252810191909152604001600020600201805460ff60a01b1916600160a01b83600481111561304357613043613824565b021790555060018160600151600481111561306057613060613824565b146130ad5760405162461bcd60e51b815260206004820152601c60248201527f4b523a204f7264657220616c726561647920776974686472617765640000000060448201526064016104e4565b60408101516001600160a01b0316331461312f5760405162461bcd60e51b815260206004820152602360248201527f4b523a20526563697069656e74206f66206f72646572206973206e6f7420627560448201527f796572000000000000000000000000000000000000000000000000000000000060648201526084016104e4565b602081015181516131409190613dc5565b61314a9084613dc5565b92506004878360ff168151811061316357613163613c44565b602002602001015167ffffffffffffffff167ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e60405160405180910390a35b506131ac81613c70565b9050612cc3565b50801561325457604051600090339083908381818185875af1925050503d80600081146131fc576040519150601f19603f3d011682016040523d82523d6000602084013e613201565b606091505b50509050806132525760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b505b811561331057600061326e6001546001600160a01b031690565b6001600160a01b03168360405160006040518083038185875af1925050503d80600081146132b8576040519150601f19603f3d011682016040523d82523d6000602084013e6132bd565b606091505b505090508061330e5760405162461bcd60e51b815260206004820152601660248201527f4b523a20556e61626c6520746f2073656e64206665650000000000000000000060448201526064016104e4565b505b5050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60606000613381836135be565b600101905060008167ffffffffffffffff8111156133a1576133a1613c2e565b6040519080825280601f01601f1916602001820160405280156133cb576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846133d557509392505050565b600080825160410361344a5760208301516040840151606085015160001a61343e878285856136a0565b94509450505050613452565b506000905060025b9250929050565b600081600481111561346d5761346d613824565b036134755750565b600181600481111561348957613489613824565b036134d65760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104e4565b60028160048111156134ea576134ea613824565b036135375760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104e4565b600381600481111561354b5761354b613824565b03612c115760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104e4565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613607577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613633576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061365157662386f26fc10000830492506010015b6305f5e1008310613669576305f5e100830492506008015b612710831061367d57612710830492506004015b6064831061368f576064830492506002015b600a8310612c8e5760010192915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156136d7575060009050600361375b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561372b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166137545760006001925092505061375b565b9150600090505b94509492505050565b6001600160a01b0381168114612c1157600080fd5b60006020828403121561378b57600080fd5b813561379681613764565b9392505050565b60008083601f8401126137af57600080fd5b50813567ffffffffffffffff8111156137c757600080fd5b6020830191508360208260051b850101111561345257600080fd5b600080602083850312156137f557600080fd5b823567ffffffffffffffff81111561380c57600080fd5b6138188582860161379d565b90969095509350505050565b634e487b7160e01b600052602160045260246000fd5b805182526020810151602083015267ffffffffffffffff604082015116604083015260608101516005811061387f57634e487b7160e01b600052602160045260246000fd5b806060840152505050565b6020808252825182820181905260009190848201906040850190845b818110156138cc576138b983855161383a565b92840192608092909201916001016138a6565b50909695505050505050565b803567ffffffffffffffff811681146138f057600080fd5b919050565b60008083601f84011261390757600080fd5b50813567ffffffffffffffff81111561391f57600080fd5b60208301915083602082850101111561345257600080fd5b6000806000806000806080878903121561395057600080fd5b613959876138d8565b9550602087013567ffffffffffffffff8082111561397657600080fd5b818901915089601f83011261398a57600080fd5b81358181111561399957600080fd5b8a60208260071b85010111156139ae57600080fd5b602083019750809650506040890135945060608901359150808211156139d357600080fd5b506139e089828a016138f5565b979a9699509497509295939492505050565b600060208284031215613a0457600080fd5b813561ffff8116811461379657600080fd5b600080600080600085870360e0811215613a2f57600080fd5b613a38876138d8565b95506080601f1982011215613a4c57600080fd5b5060208601935060a0860135925060c086013567ffffffffffffffff811115613a7457600080fd5b613a80888289016138f5565b969995985093965092949392505050565b60008060008060408587031215613aa757600080fd5b843567ffffffffffffffff80821115613abf57600080fd5b613acb8883890161379d565b90965094506020870135915080821115613ae457600080fd5b50613af1878288016138f5565b95989497509550505050565b60008060008060008060608789031215613b1657600080fd5b863567ffffffffffffffff80821115613b2e57600080fd5b613b3a8a838b0161379d565b90985096506020890135915080821115613b5357600080fd5b613b5f8a838b0161379d565b909650945060408901359150808211156139d357600080fd5b600060208284031215613b8a57600080fd5b5035919050565b600080600080600060608688031215613ba957600080fd5b853567ffffffffffffffff80821115613bc157600080fd5b613bcd89838a0161379d565b909750955060208801359150613be282613764565b90935060408701359080821115613bf857600080fd5b50613a80888289016138f5565b600060208284031215613c1757600080fd5b613796826138d8565b60808101612c8e828461383a565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8103613c8657613c86613c5a565b60010192915050565b8035613c9a81613764565b6001600160a01b0316825267ffffffffffffffff613cba602083016138d8565b16602083015260408181013590830152606090810135910152565b6001600160a01b038616815267ffffffffffffffff851660208201526080604082018190528181018490526000908560a08401835b87811015613d2c57613d1c8284613c8f565b9183019190830190600101613d0a565b508093505050508260608301529695505050505050565b600060808284031215613d5557600080fd5b6040516080810181811067ffffffffffffffff82111715613d8657634e487b7160e01b600052604160045260246000fd5b6040528235613d9481613764565b8152613da2602084016138d8565b602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613dd857613dd8613c5a565b500190565b600082821015613def57613def613c5a565b500390565b6001600160a01b038516815267ffffffffffffffff8416602082015260e08101613e216040830185613c8f565b8260c083015295945050505050565b8183526000602080850194508260005b85811015613e6d5767ffffffffffffffff613e5a836138d8565b1687529582019590820190600101613e40565b509495945050505050565b602081526000613e8c602083018486613e30565b949350505050565b803580151581146138f057600080fd5b604081526000613eb8604083018688613e30565b8281036020848101919091528482528591810160005b86811015613ef357613edf84613e94565b151582529282019290820190600101613ece565b5098975050505050505050565b600060208284031215613f1257600080fd5b61379682613e94565b604081526000613f2f604083018587613e30565b90506001600160a01b0383166020830152949350505050565b60005b83811015613f63578181015183820152602001613f4b565b83811115613f72576000848401525b50505050565b7f4b523a204f7264657220616c72656164792070726f6365737365643a20000000815260008251613fb081601d850160208701613f48565b91909101601d0192915050565b6020815260008251806020840152613fdc816040850160208701613f48565b601f01601f19169190910160400192915050565b600061ffff80831681810361400757614007613c5a565b6001019392505050565b600081600019048311821515161561402b5761402b613c5a565b500290565b60008261404d57634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220122062ed55c1b1fe88becc20cd3bda09d437d69e1800962f549dfb60a60c1d0564736f6c634300080d0033

Deployed Bytecode

0x6080604052600436106101745760003560e01c80636c2d481f116100cb578063a7bc4ff51161007f578063d75d31bd11610059578063d75d31bd146103f6578063e65d6b4914610416578063f2fde38b1461044457600080fd5b8063a7bc4ff514610389578063ba99912b146103a9578063cdf9d07c146103c957600080fd5b806373a69076116100b057806373a69076146103165780638da5cb5b146103365780639bf4f86e1461035457600080fd5b80636c2d481f146102e3578063715018a61461030157600080fd5b80632f993fce1161012d578063474d2d8011610107578063474d2d80146102855780634ea76e7a146102a55780635459060d146102c557600080fd5b80632f993fce14610232578063326cb089146102455780633e4d03101461026557600080fd5b806307258b7c1161015e57806307258b7c146101d25780630d1fa516146101ff57806318355ce61461021257600080fd5b80629f2f3c1461017957806304b8c471146101b0575b600080fd5b34801561018557600080fd5b506003546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101bc57600080fd5b506101d06101cb366004613779565b610464565b005b3480156101de57600080fd5b506101f26101ed3660046137e2565b61054c565b6040516101a7919061388a565b6101d061020d366004613937565b610734565b34801561021e57600080fd5b506101d061022d3660046139f2565b610da6565b6101d0610240366004613a16565b610e6e565b34801561025157600080fd5b506101d0610260366004613a91565b61136a565b34801561027157600080fd5b506101d0610280366004613779565b6114cc565b34801561029157600080fd5b506101d06102a0366004613779565b611598565b3480156102b157600080fd5b506101d06102c0366004613afd565b61167b565b3480156102d157600080fd5b506001546001600160a01b0316610193565b3480156102ef57600080fd5b506002546001600160a01b0316610193565b34801561030d57600080fd5b506101d0611dcb565b34801561032257600080fd5b506101d0610331366004613afd565b611ddf565b34801561034257600080fd5b506000546001600160a01b0316610193565b34801561036057600080fd5b5061037461036f366004613b78565b611fbf565b604080519283526020830191909152016101a7565b34801561039557600080fd5b506101d06103a4366004613b91565b611fe4565b3480156103b557600080fd5b506101d06103c4366004613a91565b61246d565b3480156103d557600080fd5b506103e96103e4366004613c05565b61291b565b6040516101a79190613c20565b34801561040257600080fd5b506101d0610411366004613a91565b612a42565b34801561042257600080fd5b50600354600160a01b900461ffff1660405161ffff90911681526020016101a7565b34801561045057600080fd5b506101d061045f366004613779565b612b9b565b61046c612c14565b6001600160a01b0381166104ed5760405162461bcd60e51b815260206004820152602860248201527f4b523a206e65772061646d696e2077616c6c657420697320746865207a65726f60448201527f206164647265737300000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f28a5ac5e3be62b0d2b66feeeb6e32d957e198be1d9cfb50a1c88ef4e843ee16b90600090a35050565b60608167ffffffffffffffff81111561056757610567613c2e565b6040519080825280602002602001820160405280156105c057816020015b6105ad6040805160808101825260008082526020820181905291810182905290606082015290565b8152602001906001900390816105855790505b50905060005b60ff811683111561072d5760006004600086868560ff168181106105ec576105ec613c44565b90506020020160208101906106019190613c05565b67ffffffffffffffff1681526020808201929092526040908101600020815160c0810183528154815260018201549381019390935260028101546001600160a01b03811692840192909252906060830190600160a01b900460ff16600481111561066d5761066d613824565b600481111561067e5761067e613824565b8152600391909101546001600160a01b038116602080840191909152600160a01b90910467ffffffffffffffff908116604093840152825160808101845284518152848301519281019290925260a0840151169181019190915260608083015192935090919082019060048111156106f8576106f8613824565b815250838360ff168151811061071057610710613c44565b6020026020010181905250508061072690613c70565b90506105c6565b5092915050565b338686868660405160200161074d959493929190613cd5565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c01905280519101206107e992508391505b90612c6e565b6001600160a01b03166108046002546001600160a01b031690565b6001600160a01b0316146108525760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b87858042106108a35760405162461bcd60e51b815260206004820152601e60248201527f4b523a205369676e6564207472616e73616374696f6e2065787069726564000060448201526064016104e4565b67ffffffffffffffff82166000908152600460208190526040822060020154600160a01b900460ff16908111156108dc576108dc613824565b146109295760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b67ffffffffffffffff82166000908152600460205260409020600201805460ff60a01b1916600160a01b1790558715801590610965575060ff88105b6109b15760405162461bcd60e51b815260206004820152601a60248201527f4b523a20496e76616c69642070726f647563747320636f756e7400000000000060448201526064016104e4565b60008060005b60ff81168b1115610bfe5760008c8c8360ff168181106109d9576109d9613c44565b9050608002018036038101906109ef9190613d43565b606081015160208083015167ffffffffffffffff1660009081526005909152604090205491925011610a635760405162461bcd60e51b815260206004820152601560248201527f4b523a204974656d20616c726561647920736f6c64000000000000000000000060448201526064016104e4565b80516001600160a01b0316610aba5760405162461bcd60e51b815260206004820152601060248201527f4b523a2057726f6e672073656c6c65720000000000000000000000000000000060448201526064016104e4565b6040810151610ac99085613dc5565b93506000610af48e8e8560ff16818110610ae557610ae5613c44565b90506080020160400135612c94565b9050610b008185613dc5565b9350816060015160056000846020015167ffffffffffffffff1667ffffffffffffffff16815260200190815260200160002081905550600082600001516001600160a01b0316828460400151610b569190613ddd565b604051600081818185875af1925050503d8060008114610b92576040519150601f19603f3d011682016040523d82523d6000602084013e610b97565b606091505b5050905080610be85760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b5050508080610bf690613c70565b9150506109b7565b50348214610c4e5760405162461bcd60e51b815260206004820152600f60248201527f4b523a2057726f6e672076616c7565000000000000000000000000000000000060448201526064016104e4565b6000610c626001546001600160a01b031690565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114610cac576040519150601f19603f3d011682016040523d82523d6000602084013e610cb1565b606091505b5050905080610d025760405162461bcd60e51b815260206004820152601660248201527f4b523a20556e61626c6520746f2073656e64206665650000000000000000000060448201526064016104e4565b67ffffffffffffffff8d166000818152600460205260408082208681556001810186905560020180547fffffffffffffffffffffff000000000000000000000000000000000000000000163360ff60a01b1916177403000000000000000000000000000000000000000017905551600392917ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e91a350505050505050505050505050565b6003546001600160a01b03163314610e005760405162461bcd60e51b815260206004820152601b60248201527f4b523a2043616c6c6572206973206e6f74207468652061646d696e000000000060448201526064016104e4565b6003805461ffff838116600160a01b8181027fffffffffffffffffffff0000ffffffffffffffffffffffffffffffffffffffff85161790945560405193909204169182907f07d1ecb0b6fd1c556347c57a4035549a933093e3e5a0a63418dd3589c82749de90600090a35050565b33858585604051602001610e859493929190613df4565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c0190528051910120610f1f92508391506107e3565b6001600160a01b0316610f3a6002546001600160a01b031690565b6001600160a01b031614610f885760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b8685804210610fd95760405162461bcd60e51b815260206004820152601e60248201527f4b523a205369676e6564207472616e73616374696f6e2065787069726564000060448201526064016104e4565b67ffffffffffffffff82166000908152600460208190526040822060020154600160a01b900460ff169081111561101257611012613824565b1461105f5760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b67ffffffffffffffff8216600090815260046020526040902060020180546001919060ff60a01b1916600160a01b8302179055506060880135600560006110ac60408c0160208d01613c05565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020541061111c5760405162461bcd60e51b815260206004820152601560248201527f4b523a204974656d20616c726561647920736f6c64000000000000000000000060448201526064016104e4565b3488604001351461116f5760405162461bcd60e51b815260206004820152601160248201527f4b523a20496e76616c696420707269636500000000000000000000000000000060448201526064016104e4565b600061117e8960400135612c94565b905060608901356005600061119960408d0160208e01613c05565b67ffffffffffffffff1667ffffffffffffffff168152602001908152602001600020819055506040518060c00160405280828b604001356111da9190613ddd565b81526020810183905233604082015260600160018152602090810190611202908c018c613779565b6001600160a01b031681526020018a60200160208101906112239190613c05565b67ffffffffffffffff9081169091528b1660009081526004602081815260409283902084518155908401516001820155918301516002830180546001600160a01b0390921673ffffffffffffffffffffffffffffffffffffffff1983168117825560608601519391927fffffffffffffffffffffff000000000000000000000000000000000000000000161790600160a01b9084908111156112c7576112c7613824565b021790555060808201516003909101805460a09093015167ffffffffffffffff16600160a01b027fffffffff000000000000000000000000000000000000000000000000000000009093166001600160a01b0390921691909117919091179055600160405167ffffffffffffffff8c16907ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e90600090a350505050505050505050565b838360405160200161137d929190613e78565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c019052805191012061141792508391506107e3565b6001600160a01b03166114326002546001600160a01b031690565b6001600160a01b0316146114805760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b60606114c387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525085925060029150612cbd9050565b50505050505050565b6114d4612c14565b6001600160a01b0381166115395760405162461bcd60e51b815260206004820152602660248201527f4b523a206e6577206665652077616c6c657420697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e4565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f9f4f5dce3c4d197b5d7496cb96e25f0a89809167195964b0daa3ef5fed63c00a90600090a35050565b6115a0612c14565b6001600160a01b03811661161c5760405162461bcd60e51b815260206004820152602960248201527f4b523a206e6577207369676e65722077616c6c657420697320746865207a657260448201527f6f2061646472657373000000000000000000000000000000000000000000000060648201526084016104e4565b600280546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907fbc7e15e08dcfc31330d43ba63a2e421072f5a4001ed5a7b73dd9b39021f9a19590600090a35050565b6003546001600160a01b031633146116d55760405162461bcd60e51b815260206004820152601b60248201527f4b523a2043616c6c6572206973206e6f74207468652061646d696e000000000060448201526064016104e4565b858585856040516020016116ec9493929190613ea4565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c019052805191012061178692508391506107e3565b6001600160a01b03166117a16002546001600160a01b031690565b6001600160a01b0316146117ef5760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b86851461183e5760405162461bcd60e51b815260206004820152601060248201527f4b523a20496e76616c696420646174610000000000000000000000000000000060448201526064016104e4565b6000805b60ff8116891115611d03576000600460008c8c8560ff1681811061186857611868613c44565b905060200201602081019061187d9190613c05565b67ffffffffffffffff1681526020808201929092526040908101600020815160c0810183528154815260018201549381019390935260028101546001600160a01b03811692840192909252906060830190600160a01b900460ff1660048111156118e9576118e9613824565b60048111156118fa576118fa613824565b8152600391909101546001600160a01b0381166020830152600160a01b900467ffffffffffffffff166040909101529050888860ff841681811061194057611940613c44565b90506020020160208101906119559190613f00565b611960576004611963565b60035b600460008d8d8660ff1681811061197c5761197c613c44565b90506020020160208101906119919190613c05565b67ffffffffffffffff1681526020810191909152604001600020600201805460ff60a01b1916600160a01b8360048111156119ce576119ce613824565b02179055506001816060015160048111156119eb576119eb613824565b1480611a3d575088888360ff16818110611a0757611a07613c44565b9050602002016020810190611a1c9190613f00565b8015611a3d5750600281606001516004811115611a3b57611a3b613824565b145b611a895760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b88888360ff16818110611a9e57611a9e613c44565b9050602002016020810190611ab39190613f00565b15611b9357600281606001516004811115611ad057611ad0613824565b14611ae7576020810151611ae49084613dc5565b92505b608081015181516040516000926001600160a01b031691908381818185875af1925050503d8060008114611b37576040519150601f19603f3d011682016040523d82523d6000602084013e611b3c565b606091505b5050905080611b8d5760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b50611c49565b6040810151602082015182516000926001600160a01b031691611bb591613dc5565b604051600081818185875af1925050503d8060008114611bf1576040519150601f19603f3d011682016040523d82523d6000602084013e611bf6565b606091505b5050905080611c475760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b505b88888360ff16818110611c5e57611c5e613c44565b9050602002016020810190611c739190613f00565b611c7e576004611c81565b60035b6004811115611c9257611c92613824565b8b8b8460ff16818110611ca757611ca7613c44565b9050602002016020810190611cbc9190613c05565b67ffffffffffffffff167ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e60405160405180910390a350611cfc81613c70565b9050611842565b508015611dc0576000611d1e6001546001600160a01b031690565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114611d68576040519150601f19603f3d011682016040523d82523d6000602084013e611d6d565b606091505b5050905080611dbe5760405162461bcd60e51b815260206004820152601660248201527f4b523a20556e61626c6520746f2073656e64206665650000000000000000000060448201526064016104e4565b505b505050505050505050565b611dd3612c14565b611ddd6000613317565b565b85858585604051602001611df69493929190613ea4565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c0190528051910120611e9092508391506107e3565b6001600160a01b0316611eab6002546001600160a01b031690565b6001600160a01b031614611ef95760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b868514611f485760405162461bcd60e51b815260206004820152601060248201527f4b523a20496e76616c696420646174610000000000000000000000000000000060448201526064016104e4565b611fb588888080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808c0282810182019093528b82529093508b92508a91829185019084908082843760009201829052509250612cbd915050565b5050505050505050565b6000806000611fcd84612c94565b905080611fda8186613ddd565b9250925050915091565b611fec612c14565b84848460405160200161200193929190613f1b565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c019052805191012061209b92508391506107e3565b6001600160a01b03166120b66002546001600160a01b031690565b6001600160a01b0316146121045760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b6000805b61ffff81168811156123c9576000600460008b8b8561ffff1681811061213057612130613c44565b90506020020160208101906121459190613c05565b67ffffffffffffffff1681526020808201929092526040908101600020815160c0810183528154815260018201549381019390935260028101546001600160a01b03811692840192909252906060830190600160a01b900460ff1660048111156121b1576121b1613824565b60048111156121c2576121c2613824565b81526003918201546001600160a01b0381166020830152600160a01b900467ffffffffffffffff16604090910152909150600460008c8c61ffff871681811061220d5761220d613c44565b90506020020160208101906122229190613c05565b67ffffffffffffffff1681526020810191909152604001600020600201805460ff60a01b1916600160a01b83600481111561225f5761225f613824565b021790555060018160600151600481111561227c5761227c613824565b148061229d575060028160600151600481111561229b5761229b613824565b145b6122da8b8b8561ffff168181106122b6576122b6613c44565b90506020020160208101906122cb9190613c05565b67ffffffffffffffff16613374565b6040516020016122ea9190613f78565b604051602081830303815290604052906123175760405162461bcd60e51b81526004016104e49190613fbd565b5080516123249084613dc5565b925060028160600151600481111561233e5761233e613824565b146123555760208101516123529084613dc5565b92505b60038a8a8461ffff1681811061236d5761236d613c44565b90506020020160208101906123829190613c05565b67ffffffffffffffff167ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e60405160405180910390a3506123c281613ff0565b9050612108565b506000866001600160a01b03168260405160006040518083038185875af1925050503d8060008114612417576040519150601f19603f3d011682016040523d82523d6000602084013e61241c565b606091505b5050905080611dc05760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b6003546001600160a01b031633146124c75760405162461bcd60e51b815260206004820152601b60248201527f4b523a2043616c6c6572206973206e6f74207468652061646d696e000000000060448201526064016104e4565b83836040516020016124da929190613e78565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c019052805191012061257492508391506107e3565b6001600160a01b031661258f6002546001600160a01b031690565b6001600160a01b0316146125dd5760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b600061268f85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040516107e3925061262f91508b908b90602001613e78565b60408051601f1981840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b9050806001600160a01b03166126ad6002546001600160a01b031690565b6001600160a01b0316146126fb5760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b6000805b61ffff811688111561286657600089898361ffff1681811061272357612723613c44565b90506020020160208101906127389190613c05565b9050600167ffffffffffffffff8216600090815260046020819052604090912060020154600160a01b900460ff169081111561277657612776613824565b146127c35760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b67ffffffffffffffff81166000908152600460205260409020600101546127ea9084613dc5565b67ffffffffffffffff82166000818152600460205260408082206002908101805460ff60a01b1916740200000000000000000000000000000000000000001790559051939650927ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e9190a35061285f81613ff0565b90506126ff565b50600061287b6001546001600160a01b031690565b6001600160a01b03168260405160006040518083038185875af1925050503d80600081146128c5576040519150601f19603f3d011682016040523d82523d6000602084013e6128ca565b606091505b5050905080611dc05760405162461bcd60e51b815260206004820152601660248201527f4b523a20556e61626c6520746f2073656e64206665650000000000000000000060448201526064016104e4565b6129436040805160808101825260008082526020820181905291810182905290606082015290565b67ffffffffffffffff82166000908152600460208181526040808420815160c0810183528154815260018201549381019390935260028101546001600160a01b0381169284019290925291926060840191600160a01b900460ff16908111156129ae576129ae613824565b60048111156129bf576129bf613824565b8152600391909101546001600160a01b038116602080840191909152600160a01b90910467ffffffffffffffff908116604093840152825160808101845284518152848301519281019290925260a084015116918101919091526060808301519293509091908201906004811115612a3957612a39613824565b90529392505050565b8383604051602001612a55929190613e78565b60408051601f198184030181526020601f850181900481028401810190925283835291908490849081908401838280828437600092019190915250508351602080860191909120604080517f19457468657265756d205369676e6564204d6573736167653a0a33320000000081850152603c8082019390935281518082039093018352605c0190528051910120612aef92508391506107e3565b6001600160a01b0316612b0a6002546001600160a01b031690565b6001600160a01b031614612b585760405162461bcd60e51b81526020600482015260156024820152744b523a20496e76616c6964207369676e617475726560581b60448201526064016104e4565b60606114c387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525085925060019150612cbd9050565b612ba3612c14565b6001600160a01b038116612c085760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104e4565b612c1181613317565b50565b6000546001600160a01b03163314611ddd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104e4565b6000806000612c7d8585613414565b91509150612c8a81613459565b5090505b92915050565b60035460009061271090612cb390600160a01b900461ffff1684614011565b612c8e9190614030565b60008060005b85518160ff1610156131b357600060046000888460ff1681518110612cea57612cea613c44565b60209081029190910181015167ffffffffffffffff168252818101929092526040908101600020815160c0810183528154815260018201549381019390935260028101546001600160a01b03811692840192909252906060830190600160a01b900460ff166004811115612d6057612d60613824565b6004811115612d7157612d71613824565b8152600391909101546001600160a01b0381166020830152600160a01b900467ffffffffffffffff166040909101529050600160ff86161480612dd9575060ff8516158015612dd95750858260ff1681518110612dd057612dd0613c44565b60200260200101515b15612fe257600360046000898560ff1681518110612df957612df9613c44565b60209081029190910181015167ffffffffffffffff168252810191909152604001600020600201805460ff60a01b1916600160a01b836004811115612e4057612e40613824565b0217905550600181606001516004811115612e5d57612e5d613824565b1480612e7e5750600281606001516004811115612e7c57612e7c613824565b145b612eca5760405162461bcd60e51b815260206004820152601b60248201527f4b523a204f7264657220616c72656164792070726f636573736564000000000060448201526064016104e4565b60808101516001600160a01b03163314612f4b5760405162461bcd60e51b8152602060048201526024808201527f4b523a20526563697069656e74206f66206f72646572206973206e6f7420736560448201527f6c6c65720000000000000000000000000000000000000000000000000000000060648201526084016104e4565b8051612f579084613dc5565b9250600281606001516004811115612f7157612f71613824565b14612f88576020810151612f859085613dc5565b93505b6003878360ff1681518110612f9f57612f9f613c44565b602002602001015167ffffffffffffffff167ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e60405160405180910390a36131a2565b6004806000898560ff1681518110612ffc57612ffc613c44565b60209081029190910181015167ffffffffffffffff168252810191909152604001600020600201805460ff60a01b1916600160a01b83600481111561304357613043613824565b021790555060018160600151600481111561306057613060613824565b146130ad5760405162461bcd60e51b815260206004820152601c60248201527f4b523a204f7264657220616c726561647920776974686472617765640000000060448201526064016104e4565b60408101516001600160a01b0316331461312f5760405162461bcd60e51b815260206004820152602360248201527f4b523a20526563697069656e74206f66206f72646572206973206e6f7420627560448201527f796572000000000000000000000000000000000000000000000000000000000060648201526084016104e4565b602081015181516131409190613dc5565b61314a9084613dc5565b92506004878360ff168151811061316357613163613c44565b602002602001015167ffffffffffffffff167ff9514de79d47d7f858fd19bdb4a17297986de8e5a2f895cfa93754295e10a83e60405160405180910390a35b506131ac81613c70565b9050612cc3565b50801561325457604051600090339083908381818185875af1925050503d80600081146131fc576040519150601f19603f3d011682016040523d82523d6000602084013e613201565b606091505b50509050806132525760405162461bcd60e51b815260206004820152601860248201527f4b523a20556e61626c6520746f2073656e642066756e6473000000000000000060448201526064016104e4565b505b811561331057600061326e6001546001600160a01b031690565b6001600160a01b03168360405160006040518083038185875af1925050503d80600081146132b8576040519150601f19603f3d011682016040523d82523d6000602084013e6132bd565b606091505b505090508061330e5760405162461bcd60e51b815260206004820152601660248201527f4b523a20556e61626c6520746f2073656e64206665650000000000000000000060448201526064016104e4565b505b5050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60606000613381836135be565b600101905060008167ffffffffffffffff8111156133a1576133a1613c2e565b6040519080825280601f01601f1916602001820160405280156133cb576020820181803683370190505b5090508181016020015b600019017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846133d557509392505050565b600080825160410361344a5760208301516040840151606085015160001a61343e878285856136a0565b94509450505050613452565b506000905060025b9250929050565b600081600481111561346d5761346d613824565b036134755750565b600181600481111561348957613489613824565b036134d65760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104e4565b60028160048111156134ea576134ea613824565b036135375760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104e4565b600381600481111561354b5761354b613824565b03612c115760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104e4565b6000807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310613607577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310613633576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061365157662386f26fc10000830492506010015b6305f5e1008310613669576305f5e100830492506008015b612710831061367d57612710830492506004015b6064831061368f576064830492506002015b600a8310612c8e5760010192915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156136d7575060009050600361375b565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561372b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166137545760006001925092505061375b565b9150600090505b94509492505050565b6001600160a01b0381168114612c1157600080fd5b60006020828403121561378b57600080fd5b813561379681613764565b9392505050565b60008083601f8401126137af57600080fd5b50813567ffffffffffffffff8111156137c757600080fd5b6020830191508360208260051b850101111561345257600080fd5b600080602083850312156137f557600080fd5b823567ffffffffffffffff81111561380c57600080fd5b6138188582860161379d565b90969095509350505050565b634e487b7160e01b600052602160045260246000fd5b805182526020810151602083015267ffffffffffffffff604082015116604083015260608101516005811061387f57634e487b7160e01b600052602160045260246000fd5b806060840152505050565b6020808252825182820181905260009190848201906040850190845b818110156138cc576138b983855161383a565b92840192608092909201916001016138a6565b50909695505050505050565b803567ffffffffffffffff811681146138f057600080fd5b919050565b60008083601f84011261390757600080fd5b50813567ffffffffffffffff81111561391f57600080fd5b60208301915083602082850101111561345257600080fd5b6000806000806000806080878903121561395057600080fd5b613959876138d8565b9550602087013567ffffffffffffffff8082111561397657600080fd5b818901915089601f83011261398a57600080fd5b81358181111561399957600080fd5b8a60208260071b85010111156139ae57600080fd5b602083019750809650506040890135945060608901359150808211156139d357600080fd5b506139e089828a016138f5565b979a9699509497509295939492505050565b600060208284031215613a0457600080fd5b813561ffff8116811461379657600080fd5b600080600080600085870360e0811215613a2f57600080fd5b613a38876138d8565b95506080601f1982011215613a4c57600080fd5b5060208601935060a0860135925060c086013567ffffffffffffffff811115613a7457600080fd5b613a80888289016138f5565b969995985093965092949392505050565b60008060008060408587031215613aa757600080fd5b843567ffffffffffffffff80821115613abf57600080fd5b613acb8883890161379d565b90965094506020870135915080821115613ae457600080fd5b50613af1878288016138f5565b95989497509550505050565b60008060008060008060608789031215613b1657600080fd5b863567ffffffffffffffff80821115613b2e57600080fd5b613b3a8a838b0161379d565b90985096506020890135915080821115613b5357600080fd5b613b5f8a838b0161379d565b909650945060408901359150808211156139d357600080fd5b600060208284031215613b8a57600080fd5b5035919050565b600080600080600060608688031215613ba957600080fd5b853567ffffffffffffffff80821115613bc157600080fd5b613bcd89838a0161379d565b909750955060208801359150613be282613764565b90935060408701359080821115613bf857600080fd5b50613a80888289016138f5565b600060208284031215613c1757600080fd5b613796826138d8565b60808101612c8e828461383a565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8103613c8657613c86613c5a565b60010192915050565b8035613c9a81613764565b6001600160a01b0316825267ffffffffffffffff613cba602083016138d8565b16602083015260408181013590830152606090810135910152565b6001600160a01b038616815267ffffffffffffffff851660208201526080604082018190528181018490526000908560a08401835b87811015613d2c57613d1c8284613c8f565b9183019190830190600101613d0a565b508093505050508260608301529695505050505050565b600060808284031215613d5557600080fd5b6040516080810181811067ffffffffffffffff82111715613d8657634e487b7160e01b600052604160045260246000fd5b6040528235613d9481613764565b8152613da2602084016138d8565b602082015260408301356040820152606083013560608201528091505092915050565b60008219821115613dd857613dd8613c5a565b500190565b600082821015613def57613def613c5a565b500390565b6001600160a01b038516815267ffffffffffffffff8416602082015260e08101613e216040830185613c8f565b8260c083015295945050505050565b8183526000602080850194508260005b85811015613e6d5767ffffffffffffffff613e5a836138d8565b1687529582019590820190600101613e40565b509495945050505050565b602081526000613e8c602083018486613e30565b949350505050565b803580151581146138f057600080fd5b604081526000613eb8604083018688613e30565b8281036020848101919091528482528591810160005b86811015613ef357613edf84613e94565b151582529282019290820190600101613ece565b5098975050505050505050565b600060208284031215613f1257600080fd5b61379682613e94565b604081526000613f2f604083018587613e30565b90506001600160a01b0383166020830152949350505050565b60005b83811015613f63578181015183820152602001613f4b565b83811115613f72576000848401525b50505050565b7f4b523a204f7264657220616c72656164792070726f6365737365643a20000000815260008251613fb081601d850160208701613f48565b91909101601d0192915050565b6020815260008251806020840152613fdc816040850160208701613f48565b601f01601f19169190910160400192915050565b600061ffff80831681810361400757614007613c5a565b6001019392505050565b600081600019048311821515161561402b5761402b613c5a565b500290565b60008261404d57634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220122062ed55c1b1fe88becc20cd3bda09d437d69e1800962f549dfb60a60c1d0564736f6c634300080d0033

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.