Contract 0xfA8B6F7f756745a38C9596222c1bfdBb4bA8a157 1

 
 
Txn Hash
Method
Block
From
To
Value
0xb9c163be9c774e356ef9297924b3eae77b426cc843f4eb1b9a4c112dec415683Settle Batch104466422020-07-12 19:31:11928 days 15 hrs ago0x9a82997affa9ca03f3d6ad113464c5be70db134d IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.0019144817
0x14ccce6e4a40fef4d928cbed18fb6e5ce29d9c700c169b9d9e18b8a469558368Settle Batch102658592020-06-14 19:53:57956 days 14 hrs ago0xbc1aa146978825df6cd6d7deb17a423c8ddb87fc IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.001328811.8
0x539bf758f17d04456825c42492f1751443e8a61d2d586bd4691646d6f65e325cSettle Batch102205182020-06-07 19:14:03963 days 15 hrs ago0xbc1aa146978825df6cd6d7deb17a423c8ddb87fc IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.0019074516.9375
0x76a50ef4f59f656e4d932119b5b00923876e0f2e0fc5abdf1de809c5babbf15bSettle Batch101365762020-05-25 18:34:28976 days 15 hrs ago0x9a82997affa9ca03f3d6ad113464c5be70db134d IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.0029278826
0x19caff0b0e5ef505ae959bc4c2035c65a386756fe5ddcc7abb989380d2ed5973Settle Batch100851252020-05-17 18:08:01984 days 16 hrs ago0x9a82997affa9ca03f3d6ad113464c5be70db134d IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.0013625912.1
0x692e521ec0014d16d8541c1a4d06aa7490f57792ef062651df076bcfe2726917Settle Batch99967162020-05-04 1:28:00998 days 9 hrs ago0x9a82997affa9ca03f3d6ad113464c5be70db134d IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.000720746.4
0x443428d4753417a2e3dbd79b5d8ae5fba294140aa1afbdee07dbacfe35dca09aFund Taker99550392020-04-27 14:27:011004 days 20 hrs ago0x9544c6208452be5a63c662ad9a322fd54179d8f3 IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570.000035 Ether0.0005229113
0xbe039c963123b026767d84807235f8ff990e4e729acd7af7e561649322f926c6Settle Batch99550272020-04-27 14:22:491004 days 20 hrs ago0x9544c6208452be5a63c662ad9a322fd54179d8f3 IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.0011261710
0x094908ab918e15bb37ba99ef204511280d9e366d1a891677d2749f1856feb761Settle Batch99046752020-04-19 19:21:181012 days 15 hrs ago0x9544c6208452be5a63c662ad9a322fd54179d8f3 IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.000247752.2
0x2f833b192e78ddc140d807b21420ed041e26e0475ea1f1dede2aaa81951139c3Settle Batch98599232020-04-12 21:22:421019 days 13 hrs ago0xbc1aa146978825df6cd6d7deb17a423c8ddb87fc IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.000225232
0x883f7d80d489124ff6c6117256ef72e872241367246b4c4a390a48a04ccbbeaaSettle Batch98156992020-04-06 2:05:261026 days 8 hrs ago0xbc1aa146978825df6cd6d7deb17a423c8ddb87fc IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.000225232
0xee4f83102f63395a7d1a3a26592881d5601e5de459bb85171977d0e1f0b405b8Settle Batch97749502020-03-30 19:35:471032 days 14 hrs ago0xbc1aa146978825df6cd6d7deb17a423c8ddb87fc IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.000157661.4
0xe5fceaa2a60a381f21576be48814f61c3cf59c337b790ac02abc78d0657d2686Settle Batch97188142020-03-22 2:51:361041 days 7 hrs ago0xbc1aa146978825df6cd6d7deb17a423c8ddb87fc IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.000545064.84000023
0x2474c8f33c887642a53060171d544c875962e44018073795ba08452bc882dec9Settle Batch96779782020-03-15 19:23:321047 days 15 hrs ago0xbc1aa146978825df6cd6d7deb17a423c8ddb87fc IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570 Ether0.000102111
0xd71368922c8a8cf0cf1f9b052cd26e81c8005407ee33de7b4dadf3d10b241a8fTake96412462020-03-10 3:19:391053 days 7 hrs ago0x9544c6208452be5a63c662ad9a322fd54179d8f3 IN  0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570.000007 Ether0.001549896
0x342eb36ba91dc36847a2914a81d51e872da5665ab4d164274768caab4deed9f30x6080604096205842020-03-06 23:10:381056 days 11 hrs ago0x9a82997affa9ca03f3d6ad113464c5be70db134d IN  Contract Creation0 Ether0.004903681
[ Download CSV Export 
Latest 5 internal transactions
Parent Txn Hash Block From To Value
0x443428d4753417a2e3dbd79b5d8ae5fba294140aa1afbdee07dbacfe35dca09a99550392020-04-27 14:27:011004 days 20 hrs ago 0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a157 0xb0c368e4a865bdf805044648b3fe8cd1844ce1c10.000035 Ether
0xd71368922c8a8cf0cf1f9b052cd26e81c8005407ee33de7b4dadf3d10b241a8f96412462020-03-10 3:19:391053 days 7 hrs ago 0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a157 0xb0c368e4a865bdf805044648b3fe8cd1844ce1c10.000007 Ether
0x2bf77dc111e28e176581f120eaff47234f902e2c43fa28c3d34daa3026f420fe96412082020-03-10 3:11:391053 days 7 hrs ago 0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a157 0xb0c368e4a865bdf805044648b3fe8cd1844ce1c10.0001 Ether
0x2bf77dc111e28e176581f120eaff47234f902e2c43fa28c3d34daa3026f420fe96412082020-03-10 3:11:391053 days 7 hrs ago 0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a157  Contract Creation0 Ether
0x2bf77dc111e28e176581f120eaff47234f902e2c43fa28c3d34daa3026f420fe96412082020-03-10 3:11:391053 days 7 hrs ago 0x0f4f45f2edba03d4590bd27cf4fd62e91a2a2d6a 0xfa8b6f7f756745a38c9596222c1bfdbb4ba8a1570.0001 Ether
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xa4eb2d8a2221e8fff1d46f92cba1064dae647b47

Contract Name:
AssetSwap

Compiler Version
v0.6.3+commit.8dda9521

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity Multiple files format)

File 1 of 3: AssetSwap.sol
pragma solidity 0.6.3;

import "./Book.sol";
import "./Oracle.sol";

/**
MIT License
Copyright © 2020 Eric G. Falkenstein

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
 OR OTHER DEALINGS IN THE SOFTWARE.
*/

contract AssetSwap {

    constructor (address priceOracle, int _levRatio)
        public {
            administrators[msg.sender] = true;
            feeAddress = msg.sender;
            oracle = Oracle(priceOracle);
            levRatio = _levRatio;
        }

    Oracle public oracle;
    int[5][2] public assetReturns; /// these are pushed by the oracle each week
    int public levRatio;
    uint public lastOracleSettleTime; /// updates at time of oracle settlement.
    /// Used a lot so this is written to the contract
    mapping(address => address) public books;  /// LP eth address to book contract address
    mapping(address => uint) public assetSwapBalance;  /// how ETH is ultimately withdrawn
    mapping(address => bool) public administrators;  /// gives user right to key functions
    address payable public feeAddress;   /// address for oracle fees

    event SubkTracker(
        address indexed eLP,
        address indexed eTaker,
        bytes32 eSubkID,
        bool eisOpen);

    event BurnHist(
        address eLP,
        bytes32 eSubkID,
        address eBurner,
        uint eTime);

    event LPNewBook(
        address indexed eLP,
        address eLPBook);

    event RatesUpdated(
        address indexed eLP,
        uint8 closefee,
        int16 longFundingRate,
        int16 shortFundingRate
        );

    modifier onlyAdmin() {
        require(administrators[msg.sender], "admin only");
        _;
    }

    function removeAdmin(address toRemove)
        external
        onlyAdmin
    {
        require(toRemove != msg.sender, "You may not remove yourself as an admin.");
        administrators[toRemove] = false;
    }

    /** Grant administrator priviledges to a user
    * @param newAdmin the address to promote
    */
    function addAdmin(address newAdmin)
        external
        onlyAdmin
    {
        administrators[newAdmin] = true;
    }

    function adjustMinRM(uint16 _min)
        external
    {
        require(books[msg.sender] != address(0), "User must have a book");
        require(_min >= 1);
        Book b = Book(books[msg.sender]);
        b.adjustMinRMBook(_min);
    }

    /** data are input in basis points as a percent of national
    * thus 10 is 0.1% of notional, which when applied to the crypto
    * with 2.5 leverage, generates a 0.25% of RM charge. funding rates
    * can be negative, which implies the taker receives a payment.
    * if you change the fees so they can be greater than 2.5% of RM,
    * say X, you must adjustn the Oracle contract to have a maximum value of
    * 1 - X, so that player RM can cover every conceivable scenario
    */
    function updateFees(uint newClose, int frLong, int frShort)
        external
    {
        require(books[msg.sender] != address(0), "User must have a book");
        /// data are input as basis points of notional, adjusted to bps of RM to simplify calculations
        /// thus for the spx, the leverage ratio is 1000, and so dividing it by 1e2 gives 10
        /// Thus for the spx, a long rate of 0.21% per week, applied to the notional,
        /// is 2.1% per week applied to the RM
        int longRate = frLong * levRatio / 1e2;
        int shortRate = frShort * levRatio / 1e2;
        uint closefee = newClose * uint(levRatio) / 1e2;
        /// fees are capped to avoid predatory pricing that would potentially besmirch OracleSwap's reputation
        require(closefee <= 250);
        require(longRate <= 250 && longRate >= -250);
        require(shortRate <= 250 && shortRate >= -250);
        Book b = Book(books[msg.sender]);
        b.updateFeesBook(uint8(closefee), int16(longRate), int16(shortRate));
        emit RatesUpdated(msg.sender, uint8(closefee), int16(longRate), int16(shortRate));
    }

    function changeFeeAddress(address payable newAddress)
        external
        onlyAdmin
    {
        feeAddress = newAddress;
    }
    /** this is where money is sent from the Book contract to a player's account
    * the player can then withdraw this to their personal address
    */

    function balanceInput(address recipient)
            external
            payable
    {
        assetSwapBalance[recipient] += msg.value;
    }

    /** fees are in basis points of national, as in the case when updating the fees
    * minimum RM is in Szabo, so 4 would imply a minimum RM of 4 Szabo
    */
    function createBook(uint16 _min, uint _closefee, int frLong, int frShort)
        external
        payable
        returns (address newBook)
    {
        require(books[msg.sender] == address(0), "User must not have a preexisting book");
        require(msg.value >= uint(_min) * 10 szabo, "Must prep for book");
        require(_min >= 1);
        int16 longRate = int16(frLong * levRatio / 1e2);
        int16 shortRate = int16(frShort * levRatio / 1e2);
        uint8 closefee = uint8(_closefee * uint(levRatio) / 1e2);
        require(longRate <= 250 && longRate >= -250);
        require(shortRate <= 250 && shortRate >= -250);
        require(closefee <= 250);
        books[msg.sender] = address(new Book(msg.sender, address(this), _min, closefee, longRate, shortRate));
        Book b = Book(books[msg.sender]);
        b.fundLPBook.value(msg.value)();
        emit LPNewBook(msg.sender, books[msg.sender]);
        return books[msg.sender];
    }

    function fundLP(address _lp)
        external
        payable
    {
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        b.fundLPBook.value(msg.value)();
    }

    function fundTaker(address _lp, bytes32 subkID)
        external
        payable
        {
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        b.fundTakerBook.value(msg.value)(subkID);
    }

    function burnTaker(address _lp, bytes32 subkID)
        external
        payable
    {
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        uint refund = b.burnTakerBook(subkID, msg.sender, msg.value);
        emit BurnHist(_lp, subkID, msg.sender, now);
        assetSwapBalance[msg.sender] += refund;
    }

    function burnLP()
        external
        payable
    {
        require(books[msg.sender] != address(0));
        Book b = Book(books[msg.sender]);
        uint refund = b.burnLPBook(msg.value);
        bytes32 abcnull;
        emit BurnHist(msg.sender, abcnull, msg.sender, now);
        assetSwapBalance[msg.sender] += refund;
    }

    function cancel(address _lp, bytes32 subkID, bool closeNow)
        external
        payable
    {
        require(hourOfDay() != 16, "Cannot cancel during 4 PM ET hour");
        Book b = Book(books[_lp]);
        uint8 priceDay = oracle.getStartDay();
        uint8 endDay = 5;
        if (closeNow)
            endDay = priceDay;
        b.cancelBook.value(msg.value)(lastOracleSettleTime, subkID, msg.sender, endDay);
    }

    function closeBook(address _lp)
        external
        payable
    {
        require(msg.sender == _lp);
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        b.closeBookBook.value(msg.value)();
    }

    function redeem(address _lp, bytes32 subkID)
        external
    {
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        b.redeemBook(subkID, msg.sender);
        emit SubkTracker(_lp, msg.sender, subkID, false);
    }
      /** once started, this process requires a total of at least 4 separate executions.
      * Each execution is limited to processing 200 subcontracts to avoid gas limits, so if there
      * are more than 200 accounts in any step they will have to be executed multiple times
      * eg, 555 new accounts would require 3 executions of that step
      */

    function settleParts(address _lp)
        external
        returns (bool isComplete)
    {
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        uint lastBookSettleTime = b.lastBookSettleTime();
        require(now > (lastOracleSettleTime + 24 hours));
        require(lastOracleSettleTime > lastBookSettleTime, "one settle per week");
        uint settleNumb = b.settleNum();
        if (settleNumb < 1e4) {
            b.settleExpiring(assetReturns[1]);
        } else if (settleNumb < 2e4) {
            b.settleRolling(assetReturns[0][0]);
        } else if (settleNumb < 3e4) {
            b.settleNew(assetReturns[0]);
        } else if (settleNumb == 3e4) {
            b.settleFinal();
            isComplete = true;
        }
    }

    function settleBatch(address _lp)
        external
    {
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        uint lastBookSettleTime = b.lastBookSettleTime();
        require(now > (lastOracleSettleTime + 24 hours));
        require(lastOracleSettleTime > lastBookSettleTime, "one settle per week");
        /// the 5x1 vector of returns in units of szabo, where 0.6 is a +60% of RM payoff,
        /// -0.6 is a -60% of RM payoff. The refer to initial price days to settlement day
        b.settleExpiring(assetReturns[1]);
        /// this is the settle to settle return
        b.settleRolling(assetReturns[0][0]);
        /// this is the return from the last settlement day to the price day
        /// for regular closes, the price day == 5, so it is a settlement to settlement return
        b.settleNew(assetReturns[0]);
        b.settleFinal();
    }

    function take(address _lp, uint rm, bool isTakerLong)
        external
        payable
        returns (bytes32 newsubkID)
    {
        require(rm < 3, "above max size"); // This is to make this contract economically trivial
        /// a real contract would allow positions much greater than 2 szabos
        rm = rm * 1 szabo;
        require(msg.value >= 3 * rm / 2, "Insuffient ETH for your RM");
        require(hourOfDay() != 16, "Cannot take during 4 PM ET hour");

        uint takerLong;
        if (isTakerLong)
            takerLong = 1;
        else
            takerLong = 0;
        /// starting price is taken from the oracle contract based on what the next price day is
        uint8 priceDay = oracle.getStartDay();
        Book book = Book(books[_lp]);
        newsubkID = book.takeBook.value(msg.value)(msg.sender, rm, lastOracleSettleTime, priceDay, takerLong);
        emit SubkTracker(_lp, msg.sender, newsubkID, true);
    }

    /** withdraw amounts are in 1/1000 of the unit of denomination
    * Thus, 1234 is 1.234 Szabo
    */
    function withdrawLP(uint amount)
        external
    {
        require(amount > 0);
        require(books[msg.sender] != address(0));
        Book b = Book(books[msg.sender]);
        amount = 1e9 * amount;
        b.withdrawLPBook(amount, lastOracleSettleTime);
    }

    function withdrawTaker(uint amount, address _lp, bytes32 subkID)
        external
    {
        require(amount > 0);
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        amount = 1e9 * amount;
        b.withdrawTakerBook(subkID, amount, lastOracleSettleTime, msg.sender);
    }
    /// one can withdraw from one's assetSwap balance at any time. It can only send the entire amount

    function withdrawFromAssetSwap()
        external
    {
        uint amount = assetSwapBalance[msg.sender];
        require(amount > 0);
        assetSwapBalance[msg.sender] = 0;
        msg.sender.transfer(amount);
    }

    function inactiveOracle(address _lp)
        external
    {
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        b.inactiveOracleBook();
    }

    function inactiveLP(address _lp, bytes32 subkID)
        external
    {
        require(books[_lp] != address(0));
        Book b = Book(books[_lp]);
        b.inactiveLPBook(subkID, msg.sender, lastOracleSettleTime);
    }

    function getBookData(address _lp)
        external
        view
        returns (address book,
            // balances in wei
            uint lpMargin,
            uint totalLpLong,
            uint totalLpShort,
            uint lpRM,
            /// in Szabo
            uint bookMinimum,
            /// in basis points as a percent of RM
            /// to convert to notional, we multiply by the leverage ratio
            int16 longFundingRate,
            int16 shortFundingRate,
            uint8 lpCloseFee,
            /** 0 is fine, 1 means book cancels at next settlement
            * 2 means LP burned (which cancels the book at next settlement)
            * 3 book is inactive, no more settling or new positions
            */
            uint8 bookStatus
            )
    {
        book = books[_lp];
        if (book != address(0)) {
            Book b = Book(book);
            lpMargin = b.margin(0);
            totalLpLong = b.margin(1);
            totalLpShort = b.margin(2);
            lpRM = b.margin(3);
            bookMinimum = b.lpMinTakeRM();
            longFundingRate = b.fundingRates(1);
            shortFundingRate = b.fundingRates(0);
            lpCloseFee = b.bookCloseFee();
            bookStatus = b.bookStatus();
        }
    }

    function getSubkData1(address _lp, bytes32 subkID)
        external
        view
        returns (
            address taker,
            /// in wei
            uint takerMargin,
            uint reqMargin
            )
    {
        address book = books[_lp];
        if (book != address(0)) {
            Book b = Book(book);
            (taker, takerMargin, reqMargin) = b.getSubkData1Book(subkID);
        }
    }

    function getSubkData2(address _lp, bytes32 subkID)
        external
        view
        returns (
          /** 0 new, 1 active and rolled over, 2 taker cancelled, 3 LP cancelled,
          * 4 intraweek cancelled, 5 taker burned, 6 taker default/redeemable, 7 inactive/redeemable
          */
            uint8 subkStatus,
          /// for new and expiring subcontracts, either the start or end price that week
            uint8 priceDay,
          /** the LP's closing fee, in basis points as a percent of the RM. The total closing fee
          * is this plus 2.5% of RM, the oracle's fee
          */
            uint8 closeFee,
          /// the funding rate paid by the taker, which may be negative
            int16 fundingRate,
          /// true for taker is long (and thus LP is short)
            bool takerSide
            )
    {
        address book = books[_lp];
        if (book != address(0)) {
            Book b = Book(book);
            (subkStatus, priceDay, closeFee, fundingRate, takerSide)
                = b.getSubkData2Book(subkID);
        }
    }

    function getSettleInfo(address _lp)
        external
        view
        returns (
          /// total number of taker subcontracts, including new, rolled-over, cancelled, and inactive subcontracts
            uint totalLength,
          /// taker subcontracts that are expiring at next settlement
            uint expiringLength,
          /// taker subcontracts that have not yet settled. Such positions cannot be cancelled. The next week,
          /// they will be 'active', and cancelable.
            uint newLength,
          /// time of last book settlement, in seconds from 1970, Greenwich Mean Time
            uint lastBookSettleUTC,
          /// this is used for assessing the progress of a settlement when it is too large to be
          /// executed in batch.
            uint settleNumber,
          /// amount of ETH in the LP book
            uint bookBalance,
          /// an LP can close they book en masse, which would push the maturity of the book to 28 days after
          /// the close is instantiated. Takers should take note. A taker does not pay a cancel fee when
          /// the LP cancels their book, but they must then wait until the final settlement
            uint bookMaturityUTC
            )
    {
        address book = books[_lp];
        if (book != address(0)) {
            Book b = Book(book);
            (totalLength, expiringLength, newLength, lastBookSettleUTC, settleNumber,
                bookBalance, bookMaturityUTC) = b.getSettleInfoBook();
        }
    }

    /**
    * This gives the raw asset returns for all potential start and end dates: 5 different returns
    * for new positions (price day to settlement day), and 5 for expiring positions (last settlement to price day)
    * these are posted by the Oracle at the settlemnet price update.
    * They are in % return * Leverage Ratio times 1 Szabo,
    * this allows the books to simply apply these numbers to the RM of the various subcontracts to generate the
    * weekly PNL. They are capped at +/- 0.975e12 (the unit of account in this contract, szabo),
    * so that the extreme case of a maximum funding rate, the liability
    * is never greater than 1 Szabo. This effectively caps player liability at their RM
    */
    function updateReturns(int[5] memory assetRetNew, int[5] memory assetRetExp)
            public
        {
        require(msg.sender == address(oracle));
        assetReturns[0] = assetRetNew;
        assetReturns[1] = assetRetExp;
        lastOracleSettleTime = now;
    }

    function hourOfDay()
        public
        view
        returns(uint hour1)
    {
        uint nowTemp = now;
    /**
    * 2020 Summer, 1583668800 = March 8 2020 through 1604232000 = November 1 2020
    * 2021 Summer, 1615705200 = March 14 2021 through 1636264800 = November 7 2021
    * 2022 summer, 1647154800 = March 13 2022 through 1667714400 = November 6 2022
    * summer is Daylight Savings Time in the US, where the hour is GMT - 5 in New York City
    * winter is Standard Time in the US, where the hour is GMT - 4 in New York City
    * No takes from 4-5 PM NYC time, so hour == 16 is the exclusion time
    * hour1 takes the number of seconds in the day at this time (nowTemp % 86400),
    * and divideds by the number of seconds in an hour 3600
    */
        hour1 = (nowTemp % 86400) / 3600 - 5;
        if ((nowTemp > 1583668800 && nowTemp < 1604232000) || (nowTemp > 1615705200 && nowTemp < 1636264800) ||
            (nowTemp > 1647154800 && nowTemp < 1667714400))
            hour1 = hour1 + 1;
    }

    function subzero(uint _a, uint _b)
        internal
        pure
        returns (uint)
    {
        if (_b >= _a) {
            return 0;
        }
        return _a - _b;
    }


}

File 2 of 3: Book.sol
pragma solidity 0.6.3;

import "./AssetSwap.sol";

/**
MIT License
Copyright © 2020 Eric G. Falkenstein

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
 OR OTHER DEALINGS IN THE SOFTWARE.
*/

contract Book {

    constructor(address user, address admin, uint16 minReqMarg, uint8 closefee,
        int16 fundRateLong, int16 fundRateShort)
        public {
            assetSwap = AssetSwap(admin);
            lp = user;
            lpMinTakeRM = minReqMarg;
            lastBookSettleTime = now;
            bookCloseFee = closefee;
            fundingRates[0] = fundRateShort;
            fundingRates[1] = fundRateLong;
            bookEndTime = now + 1100 days;
        }

    address public lp;
    AssetSwap public assetSwap;
    /// 0 is actual or total margin, 1 is sum of LP's short takers
    /// 2 is sum of LP's long takers, 3 is the LP's required margin
    /// units an in wei, and refer to the RM, not the notional
    uint[4] public margin;
    uint public lastBookSettleTime;
    uint public burnFactor = 1 szabo;
    uint public settleNum;
    int public lpSettleDebitAcct;
    uint public bookEndTime;
    int16[2] public fundingRates;
    uint16 public lpMinTakeRM;
    uint8 public bookStatus;
    uint8 public bookCloseFee;
    bytes32[][2] public tempContracts;
    bytes32[] public takerContracts;
    mapping(bytes32 => Subcontract) public subcontracts;

    struct Subcontract {
        address taker;
        uint takerMargin;   /// in wei
        uint requiredMargin;     /// in wei
        uint16 index;
        int16 fundingRate;
        uint8 closeFee;
        uint8 subkStatus;
        uint8 priceDay;
        int8 takerSide; /// 1 if long, -1 if short
    }

    modifier onlyAdmin() {
        require(msg.sender == address(assetSwap));
        _;
    }

    function adjustMinRMBook(uint16 _min)
        external
        onlyAdmin
    {
        lpMinTakeRM = _min;
    }

    function updateFeesBook(uint8 newClose, int16 longRate, int16 shortRate)
        external
        onlyAdmin
    {
        fundingRates[0] = shortRate;
        fundingRates[1] = longRate;
        bookCloseFee = newClose;
    }

    function burnTakerBook(bytes32 subkID, address sender, uint msgval)
        external
        onlyAdmin
        returns (uint)
    {
        Subcontract storage k = subcontracts[subkID];
        require(sender == k.taker, "must by party to his subcontract");
        require(settleNum == 0, "not during settlement process");
        require(k.subkStatus < 5, "can only burn active subcontract");
        uint burnFee = k.requiredMargin / 2;
        require(msgval >= burnFee, "Insufficient burn fee");
        burnFee = subzero(msgval, burnFee);
        /** The taker's RM as a percent of the larger of the long or short
        * side is used to decrement the credits of those at the upcoming settlement
        * This prevents the burnFactor from going below zero. It is also the likely
        * side of oracle cheating, as otherwise this implies a greater loss
        * of future revenue relative to the cheat. Further, it implies the oracle
        * 'left money on the table' because it did not maximize its position. This assumption,
        * is not necessary for the incentive effect to work.
        */
        if (margin[1] > margin[2]) {
            burnFactor = subzero(burnFactor, 1 szabo * k.requiredMargin / margin[1]);
        } else {
            burnFactor = subzero(burnFactor, 1 szabo * k.requiredMargin / margin[2]);
        }
        k.subkStatus = 5;
        return burnFee;
    }

    function burnLPBook(uint msgval)
        external
        onlyAdmin
        returns (uint)
    {
        require(bookStatus != 2, "can only burn once");
        /// burn fee is 50% of RM
        uint burnFee = margin[3] / 2;
        require(msgval >= burnFee, "Insufficient burn fee");
        burnFee = subzero(msgval, burnFee);
        /** The entire LP RM as a percent of the larger of the long or short
        * side is used to decrement the credits of those at the upcoming settlement
        */
        if (margin[2] > margin[1]) {
            burnFactor = subzero(burnFactor, 1 szabo * margin[3] / margin[2]);
        } else {
            burnFactor = subzero(burnFactor, 1 szabo * margin[3] / margin[1]);
        }
        bookStatus = 2;
        return burnFee;
    }

    function cancelBook(uint lastOracleSettle, bytes32 subkID, address sender, uint8 _endDay)
        external
        payable
        onlyAdmin
    {
        Subcontract storage k = subcontracts[subkID];
        require(lastOracleSettle < lastBookSettleTime, "Cannot do during settle period");
        require(sender == k.taker || sender == lp, "Canceller not LP or taker");
        /// checks to see if subk already cancelled, as otherwise redundant
        require(k.subkStatus == 1, "redundant or too new");
        uint feeOracle = 250 * k.requiredMargin / 1e4;
        /// users sends enough to cover the maximum cancel fee.
        /// Cancel fee less than the maximum is just sent to the taker's margin account
        require(msg.value >= (2 * feeOracle), "Insufficient cancel fee");
        uint feeLP = uint(k.closeFee) * k.requiredMargin / 1e4;
        if (bookEndTime < (now + 28 days)) {
            feeLP = 0;
            feeOracle = 0;
        }
        if (sender == k.taker && _endDay == 5) {
            k.subkStatus = 2;  /// regular taker cancel
        } else if (sender == k.taker) {
            require(k.requiredMargin < subzero(margin[0], margin[3]), "Insuff LP RM for immed cancel");
            feeLP = feeOracle;  /// close fee is now max close fee, overriding initial close fee
            k.subkStatus = 4;  /// immediate taker cancel
            k.priceDay = _endDay;  /// this is the end-day of the subcontract's last week
        } else {
            feeOracle = 2 * feeOracle;
            feeLP = subzero(msg.value, feeOracle); /// this is really a refund to the LP, not a fee
            k.subkStatus = 3;  /// LP cancel
        }
        balanceSend(feeOracle, assetSwap.feeAddress());
        tempContracts[1].push(subkID);  /// sets this up to settle as an expiring subcontract
        margin[0] += feeLP;
        k.takerMargin += subzero(msg.value, feeLP + feeOracle);
    }

    function fundLPBook()
        external
        onlyAdmin
        payable
    {
        margin[0] += msg.value;
    }

    function fundTakerBook(bytes32 subkID)
        external
        onlyAdmin
        payable
    {
        Subcontract storage k = subcontracts[subkID];
        require(k.subkStatus < 2);
        k.takerMargin += msg.value;
    }

    function closeBookBook()
        external
        payable
        onlyAdmin
    { /// pays the close fee on the larger side of her book
        uint feeOracle = 250 * (margin[1] + margin[2] - min(margin[1], margin[2])) / 1e4;
        require(msg.value >= feeOracle, "Insufficient cancel fee");
        uint feeOverpay = msg.value - feeOracle;
        balanceSend(feeOracle, assetSwap.feeAddress());
        if (now > bookEndTime)
        /// this means the next settlement ends this book's activity
            bookStatus = 1;
        else
        /// if initial, needs to be run again in 28 days to complete the shut down
            bookEndTime = now + 28 days;
        margin[0] += feeOverpay;
    }

    /**
    *We only need look at when the last book settlement because
    * if the LP was at fault, someone could have inactivatedthe LP
    * and received a reward. Thus, the only scenario where a book
    * can be active and the LP not inactivated, is when the oracle has been
    * absent for a week
    */
    function inactiveOracleBook()
        external
        onlyAdmin
        {
        require(now > (lastBookSettleTime + 10 days));
        bookStatus = 3;
    }

    /** if the book was not settled, the LP is held accountable
     * the first counterparty to execute this function will then get a bonus credit of their RM from  *the LP
     * if the LP's total margin is zero, they will get whatever is there
     * after the book is in default all players can redeem their subcontracts
     * After a book is in default, this cannot be executed
     */
    function inactiveLPBook(bytes32 subkID, address sender, uint _lastOracleSettle)
        external
        onlyAdmin
    {

        require(bookStatus != 3);
        Subcontract storage k = subcontracts[subkID];
        require(k.taker == sender);
        require(_lastOracleSettle > lastBookSettleTime);
        require(subzero(now, _lastOracleSettle) > 48 hours);
        uint lpDefFee = min(margin[0], margin[3] / 2);
        margin[0] = subzero(margin[0], lpDefFee);
        margin[3] = 0;
        bookStatus = 3;
        /// annoying, but at least someone good get the negligent LP's money
        k.takerMargin += lpDefFee;
    }

    function redeemBook(bytes32 subkid, address sender)
        external
        onlyAdmin
    {
        Subcontract storage k = subcontracts[subkid];
        require(k.subkStatus > 5 || bookStatus == 3);
        /// redemption can happen if the subcontract has defaulted subkStatus = 6, is inactive subkStatus = 7
        /// or if the book is inactive (bookStatus == 3)
        uint tMargin = k.takerMargin;
        k.takerMargin = 0;
        uint16 index = k.index;
        /// iff the taker defaulted on an active book, they are penalized by
        /// burning RM/2 of their margin
        bool isDefaulted = (k.subkStatus == 6 && bookStatus == 0);
        uint defPay = k.requiredMargin / 2;
        uint lpPayment;
        address tAddress = k.taker;
        /// this pays the lp for the gas and effort of redeeming for the taker
        /// The investor should now see their margin in the
        /// assetSwapBalance, and withdraw from there. It is not meant to generate
        /// LP profit, just pay them for the inconvenience and gas
        if (sender == lp) {
            lpPayment = tMargin - subzero(tMargin, 2e9);
            tMargin -= lpPayment;
            margin[0] += lpPayment;
        }
        /// this pays the lp for the gas and effort of redeeming for the taker
        /// it's just 2 finney. The investor should now see their margin in the
        /// assetSwapBalance, and withdraw from there
        /** we have to pop the takerLong/Short lists to free up space
        * this involves this little trick, moving the last row to the row we are
        * redeeming and writing it over the redeemed subcontract
        * then we remove the duplicate.
        */
        Subcontract storage lastTaker = subcontracts[takerContracts[takerContracts.length - 1]];
        lastTaker.index = index;
        takerContracts[index] = takerContracts[takerContracts.length - 1];
        takerContracts.pop();
        delete subcontracts[subkid];
        // we only take what is there. It goes to the oracle, so if he's a cheater, you can punish
        /// him more by withholding this payment as well as the fraudulent PNL. If he's not a cheater
        /// then you are just negligent for defaulting and probably were not paying attention, as
        /// you should have know you couldn't cure your margin Friday afternoon before close.
        if (isDefaulted) {
            tMargin = subzero(tMargin, defPay);
            balanceSend(defPay, assetSwap.feeAddress());
        }
        /// money is sent to AssetSwapContract
        balanceSend(tMargin, tAddress);

    }

    /** Settle the rolled over taker sukcontracts
    * @param assetRet the returns for a long contract for a taker for only one
    * start day, as they are all starting on the prior settlement price
    */
    function settleRolling(int assetRet)
        external
        onlyAdmin
    {
        require(settleNum < 2e4, "done with rolling settle");
        int takerRetTemp;
        int lpTemp;
        /// the first settlement function set the settleNum = 1e4, so that is subtracted to
        /// see where we are in the total number of takers in the LP's book
        uint loopCap = min(settleNum - 1e4 + 250, takerContracts.length);
        for (uint i = (settleNum - 1e4); i < loopCap; i++) {
            Subcontract storage k = subcontracts[takerContracts[i]];
            if (k.subkStatus == 1) {
                takerRetTemp = int(k.takerSide) * assetRet * int(k.requiredMargin) / 1
                szabo - (int(k.fundingRate) * int(k.requiredMargin) / 1e4);
                lpTemp = lpTemp - takerRetTemp;
                if (takerRetTemp < 0) {
                    k.takerMargin = subzero(k.takerMargin, uint(-takerRetTemp));
                } else {
                    k.takerMargin += uint(takerRetTemp) * burnFactor / 1 szabo;
                }
                if (k.takerMargin < k.requiredMargin) {
                    k.subkStatus = 6;
                    if (k.takerSide == 1)
                        margin[2] = subzero(margin[2], k.requiredMargin);
                    else
                        margin[1] = subzero(margin[1], k.requiredMargin);
                }
            }
        }
        settleNum += 250;
        if ((settleNum - 1e4) >= takerContracts.length)
            settleNum = 2e4;
        lpSettleDebitAcct += lpTemp;
    }

    /// this is the fourth and the final of the settlement functions
    function settleFinal()
        external
        onlyAdmin
    {
        require(settleNum == 3e4, "not done with all the subcontracts");
        /// this take absolute value of (long - short) to update the LP's RM
        if (margin[2] > margin[1])
            margin[3] = margin[2] - margin[1];
        else
            margin[3] = margin[1] - margin[2];
        if (lpSettleDebitAcct < 0)
            margin[0] = subzero(margin[0], uint(-lpSettleDebitAcct));
        else
        /// if the lpSettleDebitAcct is positive, we add it, but first apply the burnFactor
        /// to remove the burner's pnl in a pro-rata way
            margin[0] = margin[0] + uint(lpSettleDebitAcct) * burnFactor / 1 szabo;
        if (bookStatus != 0) {
            bookStatus = 3;
            margin[3] = 0;
        } else if (margin[0] < margin[3]) {
            // default scenario for LP
            bookStatus = 3;
            uint defPay = min(margin[0], margin[3] / 2);
            margin[0] = subzero(margin[0], defPay);
            balanceSend(defPay, assetSwap.feeAddress());
            margin[3] = 0;
        }
        // resets for our next book settlement
        lpSettleDebitAcct = 0;
        lastBookSettleTime = now;
        settleNum = 0;
        delete tempContracts[1];
        delete tempContracts[0];
        burnFactor = 1 szabo;
    }

    /** Create a new Taker long subcontract of the given parameters
    * @param taker the address of the party on the other side of the contract
    * @param rM the Szabo amount in the required margin
    * isTakerLong is +1 if taker is long, 0 if taker is short
    * @return subkID the id of the newly created subcontract
    */
    function takeBook(address taker, uint rM, uint lastOracleSettle, uint8 _priceDay, uint isTakerLong)
        external
        payable
        onlyAdmin
        returns (bytes32 subkID)
    {
        require(bookStatus == 0, "book no longer taking positions");

        require((now + 28 days) < bookEndTime, "book closing soon");
        require(rM >= uint(lpMinTakeRM) * 1 szabo, "must be greater than book min");
        require(lastOracleSettle < lastBookSettleTime, "Cannot do during settle period");
        require(takerContracts.length < 4000, "book is full");
        uint availableMargin = subzero(margin[0] / 2 + margin[2 - isTakerLong], margin[1 + isTakerLong]);
        require(rM <= availableMargin && (margin[0] - margin[3]) > rM);
        require(rM <= availableMargin);
        margin[1 + isTakerLong] += rM;
        Subcontract memory order;
        order.requiredMargin = rM;
        order.takerMargin = msg.value;
        order.taker = taker;
        order.takerSide = int8(2 * isTakerLong - 1);
        margin[3] += rM;
        subkID = keccak256(abi.encodePacked(now, takerContracts.length));
        order.index = uint16(takerContracts.length);
        order.priceDay = _priceDay;
        order.fundingRate = fundingRates[isTakerLong];
        order.closeFee = bookCloseFee;
        subcontracts[subkID] = order;
        takerContracts.push(subkID);
        tempContracts[0].push(subkID);
        return subkID;
    }

    /** Withdrawing margin
    * reverts if during the settle period, oracleSettleTime > book settle time
    * also must leave total margin greater than the required margin
    */
    function withdrawLPBook(uint amount, uint lastOracleSettle)
        external
        onlyAdmin
    {
        require(margin[0] >= amount, "Cannot withdraw more than the margin");
         // if book is dead LP can take everything left, if not dead, can only take up to RM
        if (bookStatus != 3) {
            require(subzero(margin[0], amount) >= margin[3], "Cannot w/d more than excess margin");
            require(lastOracleSettle < lastBookSettleTime, "Cannot w/d during settle period");
        }
        margin[0] = subzero(margin[0], amount);
        balanceSend(amount, lp);
    }

    function withdrawTakerBook(bytes32 subkID, uint amount, uint lastOracleSettle, address sender)
        external
        onlyAdmin
    {
        require(lastOracleSettle < lastBookSettleTime, "Cannot w/d during settle period");
        Subcontract storage k = subcontracts[subkID];
        require(k.subkStatus < 6, "subk dead, must redeem");
        require(sender == k.taker, "Must be taker to call this function");
        require(subzero(k.takerMargin, amount) >= k.requiredMargin, "cannot w/d more than excess margin");
        k.takerMargin = subzero(k.takerMargin, amount);
        balanceSend(amount, k.taker);
    }

    function getSubkData1Book(bytes32 subkID)
        external
        view
        returns (address takerAddress, uint takerMargin, uint requiredMargin)
    {   Subcontract memory k = subcontracts[subkID];
        takerAddress = k.taker;
        takerMargin = k.takerMargin;
        requiredMargin = k.requiredMargin;
    }

    function getSubkData2Book(bytes32 subkID)
        external
        view
        returns (uint8 kStatus, uint8 priceDay, uint8 closeFee, int16 fundingRate, bool takerSide)
    {   Subcontract memory k = subcontracts[subkID];
        kStatus = k.subkStatus;
        priceDay = k.priceDay;
        closeFee = k.closeFee;
        fundingRate = k.fundingRate;
        if (k.takerSide == 1)
            takerSide = true;
    }

    function getSettleInfoBook()
        external
        view
        returns (uint totalLength, uint expiringLength, uint newLength, uint lastBookSettleUTC, uint settleNumber,
            uint bookBalance, uint bookMaturityUTC)
    {
        totalLength = takerContracts.length;
        expiringLength = tempContracts[1].length;
        newLength = tempContracts[0].length;
        lastBookSettleUTC = lastBookSettleTime;
        settleNumber = settleNum;
        bookMaturityUTC = bookEndTime;
        bookBalance = address(this).balance;
    }

    /** Settle the taker long sukcontracts
    * priceDay Expiring returns use the return from the last settle to the priceDay, which
    * for regular cancels is just 5, the most recent settlement price
    * this is the first of 4 settlement functions
    * */
    function settleExpiring(int[5] memory assetRetExp)
        public
        onlyAdmin
        {
        require(bookStatus != 3 && settleNum < 1e4, "done with expiry settle");
        int takerRetTemp;
        int lpTemp;
        uint loopCap = min(settleNum + 200, tempContracts[1].length);
        for (uint i = settleNum; i < loopCap; i++) {
            Subcontract storage k = subcontracts[tempContracts[1][i]];
            takerRetTemp = int(k.takerSide) * assetRetExp[k.priceDay - 1] * int(k.requiredMargin) / 1 szabo -
            (int(k.fundingRate) * int(k.requiredMargin) / 1e4);
            lpTemp -= takerRetTemp;
            if (takerRetTemp < 0) {
                k.takerMargin = subzero(k.takerMargin, uint(-takerRetTemp));
            } else {
                k.takerMargin += uint(takerRetTemp) * burnFactor / 1 szabo;
            }
            if (k.takerSide == 1)
                margin[2] = subzero(margin[2], k.requiredMargin);
            else
                margin[1] = subzero(margin[1], k.requiredMargin);
            k.subkStatus = 7;
        }
        settleNum += 200;
        if (settleNum >= tempContracts[1].length)
            settleNum = 1e4;
        lpSettleDebitAcct += lpTemp;
    }

    /// this is the third of the settlement functions
    function settleNew(int[5] memory assetRets)
        public
        onlyAdmin
    {
        require(settleNum < 3e4, "done with new settle");
        int takerRetTemp;
        int lpTemp;
        /// after running the second settlement function, settleRolling, it is set to 2e4
        uint loopCap = min(settleNum - 2e4 + 200, tempContracts[0].length);
        for (uint i = (settleNum - 2e4); i < loopCap; i++) {
            Subcontract storage k = subcontracts[tempContracts[0][i]];
            /// subkStatus set to 'active' which means it can be cancelled
            /// it will also be settled in the settleRolling if not cancelled
            /// using the more efficient settlement that uses just one return, from last to most recent settlement
            k.subkStatus = 1;
            if (k.priceDay != 5) {
                takerRetTemp = int(k.takerSide) * assetRets[k.priceDay] * int(k.requiredMargin) / 1
                szabo - (int(k.fundingRate) * int(k.requiredMargin) / 1e4);
                lpTemp = lpTemp - takerRetTemp;
                if (takerRetTemp < 0) {
                    k.takerMargin = subzero(k.takerMargin, uint(-takerRetTemp));
                } else {
                    k.takerMargin += uint(takerRetTemp) * burnFactor / 1 szabo;
                }
                if (k.takerMargin < k.requiredMargin) {
                    k.subkStatus = 6;
                    if (k.takerSide == 1)
                        margin[2] = subzero(margin[2], k.requiredMargin);
                    else
                        margin[1] = subzero(margin[1], k.requiredMargin);
                }
                k.priceDay = 5;
            }
        }
        settleNum += 200;
        if (settleNum >= tempContracts[0].length)
            settleNum = 3e4;
        lpSettleDebitAcct += lpTemp;
    }

    /// Function to send balances back to the Assetswap contract
    function balanceSend(uint amount, address recipient)
        internal
    {
        assetSwap.balanceInput.value(amount)(recipient);
    }

    /** Utility function to find the minimum of two unsigned values
    * @notice returns the first parameter if they are equal
    */
    function min(uint a, uint b)
        internal
        pure
        returns (uint)
    {
        if (a <= b)
            return a;
        else
            return b;
    }

    function subzero(uint _a, uint _b)
        internal
        pure
        returns (uint)
    {
        if (_b >= _a)
            return 0;
        else
            return _a - _b;
    }


}

File 3 of 3: Oracle.sol
pragma solidity 0.6.3;

import "./AssetSwap.sol";

/**
MIT License
Copyright © 2020 Eric G. Falkenstein

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
 OR OTHER DEALINGS IN THE SOFTWARE.
*/

contract Oracle {

    constructor (uint ethPrice, uint spxPrice, uint btcPrice) public {
        admins[msg.sender] = true;
        prices[0][5] = ethPrice;
        prices[1][5] = spxPrice;
        prices[2][5] = btcPrice;
        lastUpdateTime = now;
        lastSettleTime = now;
        currentDay = 5;
        levRatio[0] = 250;  // ETH contract 2.5 leverage
        levRatio[1] = 1000; /// SPX contract 10.0 leverage
        levRatio[2] = 250;  // BTC contract 2.5 leverage
    }

    address[3] public assetSwaps;
    uint[6][3] private prices;
    uint public lastUpdateTime;
    uint public lastSettleTime;
    int[3] public levRatio;
    uint8 public currentDay;
    bool public nextUpdateSettle;
    mapping(address => bool) public admins;
    mapping(address => bool) public readers;

    event PriceUpdated(
        uint ethPrice,
        uint spxPrice,
        uint btcPrice,
        uint eUTCTime,
        uint eDayNumber,
        bool eisCorrection
    );

    event AssetSwapContractsChange(
        address ethSwapContract,
        address spxSwapContract,
        address btcSwapContract
    );

    event ChangeReaderStatus(
        address reader,
        bool onOrOff
    );

    modifier onlyAdmin() {
        require(admins[msg.sender]);
        _;
    }
    /** Grant write priviledges to a user,
    * mainly intended for when the admin wants to switch accounts, ie, paired with a removal
    */

    function addAdmin(address newAdmin)
        external
        onlyAdmin
    {
        admins[newAdmin] = true;
    }

    function removeAdmin(address toRemove)
            external
            onlyAdmin
    {
        require(toRemove != msg.sender);
        admins[toRemove] = false;
    }
    /** Grant priviledges to a user accessing price data on the blockchain
    * @param newReader the address. Any reader is thus approved by the oracle/admin
    * useful for new contracts that  use this oracle, in that the oracle would not
    * need to create a new oracle contract for ETH prices
    */

    function addReaders(address newReader)
        external
        onlyAdmin
    {
        readers[newReader] = true;
        emit ChangeReaderStatus(newReader, true);
    }

    function removeReaders(address oldReader)
        external
        onlyAdmin
    {
        readers[oldReader] = false;
        emit ChangeReaderStatus(oldReader, false);
    }
    /** this can only be done once, so this oracle is solely for working with
    * three AssetSwap contracts
    * assetswap 0 is the ETH, at 2.5 leverage
    * assetswap 1 is the SPX, at 10x leverage
    * assetswap 2 is the BTC, at 2.5 leverage
    *
    */

    function changeAssetSwaps(address newAS0, address newAS1, address newAS2)
        external
        onlyAdmin
    {
        require(now > lastSettleTime && now < lastSettleTime + 1 days, "only 1 day after settle");
        assetSwaps[0] = newAS0;
        assetSwaps[1] = newAS1;
        assetSwaps[2] = newAS2;
        readers[newAS0] = true;
        readers[newAS1] = true;
        readers[newAS2] = true;
        emit AssetSwapContractsChange(newAS0, newAS1, newAS2);
    }
    /** Quickly fix an erroneous price, or correct the fact that 50% movements are
    * not allowed in the standard price input
    * this must be called within 60 minutes of the initial price update occurence
    */

    function editPrice(uint _ethprice, uint _spxprice, uint _btcprice)
        external
        onlyAdmin
    {
        require(now < lastUpdateTime + 60 minutes);
        prices[0][currentDay] = _ethprice;
        prices[1][currentDay] = _spxprice;
        prices[2][currentDay] = _btcprice;
        emit PriceUpdated(_ethprice, _spxprice, _btcprice, now, currentDay, true);
    }

    function updatePrices(uint ethp, uint spxp, uint btcp, bool _newFinalDay)
        external
        onlyAdmin
    {

             /// no updates within 20 hours of last update
        require(now > lastUpdateTime + 20 hours);
            /** can't be executed if the next price should be a settlement price
            * settlement prices are special because they need to update the asset returns
            * and sent to the AssetSwap contracts
            */
        require(!nextUpdateSettle);
         /// after settlement update, at least 48 hours until new prices are posted
        require(now > lastSettleTime + 48 hours, "too soon after last settle");
          /// prevents faulty prices, as stale prices are a common source of bad prices.
        require(ethp != prices[0][currentDay] && spxp != prices[1][currentDay] && btcp != prices[2][currentDay]);
            /// extreme price movements are probably mistakes. They can be posted
          /// but only via a 'price edit' that must be done within 60 minutes of the initial update
          /// many errors generate inputs off by orders of magnitude, which imply returns of >100% or <-90%
        require((ethp * 10 < prices[0][currentDay] * 15) && (ethp * 10 > prices[0][currentDay] * 5));
        require((spxp * 10 < prices[1][currentDay] * 15) && (spxp * 10 > prices[1][currentDay] * 5));
        require((btcp * 10 < prices[2][currentDay] * 15) && (btcp * 10 > prices[2][currentDay] * 5));
        if (currentDay == 5) {
            currentDay = 1;
        } else {
            currentDay += 1;
            nextUpdateSettle = _newFinalDay;
        }
        if (currentDay == 4)
            nextUpdateSettle = true;
        updatePriceSingle(0, ethp);
        updatePriceSingle(1, spxp);
        updatePriceSingle(2, btcp);
        emit PriceUpdated(ethp, spxp, btcp, now, currentDay, false);
        lastUpdateTime = now;
    }

    function settlePrice(uint ethp, uint spxp, uint btcp)
        external
        onlyAdmin
    {
        require(nextUpdateSettle);
        require(now > lastUpdateTime + 20 hours);
        require(ethp != prices[0][currentDay] && spxp != prices[1][currentDay] && btcp != prices[2][currentDay]);
        require((ethp * 10 < prices[0][currentDay] * 15) && (ethp * 10 > prices[0][currentDay] * 5));
        require((spxp * 10 < prices[1][currentDay] * 15) && (spxp * 10 > prices[1][currentDay] * 5));
        require((btcp * 10 < prices[2][currentDay] * 15) && (btcp * 10 > prices[2][currentDay] * 5));
        currentDay = 5;
        nextUpdateSettle = false;
        updatePriceSingle(0, ethp);
        updatePriceSingle(1, spxp);
        updatePriceSingle(2, btcp);
        int[5] memory assetReturnsNew;
        int[5] memory assetReturnsExpiring;
        int cap = 975 * 1 szabo / 1000;
        for (uint j = 0; j < 3; j++) {
                  /**  asset return from start day j to settle day (ie, day 5),
                  * and also the prior settle day (day 0) to the end day.
                  * returns are normalized from 0.975 szabo to - 0.975 szabo
                  * where 0.9 szabo is a 90% of RM profit for the long taker,
                  * 0.2 szabo means a 20% of RM profit for the long taker.
                  */
            for (uint i = 0; i < 5; i++) {
                if (prices[0][i] != 0) {
                    int assetRetFwd = int(prices[j][5] * 1 szabo / prices[j][i]) - 1 szabo;
                    assetReturnsNew[i] = assetRetFwd * int(prices[0][i]) * levRatio[j] /
                        int(prices[0][5]) / 100;
                /** as funding rates are maxed out at 2.5% of RM, the return must
                * max out at 97.5% of RM so that required margins cover all
                * potential payment scenarios
                */
                    assetReturnsNew[i] = bound(assetReturnsNew[i], cap);
                }
                if (prices[0][i+1] != 0) {
                    int assetRetBack = int(prices[j][i+1] * 1 szabo / prices[j][0]) - 1 szabo;
                    assetReturnsExpiring[i] = assetRetBack * int(prices[0][0]) * levRatio[j] /
                        int(prices[0][i+1]) / 100;

                    assetReturnsExpiring[i] = bound(assetReturnsExpiring[i], cap);
                }
            }
    /// this updates the AssetSwap contract with the vector of returns,
    /// one for each day of the week
            AssetSwap asw = AssetSwap(assetSwaps[j]);
            asw.updateReturns(assetReturnsNew, assetReturnsExpiring);
        }
        lastSettleTime = now;
        emit PriceUpdated(ethp, spxp, btcp, now, currentDay, false);
        lastUpdateTime = now;
    }
    /** Return the entire current price array for a given asset
    * @param _assetID the asset id of the desired asset
    * @return _priceHist the price array in USD for the asset
    * @dev only the admin and addresses granted readership may call this function
    * While only an admin or reader can access this within the EVM
    * anyone can access these prices outside the EVM
    * eg, in javascript: OracleAddress.methods.getUsdPrices.cacheCall(0, { 'from': 'AdminAddress' }
    */

    function getUsdPrices(uint _assetID)
        public
        view
        returns (uint[6] memory _priceHist)
    {
        require(admins[msg.sender] || readers[msg.sender]);
        _priceHist = prices[_assetID];
    }

        /** Return only the latest prices
        * @param _assetID the asset id of the desired asset
        * @return _price the latest price of the given asset
        * @dev only the admin or a designated reader may call this function within the EVM
        */
    function getCurrentPrice(uint _assetID)
        public
        view
        returns (uint _price)
    {
        require(admins[msg.sender] || readers[msg.sender]);
        _price = prices[_assetID][currentDay];
    }

    /**
    * @return _startDay relevant for trades done now
    * pulls the day relevant for new AssetSwap subcontracts
    * startDay 2 means the 2 slot (ie, the third) of prices will be the initial
    * price for the subcontract. As 5 is the top slot, and rolls into slot 0
    * the next week, the next pricing day is 1 when the current day == 5
    * (this would be a weekend or Monday morning)
    */
    function getStartDay()
        public
        view
        returns (uint8 _startDay)
    {
        if (nextUpdateSettle) {
            _startDay = 5;
        } else if (currentDay == 5) {
            _startDay = 1;
        } else {
            _startDay = currentDay + 1;
        }
    }

    function updatePriceSingle(uint _assetID, uint _price)
        internal
    {
        if (currentDay == 1) {
            uint[6] memory newPrices;
            newPrices[0] = prices[_assetID][5];
            newPrices[1] = _price;
            prices[_assetID] = newPrices;
        } else {
            prices[_assetID][currentDay] = _price;
        }
    }

    function bound(int a, int b)
        internal
        pure
        returns (int)
    {
        if (a > b)
            a = b;
        if (a < -b)
            a = -b;
        return a;
    }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"priceOracle","type":"address"},{"internalType":"int256","name":"_levRatio","type":"int256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"eLP","type":"address"},{"indexed":false,"internalType":"bytes32","name":"eSubkID","type":"bytes32"},{"indexed":false,"internalType":"address","name":"eBurner","type":"address"},{"indexed":false,"internalType":"uint256","name":"eTime","type":"uint256"}],"name":"BurnHist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"eLP","type":"address"},{"indexed":false,"internalType":"address","name":"eLPBook","type":"address"}],"name":"LPNewBook","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"eLP","type":"address"},{"indexed":false,"internalType":"uint8","name":"closefee","type":"uint8"},{"indexed":false,"internalType":"int16","name":"longFundingRate","type":"int16"},{"indexed":false,"internalType":"int16","name":"shortFundingRate","type":"int16"}],"name":"RatesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"eLP","type":"address"},{"indexed":true,"internalType":"address","name":"eTaker","type":"address"},{"indexed":false,"internalType":"bytes32","name":"eSubkID","type":"bytes32"},{"indexed":false,"internalType":"bool","name":"eisOpen","type":"bool"}],"name":"SubkTracker","type":"event"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_min","type":"uint16"}],"name":"adjustMinRM","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"administrators","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"assetReturns","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetSwapBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"balanceInput","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"books","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"burnLP","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"bytes32","name":"subkID","type":"bytes32"}],"name":"burnTaker","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"bytes32","name":"subkID","type":"bytes32"},{"internalType":"bool","name":"closeNow","type":"bool"}],"name":"cancel","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newAddress","type":"address"}],"name":"changeFeeAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"closeBook","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_min","type":"uint16"},{"internalType":"uint256","name":"_closefee","type":"uint256"},{"internalType":"int256","name":"frLong","type":"int256"},{"internalType":"int256","name":"frShort","type":"int256"}],"name":"createBook","outputs":[{"internalType":"address","name":"newBook","type":"address"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"feeAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"fundLP","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"bytes32","name":"subkID","type":"bytes32"}],"name":"fundTaker","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"getBookData","outputs":[{"internalType":"address","name":"book","type":"address"},{"internalType":"uint256","name":"lpMargin","type":"uint256"},{"internalType":"uint256","name":"totalLpLong","type":"uint256"},{"internalType":"uint256","name":"totalLpShort","type":"uint256"},{"internalType":"uint256","name":"lpRM","type":"uint256"},{"internalType":"uint256","name":"bookMinimum","type":"uint256"},{"internalType":"int16","name":"longFundingRate","type":"int16"},{"internalType":"int16","name":"shortFundingRate","type":"int16"},{"internalType":"uint8","name":"lpCloseFee","type":"uint8"},{"internalType":"uint8","name":"bookStatus","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"getSettleInfo","outputs":[{"internalType":"uint256","name":"totalLength","type":"uint256"},{"internalType":"uint256","name":"expiringLength","type":"uint256"},{"internalType":"uint256","name":"newLength","type":"uint256"},{"internalType":"uint256","name":"lastBookSettleUTC","type":"uint256"},{"internalType":"uint256","name":"settleNumber","type":"uint256"},{"internalType":"uint256","name":"bookBalance","type":"uint256"},{"internalType":"uint256","name":"bookMaturityUTC","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"bytes32","name":"subkID","type":"bytes32"}],"name":"getSubkData1","outputs":[{"internalType":"address","name":"taker","type":"address"},{"internalType":"uint256","name":"takerMargin","type":"uint256"},{"internalType":"uint256","name":"reqMargin","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"bytes32","name":"subkID","type":"bytes32"}],"name":"getSubkData2","outputs":[{"internalType":"uint8","name":"subkStatus","type":"uint8"},{"internalType":"uint8","name":"priceDay","type":"uint8"},{"internalType":"uint8","name":"closeFee","type":"uint8"},{"internalType":"int16","name":"fundingRate","type":"int16"},{"internalType":"bool","name":"takerSide","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hourOfDay","outputs":[{"internalType":"uint256","name":"hour1","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"bytes32","name":"subkID","type":"bytes32"}],"name":"inactiveLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"inactiveOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lastOracleSettleTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"levRatio","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oracle","outputs":[{"internalType":"contract Oracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"bytes32","name":"subkID","type":"bytes32"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"toRemove","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"settleBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"}],"name":"settleParts","outputs":[{"internalType":"bool","name":"isComplete","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_lp","type":"address"},{"internalType":"uint256","name":"rm","type":"uint256"},{"internalType":"bool","name":"isTakerLong","type":"bool"}],"name":"take","outputs":[{"internalType":"bytes32","name":"newsubkID","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newClose","type":"uint256"},{"internalType":"int256","name":"frLong","type":"int256"},{"internalType":"int256","name":"frShort","type":"int256"}],"name":"updateFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256[5]","name":"assetRetNew","type":"int256[5]"},{"internalType":"int256[5]","name":"assetRetExp","type":"int256[5]"}],"name":"updateReturns","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFromAssetSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawLP","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"_lp","type":"address"},{"internalType":"bytes32","name":"subkID","type":"bytes32"}],"name":"withdrawTaker","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516156d33803806156d38339818101604052604081101561003357600080fd5b508051602091820151336000818152600f90945260408420805460ff19166001179055601080546001600160a01b0319908116909217905583546001600160a01b03909316921691909117909155600b55615640806100936000396000f3fe60806040526004361061020f5760003560e01c80637345b10b11610118578063c85c8925116100a0578063e1dcb1f91161006f578063e1dcb1f91461089b578063e4456ecb146108cb578063e9011c0e146108f5578063ff3f161e14610923578063ffd9881b146109495761020f565b8063c85c89251461078f578063ca1e455d146107c8578063d27c7bdb146107fc578063d6ccc19f146108675761020f565b80639482cb5d116100e75780639482cb5d146106c25780639e02b3c8146106ee5780639fab3d4b14610721578063af24608d14610747578063c5aebe931461077a5761020f565b80637345b10b1461063257806374eb1e5f1461064757806376be15851461067a5780637dc0d1d0146106ad5761020f565b8063412753581161019b578063618674191161016a578063618674191461051a5780636453ef76146105535780636dd8a2e9146105685780636ebeebd8146105c957806370480275146105ff5761020f565b806341275358146103d257806344d78bc3146103e75780635eec2b161461045b5780635f1e8134146104e75761020f565b80631acbd5fb116101e25780631acbd5fb146102d7578063285e1406146102fd57806329ca356f146103305780632fdd7df314610357578063362f5fab146103a65761020f565b806301105fe9146102145780630b45260e1461025b57806316065017146102655780631785f53c146102a4575b600080fd5b34801561022057600080fd5b506102476004803603602081101561023757600080fd5b50356001600160a01b03166109e8565b604080519115158252519081900360200190f35b610263610ccb565b005b34801561027157600080fd5b506102636004803603606081101561028857600080fd5b508035906001600160a01b036020820135169060400135610dda565b3480156102b057600080fd5b50610263600480360360208110156102c757600080fd5b50356001600160a01b0316610ea1565b610263600480360360208110156102ed57600080fd5b50356001600160a01b0316610f5b565b34801561030957600080fd5b506102636004803603602081101561032057600080fd5b50356001600160a01b0316610fee565b34801561033c57600080fd5b50610345611061565b60408051918252519081900360200190f35b61038a6004803603608081101561036d57600080fd5b5061ffff8135169060208101359060408101359060600135611067565b604080516001600160a01b039092168252519081900360200190f35b610263600480360360408110156103bc57600080fd5b506001600160a01b03813516906020013561131b565b3480156103de57600080fd5b5061038a611398565b3480156103f357600080fd5b506104206004803603604081101561040a57600080fd5b506001600160a01b0381351690602001356113a7565b6040805160ff968716815294861660208601529290941683830152600190810b900b6060830152911515608082015290519081900360a00190f35b34801561046757600080fd5b50610263600480360361014081101561047f57600080fd5b810190808060a001906005806020026040519081016040528092919082600560200280828437600092019190915250506040805160a0818101909252929594938181019392509060059083908390808284376000920191909152509194506114779350505050565b3480156104f357600080fd5b506102636004803603602081101561050a57600080fd5b50356001600160a01b03166114b2565b34801561052657600080fd5b506102636004803603604081101561053d57600080fd5b506001600160a01b03813516906020013561173f565b34801561055f57600080fd5b506102636117cb565b34801561057457600080fd5b506105a16004803603604081101561058b57600080fd5b506001600160a01b038135169060200135611824565b604080516001600160a01b039094168452602084019290925282820152519081900360600190f35b3480156105d557600080fd5b50610263600480360360608110156105ec57600080fd5b50803590602081013590604001356118de565b34801561060b57600080fd5b506102636004803603602081101561062257600080fd5b50356001600160a01b0316611a9c565b34801561063e57600080fd5b50610345611b11565b34801561065357600080fd5b5061038a6004803603602081101561066a57600080fd5b50356001600160a01b0316611b81565b34801561068657600080fd5b506102476004803603602081101561069d57600080fd5b50356001600160a01b0316611b9c565b3480156106b957600080fd5b5061038a611bb1565b610263600480360360408110156106d857600080fd5b506001600160a01b038135169060200135611bc0565b3480156106fa57600080fd5b506103456004803603602081101561071157600080fd5b50356001600160a01b0316611ce2565b6102636004803603602081101561073757600080fd5b50356001600160a01b0316611cf4565b34801561075357600080fd5b506102636004803603602081101561076a57600080fd5b50356001600160a01b0316611d7f565b34801561078657600080fd5b50610345611e0f565b34801561079b57600080fd5b50610263600480360360408110156107b257600080fd5b506001600160a01b038135169060200135611e15565b610345600480360360608110156107de57600080fd5b506001600160a01b0381351690602081013590604001351515611efb565b34801561080857600080fd5b5061082f6004803603602081101561081f57600080fd5b50356001600160a01b0316612198565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b6102636004803603606081101561087d57600080fd5b506001600160a01b0381351690602081013590604001351515612271565b3480156108a757600080fd5b50610345600480360360408110156108be57600080fd5b50803590602001356123cd565b3480156108d757600080fd5b50610263600480360360208110156108ee57600080fd5b50356123f2565b34801561090157600080fd5b506102636004803603602081101561091857600080fd5b503561ffff1661248e565b6102636004803603602081101561093957600080fd5b50356001600160a01b0316612559565b34801561095557600080fd5b5061097c6004803603602081101561096c57600080fd5b50356001600160a01b0316612578565b604080516001600160a01b03909b168b5260208b0199909952898901979097526060890195909552608088019390935260a0870191909152600190810b810b60c087015290810b900b60e085015260ff9081166101008501521661012083015251908190036101400190f35b6001600160a01b038181166000908152600d6020526040812054909116610a0e57600080fd5b6001600160a01b038083166000908152600d60209081526040808320548151637ce6d97b60e11b81529151941693849263f9cdb2f69260048082019391829003018186803b158015610a5f57600080fd5b505afa158015610a73573d6000803e3d6000fd5b505050506040513d6020811015610a8957600080fd5b5051600c5490915062015180014211610aa157600080fd5b80600c5411610aed576040805162461bcd60e51b81526020600482015260136024820152726f6e6520736574746c6520706572207765656b60681b604482015290519081900360640190fd5b6000826001600160a01b03166315acdf756040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2857600080fd5b505afa158015610b3c573d6000803e3d6000fd5b505050506040513d6020811015610b5257600080fd5b50519050612710811015610bea576001600160a01b03831663e130ce666001805b600502016040518263ffffffff1660e01b8152600401808260058015610bae576020028201915b815481526020019060010190808311610b9a575b5050915050600060405180830381600087803b158015610bcd57600080fd5b505af1158015610be1573d6000803e3d6000fd5b50505050610cc3565b614e20811015610c3f5760015460408051630a438ba760e31b81526004810192909252516001600160a01b0385169163521c5d3891602480830192600092919082900301818387803b158015610bcd57600080fd5b617530811015610c61576001600160a01b03831663095631be60016000610b73565b806175301415610cc357826001600160a01b031663fecdab0c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610ca657600080fd5b505af1158015610cba573d6000803e3d6000fd5b50505050600193505b505050919050565b336000908152600d60205260409020546001600160a01b0316610ced57600080fd5b336000908152600d6020908152604080832054815163dd6bf02960e01b815234600482015291516001600160a01b039091169392849263dd6bf029926024808301939282900301818787803b158015610d4557600080fd5b505af1158015610d59573d6000803e3d6000fd5b505050506040513d6020811015610d6f57600080fd5b5051604080513380825260006020830181905282840191909152426060830152915192935090917f53e95741f975a89642a68aaf1407e6a03f4dd08d162e255f9fe3c44d9f3b7b6b9181900360800190a150336000908152600e602052604090208054909101905550565b60008311610de757600080fd5b6001600160a01b038281166000908152600d602052604090205416610e0b57600080fd5b6001600160a01b038083166000908152600d602052604080822054600c54825163c7ebf63b60e01b815260048101879052633b9aca0090980260248901819052604489019190915233606489015291519196931692839263c7ebf63b9260848084019382900301818387803b158015610e8357600080fd5b505af1158015610e97573d6000803e3d6000fd5b5050505050505050565b336000908152600f602052604090205460ff16610ef2576040805162461bcd60e51b815260206004820152600a60248201526961646d696e206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b038116331415610f3a5760405162461bcd60e51b81526004018080602001828103825260288152602001806155c26028913960400191505060405180910390fd5b6001600160a01b03166000908152600f60205260409020805460ff19169055565b6001600160a01b038181166000908152600d602052604090205416610f7f57600080fd5b6001600160a01b038082166000908152600d602052604080822054815163465c887b60e11b815291519316928392638cb910f69234926004808301939282900301818588803b158015610fd157600080fd5b505af1158015610fe5573d6000803e3d6000fd5b50505050505050565b336000908152600f602052604090205460ff1661103f576040805162461bcd60e51b815260206004820152600a60248201526961646d696e206f6e6c7960b01b604482015290519081900360640190fd5b601080546001600160a01b0319166001600160a01b0392909216919091179055565b600b5481565b336000908152600d60205260408120546001600160a01b0316156110bc5760405162461bcd60e51b815260040180806020018281038252602581526020018061559d6025913960400191505060405180910390fd5b8461ffff166509184e72a00002341015611112576040805162461bcd60e51b81526020600482015260126024820152714d757374207072657020666f7220626f6f6b60701b604482015290519081900360640190fd5b60018561ffff16101561112457600080fd5b60006064600b5485028161113457fe5b05905060006064600b5485028161114757fe5b05905060006064600b5488028161115a57fe5b04905060fa8360010b13158015611176575060f9198360010b12155b61117f57600080fd5b60fa8260010b13158015611198575060f9198260010b12155b6111a157600080fd5b60fa8160ff1611156111b257600080fd5b3330898386866040516111c4906129d3565b6001600160a01b03968716815294909516602085015261ffff90921660408085019190915260ff9091166060840152600191820b820b608084015292810b900b60a082015290519081900360c001906000f080158015611228573d6000803e3d6000fd5b50336000908152600d602052604080822080546001600160a01b0319166001600160a01b039485161790819055815163465c887b60e11b815291519316928392638cb910f69234926004808301939282900301818588803b15801561128c57600080fd5b505af11580156112a0573d6000803e3d6000fd5b5050336000818152600d60209081526040918290205482516001600160a01b03909116815291519295507f154a3febc7352b7a16989452e69bce933ff107f46528b680800f75b0d64b826d945090829003019150a25050336000908152600d60205260409020546001600160a01b0316979650505050505050565b6001600160a01b038281166000908152600d60205260409020541661133f57600080fd5b6001600160a01b038083166000908152600d602052604080822054815163ac462c4b60e01b8152600481018690529151931692839263ac462c4b9234926024808301939282900301818588803b158015610e8357600080fd5b6010546001600160a01b031681565b6001600160a01b038083166000908152600d60205260408120549091829182918291829116801561146c576000819050806001600160a01b03166335c4479f896040518263ffffffff1660e01b81526004018082815260200191505060a06040518083038186803b15801561141b57600080fd5b505afa15801561142f573d6000803e3d6000fd5b505050506040513d60a081101561144557600080fd5b508051602082015160408301516060840151608090940151929a5090985096509094509250505b509295509295909350565b6000546001600160a01b0316331461148e57600080fd5b61149b60018360056129e0565b506114a960068260056129e0565b505042600c5550565b6001600160a01b038181166000908152600d6020526040902054166114d657600080fd5b6001600160a01b038082166000908152600d60209081526040808320548151637ce6d97b60e11b81529151941693849263f9cdb2f69260048082019391829003018186803b15801561152757600080fd5b505afa15801561153b573d6000803e3d6000fd5b505050506040513d602081101561155157600080fd5b5051600c549091506201518001421161156957600080fd5b80600c54116115b5576040805162461bcd60e51b81526020600482015260136024820152726f6e6520736574746c6520706572207765656b60681b604482015290519081900360640190fd5b604051637098673360e11b81526001600160a01b0383169063e130ce6690600690600481019060a40182825b8154815260200190600101908083116115e1575050915050600060405180830381600087803b15801561161357600080fd5b505af1158015611627573d6000803e3d6000fd5b505060015460408051630a438ba760e31b81526004810192909252516001600160a01b038616935063521c5d389250602480830192600092919082900301818387803b15801561167657600080fd5b505af115801561168a573d6000803e3d6000fd5b50506040516304ab18df60e11b81526001600160a01b038516925063095631be9150600190600481019060a40182825b8154815260200190600101908083116116ba575050915050600060405180830381600087803b1580156116ec57600080fd5b505af1158015611700573d6000803e3d6000fd5b50505050816001600160a01b031663fecdab0c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610fd157600080fd5b6001600160a01b038281166000908152600d60205260409020541661176357600080fd5b6001600160a01b038083166000908152600d602052604080822054600c54825163985438c560e01b81526004810187905233602482015260448101919091529151931692839263985438c5926064808201939182900301818387803b158015610fd157600080fd5b336000908152600e6020526040902054806117e557600080fd5b336000818152600e60205260408082208290555183156108fc0291849190818181858888f19350505050158015611820573d6000803e3d6000fd5b5050565b6001600160a01b038083166000908152600d60205260408120549091829182911680156118d6576000819050806001600160a01b0316638d164065876040518263ffffffff1660e01b81526004018082815260200191505060606040518083038186803b15801561189457600080fd5b505afa1580156118a8573d6000803e3d6000fd5b505050506040513d60608110156118be57600080fd5b50805160208201516040909201519096509094509250505b509250925092565b336000908152600d60205260409020546001600160a01b0316611940576040805162461bcd60e51b815260206004820152601560248201527455736572206d7573742068617665206120626f6f6b60581b604482015290519081900360640190fd5b60006064600b5484028161195057fe5b05905060006064600b5484028161196357fe5b05905060006064600b5487028161197657fe5b04905060fa81111561198757600080fd5b60fa831315801561199a575060f9198312155b6119a357600080fd5b60fa82131580156119b6575060f9198212155b6119bf57600080fd5b336000908152600d6020526040808220548151630f2845bd60e41b815260ff85166004820152600187810b810b602483015286810b900b604482015291516001600160a01b0390911692839263f2845bd0926064808301939282900301818387803b158015611a2d57600080fd5b505af1158015611a41573d6000803e3d6000fd5b50506040805160ff86168152600188810b810b602083015287810b900b8183015290513393507f17af015e3d17a025a2d3738280301a9420b0a6cce0bfc4c99c72adb381967df792509081900360600190a250505050505050565b336000908152600f602052604090205460ff16611aed576040805162461bcd60e51b815260206004820152600a60248201526961646d696e206f6e6c7960b01b604482015290519081900360640190fd5b6001600160a01b03166000908152600f60205260409020805460ff19166001179055565b6000426005610e1062015180830604039150635e64de4081118015611b395750635f9ea34081105b80611b55575063604db47081118015611b5557506361876b6081105b80611b71575063622d967081118015611b7157506363674d6081105b15611b7d578160010191505b5090565b600d602052600090815260409020546001600160a01b031681565b600f6020526000908152604090205460ff1681565b6000546001600160a01b031681565b6001600160a01b038281166000908152600d602052604090205416611be457600080fd5b6001600160a01b038083166000908152600d6020908152604080832054815163f6afd84d60e01b8152600481018790523360248201523460448201529151941693849263f6afd84d926064808201939182900301818787803b158015611c4957600080fd5b505af1158015611c5d573d6000803e3d6000fd5b505050506040513d6020811015611c7357600080fd5b5051604080516001600160a01b038716815260208101869052338183015242606082015290519192507f53e95741f975a89642a68aaf1407e6a03f4dd08d162e255f9fe3c44d9f3b7b6b919081900360800190a1336000908152600e6020526040902080549091019055505050565b600e6020526000908152604090205481565b336001600160a01b03821614611d0957600080fd5b6001600160a01b038181166000908152600d602052604090205416611d2d57600080fd5b6001600160a01b038082166000908152600d6020526040808220548151630f9de42f60e31b815291519316928392637cef21789234926004808301939282900301818588803b158015610fd157600080fd5b6001600160a01b038181166000908152600d602052604090205416611da357600080fd5b6001600160a01b038082166000908152600d602052604080822054815163673a03b560e11b81529151931692839263ce74076a926004808201939182900301818387803b158015611df357600080fd5b505af1158015611e07573d6000803e3d6000fd5b505050505050565b600c5481565b6001600160a01b038281166000908152600d602052604090205416611e3957600080fd5b6001600160a01b038083166000908152600d60205260408082205481516329c1c91b60e11b815260048101869052336024820152915193169283926353839236926044808201939182900301818387803b158015611e9657600080fd5b505af1158015611eaa573d6000803e3d6000fd5b5050604080518581526000602082015281513394506001600160a01b03881693507f9f814fb693360988c5219264a7d37e9a5fef9d9de4b4a43677bb415c5f91bd7b929181900390910190a3505050565b600060038310611f43576040805162461bcd60e51b815260206004820152600e60248201526d61626f7665206d61782073697a6560901b604482015290519081900360640190fd5b64e8d4a510008302926002906502ba7def30000204341015611fac576040805162461bcd60e51b815260206004820152601a60248201527f496e7375666669656e742045544820666f7220796f757220524d000000000000604482015290519081900360640190fd5b611fb4611b11565b60101415612009576040805162461bcd60e51b815260206004820152601f60248201527f43616e6e6f742074616b6520647572696e67203420504d20455420686f757200604482015290519081900360640190fd5b600082156120195750600161201d565b5060005b60008060009054906101000a90046001600160a01b03166001600160a01b031663ff4dfa516040518163ffffffff1660e01b815260040160206040518083038186803b15801561206c57600080fd5b505afa158015612080573d6000803e3d6000fd5b505050506040513d602081101561209657600080fd5b50516001600160a01b038088166000908152600d602090815260409182902054600c54835163aad1e2ed60e01b8152336004820152602481018c9052604481019190915260ff8616606482015260848101889052925194955090921692839263aad1e2ed92349260a4808301939282900301818588803b15801561211957600080fd5b505af115801561212d573d6000803e3d6000fd5b50505050506040513d602081101561214457600080fd5b50516040805182815260016020820152815192965033926001600160a01b038b16927f9f814fb693360988c5219264a7d37e9a5fef9d9de4b4a43677bb415c5f91bd7b928290030190a35050509392505050565b6001600160a01b038082166000908152600d60205260408120549091829182918291829182918291168015612265576000819050806001600160a01b0316634b3437ba6040518163ffffffff1660e01b815260040160e06040518083038186803b15801561220557600080fd5b505afa158015612219573d6000803e3d6000fd5b505050506040513d60e081101561222f57600080fd5b508051602082015160408301516060840151608085015160a086015160c090960151949e50929c50909a50985096509094509250505b50919395979092949650565b612279611b11565b601014156122b85760405162461bcd60e51b81526004018080602001828103825260218152602001806155ea6021913960400191505060405180910390fd5b6001600160a01b038084166000908152600d602090815260408083205483548251600162b205af60e01b03198152925191861695169263ff4dfa519260048082019391829003018186803b15801561230f57600080fd5b505afa158015612323573d6000803e3d6000fd5b505050506040513d602081101561233957600080fd5b50519050600583156123485750805b600c5460408051632f0e225160e01b815260048101929092526024820187905233604483015260ff83166064830152516001600160a01b03851691632f0e225191349160848082019260009290919082900301818588803b1580156123ac57600080fd5b505af11580156123c0573d6000803e3d6000fd5b5050505050505050505050565b600182600281106123da57fe5b6005020181600581106123e957fe5b01549150829050565b600081116123ff57600080fd5b336000908152600d60205260409020546001600160a01b031661242157600080fd5b336000908152600d602052604080822054600c548251632e1033cf60e11b8152633b9aca00909502600486018190526024860191909152915191936001600160a01b0391909116928392635c20679e92604480820193929182900301818387803b158015611df357600080fd5b336000908152600d60205260409020546001600160a01b03166124f0576040805162461bcd60e51b815260206004820152601560248201527455736572206d7573742068617665206120626f6f6b60581b604482015290519081900360640190fd5b60018161ffff16101561250257600080fd5b336000908152600d6020526040808220548151626dcb2760e11b815261ffff8516600482015291516001600160a01b0390911692839262db964e926024808301939282900301818387803b158015611df357600080fd5b6001600160a01b03166000908152600e60205260409020805434019055565b6001600160a01b038082166000908152600d602052604081205490911690808080808080808089156129c65760008a9050806001600160a01b03166345f2968660006040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156125ee57600080fd5b505afa158015612602573d6000803e3d6000fd5b505050506040513d602081101561261857600080fd5b5051604080516322f94b4360e11b8152600160048201529051919b506001600160a01b038316916345f2968691602480820192602092909190829003018186803b15801561266557600080fd5b505afa158015612679573d6000803e3d6000fd5b505050506040513d602081101561268f57600080fd5b5051604080516322f94b4360e11b8152600260048201529051919a506001600160a01b038316916345f2968691602480820192602092909190829003018186803b1580156126dc57600080fd5b505afa1580156126f0573d6000803e3d6000fd5b505050506040513d602081101561270657600080fd5b5051604080516322f94b4360e11b81526003600482015290519199506001600160a01b038316916345f2968691602480820192602092909190829003018186803b15801561275357600080fd5b505afa158015612767573d6000803e3d6000fd5b505050506040513d602081101561277d57600080fd5b50516040805163328b8fd560e21b815290519198506001600160a01b0383169163ca2e3f5491600480820192602092909190829003018186803b1580156127c357600080fd5b505afa1580156127d7573d6000803e3d6000fd5b505050506040513d60208110156127ed57600080fd5b5051604080516319ff274560e31b815260016004820152905161ffff90921697506001600160a01b0383169163cff93a2891602480820192602092909190829003018186803b15801561283f57600080fd5b505afa158015612853573d6000803e3d6000fd5b505050506040513d602081101561286957600080fd5b5051604080516319ff274560e31b81526000600482015290519196506001600160a01b0383169163cff93a2891602480820192602092909190829003018186803b1580156128b657600080fd5b505afa1580156128ca573d6000803e3d6000fd5b505050506040513d60208110156128e057600080fd5b505160408051632313771160e01b815290519195506001600160a01b03831691632313771191600480820192602092909190829003018186803b15801561292657600080fd5b505afa15801561293a573d6000803e3d6000fd5b505050506040513d602081101561295057600080fd5b5051604080516306aea6a160e21b815290519194506001600160a01b03831691631aba9a8491600480820192602092909190829003018186803b15801561299657600080fd5b505afa1580156129aa573d6000803e3d6000fd5b505050506040513d60208110156129c057600080fd5b50519150505b9193959799509193959799565b612b6b80612a3283390190565b8260058101928215612a0e579160200282015b82811115612a0e5782518255916020019190600101906129f3565b50611b7d92612a2e9250905b80821115611b7d5760008155600101612a1a565b9056fe608060405264e8d4a5100060075534801561001957600080fd5b50604051612b6b380380612b6b833981810160405260c081101561003c57600080fd5b508051602082015160408301516060840151608085015160a090950151600180546001600160a01b039586166001600160a01b031991821617825560008054969097169516949094178555600c805442600681905560ff90941663010000000263ff0000001961ffff96871661ffff19938416171617909155600b805497860b8516620100000263ffff0000199390960b909416961695909517949094169190911790556305aa3200909101600a55612a709081906100fb90396000f3fe60806040526004361061020e5760003560e01c80638d16406511610118578063ce74076a116100a0578063e130ce661161006f578063e130ce6614610817578063f2845bd014610876578063f6afd84d146108b6578063f9cdb2f6146108f5578063fecdab0c1461090a5761020e565b8063ce74076a1461076b578063cff93a2814610780578063d4dbfd31146107c3578063dd6bf029146107ed5761020e565b8063b1b71afa116100e7578063b1b71afa146106a0578063b769c441146106b5578063c12016fb146106ca578063c7ebf63b146106fa578063ca2e3f541461073f5761020e565b80638d164065146105b1578063985438c514610603578063aad1e2ed14610642578063ac462c4b146106835761020e565b806345f296861161019b578063538392361161016a57806353839236146105235780635c20679e1461055c5780636c734d3e1461058c5780637cef2178146105a15780638cb910f6146105a95761020e565b806345f296861461046d5780634a66aa2a146104975780634b3437ba146104ac578063521c5d38146104f95761020e565b80631d95807c116101e25780631d95807c146102f457806323137711146103875780632f0e22511461039c578063313c06a0146103d757806335c4479f146104085761020e565b8062db964e14610213578063095631be1461024357806315acdf75146102a25780631aba9a84146102c9575b600080fd5b34801561021f57600080fd5b506102416004803603602081101561023657600080fd5b503561ffff1661091f565b005b34801561024f57600080fd5b50610241600480360360a081101561026657600080fd5b810190808060a00190600580602002604051908101604052809291908260056020028082843760009201919091525091945061094e9350505050565b3480156102ae57600080fd5b506102b7610ba0565b60408051918252519081900360200190f35b3480156102d557600080fd5b506102de610ba6565b6040805160ff9092168252519081900360200190f35b34801561030057600080fd5b5061031e6004803603602081101561031757600080fd5b5035610bb5565b604080516001600160a01b03909a168a5260208a01989098528888019690965261ffff9094166060880152600192830b90920b608087015260ff90811660a087015290811660c08601521660e0840152600090810b900b61010083015251908190036101200190f35b34801561039357600080fd5b506102de610c23565b610241600480360360808110156103b257600080fd5b5080359060208101359060408101356001600160a01b0316906060013560ff16610c33565b3480156103e357600080fd5b506103ec611019565b604080516001600160a01b039092168252519081900360200190f35b34801561041457600080fd5b506104326004803603602081101561042b57600080fd5b5035611028565b6040805160ff968716815294861660208601529290941683830152600190810b900b6060830152911515608082015290519081900360a00190f35b34801561047957600080fd5b506102b76004803603602081101561049057600080fd5b5035611107565b3480156104a357600080fd5b506102b761111b565b3480156104b857600080fd5b506104c1611121565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b34801561050557600080fd5b506102416004803603602081101561051c57600080fd5b5035611142565b34801561052f57600080fd5b506102416004803603604081101561054657600080fd5b50803590602001356001600160a01b031661134c565b34801561056857600080fd5b506102416004803603604081101561057f57600080fd5b5080359060200135611599565b34801561059857600080fd5b506102b76116d2565b6102416116d8565b6102416117ff565b3480156105bd57600080fd5b506105db600480360360208110156105d457600080fd5b5035611820565b604080516001600160a01b039094168452602084019290925282820152519081900360600190f35b34801561060f57600080fd5b506102416004803603606081101561062657600080fd5b508035906001600160a01b0360208201351690604001356118de565b6102b7600480360360a081101561065857600080fd5b506001600160a01b038135169060208101359060408101359060ff60608201351690608001356119af565b6102416004803603602081101561069957600080fd5b5035611df8565b3480156106ac57600080fd5b506102b7611e45565b3480156106c157600080fd5b506103ec611e4b565b3480156106d657600080fd5b506102b7600480360360408110156106ed57600080fd5b5080359060200135611e5a565b34801561070657600080fd5b506102416004803603608081101561071d57600080fd5b50803590602081013590604081013590606001356001600160a01b0316611e88565b34801561074b57600080fd5b5061075461202b565b6040805161ffff9092168252519081900360200190f35b34801561077757600080fd5b50610241612035565b34801561078c57600080fd5b506107aa600480360360208110156107a357600080fd5b5035612072565b60408051600192830b90920b8252519081900360200190f35b3480156107cf57600080fd5b506102b7600480360360208110156107e657600080fd5b503561209c565b3480156107f957600080fd5b506102b76004803603602081101561081057600080fd5b50356120ba565b34801561082357600080fd5b50610241600480360360a081101561083a57600080fd5b810190808060a0019060058060200260405190810160405280929190826005602002808284376000920191909152509194506121ef9350505050565b34801561088257600080fd5b506102416004803603606081101561089957600080fd5b5060ff813516906020810135600190810b9160400135900b612419565b3480156108c257600080fd5b506102b7600480360360608110156108d957600080fd5b508035906001600160a01b036020820135169060400135612483565b34801561090157600080fd5b506102b761269b565b34801561091657600080fd5b506102416126a1565b6001546001600160a01b0316331461093657600080fd5b600c805461ffff191661ffff92909216919091179055565b6001546001600160a01b0316331461096557600080fd5b617530600854106109b4576040805162461bcd60e51b8152602060048201526014602482015273646f6e652077697468206e657720736574746c6560601b604482015290519081900360640190fd5b600854600090819081906109d290614d571901600d835b015461285b565b600854909150614e1f19015b81811015610b77576000601081600d810184815481106109fa57fe5b60009182526020808320909101548352820192909252604001902060038101805460ff60281b1916600160281b1790819055909150600160301b900460ff16600514610b6e5760028101546003820154612710620100008204600190810b900b8302059164e8d4a51000918990600160301b900460ff1660058110610a7b57fe5b60200201516003850154600160381b9004600090810b900b020281610a9c57fe5b0503945084840393506000851215610ac957610abf816001015486600003612874565b6001820155610aeb565b64e8d4a51000600754860281610adb57fe5b6001830180549290910490910190555b806002015481600101541015610b555760038101805460ff60281b1916650600000000001790819055600160381b9004600090810b900b60011415610b4557610b3d6002805b01548260020154612874565b600455610b55565b610b5160026001610b31565b6003555b60038101805460ff60301b191666050000000000001790555b506001016109de565b506008805460c80190819055600d5411610b92576175306008555b506009805490910190555050565b60085481565b600c5462010000900460ff1681565b6010602052600090815260408120805460018083015460028401546003909401546001600160a01b039093169490939261ffff811692620100008204900b9160ff6401000000008304811692600160281b8104821692600160301b820490921691600160381b909104900b89565b600c546301000000900460ff1681565b6001546001600160a01b03163314610c4a57600080fd5b60008381526010602052604090206006548510610cae576040805162461bcd60e51b815260206004820152601e60248201527f43616e6e6f7420646f20647572696e6720736574746c6520706572696f640000604482015290519081900360640190fd5b80546001600160a01b0384811691161480610cd657506000546001600160a01b038481169116145b610d27576040805162461bcd60e51b815260206004820152601960248201527f43616e63656c6c6572206e6f74204c50206f722074616b657200000000000000604482015290519081900360640190fd5b6003810154600160281b900460ff16600114610d81576040805162461bcd60e51b8152602060048201526014602482015273726564756e64616e74206f7220746f6f206e657760601b604482015290519081900360640190fd5b6000612710826002015460fa0281610d9557fe5b04905080600202341015610dea576040805162461bcd60e51b8152602060048201526017602482015276496e73756666696369656e742063616e63656c2066656560481b604482015290519081900360640190fd5b6002820154600383015460009161271091640100000000900460ff1602049050426224ea0001600a541015610e20575060009050805b82546001600160a01b038681169116148015610e3f57508360ff166005145b15610e605760038301805460ff60281b191665020000000000179055610f38565b82546001600160a01b0386811691161415610f0e5760028054610e879160035b0154612874565b836002015410610ede576040805162461bcd60e51b815260206004820152601d60248201527f496e73756666204c5020524d20666f7220696d6d65642063616e63656c000000604482015290519081900360640190fd5b5060038201805460ff60281b1916650400000000001760ff60301b1916600160301b60ff86160217905580610f38565b816002029150610f1e3483612874565b60038401805460ff60281b19166503000000000017905590505b610fbb82600160009054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8a57600080fd5b505afa158015610f9e573d6000803e3d6000fd5b505050506040513d6020811015610fb457600080fd5b505161288e565b600e80546001810182556000919091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd01869055600280548201905561100434838301612874565b60019093018054909301909255505050505050565b6000546001600160a01b031681565b60008060008060006110386128ff565b50600086815260106020908152604080832081516101208101835281546001600160a01b03168152600180830154948201949094526002820154928101929092526003015461ffff81166060830152620100008104830b830b830b6080830181905260ff6401000000008304811660a08501819052600160281b8404821660c08601819052600160301b850490921660e08601819052600160381b909404870b870b870b6101008601819052919b50929950919750955090920b14156110fd57600191505b5091939590929450565b6002816004811061111457fe5b0154905081565b600a5481565b600f54600e54600d54600654600854600a5494959394929391929091479190565b6001546001600160a01b0316331461115957600080fd5b614e20600854106111b1576040805162461bcd60e51b815260206004820152601860248201527f646f6e65207769746820726f6c6c696e6720736574746c650000000000000000604482015290519081900360640190fd5b60008060006111ce6127106008540360fa01600f8054905061285b565b60085490915061270f19015b8181101561131d57600060106000600f84815481106111f557fe5b9060005260206000200154815260200190815260200160002090508060030160059054906101000a900460ff1660ff16600114156113145760028101546003820154612710620100008204600190810b900b8302059164e8d4a5100091600160381b9004600090810b900b890202050394508484039350600085121561129057611286816001015486600003612874565b60018201556112b2565b64e8d4a510006007548602816112a257fe5b6001830180549290910490910190555b8060020154816001015410156113145760038101805460ff60281b1916650600000000001790819055600160381b9004600090810b900b60011415611304576112fc600280610b31565b600455611314565b61131060026001610b31565b6003555b506001016111da565b506008805460fa8101909155600f546126151990910110610b9257614e20600855506009805490910190555050565b6001546001600160a01b0316331461136357600080fd5b600082815260106020526040902060038101546005600160281b90910460ff16118061139a5750600c5462010000900460ff166003145b6113a357600080fd5b6001810180546000918290556003830154909161ffff821691600160281b900460ff1660061480156113de5750600c5462010000900460ff16155b9050600060028560020154816113f057fe5b86546000805493909204935090916001600160a01b03918216918981169116141561143757611423866377359400612874565b600280549188039182019055958690039591505b600060106000600f6001600f80549050038154811061145257fe5b6000918252602080832091909101548352820192909252604001902060038101805461ffff191661ffff8916179055600f805491925090600019810190811061149757fe5b9060005260206000200154600f8761ffff16815481106114b357fe5b600091825260209091200155600f8054806114ca57fe5b6000828152602080822083016000199081018390559092019092558b8252601090526040812080546001600160a01b0319168155600181018290556002810191909155600301805467ffffffffffffffff1916905584156115835761152f8785612874565b965061158384600160009054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8a57600080fd5b61158d878361288e565b50505050505050505050565b6001546001600160a01b031633146115b057600080fd5b6002548211156115f15760405162461bcd60e51b81526004018080602001828103825260248152602001806129f56024913960400191505060405180910390fd5b600c5462010000900460ff166003146116a7576005546002546116149084612874565b10156116515760405162461bcd60e51b815260040180806020018281038252602281526020018061298e6022913960400191505060405180910390fd5b60065481106116a7576040805162461bcd60e51b815260206004820152601f60248201527f43616e6e6f7420772f6420647572696e6720736574746c6520706572696f6400604482015290519081900360640190fd5b6002546116b49083612874565b6002556000546116ce9083906001600160a01b031661288e565b5050565b60095481565b6001546001600160a01b031633146116ef57600080fd5b6000612710611707600260010154600280015461285b565b6002800154600260010154010360fa028161171e57fe5b04905080341015611770576040805162461bcd60e51b8152602060048201526017602482015276496e73756666696369656e742063616e63656c2066656560481b604482015290519081900360640190fd5b600081340390506117c982600160009054906101000a90046001600160a01b03166001600160a01b031663412753586040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8a57600080fd5b600a544211156117e957600c805462ff00001916620100001790556117f3565b6224ea004201600a555b60028054909101905550565b6001546001600160a01b0316331461181657600080fd5b6002805434019055565b600080600061182d6128ff565b50505060009182525060106020908152604080832081516101208101835281546001600160a01b0316808252600180840154958301869052600284015494830185905260039093015461ffff81166060840152620100008104840b840b90930b608083015260ff6401000000008404811660a0840152600160281b8404811660c0840152600160301b84041660e0830152600160381b909204850b850b90940b610100909401939093529192909190565b6001546001600160a01b031633146118f557600080fd5b600c5462010000900460ff166003141561190e57600080fd5b600083815260106020526040902080546001600160a01b0384811691161461193557600080fd5b600654821161194357600080fd5b6202a3006119514284612874565b1161195b57600080fd5b60006119726002825b01546005546002900461285b565b9050611984600260005b015482612874565b6002556000600555600c805462ff000019166203000017905560019190910180549091019055505050565b6001546000906001600160a01b031633146119c957600080fd5b600c5462010000900460ff1615611a27576040805162461bcd60e51b815260206004820152601f60248201527f626f6f6b206e6f206c6f6e6765722074616b696e6720706f736974696f6e7300604482015290519081900360640190fd5b600a54426224ea000110611a76576040805162461bcd60e51b81526020600482015260116024820152703137b7b59031b637b9b4b7339039b7b7b760791b604482015290519081900360640190fd5b600c5461ffff1664e8d4a5100002851015611ad8576040805162461bcd60e51b815260206004820152601d60248201527f6d7573742062652067726561746572207468616e20626f6f6b206d696e000000604482015290519081900360640190fd5b6006548410611b2e576040805162461bcd60e51b815260206004820152601e60248201527f43616e6e6f7420646f20647572696e6720736574746c6520706572696f640000604482015290519081900360640190fd5b600f54610fa011611b75576040805162461bcd60e51b815260206004820152600c60248201526b189bdbdac81a5cc8199d5b1b60a21b604482015290519081900360640190fd5b6000611ba260028460020360048110611b8a57fe5b015460028054040160028560010160048110610e8057fe5b9050808611158015611bb957506005546002540386105b611bc257600080fd5b80861115611bcf57600080fd5b8560028460010160048110611be057fe5b0180549091019055611bf06128ff565b604081018790523460208201526001600160a01b0388168152600284810260001901600090810b900b610100830152879060030180549091019055600f5460408051426020808301919091528183018490528251808303840181526060928301909352825192019190912061ffff9092169083015260ff861660e08301529250600b8460028110611c7d57fe5b60108082049290920154600f918216600290810261010090810a909204600190810b810b810b60808701908152600c546301000000900460ff90811660a0890190815260008b8152602098895260408082208b5181546001600160a01b0319166001600160a01b03909116178155998b01518a8701558a0151958901959095556060890151600390980180549351915160c08b015160e08c0151988c015161ffff1990961661ffff9b8c161763ffff000019166201000094880b9b909b16939093029990991764ff000000001916640100000000998416999099029890981760ff60281b1916600160281b918316919091021760ff60301b1916600160301b958216959095029490941767ff000000000000001916600160381b91840b9094160292909217909355815490810182559082527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80201849055600d0180546001810182556000918252602090912001839055505095945050505050565b6001546001600160a01b03163314611e0f57600080fd5b600081815260106020526040902060038101546002600160281b90910460ff1610611e3957600080fd5b60010180543401905550565b60075481565b6001546001600160a01b031681565b600d8260028110611e6757fe5b018181548110611e7357fe5b90600052602060002001600091509150505481565b6001546001600160a01b03163314611e9f57600080fd5b6006548210611ef5576040805162461bcd60e51b815260206004820152601f60248201527f43616e6e6f7420772f6420647572696e6720736574746c6520706572696f6400604482015290519081900360640190fd5b600084815260106020526040902060038101546006600160281b90910460ff1610611f60576040805162461bcd60e51b81526020600482015260166024820152757375626b20646561642c206d7573742072656465656d60501b604482015290519081900360640190fd5b80546001600160a01b03838116911614611fab5760405162461bcd60e51b81526004018080602001828103825260238152602001806129d26023913960400191505060405180910390fd5b8060020154611fbe826001015486612874565b1015611ffb5760405162461bcd60e51b8152600401808060200182810382526022815260200180612a196022913960400191505060405180910390fd5b612009816001015485612874565b600182015580546120249085906001600160a01b031661288e565b5050505050565b600c5461ffff1681565b6001546001600160a01b0316331461204c57600080fd5b600654620d2f0001421161205f57600080fd5b600c805462ff0000191662030000179055565b600b816002811061207f57fe5b60109182820401919006600202915054906101000a900460010b81565b600f81815481106120a957fe5b600091825260209091200154905081565b6001546000906001600160a01b031633146120d457600080fd5b600c5460ff62010000909104166002141561212b576040805162461bcd60e51b815260206004820152601260248201527163616e206f6e6c79206275726e206f6e636560701b604482015290519081900360640190fd5b600554600290048083101561217f576040805162461bcd60e51b8152602060048201526015602482015274496e73756666696369656e74206275726e2066656560581b604482015290519081900360640190fd5b6121898382612874565b60035460045491925010156121c4576007546121bc906002805b015460055464e8d4a5100002816121b657fe5b04612874565b6007556121d8565b6007546121d490600260016121a3565b6007555b600c805462ff000019166202000017905592915050565b6001546001600160a01b0316331461220657600080fd5b600c5462010000900460ff166003148015906122255750612710600854105b612276576040805162461bcd60e51b815260206004820152601760248201527f646f6e6520776974682065787069727920736574746c65000000000000000000604482015290519081900360640190fd5b600080600061229260085460c801600d6001600281106109cb57fe5b6008549091505b818110156123f1576000601081600d60010184815481106122b657fe5b90600052602060002001548152602001908152602001600020905061271081600201548260030160029054906101000a900460010b60010b02816122f657fe5b0564e8d4a5100082600201548860018560030160069054906101000a900460ff160360ff166005811061232557fe5b60200201516003850154600160381b9004600090810b900b02028161234657fe5b050394508484039350600085121561237357612369816001015486600003612874565b6001820155612395565b64e8d4a5100060075486028161238557fe5b6001830180549290910490910190555b6003810154600160381b9004600090810b900b600114156123c3576123bb600280610b31565b6004556123d3565b6123cf60026001610b31565b6003555b600301805460ff60281b191665070000000000179055600101612299565b506008805460c80190819055600e5411610b9257612710600855506009805490910190555050565b6001546001600160a01b0316331461243057600080fd5b600b8054600192830b61ffff90811661ffff199092169190911763ffff00001916620100009490930b1692909202179055600c805463ff0000001916630100000060ff9390931692909202919091179055565b6001546000906001600160a01b0316331461249d57600080fd5b600084815260106020526040902080546001600160a01b0385811691161461250c576040805162461bcd60e51b815260206004820181905260248201527f6d75737420627920706172747920746f2068697320737562636f6e7472616374604482015290519081900360640190fd5b60085415612561576040805162461bcd60e51b815260206004820152601d60248201527f6e6f7420647572696e6720736574746c656d656e742070726f63657373000000604482015290519081900360640190fd5b60038101546005600160281b90910460ff16106125c5576040805162461bcd60e51b815260206004820181905260248201527f63616e206f6e6c79206275726e2061637469766520737562636f6e7472616374604482015290519081900360640190fd5b600060028260020154816125d557fe5b04905080841015612625576040805162461bcd60e51b8152602060048201526015602482015274496e73756666696369656e74206275726e2066656560581b604482015290519081900360640190fd5b61262f8482612874565b60045460035491925010156126675760075461265f90600260015b0154846002015464e8d4a5100002816121b657fe5b60075561267a565b6007546126769060028061264a565b6007555b600391909101805460ff60281b191665050000000000179055949350505050565b60065481565b6001546001600160a01b031633146126b857600080fd5b600854617530146126fa5760405162461bcd60e51b81526004018080602001828103825260228152602001806129b06022913960400191505060405180910390fd5b60035460045411156127155760035460045403600555612720565b600454600354036005555b600060095412156127475761273f600260000154600954600003612874565b60025561276a565b64e8d4a51000600754600954028161275b57fe5b04600260000154016002600001555b600c5462010000900460ff161561279957600c805462ff00001916620300001790556000600260030155612826565b600554600254101561282657600c805462ff000019166203000017905560006127c3600282611964565b90506127d16002600061197c565b60025560015460408051630824ea6b60e31b8152905161281f9284926001600160a01b0390911691634127535891600480820192602092909190829003018186803b158015610f8a57600080fd5b5060006005555b6000600981905542600655600855600d60016128449101600061294b565b612850600d600061294b565b64e8d4a51000600755565b600081831161286b57508161286e565b50805b92915050565b60008282106128855750600061286e565b5080820361286e565b600154604080516001626074f160e11b031981526001600160a01b0384811660048301529151919092169163ff3f161e91859160248082019260009290919082900301818588803b1580156128e257600080fd5b505af11580156128f6573d6000803e3d6000fd5b50505050505050565b6040805161012081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810182905261010081019190915290565b5080546000825590600052602060002090810190612969919061296c565b50565b61298a91905b808211156129865760008155600101612972565b5090565b9056fe43616e6e6f7420772f64206d6f7265207468616e20657863657373206d617267696e6e6f7420646f6e65207769746820616c6c2074686520737562636f6e7472616374734d7573742062652074616b657220746f2063616c6c20746869732066756e6374696f6e43616e6e6f74207769746864726177206d6f7265207468616e20746865206d617267696e63616e6e6f7420772f64206d6f7265207468616e20657863657373206d617267696ea2646970667358221220dcb01fb462142a46e8950aa2bf9b22b357b9abbe1911a5087c7fdcf40d8b9c5164736f6c6343000603003355736572206d757374206e6f7420686176652061207072656578697374696e6720626f6f6b596f75206d6179206e6f742072656d6f766520796f757273656c6620617320616e2061646d696e2e43616e6e6f742063616e63656c20647572696e67203420504d20455420686f7572a264697066735822122022e58e8435387681d36391c302c7e2824680a1082542a4d6c6df2f4cecfbeb2864736f6c634300060300330000000000000000000000009e5fe21d12629e05252d02f5a0b79fe841aae1f100000000000000000000000000000000000000000000000000000000000000fa

Deployed ByteCode Sourcemap

1157:18311:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;8883:772:0;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8883:772:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;8883:772:0;-1:-1:-1;;;;;8883:772:0;;:::i;:::-;;;;;;;;;;;;;;;;;;7255:335;;;:::i;:::-;;11894:310;;5:9:-1;2:2;;;27:1;24;17:12;2:2;11894:310:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;11894:310:0;;;-1:-1:-1;;;;;11894:310:0;;;;;;;;;;:::i;2610:212::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2610:212:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;2610:212:0;-1:-1:-1;;;;;2610:212:0;;:::i;6480:192::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;6480:192:0;-1:-1:-1;;;;;6480:192:0;;:::i;4915:133::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;4915:133:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;4915:133:0;-1:-1:-1;;;;;4915:133:0;;:::i;1530:19::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1530:19:0;;;:::i;:::-;;;;;;;;;;;;;;;;5519:955;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;-1:-1;5519:955:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;5519:955:0;;;;;;;;;;;;;;6678:224;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;6678:224:0;;;;;;;;:::i;1962:33::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1962:33:0;;;:::i;14653:1077::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;14653:1077:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;14653:1077:0;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;17980:273;;5:9:-1;2:2;;;27:1;24;17:12;2:2;17980:273:0;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;17980:273:0;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;;17980:273:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;17980:273:0;;;;;;;;;;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;17980:273:0;;-1:-1:-1;17980:273:0;;-1:-1:-1;;;;17980:273:0:i;9661:892::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;9661:892:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;9661:892:0;-1:-1:-1;;;;;9661:892:0;;:::i;12720:223::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;12720:223:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;12720:223:0;;;;;;;;:::i;12312:221::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;12312:221:0;;;:::i;14230:417::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;14230:417:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;14230:417:0;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;14230:417:0;;;;;;;;;;;;;;;;;;;;;;;;;3796:1113;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3796:1113:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;3796:1113:0;;;;;;;;;;;;:::i;2930:123::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;2930:123:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;2930:123:0;-1:-1:-1;;;;;2930:123:0;;:::i;18259:1020::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;18259:1020:0;;;:::i;1689:40::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1689:40:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1689:40:0;-1:-1:-1;;;;;1689:40:0;;:::i;1871:46::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1871:46:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1871:46:0;-1:-1:-1;;;;;1871:46:0;;:::i;1424:20::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1424:20:0;;;:::i;6908:341::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;6908:341:0;;;;;;;;:::i;1780:48::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1780:48:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1780:48:0;-1:-1:-1;;;;;1780:48:0;;:::i;8029:234::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;8029:234:0;-1:-1:-1;;;;;8029:234:0;;:::i;12539:175::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;12539:175:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;12539:175:0;-1:-1:-1;;;;;12539:175:0;;:::i;1555:32::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1555:32:0;;;:::i;8269:251::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;8269:251:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;8269:251:0;;;;;;;;:::i;10559:948::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;10559:948:0;;;;;;;;;;;;;;;:::i;15736:1513::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;15736:1513:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;15736:1513:0;-1:-1:-1;;;;;15736:1513:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7596:427;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;7596:427:0;;;;;;;;;;;;;;;:::i;1450:29::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1450:29:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;1450:29:0;;;;;;;:::i;11619:269::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;11619:269:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;11619:269:0;;:::i;3059:240::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;3059:240:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;3059:240:0;;;;:::i;5208:143::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;5208:143:0;-1:-1:-1;;;;;5208:143:0;;:::i;12949:1275::-;;5:9:-1;2:2;;;27:1;24;17:12;2:2;12949:1275:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;12949:1275:0;-1:-1:-1;;;;;12949:1275:0;;:::i;:::-;;;;-1:-1:-1;;;;;12949:1275:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8883:772;-1:-1:-1;;;;;8990:10:0;;;8951:15;8990:10;;;:5;:10;;;;;;8951:15;;8990:10;8982:33;;12:1:-1;9;2:12;8982:33:0;-1:-1:-1;;;;;9039:10:0;;;9025:6;9039:10;;;:5;:10;;;;;;;;;9086:22;;-1:-1:-1;;;9086:22:0;;;;9039:10;;;;;9086:20;;:22;;;;;;;;;;;9039:10;9086:22;;;2:2:-1;;;;27:1;24;17:12;2:2;9086:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9086:22:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;9086:22:0;9133:20;;9086:22;;-1:-1:-1;9156:8:0;9133:31;9126:3;:39;9118:48;;12:1:-1;9;2:12;9118:48:0;9207:18;9184:20;;:41;9176:73;;;;;-1:-1:-1;;;9176:73:0;;;;;;;;;;;;-1:-1:-1;;;9176:73:0;;;;;;;;;;;;;;;9259:15;9277:1;-1:-1:-1;;;;;9277:11:0;;:13;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;9277:13:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9277:13:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;9277:13:0;;-1:-1:-1;9317:3:0;9304:16;;9300:349;;;-1:-1:-1;;;;;9336:16:0;;;9353:12;;:15;;;;9336:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;9336:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9336:33:0;;;;9300:349;;;9403:3;9390:10;:16;9386:263;;;9438:12;:18;9422:35;;;-1:-1:-1;;;9422:35:0;;;;;;;;;;-1:-1:-1;;;;;9422:15:0;;;;;:35;;;;;9451:1;;9422:35;;;;;;;9451:1;9422:15;:35;;;2:2:-1;;;;27:1;24;17:12;9386:263:0;9491:3;9478:10;:16;9474:175;;;-1:-1:-1;;;;;9510:11:0;;;9522:12;9535:1;9522:15;;9474:175;9559:10;9573:3;9559:17;9555:94;;;9592:1;-1:-1:-1;;;;;9592:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;9592:15:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9592:15:0;;;;9634:4;9621:17;;9555:94;8883:772;;;;;;:::o;7255:335::-;7334:10;7357:1;7328:17;;;:5;:17;;;;;;-1:-1:-1;;;;;7328:17:0;7320:40;;12:1:-1;9;2:12;7320:40:0;7390:10;7370:6;7384:17;;;:5;:17;;;;;;;;;7426:23;;-1:-1:-1;;;7426:23:0;;7439:9;7426:23;;;;;;-1:-1:-1;;;;;7384:17:0;;;;7370:6;7384:17;;7426:12;;:23;;;;;7384:17;7426:23;;;;;7370:6;7384:17;7426:23;;;2:2:-1;;;;27:1;24;17:12;2:2;7426:23:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7426:23:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;7426:23:0;7489:46;;;7498:10;7489:46;;;7459:15;7426:23;7489:46;;;;;;;;;;;;7531:3;7489:46;;;;;;7426:23;;-1:-1:-1;7459:15:0;;7489:46;;;;;;;;;-1:-1:-1;7562:10:0;7545:28;;;;:16;:28;;;;;:38;;;;;;;-1:-1:-1;7255:335:0:o;11894:310::-;12007:1;11998:6;:10;11990:19;;12:1:-1;9;2:12;11990:19:0;-1:-1:-1;;;;;12027:10:0;;;12049:1;12027:10;;;:5;:10;;;;;;;12019:33;;12:1:-1;9;2:12;12019:33:0;-1:-1:-1;;;;;12076:10:0;;;12062:6;12076:10;;;:5;:10;;;;;;;12164:20;;12128:69;;-1:-1:-1;;;12128:69:0;;;;;;;;12106:3;:12;;;12128:69;;;;;;;;;;;;;12186:10;12128:69;;;;;;12106:12;;12076:10;;;;;12128:19;;:69;;;;;;;;;;12062:6;12076:10;12128:69;;;2:2:-1;;;;27:1;24;17:12;2:2;12128:69:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12128:69:0;;;;11894:310;;;;:::o;2610:212::-;2560:10;2545:26;;;;:14;:26;;;;;;;;2537:49;;;;;-1:-1:-1;;;2537:49:0;;;;;;;;;;;;-1:-1:-1;;;2537:49:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;2706:22:0;::::1;2718:10;2706:22;;2698:75;;;;-1:-1:-1::0;;;2698:75:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1::0;;;;;2783:24:0::1;2810:5;2783:24:::0;;;:14:::1;:24;::::0;;;;:32;;-1:-1:-1;;2783:32:0::1;::::0;;2610:212::o;6480:192::-;-1:-1:-1;;;;;6564:10:0;;;6586:1;6564:10;;;:5;:10;;;;;;;6556:33;;12:1:-1;9;2:12;6556:33:0;-1:-1:-1;;;;;6613:10:0;;;6599:6;6613:10;;;:5;:10;;;;;;;6634:31;;-1:-1:-1;;;6634:31:0;;;;6613:10;;;;;6634:12;;6653:9;;6634:31;;;;;6599:6;6634:31;;;;;6653:9;6613:10;6634:31;;;2:2:-1;;;;27:1;24;17:12;2:2;6634:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;6634:31:0;;;;;6480:192;;:::o;4915:133::-;2560:10;2545:26;;;;:14;:26;;;;;;;;2537:49;;;;;-1:-1:-1;;;2537:49:0;;;;;;;;;;;;-1:-1:-1;;;2537:49:0;;;;;;;;;;;;;;;5018:10:::1;:23:::0;;-1:-1:-1;;;;;;5018:23:0::1;-1:-1:-1::0;;;;;5018:23:0;;;::::1;::::0;;;::::1;::::0;;4915:133::o;1530:19::-;;;;:::o;5519:955::-;5688:10;5643:15;5682:17;;;:5;:17;;;;;;-1:-1:-1;;;;;5682:17:0;:31;5674:81;;;;-1:-1:-1;;;5674:81:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5791:4;5786:10;;5799:8;5786:21;5773:9;:34;;5765:65;;;;;-1:-1:-1;;;5765:65:0;;;;;;;;;;;;-1:-1:-1;;;5765:65:0;;;;;;;;;;;;;;;5856:1;5848:4;:9;;;;5840:18;;12:1:-1;9;2:12;5840:18:0;5868:14;5911:3;5900:8;;5891:6;:17;:23;;;;;;5868:47;;5925:15;5970:3;5959:8;;5949:7;:18;:24;;;;;;5925:49;;5984:14;6036:3;6024:8;;6007:9;:26;:32;;;;;;5984:56;;6070:3;6058:8;:15;;;;:35;;;;;-1:-1:-1;;6077:8:0;:16;;;;6058:35;6050:44;;12:1:-1;9;2:12;6050:44:0;6125:3;6112:9;:16;;;;:37;;;;;-1:-1:-1;;6132:9:0;:17;;;;6112:37;6104:46;;12:1:-1;9;2:12;6104:46:0;6180:3;6168:8;:15;;;;6160:24;;12:1:-1;9;2:12;6160:24:0;6231:10;6251:4;6258;6264:8;6274;6284:9;6222:72;;;;;:::i;:::-;-1:-1:-1;;;;;6222:72:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6222:72:0;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;6200:10:0;6194:17;;;;:5;:17;;;;;;:101;;-1:-1:-1;;;;;;6194:101:0;-1:-1:-1;;;;;6194:101:0;;;;;;;;6347:31;;-1:-1:-1;;;6347:31:0;;;;6319:17;;;;;6347:12;;6366:9;;6347:31;;;;;6194:17;6347:31;;;;;6366:9;6319:17;6347:31;;;2:2:-1;;;;27:1;24;17:12;2:2;6347:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;6403:10:0;6415:17;;;;:5;:17;;;;;;;;;;6393:40;;-1:-1:-1;;;;;6415:17:0;;;6393:40;;;;6403:10;;-1:-1:-1;6393:40:0;;-1:-1:-1;6393:40:0;;;;;;-1:-1:-1;6393:40:0;-1:-1:-1;;6456:10:0;6450:17;;;;:5;:17;;;;;;-1:-1:-1;;;;;6450:17:0;;5519:955;-1:-1:-1;;;;;;;5519:955:0:o;6678:224::-;-1:-1:-1;;;;;6785:10:0;;;6807:1;6785:10;;;:5;:10;;;;;;;6777:33;;12:1:-1;9;2:12;6777:33:0;-1:-1:-1;;;;;6834:10:0;;;6820:6;6834:10;;;:5;:10;;;;;;;6855:40;;-1:-1:-1;;;6855:40:0;;;;;;;;;;6834:10;;;;;6855:15;;6877:9;;6855:40;;;;;6820:6;6855:40;;;;;6877:9;6834:10;6855:40;;;2:2:-1;;;;27:1;24;17:12;1962:33:0;;;-1:-1:-1;;;;;1962:33:0;;:::o;14653:1077::-;-1:-1:-1;;;;;15521:10:0;;;14960:16;15521:10;;;:5;:10;;;;;;14960:16;;;;;;;;;;15521:10;15545:18;;15541:183;;15579:6;15593:4;15579:19;;15687:1;-1:-1:-1;;;;;15687:18:0;;15706:6;15687:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;15687:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;15687:26:0;;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;-1:-1;15687:26:0;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;15687:26:0;;-1:-1:-1;15687:26:0;-1:-1:-1;15687:26:0;;-1:-1:-1;15687:26:0;-1:-1:-1;;15541:183:0;14653:1077;;;;;;;;;:::o;17980:273::-;18124:6;;-1:-1:-1;;;;;18124:6:0;18102:10;:29;18094:38;;12:1:-1;9;2:12;18094:38:0;18142:29;:12;18160:11;18142:15;:29;:::i;:::-;-1:-1:-1;18181:29:0;:15;18199:11;18181:15;:29;:::i;:::-;-1:-1:-1;;18243:3:0;18220:20;:26;-1:-1:-1;17980:273:0:o;9661:892::-;-1:-1:-1;;;;;9734:10:0;;;9756:1;9734:10;;;:5;:10;;;;;;;9726:33;;12:1:-1;9;2:12;9726:33:0;-1:-1:-1;;;;;9783:10:0;;;9769:6;9783:10;;;:5;:10;;;;;;;;;9830:22;;-1:-1:-1;;;9830:22:0;;;;9783:10;;;;;9830:20;;:22;;;;;;;;;;;9783:10;9830:22;;;2:2:-1;;;;27:1;24;17:12;2:2;9830:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;9830:22:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;9830:22:0;9877:20;;9830:22;;-1:-1:-1;9900:8:0;9877:31;9870:3;:39;9862:48;;12:1:-1;9;2:12;9862:48:0;9951:18;9928:20;;:41;9920:73;;;;;-1:-1:-1;;;9920:73:0;;;;;;;;;;;;-1:-1:-1;;;9920:73:0;;;;;;;;;;;;;;;10185:33;;-1:-1:-1;;;10185:33:0;;-1:-1:-1;;;;;10185:16:0;;;;;10202:15;;10185:33;;;;;;10202:15;10185:33;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;10185:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;10292:12:0;:18;10276:35;;;-1:-1:-1;;;10276:35:0;;;;;;;;;;-1:-1:-1;;;;;10276:15:0;;;-1:-1:-1;10276:15:0;;-1:-1:-1;10276:35:0;;;;;10305:1;;10276:35;;;;;;;10305:1;10276:15;:35;;;2:2:-1;;;;27:1;24;17:12;2:2;10276:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;10493:28:0;;-1:-1:-1;;;10493:28:0;;-1:-1:-1;;;;;10493:11:0;;;-1:-1:-1;10493:11:0;;-1:-1:-1;10505:12:0;;10493:28;;;;;;10505:12;10493:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;10493:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;10493:28:0;;;;10531:1;-1:-1:-1;;;;;10531:13:0;;:15;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;12720:223:0;-1:-1:-1;;;;;12808:10:0;;;12830:1;12808:10;;;:5;:10;;;;;;;12800:33;;12:1:-1;9;2:12;12800:33:0;-1:-1:-1;;;;;12857:10:0;;;12843:6;12857:10;;;:5;:10;;;;;;;12915:20;;12878:58;;-1:-1:-1;;;12878:58:0;;;;;;;;12903:10;12878:58;;;;;;;;;;;;;12857:10;;;;;12878:16;;:58;;;;;;;;;;;12843:6;12857:10;12878:58;;;2:2:-1;;;;27:1;24;17:12;12312:221:0;12407:10;12376:11;12390:28;;;:16;:28;;;;;;12436:10;12428:19;;12:1:-1;9;2:12;12428:19:0;12474:10;12488:1;12457:28;;;:16;:28;;;;;;:32;;;12499:27;;;;;;12519:6;;12499:27;;12488:1;12499:27;12519:6;12474:10;12499:27;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12499:27:0;12312:221;:::o;14230:417::-;-1:-1:-1;;;;;14479:10:0;;;14341:13;14479:10;;;:5;:10;;;;;;14341:13;;;;;;14479:10;14503:18;;14499:142;;14537:6;14551:4;14537:19;;14604:1;-1:-1:-1;;;;;14604:18:0;;14623:6;14604:26;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;14604:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14604:26:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;14604:26:0;;;;;;;;;;;;;-1:-1:-1;14604:26:0;;-1:-1:-1;14604:26:0;-1:-1:-1;;14499:142:0;14230:417;;;;;;:::o;3796:1113::-;3901:10;3924:1;3895:17;;;:5;:17;;;;;;-1:-1:-1;;;;;3895:17:0;3887:65;;;;;-1:-1:-1;;;3887:65:0;;;;;;;;;;;;-1:-1:-1;;;3887:65:0;;;;;;;;;;;;;;;4291:12;4326:3;4315:8;;4306:6;:17;:23;;;;;;4291:38;;4339:13;4376:3;4365:8;;4355:7;:18;:24;;;;;;4339:40;;4389:13;4433:3;4421:8;;4405;:25;:31;;;;;;4389:47;;4577:3;4565:8;:15;;4557:24;;12:1:-1;9;2:12;4557:24:0;4611:3;4599:8;:15;;:35;;;;;-1:-1:-1;;4618:8:0;:16;;4599:35;4591:44;;12:1:-1;9;2:12;4591:44:0;4666:3;4653:9;:16;;:37;;;;;-1:-1:-1;;4673:9:0;:17;;4653:37;4645:46;;12:1:-1;9;2:12;4645:46:0;4721:10;4701:6;4715:17;;;:5;:17;;;;;;;4743:68;;-1:-1:-1;;;4743:68:0;;;;;;;;;4715:17;4743:68;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;4715:17:0;;;;;;4743:16;;:68;;;;;4701:6;4743:68;;;;;4701:6;4715:17;4743:68;;;2:2:-1;;;;27:1;24;17:12;2:2;4743:68:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;4826:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4839:10;;-1:-1:-1;4826:76:0;;-1:-1:-1;4826:76:0;;;;;;;;3796:1113;;;;;;;:::o;2930:123::-;2560:10;2545:26;;;;:14;:26;;;;;;;;2537:49;;;;;-1:-1:-1;;;2537:49:0;;;;;;;;;;;;-1:-1:-1;;;2537:49:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;3015:24:0::1;;::::0;;;:14:::1;:24;::::0;;;;:31;;-1:-1:-1;;3015:31:0::1;3042:4;3015:31;::::0;;2930:123::o;18259:1020::-;18324:10;18365:3;19068:1;19061:4;19052:5;19042:15;;19041:24;:28;19033:36;;19094:10;19084:7;:20;:44;;;;;19118:10;19108:7;:20;19084:44;19083:96;;;;19144:10;19134:7;:20;:44;;;;;19168:10;19158:7;:20;19134:44;19083:158;;;;19206:10;19196:7;:20;:44;;;;;19230:10;19220:7;:20;19196:44;19079:193;;;19263:5;19271:1;19263:9;19255:17;;19079:193;18259:1020;;:::o;1689:40::-;;;;;;;;;;;;-1:-1:-1;;;;;1689:40:0;;:::o;1871:46::-;;;;;;;;;;;;;;;:::o;1424:20::-;;;-1:-1:-1;;;;;1424:20:0;;:::o;6908:341::-;-1:-1:-1;;;;;7011:10:0;;;7033:1;7011:10;;;:5;:10;;;;;;;7003:33;;12:1:-1;9;2:12;7003:33:0;-1:-1:-1;;;;;7060:10:0;;;7046:6;7060:10;;;:5;:10;;;;;;;;;7095:46;;-1:-1:-1;;;7095:46:0;;;;;;;;7119:10;7095:46;;;;7131:9;7095:46;;;;;;7060:10;;;;;7095:15;;:46;;;;;;;;;;;7046:6;7060:10;7095:46;;;2:2:-1;;;;27:1;24;17:12;2:2;7095:46:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7095:46:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;7095:46:0;7156:38;;;-1:-1:-1;;;;;7156:38:0;;;;7095:46;7156:38;;;;;7178:10;7156:38;;;;7190:3;7156:38;;;;;;7095:46;;-1:-1:-1;7156:38:0;;;;;;;;;;7221:10;7204:28;;;;:16;:28;;;;;:38;;;;;;;-1:-1:-1;;;6908:341:0:o;1780:48::-;;;;;;;;;;;;;:::o;8029:234::-;8116:10;-1:-1:-1;;;;;8116:17:0;;;8108:26;;12:1:-1;9;2:12;8108:26:0;-1:-1:-1;;;;;8152:10:0;;;8174:1;8152:10;;;:5;:10;;;;;;;8144:33;;12:1:-1;9;2:12;8144:33:0;-1:-1:-1;;;;;8201:10:0;;;8187:6;8201:10;;;:5;:10;;;;;;;8222:34;;-1:-1:-1;;;8222:34:0;;;;8201:10;;;;;8222:15;;8244:9;;8222:34;;;;;8187:6;8222:34;;;;;8244:9;8201:10;8222:34;;;2:2:-1;;;;27:1;24;17:12;12539:175:0;-1:-1:-1;;;;;12615:10:0;;;12637:1;12615:10;;;:5;:10;;;;;;;12607:33;;12:1:-1;9;2:12;12607:33:0;-1:-1:-1;;;;;12664:10:0;;;12650:6;12664:10;;;:5;:10;;;;;;;12685:22;;-1:-1:-1;;;12685:22:0;;;;12664:10;;;;;12685:20;;:22;;;;;;;;;;;12650:6;12664:10;12685:22;;;2:2:-1;;;;27:1;24;17:12;2:2;12685:22:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;12685:22:0;;;;12539:175;;:::o;1555:32::-;;;;:::o;8269:251::-;-1:-1:-1;;;;;8353:10:0;;;8375:1;8353:10;;;:5;:10;;;;;;;8345:33;;12:1:-1;9;2:12;8345:33:0;-1:-1:-1;;;;;8402:10:0;;;8388:6;8402:10;;;:5;:10;;;;;;;8423:32;;-1:-1:-1;;;8423:32:0;;;;;;;;8444:10;8423:32;;;;;;8402:10;;;;;8423:12;;:32;;;;;;;;;;;8388:6;8402:10;8423:32;;;2:2:-1;;;;27:1;24;17:12;2:2;8423:32:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;8470:43:0;;;;;;8507:5;8470:43;;;;;;8487:10;;-1:-1:-1;;;;;;8470:43:0;;;-1:-1:-1;8470:43:0;;;;;;;;;;;8269:251;;;:::o;10559:948::-;10663:17;10709:1;10704:2;:6;10696:33;;;;;-1:-1:-1;;;10696:33:0;;;;;;;;;;;;-1:-1:-1;;;10696:33:0;;;;;;;;;;;;;;;10880:7;10875:12;;;10927:1;;10918:6;;:10;10905:9;:23;;10897:62;;;;;-1:-1:-1;;;10897:62:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;10977:11;:9;:11::i;:::-;10992:2;10977:17;;10969:61;;;;;-1:-1:-1;;;10969:61:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;11041:14;11069:11;11065:82;;;-1:-1:-1;11106:1:0;11065:82;;;-1:-1:-1;11146:1:0;11065:82;11254:14;11271:6;;;;;;;;;-1:-1:-1;;;;;11271:6:0;-1:-1:-1;;;;;11271:18:0;;:20;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;11271:20:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11271:20:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;11271:20:0;-1:-1:-1;;;;;11318:10:0;;;11301:9;11318:10;;;:5;11271:20;11318:10;;;;;;;;;11398:20;;11351:89;;-1:-1:-1;;;11351:89:0;;11382:10;11351:89;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11271:20;;-1:-1:-1;11318:10:0;;;;;;11351:13;;11371:9;;11351:89;;;;;11271:20;11351:89;;;;;11371:9;11318:10;11351:89;;;2:2:-1;;;;27:1;24;17:12;2:2;11351:89:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;11351:89:0;;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;11351:89:0;11455:45;;;;;;11495:4;11351:89;11455:45;;;;;11351:89;;-1:-1:-1;11472:10:0;;-1:-1:-1;;;;;11455:45:0;;;;;;;;;;;10559:948;;;;;;;;:::o;15736:1513::-;-1:-1:-1;;;;;16998:10:0;;;15947:16;16998:10;;;:5;:10;;;;;;15947:16;;;;;;;;;;;;;;16998:10;17022:18;;17018:225;;17056:6;17070:4;17056:19;;17211:1;-1:-1:-1;;;;;17211:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;17211:21:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;17211:21:0;;;;;;;15:3:-1;10;7:12;4:2;;;32:1;29;22:12;4:2;-1:-1;17211:21:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;17211:21:0;;-1:-1:-1;17211:21:0;;-1:-1:-1;17211:21:0;-1:-1:-1;17211:21:0;-1:-1:-1;17211:21:0;;-1:-1:-1;17211:21:0;-1:-1:-1;;17018:225:0;15736:1513;;;;;;;;;;:::o;7596:427::-;7711:11;:9;:11::i;:::-;7726:2;7711:17;;7703:63;;;;-1:-1:-1;;;7703:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7790:10:0;;;7776:6;7790:10;;;:5;:10;;;;;;;;;7828:6;;:20;;-1:-1:-1;;;;;;7828:20:0;;;;7790:10;;;;7828:6;;:18;;:20;;;;;;;;;;;:6;:20;;;2:2:-1;;;;27:1;24;17:12;2:2;7828:20:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7828:20:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;7828:20:0;;-1:-1:-1;7873:1:0;7884:43;;;;-1:-1:-1;7919:8:0;7884:43;7967:20;;7937:79;;;-1:-1:-1;;;7937:79:0;;;;;;;;;;;;;;;7997:10;7937:79;;;;;;;;;;;;-1:-1:-1;;;;;7937:12:0;;;;;7956:9;;7937:79;;;;;-1:-1:-1;;7937:79:0;;;;;;;;7956:9;7937:12;:79;;;2:2:-1;;;;27:1;24;17:12;2:2;7937:79:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;7937:79:0;;;;;7596:427;;;;;;:::o;1450:29::-;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1450:29:0;;-1:-1:-1;1450:29:0:o;11619:269::-;11700:1;11691:6;:10;11683:19;;12:1:-1;9;2:12;11683:19:0;11726:10;11749:1;11720:17;;;:5;:17;;;;;;-1:-1:-1;;;;;11720:17:0;11712:40;;12:1:-1;9;2:12;11712:40:0;11782:10;11762:6;11776:17;;;:5;:17;;;;;;;11860:20;;11835:46;;-1:-1:-1;;;11835:46:0;;11813:3;:12;;;11835:46;;;;;;;;;;;;;;;11813:12;;-1:-1:-1;;;;;11776:17:0;;;;;;;11835:16;;:46;;;;;11762:6;11835:46;;;;;;11762:6;11776:17;11835:46;;;2:2:-1;;;;27:1;24;17:12;3059:240:0;3138:10;3161:1;3132:17;;;:5;:17;;;;;;-1:-1:-1;;;;;3132:17:0;3124:65;;;;;-1:-1:-1;;;3124:65:0;;;;;;;;;;;;-1:-1:-1;;;3124:65:0;;;;;;;;;;;;;;;3215:1;3207:4;:9;;;;3199:18;;12:1:-1;9;2:12;3199:18:0;3247:10;3227:6;3241:17;;;:5;:17;;;;;;;3269:23;;-1:-1:-1;;;3269:23:0;;;;;;;;;;;-1:-1:-1;;;;;3241:17:0;;;;;;3269;;:23;;;;;3227:6;3269:23;;;;;3227:6;3241:17;3269:23;;;2:2:-1;;;;27:1;24;17:12;5208:143:0;-1:-1:-1;;;;;5304:27:0;;;;;:16;:27;;;;;:40;;5335:9;5304:40;;;5208:143::o;12949:1275::-;-1:-1:-1;;;;;13757:10:0;;;13030:12;13757:10;;;:5;:10;;;;;;;;;;13030:12;;;;;;;;13781:18;;13777:441;;13815:6;13829:4;13815:19;;13859:1;-1:-1:-1;;;;;13859:8:0;;13868:1;13859:11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;13859:11:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13859:11:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;13859:11:0;13898;;;-1:-1:-1;;;13898:11:0;;13907:1;13898:11;;;;;;13859;;-1:-1:-1;;;;;;13898:8:0;;;;;:11;;;;;13859;;13898;;;;;;;;:8;:11;;;2:2:-1;;;;27:1;24;17:12;2:2;13898:11:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13898:11:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;13898:11:0;13938;;;-1:-1:-1;;;13938:11:0;;13947:1;13938:11;;;;;;13898;;-1:-1:-1;;;;;;13938:8:0;;;;;:11;;;;;13898;;13938;;;;;;;;:8;:11;;;2:2:-1;;;;27:1;24;17:12;2:2;13938:11:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13938:11:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;13938:11:0;13970;;;-1:-1:-1;;;13970:11:0;;13979:1;13970:11;;;;;;13938;;-1:-1:-1;;;;;;13970:8:0;;;;;:11;;;;;13938;;13970;;;;;;;;:8;:11;;;2:2:-1;;;;27:1;24;17:12;2:2;13970:11:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;13970:11:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;13970:11:0;14009:15;;;-1:-1:-1;;;14009:15:0;;;;13970:11;;-1:-1:-1;;;;;;14009:13:0;;;;;:15;;;;;13970:11;;14009:15;;;;;;;;:13;:15;;;2:2:-1;;;;27:1;24;17:12;2:2;14009:15:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14009:15:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;14009:15:0;14056:17;;;-1:-1:-1;;;14056:17:0;;14071:1;14056:17;;;;;;13995:29;;;;;-1:-1:-1;;;;;;14056:14:0;;;;;:17;;;;;14009:15;;14056:17;;;;;;;;:14;:17;;;2:2:-1;;;;27:1;24;17:12;2:2;14056:17:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14056:17:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;14056:17:0;14106;;;-1:-1:-1;;;14106:17:0;;14121:1;14106:17;;;;;;14056;;-1:-1:-1;;;;;;14106:14:0;;;;;:17;;;;;14056;;14106;;;;;;;;:14;:17;;;2:2:-1;;;;27:1;24;17:12;2:2;14106:17:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14106:17:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;14106:17:0;14150:16;;;-1:-1:-1;;;14150:16:0;;;;14106:17;;-1:-1:-1;;;;;;14150:14:0;;;;;:16;;;;;14106:17;;14150:16;;;;;;;;:14;:16;;;2:2:-1;;;;27:1;24;17:12;2:2;14150:16:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14150:16:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;14150:16:0;14193:14;;;-1:-1:-1;;;14193:14:0;;;;14150:16;;-1:-1:-1;;;;;;14193:12:0;;;;;:14;;;;;14150:16;;14193:14;;;;;;;;:12;:14;;;2:2:-1;;;;27:1;24;17:12;2:2;14193:14:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;14193:14:0;;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;14193:14:0;;-1:-1:-1;;13777:441:0;12949:1275;;;;;;;;;;;:::o;1157:18311::-;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1157:18311:0;;;;-1:-1:-1;1157:18311:0;;;;;;;;;;;;;;;;;:::o

Swarm Source

ipfs://22e58e8435387681d36391c302c7e2824680a1082542a4d6c6df2f4cecfbeb28
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.

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.