false
false
0

Contract Address Details

0x6924031220fA6d428B009cC253aDd22C178FFD22

Contract Name
SlotMachine
Creator
0xfc8f33–9a9935 at 0x740f48–3d373e
Balance
0 CLO
Tokens
Fetching tokens...
Transactions
148 Transactions
Transfers
0 Transfers
Gas Used
14,724,273
Last Balance Update
16288938
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
SlotMachine




Optimization enabled
false
Compiler version
v0.8.16+commit.07a7930e




EVM Version
default




Verified at
2024-09-26T15:34:04.450856Z

Contract source code

// SPDX-License-Identifier: GPL

pragma solidity ^0.8.16;

contract SlotMachine {

    uint256 solt; // соль исключит один и тот же результат рандома, если человек несколько раз дернет контракт в одном блоке 
    address public immutable owner = msg.sender; // Владелец контракта
    address public immutable owner2 = 0x000F0438b169F8CEcAF6D73f31a996810ed4E000; // Второй владелец
    mapping(uint256 => uint256) private listCombination; // Последовательный список всех комбинаций
    mapping(uint256 => uint256) private combinationPercent; // Проценты за комбинации
    uint256 index = 1; // последний свободный индекс у listCombination
    uint256 bidMax = 1000 * 1e18; // максимально допустимая ставка
    uint256 fee_percent = 5 * 1e18; // комиссия за каждое вращение в процентах (не влияет на ставку игрока, его ставка рассчитывается в полном объеме)
    uint256 balanceOwners; // накопления владельцев

    event Spin(
        uint indexed rnd, // выпавшее случайное значение
        uint indexed win_percent, // процент за выпавшую комбинацию относительно ставки
        uint win_pay // сумма выплаты за текущее вращение
    );

    modifier onlyOwners() {
        require((msg.sender == owner) || (msg.sender == owner2), "Only owners can call this.");
        _;
    }




    function game(uint256 _bet, uint256 _spin) payable external // главная игровая функция
    {
        require(msg.sender == tx.origin, "Only EOA"); // другие контракты не могут вызывать данную функцию
        require((_bet > 0) && (_spin > 0) , "high bet"); // ставка должна быть больше 0 и количество вращений не 0
        require(_bet <= bidMax, "high bet"); // ставка должна быть не больше максимальной
        require(msg.value >= _bet * _spin, "low CLO"); // отправленное кло должно покрывать ставку для каждого вращения

        balanceOwners += fee_percent * (_bet * _spin) / (100 * 1e18); // комиссионные сборы
        uint256 solt_temp = solt; 
        uint256 rnd;
        uint256 win_percent; // процент за выпавшую комбинацию относительно ставки
        uint256 win_pay; // сумма которую должен выплатить контракт за все победы в данной транзакции

        for(uint256 i; i < _spin; i++){
            rnd = random(_bet, _spin, solt_temp);
            solt_temp += rnd;

            win_percent = searchCombinations(rnd); // для начала вернем процент за выпавшую комбинацию

            if (win_percent == 0) { // нет выигрышных комбинаций
                emit Spin(rnd, win_percent, 0);
            } else if (win_percent == 1) { // возврат игроку половины ставки
                win_pay += _bet / 2;
                emit Spin(rnd, win_percent, _bet / 2);
            } else if (win_percent == 2) { // возврат игроку полной ставки
                win_pay += _bet;
                emit Spin(rnd, win_percent, _bet);
            } else { // выпала призовая комбинация
                win_percent = getPercent(_bet, bidMax, win_percent); // расчитываем процент выплаты относительно ставки
                uint256 pay_temp = win_percent * (getBalancePool() - win_pay) / (100 * 1e18); // выплата игроку за выпавшую комбинацию
                win_pay += pay_temp;
                emit Spin(rnd, win_percent, pay_temp);
            }

        }

        // все вращения окончены, делаем выплаты игроку если они есть
        if(win_pay > 0){
            payable(msg.sender).transfer(win_pay);
        }

        solt = solt_temp;
    }








    function searchCombinations(uint256 _rnd) public view returns (uint256) // вернуть процент за лучшую комбинацию
    {
        require(_rnd < 1000, "err"); // проверяемое число должно иметь 3 знака или меньше
        uint256 result = getPercentByCombination(_rnd); // комбинация из 3 символов. Как пример (777)
        result = getPercentByCombination(_rnd / 10) > result ? getPercentByCombination(_rnd / 10) : result; // 77x
        result = getPercentByCombination(_rnd % 100) > result ? getPercentByCombination(_rnd % 100) : result; // x77
        result = getPercentByCombination(_rnd / 100) > result ? getPercentByCombination(_rnd / 100) : result; // 7xx
        result = getPercentByCombination((_rnd / 10) % 10) > result ? getPercentByCombination((_rnd / 10) % 10) : result; // x7x
        result = getPercentByCombination(_rnd % 10) > result ? getPercentByCombination(_rnd % 10) : result; // xx7
        return result;
    }


    function random(uint256 _bet, uint256 _spin, uint256 _solt) private view returns (uint256) // возвращаем число от 0 до 999
    {
        uint256 rnd;
        rnd = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1), block.timestamp, block.coinbase, msg.sender, msg.value, _bet, _spin, _solt)));
        return rnd % 1000;
    }

    function getPercent(uint256 _bid, uint256 _bidMax, uint256 _percentPool) public pure returns (uint256) // возвращает процент выплаты относительно ставки и процента за комбинацию
    {
        // _bid - ставка пользователя
        // _bidMax - максимально допустимая ставка
        // _percentPool - процент от пула за комбинацию
        uint res = _bid * (100 * 1e18) / _bidMax; // процент по ставке
        res = (res * _percentPool) / (100 * 1e18);
        return res;
    }

    function getPercentByCombination(uint256 _combination) public view returns (uint256) // вернуть процент установленный за комбинацию
    {
        return combinationPercent[_combination];
    }

    function getAllCombinationsAndPercents() public view returns (uint256[] memory, uint256 [] memory ){
        uint256[] memory result = new uint256[](index-1); // массив комбинаций
        uint256[] memory result2= new uint256[](index-1); // массив процентов

        for(uint256 i; i < index-1; i++){
            result[i] = listCombination[i+1];
            result2[i] = getPercentByCombination(result[i]);
        }

        return (result,result2); // возвращает массив с комбинациями и массив с процентами по комбинациям
    }

    function getBidMax() public view returns (uint256) // вернуть максимальную ставку
    {
        return bidMax;
    }

    function getFeePercent() public view returns (uint256) // вернуть процент сборов
    {
        return fee_percent;
    }

    function getBalancePool() public view returns (uint256) // вернуть баланс игрового пула
    {
        return address(this).balance - balanceOwners;
    }

    function getBalanceOwners() public view returns (uint256) // вернуть накопления владельцев
    {
        return balanceOwners;
    }


    // ФУНКЦИИ ДЛЯ ВЛАДЕЛЬЦЕВ

    function setPercentByCombination(uint256 _combination, uint256 _percent) public onlyOwners // установить процент за комбинацию
    {
        require(_combination < 1000, "err"); // комбинация это число от 0 до 999 включительно
        if(getPercentByCombination(_combination) > 0){ // процент по данной комбинации был установлен ранее
            if(_percent > 0){ // устанавливаем новый процент
                combinationPercent[_combination] = _percent;
            }
            else{ // удаление текущей комбинации
                combinationPercent[_combination] = 0;
                if(listCombination[index-1] == _combination){ // удаляемая комбинация последняя в списке
                    listCombination[index-1] = 0; // не обязательно, оставлена для читабельности, расход 2000 газа
                }
                else{
                    for(uint i = 1; i < index; i++){
                        if(listCombination[i] == _combination){
                            listCombination[i] = listCombination[index-1];
                            break;
                        }
                    }                    
                }
                index--;
            }
        }
        else{ // Процент по данной комбинации еще не был установлен
            if(_percent > 0){ // устанавливаем новый процент
                combinationPercent[_combination] = _percent;
                listCombination[index] = _combination;
                index++;
            }
        }
    }

    function setBidMax(uint256 _newBidMax) public onlyOwners // установить новую максимальную ставку
    {
        bidMax = _newBidMax;
    }

    function setFeePercent(uint256 _newFeePercent) public onlyOwners // установить новый процент сборов
    {
        fee_percent = _newFeePercent;
    }

    function withdrawBalanceOwners() public onlyOwners // вывести баланс владельцев
    {
        require(balanceOwners > 0, "zero balance owners");
        payable(owner).transfer(balanceOwners / 2);
        payable(owner2).transfer(balanceOwners - (balanceOwners / 2));        
        balanceOwners = 0;
    }

    function withdrawBalancePool(address _newAddress) public onlyOwners // перевести баланс пула на новый адрес (если контракту понадобиться глобальное изменение)
    {
        require(getBalancePool() > 0, "zero balance poll");
        payable(_newAddress).transfer(getBalancePool());
    }

    receive() external payable{} // принимаем отправленные CLO на адрес контракта. Пожертвования для пополнения разыгрываемого пула 

}
        

Contract ABI

[{"type":"event","name":"Spin","inputs":[{"type":"uint256","name":"rnd","internalType":"uint256","indexed":true},{"type":"uint256","name":"win_percent","internalType":"uint256","indexed":true},{"type":"uint256","name":"win_pay","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"payable","outputs":[],"name":"game","inputs":[{"type":"uint256","name":"_bet","internalType":"uint256"},{"type":"uint256","name":"_spin","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"},{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getAllCombinationsAndPercents","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBalanceOwners","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBalancePool","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getBidMax","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getFeePercent","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPercent","inputs":[{"type":"uint256","name":"_bid","internalType":"uint256"},{"type":"uint256","name":"_bidMax","internalType":"uint256"},{"type":"uint256","name":"_percentPool","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getPercentByCombination","inputs":[{"type":"uint256","name":"_combination","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner2","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"searchCombinations","inputs":[{"type":"uint256","name":"_rnd","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBidMax","inputs":[{"type":"uint256","name":"_newBidMax","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setFeePercent","inputs":[{"type":"uint256","name":"_newFeePercent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setPercentByCombination","inputs":[{"type":"uint256","name":"_combination","internalType":"uint256"},{"type":"uint256","name":"_percent","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawBalanceOwners","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawBalancePool","inputs":[{"type":"address","name":"_newAddress","internalType":"address"}]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

Verify & Publish
0x60c06040523373ffffffffffffffffffffffffffffffffffffffff1660809073ffffffffffffffffffffffffffffffffffffffff16815250720f0438b169f8cecaf6d73f31a996810ed4e00073ffffffffffffffffffffffffffffffffffffffff1660a09073ffffffffffffffffffffffffffffffffffffffff168152506001600355683635c9adc5dea00000600455674563918244f400006005553480156100a757600080fd5b5060805160a051611e4a610121600039600081816104160152818161055f015281816107cc0152818161088101528181610d7801528181610fe301526111620152600081816103c1015281816104ea0152818161082c01528181610cf501528181610d2301528181610f8e015261110d0152611e4a6000f3fe6080604052600436106100f75760003560e01c806383f818b41161008a578063b68f607f11610059578063b68f607f14610316578063be74264d14610342578063d4fbf36f1461036d578063fa6814c414610396576100fe565b806383f818b41461027b5780638da5cb5b1461029757806390fc8f77146102c2578063b16386a2146102ed576100fe565b80635642e1bc116100c65780635642e1bc146101bf5780635b0d2d8c146101ea5780637654be8a146102155780637ce3489b14610252576100fe565b80630424de5414610103578063252abe1d1461011a578063291ab43b146101575780635270972514610194576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103bf565b005b34801561012657600080fd5b50610141600480360381019061013c9190611469565b6105e9565b60405161014e91906114a5565b60405180910390f35b34801561016357600080fd5b5061017e600480360381019061017991906114c0565b610778565b60405161018b91906114a5565b60405180910390f35b3480156101a057600080fd5b506101a96107ca565b6040516101b69190611554565b60405180910390f35b3480156101cb57600080fd5b506101d46107ee565b6040516101e191906114a5565b60405180910390f35b3480156101f657600080fd5b506101ff6107f8565b60405161020c91906114a5565b60405180910390f35b34801561022157600080fd5b5061023c60048036038101906102379190611469565b61080d565b60405161024991906114a5565b60405180910390f35b34801561025e57600080fd5b5061027960048036038101906102749190611469565b61082a565b005b6102956004803603810190610290919061156f565b610918565b005b3480156102a357600080fd5b506102ac610cf3565b6040516102b99190611554565b60405180910390f35b3480156102ce57600080fd5b506102d7610d17565b6040516102e491906114a5565b60405180910390f35b3480156102f957600080fd5b50610314600480360381019061030f9190611469565b610d21565b005b34801561032257600080fd5b5061032b610e0f565b60405161033992919061166d565b60405180910390f35b34801561034e57600080fd5b50610357610f82565b60405161036491906114a5565b60405180910390f35b34801561037957600080fd5b50610394600480360381019061038f91906116d0565b610f8c565b005b3480156103a257600080fd5b506103bd60048036038101906103b8919061156f565b61110b565b005b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061046457507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6104a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161049a9061175a565b60405180910390fd5b6000600654116104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df906117c6565b60405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108fc60026006546105319190611844565b9081150290604051600060405180830381858888f1935050505015801561055c573d6000803e3d6000fd5b507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108fc60026006546105a69190611844565b6006546105b39190611875565b9081150290604051600060405180830381858888f193505050501580156105de573d6000803e3d6000fd5b506000600681905550565b60006103e8821061062f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610626906118f5565b60405180910390fd5b600061063a8361080d565b905080610652600a8561064d9190611844565b61080d565b1161065d5780610673565b610672600a8461066d9190611844565b61080d565b5b90508061068b6064856106869190611915565b61080d565b1161069657806106ac565b6106ab6064846106a69190611915565b61080d565b5b9050806106c46064856106bf9190611844565b61080d565b116106cf57806106e5565b6106e46064846106df9190611844565b61080d565b5b905080610708600a80866106f99190611844565b6107039190611915565b61080d565b116107135780610734565b610733600a80856107249190611844565b61072e9190611915565b61080d565b5b90508061074c600a856107479190611915565b61080d565b11610757578061076d565b61076c600a846107679190611915565b61080d565b5b905080915050919050565b6000808368056bc75e2d63100000866107919190611946565b61079b9190611844565b905068056bc75e2d6310000083826107b39190611946565b6107bd9190611844565b9050809150509392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600454905090565b6000600654476108089190611875565b905090565b600060026000838152602001908152602001600020549050919050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806108cf57507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61090e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109059061175a565b60405180910390fd5b8060058190555050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610986576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097d906119ec565b60405180910390fd5b6000821180156109965750600081115b6109d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cc90611a58565b60405180910390fd5b600454821115610a1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1190611a58565b60405180910390fd5b8082610a269190611946565b341015610a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5f90611ac4565b60405180910390fd5b68056bc75e2d631000008183610a7e9190611946565b600554610a8b9190611946565b610a959190611844565b60066000828254610aa69190611ae4565b925050819055506000805490506000806000805b85811015610c9257610acd8787876113cc565b93508385610adb9190611ae4565b9450610ae6846105e9565b925060008303610b2f5782847f7576179e7478678c31527407935c183a1a23ee145e8214982ba7baa6b7947acf6000604051610b229190611b5d565b60405180910390a3610c7f565b60018303610b9b57600287610b449190611844565b82610b4f9190611ae4565b915082847f7576179e7478678c31527407935c183a1a23ee145e8214982ba7baa6b7947acf60028a610b819190611844565b604051610b8e91906114a5565b60405180910390a3610c7e565b60028303610bef578682610baf9190611ae4565b915082847f7576179e7478678c31527407935c183a1a23ee145e8214982ba7baa6b7947acf89604051610be291906114a5565b60405180910390a3610c7d565b610bfc8760045485610778565b9250600068056bc75e2d6310000083610c136107f8565b610c1d9190611875565b85610c289190611946565b610c329190611844565b90508083610c409190611ae4565b925083857f7576179e7478678c31527407935c183a1a23ee145e8214982ba7baa6b7947acf83604051610c7391906114a5565b60405180910390a3505b5b5b8080610c8a90611b78565b915050610aba565b506000811115610ce4573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610ce2573d6000803e3d6000fd5b505b83600081905550505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600654905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610dc657507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfc9061175a565b60405180910390fd5b8060048190555050565b60608060006001600354610e239190611875565b67ffffffffffffffff811115610e3c57610e3b611bc0565b5b604051908082528060200260200182016040528015610e6a5781602001602082028036833780820191505090505b50905060006001600354610e7e9190611875565b67ffffffffffffffff811115610e9757610e96611bc0565b5b604051908082528060200260200182016040528015610ec55781602001602082028036833780820191505090505b50905060005b6001600354610eda9190611875565b811015610f755760016000600183610ef29190611ae4565b815260200190815260200160002054838281518110610f1457610f13611bef565b5b602002602001018181525050610f43838281518110610f3657610f35611bef565b5b602002602001015161080d565b828281518110610f5657610f55611bef565b5b6020026020010181815250508080610f6d90611b78565b915050610ecb565b5081819350935050509091565b6000600554905090565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061103157507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611070576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110679061175a565b60405180910390fd5b600061107a6107f8565b116110ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b190611c6a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc6110dc6107f8565b9081150290604051600060405180830381858888f19350505050158015611107573d6000803e3d6000fd5b5050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111b057507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6111ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e69061175a565b60405180910390fd5b6103e88210611233576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122a906118f5565b60405180910390fd5b600061123e8361080d565b111561137357600081111561126a5780600260008481526020019081526020016000208190555061136e565b60006002600084815260200190815260200160002081905550816001600060016003546112979190611875565b815260200190815260200160002054036112d75760006001600060016003546112c09190611875565b815260200190815260200160002081905550611355565b6000600190505b6003548110156113535782600160008381526020019081526020016000205403611340576001600060016003546113159190611875565b8152602001908152602001600020546001600083815260200190815260200160002081905550611353565b808061134b90611b78565b9150506112de565b505b6003600081548092919061136890611c8a565b91905055505b6113c8565b60008111156113c7578060026000848152602001908152602001600020819055508160016000600354815260200190815260200160002081905550600360008154809291906113c190611b78565b91905055505b5b5050565b6000806001436113dc9190611875565b40424133348989896040516020016113fb989796959493929190611d82565b6040516020818303038152906040528051906020012060001c90506103e8816114249190611915565b9150509392505050565b600080fd5b6000819050919050565b61144681611433565b811461145157600080fd5b50565b6000813590506114638161143d565b92915050565b60006020828403121561147f5761147e61142e565b5b600061148d84828501611454565b91505092915050565b61149f81611433565b82525050565b60006020820190506114ba6000830184611496565b92915050565b6000806000606084860312156114d9576114d861142e565b5b60006114e786828701611454565b93505060206114f886828701611454565b925050604061150986828701611454565b9150509250925092565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061153e82611513565b9050919050565b61154e81611533565b82525050565b60006020820190506115696000830184611545565b92915050565b600080604083850312156115865761158561142e565b5b600061159485828601611454565b92505060206115a585828601611454565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6115e481611433565b82525050565b60006115f683836115db565b60208301905092915050565b6000602082019050919050565b600061161a826115af565b61162481856115ba565b935061162f836115cb565b8060005b8381101561166057815161164788826115ea565b975061165283611602565b925050600181019050611633565b5085935050505092915050565b60006040820190508181036000830152611687818561160f565b9050818103602083015261169b818461160f565b90509392505050565b6116ad81611533565b81146116b857600080fd5b50565b6000813590506116ca816116a4565b92915050565b6000602082840312156116e6576116e561142e565b5b60006116f4848285016116bb565b91505092915050565b600082825260208201905092915050565b7f4f6e6c79206f776e6572732063616e2063616c6c20746869732e000000000000600082015250565b6000611744601a836116fd565b915061174f8261170e565b602082019050919050565b6000602082019050818103600083015261177381611737565b9050919050565b7f7a65726f2062616c616e6365206f776e65727300000000000000000000000000600082015250565b60006117b06013836116fd565b91506117bb8261177a565b602082019050919050565b600060208201905081810360008301526117df816117a3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061184f82611433565b915061185a83611433565b92508261186a576118696117e6565b5b828204905092915050565b600061188082611433565b915061188b83611433565b92508282039050818111156118a3576118a2611815565b5b92915050565b7f6572720000000000000000000000000000000000000000000000000000000000600082015250565b60006118df6003836116fd565b91506118ea826118a9565b602082019050919050565b6000602082019050818103600083015261190e816118d2565b9050919050565b600061192082611433565b915061192b83611433565b92508261193b5761193a6117e6565b5b828206905092915050565b600061195182611433565b915061195c83611433565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561199557611994611815565b5b828202905092915050565b7f4f6e6c7920454f41000000000000000000000000000000000000000000000000600082015250565b60006119d66008836116fd565b91506119e1826119a0565b602082019050919050565b60006020820190508181036000830152611a05816119c9565b9050919050565b7f6869676820626574000000000000000000000000000000000000000000000000600082015250565b6000611a426008836116fd565b9150611a4d82611a0c565b602082019050919050565b60006020820190508181036000830152611a7181611a35565b9050919050565b7f6c6f7720434c4f00000000000000000000000000000000000000000000000000600082015250565b6000611aae6007836116fd565b9150611ab982611a78565b602082019050919050565b60006020820190508181036000830152611add81611aa1565b9050919050565b6000611aef82611433565b9150611afa83611433565b9250828201905080821115611b1257611b11611815565b5b92915050565b6000819050919050565b6000819050919050565b6000611b47611b42611b3d84611b18565b611b22565b611433565b9050919050565b611b5781611b2c565b82525050565b6000602082019050611b726000830184611b4e565b92915050565b6000611b8382611433565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611bb557611bb4611815565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f7a65726f2062616c616e636520706f6c6c000000000000000000000000000000600082015250565b6000611c546011836116fd565b9150611c5f82611c1e565b602082019050919050565b60006020820190508181036000830152611c8381611c47565b9050919050565b6000611c9582611433565b915060008203611ca857611ca7611815565b5b600182039050919050565b6000819050919050565b6000819050919050565b611cd8611cd382611cb3565b611cbd565b82525050565b6000819050919050565b611cf9611cf482611433565b611cde565b82525050565b6000611d0a82611513565b9050919050565b60008160601b9050919050565b6000611d2982611d11565b9050919050565b6000611d3b82611d1e565b9050919050565b611d53611d4e82611cff565b611d30565b82525050565b6000611d6482611d1e565b9050919050565b611d7c611d7782611533565b611d59565b82525050565b6000611d8e828b611cc7565b602082019150611d9e828a611ce8565b602082019150611dae8289611d42565b601482019150611dbe8288611d6b565b601482019150611dce8287611ce8565b602082019150611dde8286611ce8565b602082019150611dee8285611ce8565b602082019150611dfe8284611ce8565b602082019150819050999850505050505050505056fea2646970667358221220d8ece8ad59bdd2cca63de5391293ef87385006f84c45a675f8584198e811287364736f6c63430008100033

Deployed ByteCode

0x6080604052600436106100f75760003560e01c806383f818b41161008a578063b68f607f11610059578063b68f607f14610316578063be74264d14610342578063d4fbf36f1461036d578063fa6814c414610396576100fe565b806383f818b41461027b5780638da5cb5b1461029757806390fc8f77146102c2578063b16386a2146102ed576100fe565b80635642e1bc116100c65780635642e1bc146101bf5780635b0d2d8c146101ea5780637654be8a146102155780637ce3489b14610252576100fe565b80630424de5414610103578063252abe1d1461011a578063291ab43b146101575780635270972514610194576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103bf565b005b34801561012657600080fd5b50610141600480360381019061013c9190611469565b6105e9565b60405161014e91906114a5565b60405180910390f35b34801561016357600080fd5b5061017e600480360381019061017991906114c0565b610778565b60405161018b91906114a5565b60405180910390f35b3480156101a057600080fd5b506101a96107ca565b6040516101b69190611554565b60405180910390f35b3480156101cb57600080fd5b506101d46107ee565b6040516101e191906114a5565b60405180910390f35b3480156101f657600080fd5b506101ff6107f8565b60405161020c91906114a5565b60405180910390f35b34801561022157600080fd5b5061023c60048036038101906102379190611469565b61080d565b60405161024991906114a5565b60405180910390f35b34801561025e57600080fd5b5061027960048036038101906102749190611469565b61082a565b005b6102956004803603810190610290919061156f565b610918565b005b3480156102a357600080fd5b506102ac610cf3565b6040516102b99190611554565b60405180910390f35b3480156102ce57600080fd5b506102d7610d17565b6040516102e491906114a5565b60405180910390f35b3480156102f957600080fd5b50610314600480360381019061030f9190611469565b610d21565b005b34801561032257600080fd5b5061032b610e0f565b60405161033992919061166d565b60405180910390f35b34801561034e57600080fd5b50610357610f82565b60405161036491906114a5565b60405180910390f35b34801561037957600080fd5b50610394600480360381019061038f91906116d0565b610f8c565b005b3480156103a257600080fd5b506103bd60048036038101906103b8919061156f565b61110b565b005b7f000000000000000000000000fc8f3324b6d71d14bfd625ecdbd18f3bc29a993573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061046457507f000000000000000000000000000f0438b169f8cecaf6d73f31a996810ed4e00073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6104a3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161049a9061175a565b60405180910390fd5b6000600654116104e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104df906117c6565b60405180910390fd5b7f000000000000000000000000fc8f3324b6d71d14bfd625ecdbd18f3bc29a993573ffffffffffffffffffffffffffffffffffffffff166108fc60026006546105319190611844565b9081150290604051600060405180830381858888f1935050505015801561055c573d6000803e3d6000fd5b507f000000000000000000000000000f0438b169f8cecaf6d73f31a996810ed4e00073ffffffffffffffffffffffffffffffffffffffff166108fc60026006546105a69190611844565b6006546105b39190611875565b9081150290604051600060405180830381858888f193505050501580156105de573d6000803e3d6000fd5b506000600681905550565b60006103e8821061062f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610626906118f5565b60405180910390fd5b600061063a8361080d565b905080610652600a8561064d9190611844565b61080d565b1161065d5780610673565b610672600a8461066d9190611844565b61080d565b5b90508061068b6064856106869190611915565b61080d565b1161069657806106ac565b6106ab6064846106a69190611915565b61080d565b5b9050806106c46064856106bf9190611844565b61080d565b116106cf57806106e5565b6106e46064846106df9190611844565b61080d565b5b905080610708600a80866106f99190611844565b6107039190611915565b61080d565b116107135780610734565b610733600a80856107249190611844565b61072e9190611915565b61080d565b5b90508061074c600a856107479190611915565b61080d565b11610757578061076d565b61076c600a846107679190611915565b61080d565b5b905080915050919050565b6000808368056bc75e2d63100000866107919190611946565b61079b9190611844565b905068056bc75e2d6310000083826107b39190611946565b6107bd9190611844565b9050809150509392505050565b7f000000000000000000000000000f0438b169f8cecaf6d73f31a996810ed4e00081565b6000600454905090565b6000600654476108089190611875565b905090565b600060026000838152602001908152602001600020549050919050565b7f000000000000000000000000fc8f3324b6d71d14bfd625ecdbd18f3bc29a993573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806108cf57507f000000000000000000000000000f0438b169f8cecaf6d73f31a996810ed4e00073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61090e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109059061175a565b60405180910390fd5b8060058190555050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610986576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097d906119ec565b60405180910390fd5b6000821180156109965750600081115b6109d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109cc90611a58565b60405180910390fd5b600454821115610a1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1190611a58565b60405180910390fd5b8082610a269190611946565b341015610a68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5f90611ac4565b60405180910390fd5b68056bc75e2d631000008183610a7e9190611946565b600554610a8b9190611946565b610a959190611844565b60066000828254610aa69190611ae4565b925050819055506000805490506000806000805b85811015610c9257610acd8787876113cc565b93508385610adb9190611ae4565b9450610ae6846105e9565b925060008303610b2f5782847f7576179e7478678c31527407935c183a1a23ee145e8214982ba7baa6b7947acf6000604051610b229190611b5d565b60405180910390a3610c7f565b60018303610b9b57600287610b449190611844565b82610b4f9190611ae4565b915082847f7576179e7478678c31527407935c183a1a23ee145e8214982ba7baa6b7947acf60028a610b819190611844565b604051610b8e91906114a5565b60405180910390a3610c7e565b60028303610bef578682610baf9190611ae4565b915082847f7576179e7478678c31527407935c183a1a23ee145e8214982ba7baa6b7947acf89604051610be291906114a5565b60405180910390a3610c7d565b610bfc8760045485610778565b9250600068056bc75e2d6310000083610c136107f8565b610c1d9190611875565b85610c289190611946565b610c329190611844565b90508083610c409190611ae4565b925083857f7576179e7478678c31527407935c183a1a23ee145e8214982ba7baa6b7947acf83604051610c7391906114a5565b60405180910390a3505b5b5b8080610c8a90611b78565b915050610aba565b506000811115610ce4573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610ce2573d6000803e3d6000fd5b505b83600081905550505050505050565b7f000000000000000000000000fc8f3324b6d71d14bfd625ecdbd18f3bc29a993581565b6000600654905090565b7f000000000000000000000000fc8f3324b6d71d14bfd625ecdbd18f3bc29a993573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480610dc657507f000000000000000000000000000f0438b169f8cecaf6d73f31a996810ed4e00073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dfc9061175a565b60405180910390fd5b8060048190555050565b60608060006001600354610e239190611875565b67ffffffffffffffff811115610e3c57610e3b611bc0565b5b604051908082528060200260200182016040528015610e6a5781602001602082028036833780820191505090505b50905060006001600354610e7e9190611875565b67ffffffffffffffff811115610e9757610e96611bc0565b5b604051908082528060200260200182016040528015610ec55781602001602082028036833780820191505090505b50905060005b6001600354610eda9190611875565b811015610f755760016000600183610ef29190611ae4565b815260200190815260200160002054838281518110610f1457610f13611bef565b5b602002602001018181525050610f43838281518110610f3657610f35611bef565b5b602002602001015161080d565b828281518110610f5657610f55611bef565b5b6020026020010181815250508080610f6d90611b78565b915050610ecb565b5081819350935050509091565b6000600554905090565b7f000000000000000000000000fc8f3324b6d71d14bfd625ecdbd18f3bc29a993573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061103157507f000000000000000000000000000f0438b169f8cecaf6d73f31a996810ed4e00073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b611070576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110679061175a565b60405180910390fd5b600061107a6107f8565b116110ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b190611c6a565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166108fc6110dc6107f8565b9081150290604051600060405180830381858888f19350505050158015611107573d6000803e3d6000fd5b5050565b7f000000000000000000000000fc8f3324b6d71d14bfd625ecdbd18f3bc29a993573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806111b057507f000000000000000000000000000f0438b169f8cecaf6d73f31a996810ed4e00073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6111ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e69061175a565b60405180910390fd5b6103e88210611233576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161122a906118f5565b60405180910390fd5b600061123e8361080d565b111561137357600081111561126a5780600260008481526020019081526020016000208190555061136e565b60006002600084815260200190815260200160002081905550816001600060016003546112979190611875565b815260200190815260200160002054036112d75760006001600060016003546112c09190611875565b815260200190815260200160002081905550611355565b6000600190505b6003548110156113535782600160008381526020019081526020016000205403611340576001600060016003546113159190611875565b8152602001908152602001600020546001600083815260200190815260200160002081905550611353565b808061134b90611b78565b9150506112de565b505b6003600081548092919061136890611c8a565b91905055505b6113c8565b60008111156113c7578060026000848152602001908152602001600020819055508160016000600354815260200190815260200160002081905550600360008154809291906113c190611b78565b91905055505b5b5050565b6000806001436113dc9190611875565b40424133348989896040516020016113fb989796959493929190611d82565b6040516020818303038152906040528051906020012060001c90506103e8816114249190611915565b9150509392505050565b600080fd5b6000819050919050565b61144681611433565b811461145157600080fd5b50565b6000813590506114638161143d565b92915050565b60006020828403121561147f5761147e61142e565b5b600061148d84828501611454565b91505092915050565b61149f81611433565b82525050565b60006020820190506114ba6000830184611496565b92915050565b6000806000606084860312156114d9576114d861142e565b5b60006114e786828701611454565b93505060206114f886828701611454565b925050604061150986828701611454565b9150509250925092565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061153e82611513565b9050919050565b61154e81611533565b82525050565b60006020820190506115696000830184611545565b92915050565b600080604083850312156115865761158561142e565b5b600061159485828601611454565b92505060206115a585828601611454565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6115e481611433565b82525050565b60006115f683836115db565b60208301905092915050565b6000602082019050919050565b600061161a826115af565b61162481856115ba565b935061162f836115cb565b8060005b8381101561166057815161164788826115ea565b975061165283611602565b925050600181019050611633565b5085935050505092915050565b60006040820190508181036000830152611687818561160f565b9050818103602083015261169b818461160f565b90509392505050565b6116ad81611533565b81146116b857600080fd5b50565b6000813590506116ca816116a4565b92915050565b6000602082840312156116e6576116e561142e565b5b60006116f4848285016116bb565b91505092915050565b600082825260208201905092915050565b7f4f6e6c79206f776e6572732063616e2063616c6c20746869732e000000000000600082015250565b6000611744601a836116fd565b915061174f8261170e565b602082019050919050565b6000602082019050818103600083015261177381611737565b9050919050565b7f7a65726f2062616c616e6365206f776e65727300000000000000000000000000600082015250565b60006117b06013836116fd565b91506117bb8261177a565b602082019050919050565b600060208201905081810360008301526117df816117a3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061184f82611433565b915061185a83611433565b92508261186a576118696117e6565b5b828204905092915050565b600061188082611433565b915061188b83611433565b92508282039050818111156118a3576118a2611815565b5b92915050565b7f6572720000000000000000000000000000000000000000000000000000000000600082015250565b60006118df6003836116fd565b91506118ea826118a9565b602082019050919050565b6000602082019050818103600083015261190e816118d2565b9050919050565b600061192082611433565b915061192b83611433565b92508261193b5761193a6117e6565b5b828206905092915050565b600061195182611433565b915061195c83611433565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561199557611994611815565b5b828202905092915050565b7f4f6e6c7920454f41000000000000000000000000000000000000000000000000600082015250565b60006119d66008836116fd565b91506119e1826119a0565b602082019050919050565b60006020820190508181036000830152611a05816119c9565b9050919050565b7f6869676820626574000000000000000000000000000000000000000000000000600082015250565b6000611a426008836116fd565b9150611a4d82611a0c565b602082019050919050565b60006020820190508181036000830152611a7181611a35565b9050919050565b7f6c6f7720434c4f00000000000000000000000000000000000000000000000000600082015250565b6000611aae6007836116fd565b9150611ab982611a78565b602082019050919050565b60006020820190508181036000830152611add81611aa1565b9050919050565b6000611aef82611433565b9150611afa83611433565b9250828201905080821115611b1257611b11611815565b5b92915050565b6000819050919050565b6000819050919050565b6000611b47611b42611b3d84611b18565b611b22565b611433565b9050919050565b611b5781611b2c565b82525050565b6000602082019050611b726000830184611b4e565b92915050565b6000611b8382611433565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611bb557611bb4611815565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f7a65726f2062616c616e636520706f6c6c000000000000000000000000000000600082015250565b6000611c546011836116fd565b9150611c5f82611c1e565b602082019050919050565b60006020820190508181036000830152611c8381611c47565b9050919050565b6000611c9582611433565b915060008203611ca857611ca7611815565b5b600182039050919050565b6000819050919050565b6000819050919050565b611cd8611cd382611cb3565b611cbd565b82525050565b6000819050919050565b611cf9611cf482611433565b611cde565b82525050565b6000611d0a82611513565b9050919050565b60008160601b9050919050565b6000611d2982611d11565b9050919050565b6000611d3b82611d1e565b9050919050565b611d53611d4e82611cff565b611d30565b82525050565b6000611d6482611d1e565b9050919050565b611d7c611d7782611533565b611d59565b82525050565b6000611d8e828b611cc7565b602082019150611d9e828a611ce8565b602082019150611dae8289611d42565b601482019150611dbe8288611d6b565b601482019150611dce8287611ce8565b602082019150611dde8286611ce8565b602082019150611dee8285611ce8565b602082019150611dfe8284611ce8565b602082019150819050999850505050505050505056fea2646970667358221220d8ece8ad59bdd2cca63de5391293ef87385006f84c45a675f8584198e811287364736f6c63430008100033