Latest 25 txns

TxHash Age From To Value [TxFee]
0xe7689228f35cdaf9d7555328d9a34c09157b92298e73736d6340677d35a5e1ea4 days 19 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.000022914
0x88de50a3c8d9c2cf9c27c42f9af53cacda470c8c99375074343e1e3d09fbbefc4 days 19 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.000039977
0x7fc011a7e65c6da1880be294a13e42148a9129cbbc237dadd45c9ad8c55631804 days 19 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.000024057
0x68587f979b32fcc274e15d9edcce9484ef18876f05b67fd22d8a32454b784c004 days 19 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.02 Ether0.000107369
0xa887de199b20685763ebcb78715744c8bd90e90f7628e54e6aa981e0887ad1e54 days 20 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.02 Ether0.000139732
0x274e038f3b59f8a55a89a50322443ba418dd83a87e8e74ed43377c69f185f5294 days 20 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.01 Ether0.000615054
0x764c76180487fadb8ffb20bf96cceffa2fd772cdc804d898af84b047a48945fa4 days 20 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.000274797
0xab06b48798e188392c5651040e9458b893dcd2798e184a7f54e705f15887ea374 days 20 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.000014688
0x7d713e62779e011e2fc6d2084c89a822984835517d37cc3db2ca38545ec2909e10 days 3 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.02 Ether0.00206574
0x1fc1cfa1609d4c9d3a0fdaf6f92c31c8a0696d33fb08145a7614bfe7711b0f2810 days 3 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.01 Ether0.003330505
0x95d0d88807e5b97285d869dc0b6f4bebac1acb3097986298d54fb339edeb684c10 days 22 hrs ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.00244411
0x754a052e97c8caaf038c8e0664b0577babc9ea423b391660be315df3bd18b02d11 days 2 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.000120285
0x2ab06f93a33f4a9a1188e31edddbe493d134c69b65471750c30faba093960b9511 days 13 mins ago0x6ad9610847ead7030fe9f37e69967d0e8a707a57  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.01 Ether0.000107428
0x235c4daf77b671424f9aeda63aac658a9b064386d7345d939ba8148ee072fc7211 days 13 mins ago0x6ad9610847ead7030fe9f37e69967d0e8a707a57  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.02 Ether0.000107428
0xd9b30ce9b43934b97a2669392261921cea855da49208a8dc8c9433631382c90a11 days 13 mins ago0x6ad9610847ead7030fe9f37e69967d0e8a707a57  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.02 Ether0.000107369
0x5d7fdcc2ce701e8efe9be8b0f7e304f35c98a7ff3e0217503d6c58bc4c30065b11 days 14 mins ago0x6ad9610847ead7030fe9f37e69967d0e8a707a57  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.01 Ether0.000107369
0x5f79d43705a873a57c9e0caa48adc811b0289717ff8248353d071affdb29439d11 days 14 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.01 Ether0.000107428
0x5fef66247eec45cd2643e5ee85dd5db2433a413a97036491fcea147338a6fc8511 days 14 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.02 Ether0.000137428
0x64e8654cbf65e105dfab75a366516841748de690e7351cface3c7e9de6f9db5511 days 14 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.02 Ether0.000107369
0x7b62f7dabbe8faee31e9aa633ce21b85a7a6d24da42fc4e5d434ee444ccf2f8c11 days 14 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80.01 Ether0.000152369
0xea915f583225102fedfc9c2b98a4be6c1e7a87aeb5bbcb7ef07d05b0d056d63e11 days 20 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.001300265
0x08803317c50c7be427a97fcfef8fbd4e25a05e4bfa8d218bea4725b7ec82c4f011 days 21 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.001524945
0xaf21211b9adb60eaf206c65484feca2d8d29cd26ecc7922d999a671fac51e27b11 days 27 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.000403465
0x21b8b2f44570225dd7e3ca985c9110f1b1f12a834a492f6c96bc2d4165b5ddbe11 days 28 mins ago0x6ad9610847ead7030fe9f37e69967d0e8a707a57  IN   0x225dc53448518b9cd07a6736afced1921ec0d6e80 Ether0.000123045
0x66ade7ab97b6ef4488978980abf98fb903a2daaa07d0e021fbf984eccdb91dda11 days 50 mins ago0x569425bc7629040ad8c70e52ee6f999a7b80a18b  IN    Contract Creation0 Ether0.06443189
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 19 Internal Transactions

ParentTxHash Block Age From To Value
0x88de50a3c8d9c2cf9c27c42f9af53cacda470c8c99375074343e1e3d09fbbefc50423274 days 19 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x6ad9610847ead7030fe9f37e69967d0e8a707a570.0012653492 Ether
0x88de50a3c8d9c2cf9c27c42f9af53cacda470c8c99375074343e1e3d09fbbefc50423274 days 19 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0113881428 Ether
0x68587f979b32fcc274e15d9edcce9484ef18876f05b67fd22d8a32454b784c0050423254 days 19 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0103 Ether
0xa887de199b20685763ebcb78715744c8bd90e90f7628e54e6aa981e0887ad1e550421484 days 20 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0103 Ether
0x274e038f3b59f8a55a89a50322443ba418dd83a87e8e74ed43377c69f185f52950421464 days 20 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0003 Ether
0x274e038f3b59f8a55a89a50322443ba418dd83a87e8e74ed43377c69f185f52950421464 days 20 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.01746 Ether
0x7d713e62779e011e2fc6d2084c89a822984835517d37cc3db2ca38545ec2909e500817610 days 3 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0103 Ether
0x1fc1cfa1609d4c9d3a0fdaf6f92c31c8a0696d33fb08145a7614bfe7711b0f28500816710 days 3 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0003 Ether
0x1fc1cfa1609d4c9d3a0fdaf6f92c31c8a0696d33fb08145a7614bfe7711b0f28500816710 days 3 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.011638836 Ether
0x1fc1cfa1609d4c9d3a0fdaf6f92c31c8a0696d33fb08145a7614bfe7711b0f28500816710 days 3 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.023277672 Ether
0x95d0d88807e5b97285d869dc0b6f4bebac1acb3097986298d54fb339edeb684c500309510 days 22 hrs ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x6ad9610847ead7030fe9f37e69967d0e8a707a570.03528 Ether
0x2ab06f93a33f4a9a1188e31edddbe493d134c69b65471750c30faba093960b95500258811 days 13 mins ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x6ad9610847ead7030fe9f37e69967d0e8a707a570.0002 Ether
0x235c4daf77b671424f9aeda63aac658a9b064386d7345d939ba8148ee072fc72500258711 days 13 mins ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x6ad9610847ead7030fe9f37e69967d0e8a707a570.0102 Ether
0xd9b30ce9b43934b97a2669392261921cea855da49208a8dc8c9433631382c90a500258611 days 13 mins ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x6ad9610847ead7030fe9f37e69967d0e8a707a570.0103 Ether
0x5d7fdcc2ce701e8efe9be8b0f7e304f35c98a7ff3e0217503d6c58bc4c30065b500258511 days 14 mins ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x6ad9610847ead7030fe9f37e69967d0e8a707a570.0003 Ether
0x5f79d43705a873a57c9e0caa48adc811b0289717ff8248353d071affdb29439d500258211 days 14 mins ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0002 Ether
0x5fef66247eec45cd2643e5ee85dd5db2433a413a97036491fcea147338a6fc85500258011 days 14 mins ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0102 Ether
0x64e8654cbf65e105dfab75a366516841748de690e7351cface3c7e9de6f9db55500257911 days 14 mins ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0103 Ether
0x7b62f7dabbe8faee31e9aa633ce21b85a7a6d24da42fc4e5d434ee444ccf2f8c500257911 days 14 mins ago0x225dc53448518b9cd07a6736afced1921ec0d6e80x569425bc7629040ad8c70e52ee6f999a7b80a18b0.0003 Ether
[ Download CSV Export  ] 
Contract Source Code Verified (Exact Match)
Contract Name: CryptoLotto
Compiler Version: v0.5.1+commit.c8a2cb62
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity >=0.5.0 <0.6.0;
library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        require(c / a == b, "Ошибка умножения чисел.");
        return c;
    }
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "Ошибка деления чисел.");
        uint256 c = a / b;
        return c;
    }
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "Ошибка вычитания чисел.");
        uint256 c = a - b;
        return c;
    }
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "Ошибка сложения чисел.");
        return c;
    }
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "Ошибка определения остатка от деления.");
        return a % b;
    }
}
contract CryptoLotto {
    using SafeMath for *;
    uint256 constant None = uint256(0);
    uint256 constant private MAX_PERCENTS = 10000;
    uint256 constant private FULL_PART = 10000;
    uint256 constant private FEE = 1000;
    uint constant MAX_RECENT_BLOCK_NUMBER = 250;
    string constant private MSG_INVALID_LOTTERY_ID = "Несуществующий id лотереи.";
    enum LotteryStatus {
        Open,
        Finished
    }
    enum LotteryPrizeType {
        T10,
        T30,
        All,
        First
    }
    struct Player {
        address addr;
        uint blockNumber;
    }
    struct Lottery {
        uint256 id;
        string name;
        address owner;
        uint256 price;
        uint begin;
        uint end;
        uint256 number;
        uint256 pot;
        LotteryStatus status;
        LotteryPrizeType prizeType;
        uint256 parentId;
        uint256 childId;
        bool isContinued;
        uint256 winNumber;
        uint blockNumberForRandom;
        bytes32 blockHashForRandom;
    }
    address private _owner;
    uint private _totalFee;
    address[] private _admins;
    mapping (address => uint256) private _adminsParts;
    mapping (uint256 => Lottery) private _lotteries;
    uint256 _lastLotteryId;
    mapping (uint256 => Player[]) private _players;
    mapping (uint256 => address[]) private _winPlayers;
    mapping (uint256 => uint256[]) private _winPlayerPrizes;
    uint256[] _openLotteries;
    event BuyTicketEvent(
        address indexed from,
        uint256 indexed lotteryId
    );
    event NewLotteryEvent(
        uint256 indexed lotteryId
    );
    event FinishedLotteryEvent(
        uint256 indexed lotteryId
    );
    event DeleteLotteryEvent(
        uint256 indexed lotteryId
    );
    event WinPrizeEvent(
        address indexed player,
        uint256 indexed prize,
        uint256 indexed lotteryId
    );
    event TransferAdminPartEvent(
        address indexed from,
        address indexed to,
        uint256 indexed part
    );
    event DividendEvent(
        address indexed admin,
        uint256 indexed sum
    );
    modifier onlyOwner() {
        require(msg.sender == _owner, "Разрешено только владельцу контракта.");
        _;
    }
    modifier onlyAdmin() {
        require(checkIsAdmin(msg.sender), "Разрешено только админам контракта.");
        _;
    }
    constructor() public {
        _owner = msg.sender;
        _admins.push(_owner);
        _adminsParts[_owner] = FULL_PART;
    }
    function transferAdminPart(address addr, uint256 part)
        public
        onlyAdmin
    {
        require(
            part <= _adminsParts[msg.sender],
            "Передаваемая доля больше доли владения."
        );
        distributeDividend();
        if (!checkIsAdmin(addr)) {
            _admins.push(addr);
        }
        _adminsParts[msg.sender] = _adminsParts[msg.sender].sub(part);
        _adminsParts[addr] = _adminsParts[addr].add(part);
        if (_adminsParts[msg.sender] == 0) {
            removeAdmin(msg.sender);
        }
        emit TransferAdminPartEvent(msg.sender, addr, part);
    }
    function distributeDividend() public onlyAdmin {
        if (_totalFee == 0)
            return;
        uint totalSum = _totalFee;
        for (uint i = 0; i < _admins.length; i++) {
            address payable addr = address(uint160(_admins[i]));
            uint sum = totalSum.mul(_adminsParts[addr]).div(FULL_PART);
            if (sum > 0) {
                _totalFee = _totalFee.sub(sum);
                addr.transfer(sum);
                emit DividendEvent(addr, sum);
            }
        }
    }
    function createLottery(
        string memory name,
        uint256 price,
        uint begin,
        uint end,
        LotteryPrizeType prizeType
    )
        public
        onlyOwner
    {
        require(begin < end, "Время начала лотереи должно быть меньше окончания.");
        _lastLotteryId = _lastLotteryId.add(1);
        _lotteries[_lastLotteryId] = Lottery({
            id: _lastLotteryId,
            name: name,
            owner: msg.sender,
            price: price,
            begin: begin,
            end: end,
            number: 1,
            pot: 0,
            status: LotteryStatus.Open,
            prizeType: prizeType,
            parentId: None,
            childId: None,
            isContinued: true,
            winNumber: 0,
            blockNumberForRandom: 0,
            blockHashForRandom: 0x0
         });
        _openLotteries.push(_lastLotteryId);
        emit NewLotteryEvent(_lastLotteryId);
    }
    function buyTicket(uint256 lotteryId) public payable {
        require(lotteryId <= _lastLotteryId, MSG_INVALID_LOTTERY_ID);
        finalizeLotteries();
        uint256 actualLotteryId = getActualLotteryId(lotteryId);
        require(
            actualLotteryId != None,
            "Лотерея завершена и не возобновится. Покупка билета не возможна."
        );
        Lottery storage lottery = _lotteries[actualLotteryId];
        uint actualPrice = getActualLotteryPrice(lottery);
        require(
            msg.value >= actualPrice,
            "Сумма перевода меньше стоимости участия в лотереи."
        );
        addPlayerToLottery(lottery);
        uint feeSum = actualPrice.mul(FEE).div(MAX_PERCENTS);
        lottery.pot = lottery.pot.add(actualPrice.sub(feeSum));
        _totalFee = _totalFee.add(feeSum);
        uint remainder = msg.value.sub(actualPrice);
        if (remainder > 0)
            msg.sender.transfer(remainder);
        emit BuyTicketEvent(msg.sender, actualLotteryId);
    }
    function finalizeLotteries() public {
        for (uint i = 0; i < _openLotteries.length; i++) {
            uint256 lotteryId = _openLotteries[i];
            if (_lotteries[lotteryId].end < now) {
                if (_players[lotteryId].length > 0) {
                    uint256 lastIndex = _players[lotteryId].length.sub(1);
                    uint blockNumber = _players[lotteryId][lastIndex].blockNumber;
                    if (block.number.sub(blockNumber) == 1) {
                        continue;
                    }
                }
                finalizeLottery(_lotteries[lotteryId]);
            }
        }
    }
    function deleteLottery(uint256 lotteryId) public onlyOwner {
        require(lotteryId <= _lastLotteryId, MSG_INVALID_LOTTERY_ID);

        Lottery storage lottery = _lotteries[lotteryId];

        require(
            lottery.status == LotteryStatus.Open,
            "Лотерея уже завершена, удаление невозможно."
        );
        require(
            lottery.isContinued,
            "Лотерея уже отмечена к удалению, повторное удаление невозможно."
        );
        lottery.isContinued = false;
        emit DeleteLotteryEvent(lotteryId);
    }
    function() external payable {
        uint256 lotteryId = None;
        uint256 price = 0;
        for (uint256 i = 0; i < _openLotteries.length; i++) {
            uint256 openLotteryId = _openLotteries[i];
            uint256 openLotteryPrice = _lotteries[openLotteryId].price;
            if (msg.value >= openLotteryPrice && openLotteryPrice > price) {
                lotteryId = openLotteryId;
                price = openLotteryPrice;
            }
        }
        if (lotteryId != None) {
            buyTicket(lotteryId);
        } else {
            revert("Не найдена подходящая лотерея. Покупка билета невозможна.");
        }
    }
    function getOwner() public view returns (address) {
        return _owner;
    }
    function getTotalFee() public view returns (uint) {
        return _totalFee;
    }
    function getAdmins() public view returns (address[] memory) {
        return _admins;
    }
    function getAdminPartByAddress(address addr) public view returns (uint256) {
        return _adminsParts[addr];
    }

    function getLotteryInfo(uint256 id)
        public
        view
        returns (
            uint256,
            address,
            uint256,
            uint,
            uint,
            uint256,
            uint256,
            LotteryStatus,
            LotteryPrizeType,
            uint256,
            uint256,
            bool
        )
    {
        Lottery memory lottery = _lotteries[id];
        return (
            lottery.id,
            lottery.owner,
            lottery.price,
            lottery.begin,
            lottery.end,
            lottery.number,
            lottery.pot,
            lottery.status,
            lottery.prizeType,
            lottery.parentId,
            lottery.childId,
            lottery.isContinued
        );
    }
    function getFinishedLotteryInfo(uint256 id)
        public
        view
        returns (
            uint256,
            uint256,
            uint,
            bytes32,
            uint256,
            uint256
        )
    {
        Lottery memory lottery = _lotteries[id];
        require(
            lottery.status == LotteryStatus.Finished,
            "Лотерея еще не завершена."
        );
        return (
            lottery.id,
            lottery.winNumber,
            lottery.blockNumberForRandom,
            lottery.blockHashForRandom,
            lottery.pot,
            _players[id].length
        );
    }
    function getLotteryName(uint256 id) public view returns (string memory) {
        return _lotteries[id].name;
    }
    function getLotteryPlayers(uint256 lotteryId)
        public
        view
        returns (address[] memory, uint[] memory)
    {
        require(lotteryId <= _lastLotteryId, MSG_INVALID_LOTTERY_ID);
        Player[] memory players = _players[lotteryId];
        address[] memory addresses = new address[](players.length);
        uint[] memory blockNumbers = new uint[](players.length);
        for (uint i = 0; i < players.length; i++) {
            addresses[i] = players[i].addr;
            blockNumbers[i] = players[i].blockNumber;
        }
        return (addresses, blockNumbers);
    }
    function getLotteryPlayerAddresses(uint256 lotteryId)
        public
        view
        returns (address[] memory)
    {
        require(lotteryId <= _lastLotteryId, MSG_INVALID_LOTTERY_ID);
        Player[] memory players = _players[lotteryId];
        address[] memory result = new address[](players.length);
        for (uint i = 0; i < players.length; i++) {
            result[i] = players[i].addr;
        }
        return result;
    }
    function getWinPlayers(uint256 lotteryId)
        public
        view
        returns (address[] memory, uint256[] memory)
    {
        require(lotteryId <= _lastLotteryId, MSG_INVALID_LOTTERY_ID);
        address[] memory addresses = new address[](_winPlayers[lotteryId].length);
        uint256[] memory prizes = new uint256[](_winPlayerPrizes[lotteryId].length);
        for (uint256 i = 0; i < _winPlayers[lotteryId].length; i++) {
            addresses[i] = _winPlayers[lotteryId][i];
        }
        for (uint256 i = 0; i < _winPlayerPrizes[lotteryId].length; i++) {
            prizes[i] = _winPlayerPrizes[lotteryId][i];
        }
        return (addresses, prizes);
    }
    function getActualLotteryId(uint256 lotteryId)
        public
        view
        returns (uint256)
    {
        require(lotteryId <= _lastLotteryId, MSG_INVALID_LOTTERY_ID);
        uint256 actualLotteryId = None;
        bool isLotteryDeleted = false;
        Lottery memory lottery = _lotteries[lotteryId];
        while (lottery.status == LotteryStatus.Finished) {
            if (lottery.childId == None) {
                isLotteryDeleted = true;
                break;
            }
            lottery = _lotteries[lottery.childId];
        }
        if (!isLotteryDeleted)
            actualLotteryId = lottery.id;
        return actualLotteryId;
    }
    function getOpenedLotteries() public view returns (uint256[] memory) {
        return _openLotteries;
    }
    function checkIsAdmin(address addr) private view returns (bool) {
        bool isAdmin = false;
        for (uint i = 0; i < _admins.length; i++) {
            if (addr == _admins[i]) {
                isAdmin = true;
                break;
            }
        }
        return isAdmin;
    }
    function removeAdmin(address addr) private {
        require(
            checkIsAdmin(addr),
            "Невозможно удалить админа, пользователь не админ."
        );
        require(
            _adminsParts[addr] == 0,
            "Невозможно удалить админа, доля не ровна 0."
        );
        uint index;
        for (uint i = 0; i < _admins.length; i++) {
            if (_admins[i] == addr) {
                index = i;
                break;
            }
        }
        for (uint i = index; i < _admins.length.sub(1); i++) {
            _admins[i] = _admins[i + 1];
        }
        _admins.length--;
    }
    function addPlayerToLottery(Lottery memory lottery) private {
        require(
            lottery.begin <= now && lottery.end >= now,
            "Невозможно добавить участника в лотерею с данным периодом."
        );
        require(
            lottery.status == LotteryStatus.Open,
            "Лотерея закрыта для участия. Добавление участника невозможно."
        );
        Player memory player = Player({
            addr: msg.sender,
            blockNumber: block.number
        });
        _players[lottery.id].push(player);
    }
    function createChildLottery(Lottery storage parentLottery) private {
        if (!parentLottery.isContinued)
            return;
        uint period = parentLottery.end.sub(parentLottery.begin);
        uint begin = parentLottery.end;
        uint end = begin.add(period);
        if (end < now)
            (begin, end) = getPeriodBorders(begin, end, now);
        _lastLotteryId = _lastLotteryId.add(1);
        _lotteries[_lastLotteryId] = Lottery({
            id: _lastLotteryId,
            name: parentLottery.name,
            owner: msg.sender,
            price: parentLottery.price,
            begin: begin,
            end: end,
            number: parentLottery.number.add(1),
            pot: 0,
            status: LotteryStatus.Open,
            prizeType: parentLottery.prizeType,
            parentId: parentLottery.id,
            childId: None,
            isContinued: parentLottery.isContinued,
            winNumber: 0,
            blockNumberForRandom: 0,
            blockHashForRandom: 0x0
         });
        parentLottery.childId = _lastLotteryId;
        _openLotteries.push(_lastLotteryId);
        emit NewLotteryEvent(_lastLotteryId);
    }

    function getPeriodBorders(uint begin, uint end, uint currentTime)
        private
        pure
        returns (uint, uint)
    {
        if (end < currentTime) {
            uint period = end.sub(begin);
            uint n = currentTime.sub(end);
            n = n.div(period);
            n = n.add(1);
            uint delta = n.mul(period);
            begin = begin.add(delta);
            end = end.add(delta);
        }
        return (begin, end);
    }
    function finalizeLottery(Lottery storage lottery) private {
        if (_players[lottery.id].length == 0)
            finalizeEmptyLottery(lottery);
        else
            finalizeNotEmptyLottery(lottery);
    }
    function finalizeEmptyLottery(Lottery storage lottery) private {
        lottery.status = LotteryStatus.Finished;
        removeFinishedLotteryFromOpened(lottery.id);
        emit FinishedLotteryEvent(lottery.id);
        if (lottery.isContinued)
            createChildLottery(lottery);
    }
    function finalizeNotEmptyLottery(Lottery storage lottery) private {
        (
            lottery.winNumber,
            lottery.blockNumberForRandom,
            lottery.blockHashForRandom
        ) = getWinNumber(lottery);
        lottery.status = LotteryStatus.Finished;
        removeFinishedLotteryFromOpened(lottery.id);
        emit FinishedLotteryEvent(lottery.id);
        uint256 n = getWinningsCount(lottery);
        uint256[] memory shareOfWinnings = getShareOfWinnings(n);
        uint256 remainder = lottery.pot;
        for (uint256 i = 0; i < n; i++) {
            uint256 playerIndex = lottery.winNumber.add(i);
            if (playerIndex >= _players[lottery.id].length)
                playerIndex = playerIndex.sub(_players[lottery.id].length);
            uint256 prize = shareOfWinnings[i].mul(lottery.pot).div(MAX_PERCENTS);
            if (prize > 0) {
                remainder = remainder.sub(prize);
                address payable addr = address(uint160(_players[lottery.id][playerIndex].addr));
                _winPlayers[lottery.id].push(addr);
                _winPlayerPrizes[lottery.id].push(prize);
                addr.transfer(prize);
                emit WinPrizeEvent(addr, prize, lottery.id);
            }
        }
        if (remainder > 0) {
            _totalFee = _totalFee.add(remainder);
        }
        if (lottery.isContinued)
            createChildLottery(lottery);
    }
    function removeFinishedLotteryFromOpened(uint256 lotteryId) private {
        bool exists = false;
        uint index;
        for (uint i = 0; i < _openLotteries.length; i++) {
            if (_openLotteries[i] == lotteryId) {
                index = i;
                exists = true;
                break;
            }
        }
        require(exists, "id лотереи нет в списке открытых.");
        for (uint i = index; i < _openLotteries.length.sub(1); i++) {
            _openLotteries[i] = _openLotteries[i + 1];
        }
        _openLotteries.length--;
    }
    function getWinningsCount(Lottery memory lottery)
        private
        view
        returns (uint256)
    {
        require(
            _players[lottery.id].length > 0,
            "Невозможно вычислить количество победителей для 0 участников."
        );
        uint256 result;
        uint256 remainder = 0;
        uint256 playersCount = _players[lottery.id].length;
        if (lottery.prizeType == LotteryPrizeType.First) {
            result = 1;
        } else if (lottery.prizeType == LotteryPrizeType.All) {
            result = _players[lottery.id].length;
        } else if (lottery.prizeType == LotteryPrizeType.T10) {
            remainder = playersCount.mod(10);
            result = playersCount.div(10);
        } else if (lottery.prizeType == LotteryPrizeType.T30) {
            result = playersCount.mul(30);
            remainder = result.mod(100);
            result = result.div(100);
        } else {
            revert("Лотерея имеет неизвестный тип распределения выигрышей.");
        }
        if (remainder > 0 && result < playersCount) {
            result = result.add(1);
        }
        return result;
    }
    function getWinNumber(Lottery memory lottery)
        private
        view
        returns (uint256, uint, bytes32)
    {
        require(
            lottery.end < now,
            "Дата окончания лотереи должна быть меньше текущего времени. Определение победного номера невозможно."
        );
        require(
            _players[lottery.id].length > 0,
             "Пустой список участников. Определение победного номера невозможно."
        );
        uint256 lastIndex = _players[lottery.id].length.sub(1);
        uint blockNumber = _players[lottery.id][lastIndex].blockNumber;
        if (block.number.sub(blockNumber) > MAX_RECENT_BLOCK_NUMBER)
            blockNumber = block.number.sub(MAX_RECENT_BLOCK_NUMBER);
        bytes32 hash = blockhash(blockNumber);
        return (getRandomNumber(hash, _players[lottery.id].length), blockNumber, hash);
    }
    function getRandomNumber(bytes32 hash, uint256 n)
        private
        pure
        returns (uint256)
    {
        return uint256(keccak256(abi.encodePacked(hash))).mod(n);
    }
    function getActualLotteryPrice(Lottery memory lottery)
        private
        view
        returns (uint)
    {
        uint256 discount = 0;
        uint256 percent = 0;
        (uint b1, uint b2, uint b3) = splitPeriod(lottery.begin, lottery.end);
        if (lottery.begin <= now && now < b1) {
            percent = 300;
        } else if (b1 <= now && now < b2) {
            percent = 200;
        } else if (b2 <= now && now < b3) {
            percent = 100;
        }
        discount = lottery.price.mul(percent).div(MAX_PERCENTS);
        return lottery.price.sub(discount);
    }
    function splitPeriod(uint begin, uint end)
        private
        pure
        returns (uint, uint, uint)
    {
        require(
            begin < end,
            "Невозможно разделить период. Время начала периода больше окончания."
        );
        uint step = (end.sub(begin)).div(4);
        uint b1 = begin.add(step);
        uint b2 = b1.add(step);
        uint b3 = b2.add(step);
        return (b1, b2, b3);
    }
    function getShareOfWinnings(uint256 n)
        private
        pure
        returns (uint[] memory)
    {
        uint[] memory result = new uint[](n);
        uint256 divider = n.mul(n.add(1));
        for (uint256 k = 0; k < n; k++) {
            uint256 p = (n.sub(k)).mul(20000);
            p = p.div(divider);
            result[k] = p;
        }
        return result;
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"lotteryId","type":"uint256"}],"name":"deleteLottery","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"lotteryId","type":"uint256"}],"name":"getActualLotteryId","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getOpenedLotteries","outputs":[{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getLotteryName","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getAdmins","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"lotteryId","type":"uint256"}],"name":"getWinPlayers","outputs":[{"name":"","type":"address[]"},{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"},{"name":"part","type":"uint256"}],"name":"transferAdminPart","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"lotteryId","type":"uint256"}],"name":"buyTicket","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[{"name":"addr","type":"address"}],"name":"getAdminPartByAddress","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"lotteryId","type":"uint256"}],"name":"getLotteryPlayerAddresses","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getLotteryInfo","outputs":[{"name":"","type":"uint256"},{"name":"","type":"address"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint8"},{"name":"","type":"uint8"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getTotalFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"finalizeLotteries","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"getOwner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"lotteryId","type":"uint256"}],"name":"getLotteryPlayers","outputs":[{"name":"","type":"address[]"},{"name":"","type":"uint256[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"id","type":"uint256"}],"name":"getFinishedLotteryInfo","outputs":[{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"uint256"},{"name":"","type":"bytes32"},{"name":"","type":"uint256"},{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"name","type":"string"},{"name":"price","type":"uint256"},{"name":"begin","type":"uint256"},{"name":"end","type":"uint256"},{"name":"prizeType","type":"uint8"}],"name":"createLottery","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"distributeDividend","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"lotteryId","type":"uint256"}],"name":"BuyTicketEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lotteryId","type":"uint256"}],"name":"NewLotteryEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lotteryId","type":"uint256"}],"name":"FinishedLotteryEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"lotteryId","type":"uint256"}],"name":"DeleteLotteryEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"player","type":"address"},{"indexed":true,"name":"prize","type":"uint256"},{"indexed":true,"name":"lotteryId","type":"uint256"}],"name":"WinPrizeEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":true,"name":"part","type":"uint256"}],"name":"TransferAdminPartEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"admin","type":"address"},{"indexed":true,"name":"sum","type":"uint256"}],"name":"DividendEvent","type":"event"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060026000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050612710600360008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550615d87806200014f6000396000f3fe6080604052600436106100f6576000357c010000000000000000000000000000000000000000000000000000000090048063058f1a411461027357806306c069ae146102ae5780631e02dca3146102fd5780632a69ecf11461036957806331ae450b1461041d5780633454ba901461048957806364685e5e1461056157806367dd74ca146105bc5780636f135ccd146105ea578063714f03fe1461064f57806376b3c8a8146106df5780637ae316d0146107c75780637ae55852146107f2578063893d20e814610809578063a646daf614610860578063afaf3a4714610938578063dc38d292146109aa578063f6ef8f0a14610a9d575b6000809050600080905060008090505b60098054905081101561017657600060098281548110151561012457fe5b9060005260206000200154905060006004600083815260200190815260200160002060030154905080341015801561015b57508381115b15610167578194508093505b50508080600101915050610106565b5060008214151561018f5761018a82610ab4565b61026f565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252606a8152602001807fd09dd0b520d0bdd0b0d0b9d0b4d0b5d0bdd0b020d0bfd0bed0b4d185d0bed0b481526020017fd18fd189d0b0d18f20d0bbd0bed182d0b5d180d0b5d18f2e20d09fd0bed0bad181526020017f83d0bfd0bad0b020d0b1d0b8d0bbd0b5d182d0b020d0bdd0b5d0b2d0bed0b7d081526020017fbcd0bed0b6d0bdd0b02e0000000000000000000000000000000000000000000081525060800191505060405180910390fd5b5050005b34801561027f57600080fd5b506102ac6004803603602081101561029657600080fd5b81019080803590602001909291905050506112ae565b005b3480156102ba57600080fd5b506102e7600480360360208110156102d157600080fd5b8101908080359060200190929190505050611712565b6040518082815260200191505060405180910390f35b34801561030957600080fd5b50610312611c8b565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561035557808201518184015260208101905061033a565b505050509050019250505060405180910390f35b34801561037557600080fd5b506103a26004803603602081101561038c57600080fd5b8101908080359060200190929190505050611ce3565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103e25780820151818401526020810190506103c7565b50505050905090810190601f16801561040f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561042957600080fd5b50610432611d9b565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561047557808201518184015260208101905061045a565b505050509050019250505060405180910390f35b34801561049557600080fd5b506104c2600480360360208110156104ac57600080fd5b8101908080359060200190929190505050611e29565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156105095780820151818401526020810190506104ee565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561054b578082015181840152602081019050610530565b5050505090500194505050505060405180910390f35b34801561056d57600080fd5b506105ba6004803603604081101561058457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612119565b005b6105e8600480360360208110156105d257600080fd5b8101908080359060200190929190505050610ab4565b005b3480156105f657600080fd5b506106396004803603602081101561060d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061253e565b6040518082815260200191505060405180910390f35b34801561065b57600080fd5b506106886004803603602081101561067257600080fd5b8101908080359060200190929190505050612587565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156106cb5780820151818401526020810190506106b0565b505050509050019250505060405180910390f35b3480156106eb57600080fd5b506107186004803603602081101561070257600080fd5b8101908080359060200190929190505050612824565b604051808d81526020018c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018b81526020018a815260200189815260200188815260200187815260200186600181111561077e57fe5b60ff16815260200185600381111561079257fe5b60ff168152602001848152602001838152602001821515151581526020019c5050505050505050505050505060405180910390f35b3480156107d357600080fd5b506107dc612aa4565b6040518082815260200191505060405180910390f35b3480156107fe57600080fd5b50610807612aae565b005b34801561081557600080fd5b5061081e612bd4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561086c57600080fd5b506108996004803603602081101561088357600080fd5b8101908080359060200190929190505050612bfd565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156108e05780820151818401526020810190506108c5565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610922578082015181840152602081019050610907565b5050505090500194505050505060405180910390f35b34801561094457600080fd5b506109716004803603602081101561095b57600080fd5b8101908080359060200190929190505050612f0c565b60405180878152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b3480156109b657600080fd5b50610a9b600480360360a08110156109cd57600080fd5b81019080803590602001906401000000008111156109ea57600080fd5b8201836020820111156109fc57600080fd5b80359060200191846001830284011164010000000083111715610a1e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001909291908035906020019092919080359060200190929190803560ff16906020019092919050505061321b565b005b348015610aa957600080fd5b50610ab2613679565b005b600554811115606060405190810160405280602f81526020017fd09dd0b5d181d183d189d0b5d181d182d0b2d183d18ed189d0b8d0b92069642081526020017fd0bbd0bed182d0b5d180d0b5d0b82e0000000000000000000000000000000000815250901515610bbf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610b84578082015181840152602081019050610b69565b50505050905090810190601f168015610bb15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50610bc8612aae565b6000610bd382611712565b905060008114151515610cc0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260768152602001807fd09bd0bed182d0b5d180d0b5d18f20d0b7d0b0d0b2d0b5d180d188d0b5d0bdd081526020017fb020d0b820d0bdd0b520d0b2d0bed0b7d0bed0b1d0bdd0bed0b2d0b8d182d18181526020017fd18f2e20d09fd0bed0bad183d0bfd0bad0b020d0b1d0b8d0bbd0b5d182d0b02081526020017fd0bdd0b520d0b2d0bed0b7d0bcd0bed0b6d0bdd0b02e0000000000000000000081525060800191505060405180910390fd5b60006004600083815260200190815260200160002090506000610eca82610200604051908101604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d8d5780601f10610d6257610100808354040283529160200191610d8d565b820191906000526020600020905b815481529060010190602001808311610d7057829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff166001811115610e3c57fe5b6001811115610e4757fe5b81526020016008820160019054906101000a900460ff166003811115610e6957fe5b6003811115610e7457fe5b815260200160098201548152602001600a8201548152602001600b820160009054906101000a900460ff16151515158152602001600c8201548152602001600d8201548152602001600e820154815250506138d8565b9050803410151515610f90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605d8152602001807fd0a1d183d0bcd0bcd0b020d0bfd0b5d180d0b5d0b2d0bed0b4d0b020d0bcd0b581526020017fd0bdd18cd188d0b520d181d182d0bed0b8d0bcd0bed181d182d0b820d183d18781526020017fd0b0d181d182d0b8d18f20d0b220d0bbd0bed182d0b5d180d0b5d0b82e00000081525060600191505060405180910390fd5b61118182610200604051908101604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110445780601f1061101957610100808354040283529160200191611044565b820191906000526020600020905b81548152906001019060200180831161102757829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff1660018111156110f357fe5b60018111156110fe57fe5b81526020016008820160019054906101000a900460ff16600381111561112057fe5b600381111561112b57fe5b815260200160098201548152602001600a8201548152602001600b820160009054906101000a900460ff16151515158152602001600c8201548152602001600d8201548152602001600e820154815250506139ab565b60006111ac61271061119e6103e885613c7e90919063ffffffff16565b613d4b90919063ffffffff16565b90506111d76111c48284613e0490919063ffffffff16565b8460070154613eb590919063ffffffff16565b83600701819055506111f481600154613eb590919063ffffffff16565b600181905550600061120f8334613e0490919063ffffffff16565b90506000811115611262573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611260573d6000803e3d6000fd5b505b843373ffffffffffffffffffffffffffffffffffffffff167fc93f534ae2f87e33bba15c42a184baacb06d1e29fc264ac440bf371978807f9760405160405180910390a3505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260468152602001807fd0a0d0b0d0b7d180d0b5d188d0b5d0bdd0be20d182d0bed0bbd18cd0bad0be2081526020017fd0b2d0bbd0b0d0b4d0b5d0bbd18cd186d18320d0bad0bed0bdd182d180d0b0d081526020017fbad182d0b02e000000000000000000000000000000000000000000000000000081525060600191505060405180910390fd5b600554811115606060405190810160405280602f81526020017fd09dd0b5d181d183d189d0b5d181d182d0b2d183d18ed189d0b8d0b92069642081526020017fd0bbd0bed182d0b5d180d0b5d0b82e00000000000000000000000000000000008152509015156114c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561148e578082015181840152602081019050611473565b50505050905090810190601f1680156114bb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000600460008381526020019081526020016000209050600060018111156114ee57fe5b8160080160009054906101000a900460ff16600181111561150b57fe5b1415156115cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260508152602001807fd09bd0bed182d0b5d180d0b5d18f20d183d0b6d0b520d0b7d0b0d0b2d0b5d18081526020017fd188d0b5d0bdd0b02c20d183d0b4d0b0d0bbd0b5d0bdd0b8d0b520d0bdd0b5d081526020017fb2d0bed0b7d0bcd0bed0b6d0bdd0be2e0000000000000000000000000000000081525060600191505060405180910390fd5b80600b0160009054906101000a900460ff1615156116c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260758152602001807fd09bd0bed182d0b5d180d0b5d18f20d183d0b6d0b520d0bed182d0bcd0b5d18781526020017fd0b5d0bdd0b020d0ba20d183d0b4d0b0d0bbd0b5d0bdd0b8d18e2c20d0bfd0be81526020017fd0b2d182d0bed180d0bdd0bed0b520d183d0b4d0b0d0bbd0b5d0bdd0b8d0b52081526020017fd0bdd0b5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be2e000000000000000000000081525060800191505060405180910390fd5b600081600b0160006101000a81548160ff021916908315150217905550817f620b39d9367236157893f98582c2e8cb5ced0eb6497fdb86451b7e4d2fd3859660405160405180910390a25050565b6000600554821115606060405190810160405280602f81526020017fd09dd0b5d181d183d189d0b5d181d182d0b2d183d18ed189d0b8d0b92069642081526020017fd0bbd0bed182d0b5d180d0b5d0b82e000000000000000000000000000000000081525090151561181f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156117e45780820151818401526020810190506117c9565b50505050905090810190601f1680156118115780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008090506000809050611832615ac4565b60046000868152602001908152602001600020610200604051908101604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118f55780601f106118ca576101008083540402835291602001916118f5565b820191906000526020600020905b8154815290600101906020018083116118d857829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff1660018111156119a457fe5b60018111156119af57fe5b81526020016008820160019054906101000a900460ff1660038111156119d157fe5b60038111156119dc57fe5b815260200160098201548152602001600a8201548152602001600b820160009054906101000a900460ff16151515158152602001600c8201548152602001600d8201548152602001600e8201548152505090505b600180811115611a3c57fe5b8161010001516001811115611a4d57fe5b1415611c715760008161016001511415611a6a5760019150611c71565b600460008261016001518152602001908152602001600020610200604051908101604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b325780601f10611b0757610100808354040283529160200191611b32565b820191906000526020600020905b815481529060010190602001808311611b1557829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff166001811115611be157fe5b6001811115611bec57fe5b81526020016008820160019054906101000a900460ff166003811115611c0e57fe5b6003811115611c1957fe5b815260200160098201548152602001600a8201548152602001600b820160009054906101000a900460ff16151515158152602001600c8201548152602001600d8201548152602001600e820154815250509050611a30565b811515611c8057806000015192505b829350505050919050565b60606009805480602002602001604051908101604052809291908181526020018280548015611cd957602002820191906000526020600020905b815481526020019060010190808311611cc5575b5050505050905090565b6060600460008381526020019081526020016000206001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611d8f5780601f10611d6457610100808354040283529160200191611d8f565b820191906000526020600020905b815481529060010190602001808311611d7257829003601f168201915b50505050509050919050565b60606002805480602002602001604051908101604052809291908181526020018280548015611e1f57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611dd5575b5050505050905090565b606080600554831115606060405190810160405280602f81526020017fd09dd0b5d181d183d189d0b5d181d182d0b2d183d18ed189d0b8d0b92069642081526020017fd0bbd0bed182d0b5d180d0b5d0b82e0000000000000000000000000000000000815250901515611f37576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611efc578082015181840152602081019050611ee1565b50505050905090810190601f168015611f295780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060606007600085815260200190815260200160002080549050604051908082528060200260200182016040528015611f7f5781602001602082028038833980820191505090505b50905060606008600086815260200190815260200160002080549050604051908082528060200260200182016040528015611fc95781602001602082028038833980820191505090505b50905060008090505b600760008781526020019081526020016000208054905081101561209257600760008781526020019081526020016000208181548110151561201057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838281518110151561204957fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050611fd2565b5060008090505b600860008781526020019081526020016000208054905081101561210b5760086000878152602001908152602001600020818154811015156120d757fe5b906000526020600020015482828151811015156120f057fe5b90602001906020020181815250508080600101915050612099565b508181935093505050915091565b61212233613f65565b15156121e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260428152602001807fd0a0d0b0d0b7d180d0b5d188d0b5d0bdd0be20d182d0bed0bbd18cd0bad0be2081526020017fd0b0d0b4d0bcd0b8d0bdd0b0d0bc20d0bad0bed0bdd182d180d0b0d0bad182d081526020017fb02e00000000000000000000000000000000000000000000000000000000000081525060600191505060405180910390fd5b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481111515156122e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260498152602001807fd09fd0b5d180d0b5d0b4d0b0d0b2d0b0d0b5d0bcd0b0d18f20d0b4d0bed0bbd181526020017f8f20d0b1d0bed0bbd18cd188d0b520d0b4d0bed0bbd0b820d0b2d0bbd0b0d0b481526020017fd0b5d0bdd0b8d18f2e000000000000000000000000000000000000000000000081525060600191505060405180910390fd5b6122ed613679565b6122f682613f65565b15156123635760028290806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b6123b581600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613e0490919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061244a81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613eb590919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156124df576124de3361400c565b5b808273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fec6680b9c5d004bf7f43ab5a4cc4fe1034e8f23df8395df3aa944db74fcddfb960405160405180910390a45050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6060600554821115606060405190810160405280602f81526020017fd09dd0b5d181d183d189d0b5d181d182d0b2d183d18ed189d0b8d0b92069642081526020017fd0bbd0bed182d0b5d180d0b5d0b82e0000000000000000000000000000000000815250901515612694576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561265957808201518184015260208101905061263e565b50505050905090810190601f1680156126865780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50606060066000848152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b8282101561275c57838290600052602060002090600202016040805190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182015481525050815260200190600101906126ca565b505050509050606081516040519080825280602002602001820160405280156127945781602001602082028038833980820191505090505b50905060008090505b82518110156128195782818151811015156127b457fe5b906020019060200201516000015182828151811015156127d057fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050808060010191505061279d565b508092505050919050565b60008060008060008060008060008060008061283e615ac4565b600460008f8152602001908152602001600020610200604051908101604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156129015780601f106128d657610100808354040283529160200191612901565b820191906000526020600020905b8154815290600101906020018083116128e457829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff1660018111156129b057fe5b60018111156129bb57fe5b81526020016008820160019054906101000a900460ff1660038111156129dd57fe5b60038111156129e857fe5b815260200160098201548152602001600a8201548152602001600b820160009054906101000a900460ff16151515158152602001600c8201548152602001600d8201548152602001600e82015481525050905080600001518160400151826060015183608001518460a001518560c001518660e001518761010001518861012001518961014001518a61016001518b61018001519c509c509c509c509c509c509c509c509c509c509c509c505091939597999b5091939597999b565b6000600154905090565b60008090505b600980549050811015612bd1576000600982815481101515612ad257fe5b906000526020600020015490504260046000838152602001908152602001600020600501541015612bc257600060066000838152602001908152602001600020805490501115612ba6576000612b4860016006600085815260200190815260200160002080549050613e0490919063ffffffff16565b905060006006600084815260200190815260200160002082815481101515612b6c57fe5b90600052602060002090600202016001015490506001612b958243613e0490919063ffffffff16565b1415612ba357505050612bc4565b50505b612bc160046000838152602001908152602001600020614352565b5b505b8080600101915050612ab4565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606080600554831115606060405190810160405280602f81526020017fd09dd0b5d181d183d189d0b5d181d182d0b2d183d18ed189d0b8d0b92069642081526020017fd0bbd0bed182d0b5d180d0b5d0b82e0000000000000000000000000000000000815250901515612d0b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612cd0578082015181840152602081019050612cb5565b50505050905090810190601f168015612cfd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50606060066000858152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015612dd357838290600052602060002090600202016040805190810160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160018201548152505081526020019060010190612d41565b50505050905060608151604051908082528060200260200182016040528015612e0b5781602001602082028038833980820191505090505b50905060608251604051908082528060200260200182016040528015612e405781602001602082028038833980820191505090505b50905060008090505b8351811015612efd578381815181101515612e6057fe5b90602001906020020151600001518382815181101515612e7c57fe5b9060200190602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508381815181101515612ec657fe5b90602001906020020151602001518282815181101515612ee257fe5b90602001906020020181815250508080600101915050612e49565b50818194509450505050915091565b600080600080600080612f1d615ac4565b60046000898152602001908152602001600020610200604051908101604052908160008201548152602001600182018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612fe05780601f10612fb557610100808354040283529160200191612fe0565b820191906000526020600020905b815481529060010190602001808311612fc357829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff16600181111561308f57fe5b600181111561309a57fe5b81526020016008820160019054906101000a900460ff1660038111156130bc57fe5b60038111156130c757fe5b815260200160098201548152602001600a8201548152602001600b820160009054906101000a900460ff16151515158152602001600c8201548152602001600d8201548152602001600e82015481525050905060018081111561312657fe5b816101000151600181111561313757fe5b1415156131d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e8152602001807fd09bd0bed182d0b5d180d0b5d18f20d0b5d189d0b520d0bdd0b520d0b7d0b0d081526020017fb2d0b5d180d188d0b5d0bdd0b02e00000000000000000000000000000000000081525060400191505060405180910390fd5b8060000151816101a00151826101c00151836101e001518460e00151600660008e8152602001908152602001600020805490509650965096509650965096505091939550919395565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561332b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260468152602001807fd0a0d0b0d0b7d180d0b5d188d0b5d0bdd0be20d182d0bed0bbd18cd0bad0be2081526020017fd0b2d0bbd0b0d0b4d0b5d0bbd18cd186d18320d0bad0bed0bdd182d180d0b0d081526020017fbad182d0b02e000000000000000000000000000000000000000000000000000081525060600191505060405180910390fd5b81831015156133ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605d8152602001807fd092d180d0b5d0bcd18f20d0bdd0b0d187d0b0d0bbd0b020d0bbd0bed182d0b581526020017fd180d0b5d0b820d0b4d0bed0bbd0b6d0bdd0be20d0b1d18bd182d18c20d0bcd081526020017fb5d0bdd18cd188d0b520d0bed0bad0bed0bdd187d0b0d0bdd0b8d18f2e00000081525060600191505060405180910390fd5b6134046001600554613eb590919063ffffffff16565b6005819055506102006040519081016040528060055481526020018681526020013373ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184815260200183815260200160018152602001600081526020016000600181111561346e57fe5b815260200182600381111561347f57fe5b81526020016000815260200160008152602001600115158152602001600081526020016000815260200160006001028152506004600060055481526020019081526020016000206000820151816000015560208201518160010190805190602001906134ec929190615b73565b5060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083600181111561358b57fe5b02179055506101208201518160080160016101000a81548160ff021916908360038111156135b557fe5b0217905550610140820151816009015561016082015181600a015561018082015181600b0160006101000a81548160ff0219169083151502179055506101a082015181600c01556101c082015181600d01556101e082015181600e0155905050600960055490806001815401808255809150509060018203906000526020600020016000909192909190915055506005547fddc3acf9e54c3d96c68a9dfe3f070f10dc8a4a4cec76aeaf2e083ca5debe05ca60405160405180910390a25050505050565b61368233613f65565b1515613742576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260428152602001807fd0a0d0b0d0b7d180d0b5d188d0b5d0bdd0be20d182d0bed0bbd18cd0bad0be2081526020017fd0b0d0b4d0bcd0b8d0bdd0b0d0bc20d0bad0bed0bdd182d180d0b0d0bad182d081526020017fb02e00000000000000000000000000000000000000000000000000000000000081525060600191505060405180910390fd5b60006001541415613752576138d6565b6000600154905060008090505b6002805490508110156138d357600060028281548110151561377d57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000613812612710613804600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205487613c7e90919063ffffffff16565b613d4b90919063ffffffff16565b905060008111156138c45761383281600154613e0490919063ffffffff16565b6001819055508173ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561387e573d6000803e3d6000fd5b50808273ffffffffffffffffffffffffffffffffffffffff167f739f958828b2889a70ad6723d56baac0346b1d420867982ded98328e3fefda0f60405160405180910390a35b5050808060010191505061375f565b50505b565b60008060009050600080905060008060006138fb87608001518860a00151614390565b9250925092504287608001511115801561391457508242105b156139235761012c935061395b565b42831115801561393257508142105b156139405760c8935061395a565b42821115801561394f57508042105b1561395957606493505b5b5b613986612710613978868a60600151613c7e90919063ffffffff16565b613d4b90919063ffffffff16565b945061399f858860600151613e0490919063ffffffff16565b95505050505050919050565b428160800151111580156139c35750428160a0015110155b1515613aa9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252606c8152602001807fd09dd0b5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be20d0b4d0bed0b1d0b0d0b2d081526020017fb8d182d18c20d183d187d0b0d181d182d0bdd0b8d0bad0b020d0b220d0bbd0be81526020017fd182d0b5d180d0b5d18e20d18120d0b4d0b0d0bdd0bdd18bd0bc20d0bfd0b5d181526020017f80d0b8d0bed0b4d0bed0bc2e000000000000000000000000000000000000000081525060800191505060405180910390fd5b60006001811115613ab657fe5b8161010001516001811115613ac757fe5b141515613bae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260728152602001807fd09bd0bed182d0b5d180d0b5d18f20d0b7d0b0d0bad180d18bd182d0b020d0b481526020017fd0bbd18f20d183d187d0b0d181d182d0b8d18f2e20d094d0bed0b1d0b0d0b2d081526020017fbbd0b5d0bdd0b8d0b520d183d187d0b0d181d182d0bdd0b8d0bad0b020d0bdd081526020017fb5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be2e000000000000000000000000000081525060800191505060405180910390fd5b613bb6615bf3565b60408051908101604052803373ffffffffffffffffffffffffffffffffffffffff1681526020014381525090506006600083600001518152602001908152602001600020819080600181540180825580915050906001820390600052602060002090600202016000909192909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101555050505050565b600080831415613c915760009050613d45565b60008284029050828482811515613ca457fe5b04141515613d40576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001807fd09ed188d0b8d0b1d0bad0b020d183d0bcd0bdd0bed0b6d0b5d0bdd0b8d18f2081526020017fd187d0b8d181d0b5d0bb2e00000000000000000000000000000000000000000081525060400191505060405180910390fd5b809150505b92915050565b60008082111515613dea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001807fd09ed188d0b8d0b1d0bad0b020d0b4d0b5d0bbd0b5d0bdd0b8d18f20d187d0b881526020017fd181d0b5d0bb2e0000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b60008284811515613df757fe5b0490508091505092915050565b6000828211151515613ea4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001807fd09ed188d0b8d0b1d0bad0b020d0b2d18bd187d0b8d182d0b0d0bdd0b8d18f2081526020017fd187d0b8d181d0b5d0bb2e00000000000000000000000000000000000000000081525060400191505060405180910390fd5b600082840390508091505092915050565b6000808284019050838110151515613f5b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001807fd09ed188d0b8d0b1d0bad0b020d181d0bbd0bed0b6d0b5d0bdd0b8d18f20d18781526020017fd0b8d181d0b5d0bb2e000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b8091505092915050565b6000806000905060008090505b60028054905081101561400257600281815481101515613f8e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415613ff55760019150614002565b8080600101915050613f72565b5080915050919050565b61401581613f65565b15156140d5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605b8152602001807fd09dd0b5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be20d183d0b4d0b0d0bbd0b8d181526020017f82d18c20d0b0d0b4d0bcd0b8d0bdd0b02c20d0bfd0bed0bbd18cd0b7d0bed0b281526020017fd0b0d182d0b5d0bbd18c20d0bdd0b520d0b0d0b4d0bcd0b8d0bd2e000000000081525060600191505060405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415156141d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604d8152602001807fd09dd0b5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be20d183d0b4d0b0d0bbd0b8d181526020017f82d18c20d0b0d0b4d0bcd0b8d0bdd0b02c20d0b4d0bed0bbd18f20d0bdd0b52081526020017fd180d0bed0b2d0bdd0b020302e0000000000000000000000000000000000000081525060600191505060405180910390fd5b600080600090505b60028054905081101561426f578273ffffffffffffffffffffffffffffffffffffffff1660028281548110151561421357fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156142625780915061426f565b80806001019150506141e0565b5060008190505b61428f6001600280549050613e0490919063ffffffff16565b811015614337576002600182018154811015156142a857fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166002828154811015156142e257fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508080600101915050614276565b50600280548091906001900361434d9190615c23565b505050565b600060066000836000015481526020019081526020016000208054905014156143835761437e81614501565b61438d565b61438c81614589565b5b50565b6000806000838510151561447e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252607d8152602001807fd09dd0b5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be20d180d0b0d0b7d0b4d0b5d081526020017fbbd0b8d182d18c20d0bfd0b5d180d0b8d0bed0b42e20d092d180d0b5d0bcd18f81526020017f20d0bdd0b0d187d0b0d0bbd0b020d0bfd0b5d180d0b8d0bed0b4d0b020d0b1d081526020017fbed0bbd18cd188d0b520d0bed0bad0bed0bdd187d0b0d0bdd0b8d18f2e00000081525060800191505060405180910390fd5b60006144a660046144988888613e0490919063ffffffff16565b613d4b90919063ffffffff16565b905060006144bd8288613eb590919063ffffffff16565b905060006144d48383613eb590919063ffffffff16565b905060006144eb8483613eb590919063ffffffff16565b9050828282965096509650505050509250925092565b60018160080160006101000a81548160ff0219169083600181111561452257fe5b02179055506145348160000154614cf1565b80600001547f35f0c4c5990e162eaedda2ea60c42bbe9399218d0d884f34ee6c6c8c916953bc60405160405180910390a280600b0160009054906101000a900460ff16156145865761458581614e6a565b5b50565b61477a81610200604051908101604052908160008201548152602001600182018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561463d5780601f106146125761010080835404028352916020019161463d565b820191906000526020600020905b81548152906001019060200180831161462057829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff1660018111156146ec57fe5b60018111156146f757fe5b81526020016008820160019054906101000a900460ff16600381111561471957fe5b600381111561472457fe5b815260200160098201548152602001600a8201548152602001600b820160009054906101000a900460ff16151515158152602001600c8201548152602001600d8201548152602001600e82015481525050615252565b83600c01600085600d01600087600e01600086919050558591905055849190505550505060018160080160006101000a81548160ff021916908360018111156147bf57fe5b02179055506147d18160000154614cf1565b80600001547f35f0c4c5990e162eaedda2ea60c42bbe9399218d0d884f34ee6c6c8c916953bc60405160405180910390a260006149f582610200604051908101604052908160008201548152602001600182018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156148b85780601f1061488d576101008083540402835291602001916148b8565b820191906000526020600020905b81548152906001019060200180831161489b57829003601f168201915b505050505081526020016002820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820160009054906101000a900460ff16600181111561496757fe5b600181111561497257fe5b81526020016008820160019054906101000a900460ff16600381111561499457fe5b600381111561499f57fe5b815260200160098201548152602001600a8201548152602001600b820160009054906101000a900460ff16151515158152602001600c8201548152602001600d8201548152602001600e82015481525050615493565b90506060614a0282615809565b905060008360070154905060008090505b83811015614ca4576000614a348287600c0154613eb590919063ffffffff16565b905060066000876000015481526020019081526020016000208054905081101515614a8957614a8660066000886000015481526020019081526020016000208054905082613e0490919063ffffffff16565b90505b6000614acd612710614abf89600701548887815181101515614aa757fe5b90602001906020020151613c7e90919063ffffffff16565b613d4b90919063ffffffff16565b90506000811115614c9557614aeb8185613e0490919063ffffffff16565b93506000600660008960000154815260200190815260200160002083815481101515614b1357fe5b906000526020600020906002020160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060076000896000015481526020019081526020016000208190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505060086000896000015481526020019081526020016000208290806001815401808255809150509060018203906000526020600020016000909192909190915055508073ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050158015614c49573d6000803e3d6000fd5b508760000154828273ffffffffffffffffffffffffffffffffffffffff167f03a669b96e881f4f0a2b1ef7e8c9f70a4baa5089a35378b42f5e3cc82875aed860405160405180910390a4505b50508080600101915050614a13565b506000811115614cca57614cc381600154613eb590919063ffffffff16565b6001819055505b83600b0160009054906101000a900460ff1615614ceb57614cea84614e6a565b5b50505050565b6000809050600080600090505b600980549050811015614d455783600982815481101515614d1b57fe5b90600052602060002001541415614d385780915060019250614d45565b8080600101915050614cfe565b50811515614de1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a8152602001807f696420d0bbd0bed182d0b5d180d0b5d0b820d0bdd0b5d18220d0b220d181d0bf81526020017fd0b8d181d0bad0b520d0bed182d0bad180d18bd182d18bd1852e00000000000081525060400191505060405180910390fd5b60008190505b614e006001600980549050613e0490919063ffffffff16565b811015614e4e57600960018201815481101515614e1957fe5b9060005260206000200154600982815481101515614e3357fe5b90600052602060002001819055508080600101915050614de7565b506009805480919060019003614e649190615c4f565b50505050565b80600b0160009054906101000a900460ff161515614e875761524f565b6000614ea482600401548360050154613e0490919063ffffffff16565b90506000826005015490506000614ec48383613eb590919063ffffffff16565b905042811015614ee257614ed98282426158ec565b80925081935050505b614ef86001600554613eb590919063ffffffff16565b600581905550610200604051908101604052806005548152602001856001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015614fab5780601f10614f8057610100808354040283529160200191614fab565b820191906000526020600020905b815481529060010190602001808311614f8e57829003601f168201915b505050505081526020013373ffffffffffffffffffffffffffffffffffffffff16815260200185600301548152602001838152602001828152602001614fff60018760060154613eb590919063ffffffff16565b8152602001600081526020016000600181111561501857fe5b81526020018560080160019054906101000a900460ff16600381111561503a57fe5b8152602001856000015481526020016000815260200185600b0160009054906101000a900460ff1615158152602001600081526020016000815260200160006001028152506004600060055481526020019081526020016000206000820151816000015560208201518160010190805190602001906150ba929190615b73565b5060408201518160020160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550606082015181600301556080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083600181111561515957fe5b02179055506101208201518160080160016101000a81548160ff0219169083600381111561518357fe5b0217905550610140820151816009015561016082015181600a015561018082015181600b0160006101000a81548160ff0219169083151502179055506101a082015181600c01556101c082015181600d01556101e082015181600e015590505060055484600a0181905550600960055490806001815401808255809150509060018203906000526020600020016000909192909190915055506005547fddc3acf9e54c3d96c68a9dfe3f070f10dc8a4a4cec76aeaf2e083ca5debe05ca60405160405180910390a25050505b50565b6000806000428460a001511015156152b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260bb815260200180615ca160bb913960c00191505060405180910390fd5b60006006600086600001518152602001908152602001600020805490501115156153b9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252607c8152602001807fd09fd183d181d182d0bed0b920d181d0bfd0b8d181d0bed0ba20d183d187d0b081526020017fd181d182d0bdd0b8d0bad0bed0b22e20d09ed0bfd180d0b5d0b4d0b5d0bbd0b581526020017fd0bdd0b8d0b520d0bfd0bed0b1d0b5d0b4d0bdd0bed0b3d0be20d0bdd0bed0bc81526020017fd0b5d180d0b020d0bdd0b5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be2e0000000081525060800191505060405180910390fd5b60006153e96001600660008860000151815260200190815260200160002080549050613e0490919063ffffffff16565b9050600060066000876000015181526020019081526020016000208281548110151561541157fe5b906000526020600020906002020160010154905060fa61543a8243613e0490919063ffffffff16565b11156154575761545460fa43613e0490919063ffffffff16565b90505b60008140905061548181600660008a600001518152602001908152602001600020805490506159a3565b82829550955095505050509193909250565b600080600660008460000151815260200190815260200160002080549050111515615598576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260728152602001807fd09dd0b5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be20d0b2d18bd187d0b8d181d081526020017fbbd0b8d182d18c20d0bad0bed0bbd0b8d187d0b5d181d182d0b2d0be20d0bfd081526020017fbed0b1d0b5d0b4d0b8d182d0b5d0bbd0b5d0b920d0b4d0bbd18f203020d183d181526020017f87d0b0d181d182d0bdd0b8d0bad0bed0b22e000000000000000000000000000081525060800191505060405180910390fd5b60008060009050600060066000866000015181526020019081526020016000208054905090506003808111156155ca57fe5b85610120015160038111156155db57fe5b14156155ea57600192506157d3565b600260038111156155f757fe5b856101200151600381111561560857fe5b14156156305760066000866000015181526020019081526020016000208054905092506157d2565b6000600381111561563d57fe5b856101200151600381111561564e57fe5b141561568557615668600a826159ea90919063ffffffff16565b915061567e600a82613d4b90919063ffffffff16565b92506157d1565b6001600381111561569257fe5b85610120015160038111156156a357fe5b14156156f0576156bd601e82613c7e90919063ffffffff16565b92506156d36064846159ea90919063ffffffff16565b91506156e9606484613d4b90919063ffffffff16565b92506157d0565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260668152602001807fd09bd0bed182d0b5d180d0b5d18f20d0b8d0bcd0b5d0b5d18220d0bdd0b5d0b881526020017fd0b7d0b2d0b5d181d182d0bdd18bd0b920d182d0b8d0bf20d180d0b0d181d0bf81526020017fd180d0b5d0b4d0b5d0bbd0b5d0bdd0b8d18f20d0b2d18bd0b8d0b3d180d18bd181526020017f88d0b5d0b92e000000000000000000000000000000000000000000000000000081525060800191505060405180910390fd5b5b5b5b6000821180156157e257508083105b156157fe576157fb600184613eb590919063ffffffff16565b92505b829350505050919050565b6060808260405190808252806020026020018201604052801561583b5781602001602082028038833980820191505090505b5090506000615866615857600186613eb590919063ffffffff16565b85613c7e90919063ffffffff16565b905060008090505b848110156158e157600061589f614e206158918489613e0490919063ffffffff16565b613c7e90919063ffffffff16565b90506158b48382613d4b90919063ffffffff16565b90508084838151811015156158c557fe5b906020019060200201818152505050808060010191505061586e565b508192505050919050565b6000808284101561599557600061590c8686613e0490919063ffffffff16565b905060006159238686613e0490919063ffffffff16565b90506159388282613d4b90919063ffffffff16565b905061594e600182613eb590919063ffffffff16565b905060006159658383613c7e90919063ffffffff16565b905061597a8189613eb590919063ffffffff16565b975061598f8188613eb590919063ffffffff16565b96505050505b848491509150935093915050565b60006159e282846040516020018082815260200191505060405160208183030381529060405280519060200120600190046159ea90919063ffffffff16565b905092915050565b6000808214151515615ab0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260478152602001807fd09ed188d0b8d0b1d0bad0b020d0bed0bfd180d0b5d0b4d0b5d0bbd0b5d0bdd081526020017fb8d18f20d0bed181d182d0b0d182d0bad0b020d0bed18220d0b4d0b5d0bbd0b581526020017fd0bdd0b8d18f2e0000000000000000000000000000000000000000000000000081525060600191505060405180910390fd5b8183811515615abb57fe5b06905092915050565b610200604051908101604052806000815260200160608152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600081526020016000815260200160008152602001600081526020016000815260200160006001811115615b2c57fe5b815260200160006003811115615b3e57fe5b815260200160008152602001600081526020016000151581526020016000815260200160008152602001600080191681525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10615bb457805160ff1916838001178555615be2565b82800160010185558215615be2579182015b82811115615be1578251825591602001919060010190615bc6565b5b509050615bef9190615c7b565b5090565b6040805190810160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600081525090565b815481835581811115615c4a57818360005260206000209182019101615c499190615c7b565b5b505050565b815481835581811115615c7657818360005260206000209182019101615c759190615c7b565b5b505050565b615c9d91905b80821115615c99576000816000905550600101615c81565b5090565b9056fed094d0b0d182d0b020d0bed0bad0bed0bdd187d0b0d0bdd0b8d18f20d0bbd0bed182d0b5d180d0b5d0b820d0b4d0bed0bbd0b6d0bdd0b020d0b1d18bd182d18c20d0bcd0b5d0bdd18cd188d0b520d182d0b5d0bad183d189d0b5d0b3d0be20d0b2d180d0b5d0bcd0b5d0bdd0b82e20d09ed0bfd180d0b5d0b4d0b5d0bbd0b5d0bdd0b8d0b520d0bfd0bed0b1d0b5d0b4d0bdd0bed0b3d0be20d0bdd0bed0bcd0b5d180d0b020d0bdd0b5d0b2d0bed0b7d0bcd0bed0b6d0bdd0be2ea165627a7a7230582061317b060f0d724b3fd5c8e129de592459d2e7cf04ede9d54fa3a9437a61b5cf0029

   Swarm Source:
bzzr://61317b060f0d724b3fd5c8e129de592459d2e7cf04ede9d54fa3a9437a61b5cf

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward