More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,090 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Resolve Game | 8950551 | 1837 days ago | IN | 0 ETH | 0.00043227 | ||||
Use Tickets | 8945796 | 1838 days ago | IN | 0 ETH | 0.01101185 | ||||
Use Tickets | 8933111 | 1840 days ago | IN | 0 ETH | 0.00463533 | ||||
Use Tickets | 8927064 | 1841 days ago | IN | 0 ETH | 0.0047144 | ||||
Resolve Game | 8914004 | 1843 days ago | IN | 0 ETH | 0.00002234 | ||||
__callback | 8913991 | 1843 days ago | IN | 0 ETH | 0.002994 | ||||
Resolve Game | 8907850 | 1844 days ago | IN | 0 ETH | 0.00011924 | ||||
Use Tickets | 8891103 | 1847 days ago | IN | 0 ETH | 0.00562533 | ||||
Resolve Game | 8864644 | 1851 days ago | IN | 0 ETH | 0.00003686 | ||||
__callback | 8864641 | 1851 days ago | IN | 0 ETH | 0.0030041 | ||||
Use Tickets | 8833120 | 1856 days ago | IN | 0 ETH | 0.01200185 | ||||
Resolve Game | 8833071 | 1856 days ago | IN | 0 ETH | 0.00020996 | ||||
Resolve Game | 8833067 | 1856 days ago | IN | 0 ETH | 0.00020996 | ||||
__callback | 8833047 | 1856 days ago | IN | 0 ETH | 0.0030041 | ||||
Resolve Game | 8833043 | 1856 days ago | IN | 0 ETH | 0.00024015 | ||||
Transfer | 8833033 | 1856 days ago | IN | 2 ETH | 0.0001052 | ||||
__callback | 8764031 | 1867 days ago | IN | 0 ETH | 0.00284904 | ||||
Resolve Game | 8764030 | 1867 days ago | IN | 0 ETH | 0.00008005 | ||||
__callback | 8752146 | 1869 days ago | IN | 0 ETH | 0.00254904 | ||||
Resolve Game | 8752144 | 1869 days ago | IN | 0 ETH | 0.00008005 | ||||
__callback | 8751592 | 1869 days ago | IN | 0 ETH | 0.00283894 | ||||
Resolve Game | 8751591 | 1869 days ago | IN | 0 ETH | 0.00008005 | ||||
__callback | 8732527 | 1872 days ago | IN | 0 ETH | 0.00284904 | ||||
Resolve Game | 8732526 | 1872 days ago | IN | 0 ETH | 0.00012007 | ||||
Use Tickets | 8732345 | 1872 days ago | IN | 0 ETH | 0.00860906 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
8950551 | 1837 days ago | 0.02005349 ETH | ||||
8913991 | 1843 days ago | 0.036315 ETH | ||||
8913991 | 1843 days ago | 0.108945 ETH | ||||
8913991 | 1843 days ago | 0.012 ETH | ||||
8907850 | 1844 days ago | 0.02005349 ETH | ||||
8864641 | 1851 days ago | 0.12805 ETH | ||||
8864641 | 1851 days ago | 0.38415 ETH | ||||
8864641 | 1851 days ago | 0.012 ETH | ||||
8833047 | 1856 days ago | 0.36394 ETH | ||||
8833047 | 1856 days ago | 1.09182 ETH | ||||
8833047 | 1856 days ago | 0.012 ETH | ||||
8833043 | 1856 days ago | 0.02005349 ETH | ||||
8764031 | 1867 days ago | 0.012 ETH | ||||
8764030 | 1867 days ago | 0.02005349 ETH | ||||
8752146 | 1869 days ago | 0.012 ETH | ||||
8752144 | 1869 days ago | 0.02005349 ETH | ||||
8751592 | 1869 days ago | 0.012 ETH | ||||
8751591 | 1869 days ago | 0.02005349 ETH | ||||
8732527 | 1872 days ago | 0.012 ETH | ||||
8732526 | 1872 days ago | 0.02005349 ETH | ||||
8687925 | 1879 days ago | 0.377045 ETH | ||||
8687925 | 1879 days ago | 1.131135 ETH | ||||
8687925 | 1879 days ago | 0.012 ETH | ||||
8687923 | 1879 days ago | 0.02005349 ETH | ||||
8643046 | 1886 days ago | 0.717775 ETH |
Loading...
Loading
Contract Name:
LoteoGame
Compiler Version
v0.4.21+commit.dfe3193c
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-04-30 */ pragma solidity ^0.4.18; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** @title ERC827 interface, an extension of ERC20 token standard Interface of a ERC827 token, following the ERC20 standard with extra methods to transfer value and data and execute calls in transfers and approvals. */ contract ERC827 is ERC20 { function approve( address _spender, uint256 _value, bytes _data ) public returns (bool); function transfer( address _to, uint256 _value, bytes _data ) public returns (bool); function transferFrom( address _from, address _to, uint256 _value, bytes _data ) public returns (bool); } /** @title ERC827, an extension of ERC20 token standard Implementation the ERC827, following the ERC20 standard with extra methods to transfer value and data and execute calls in transfers and approvals. Uses OpenZeppelin StandardToken. */ contract ERC827Token is ERC827, StandardToken { /** @dev Addition to ERC20 token methods. It allows to approve the transfer of value and execute a call with the sent data. Beware that changing an allowance with this method brings the risk that someone may use both the old and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 @param _spender The address that will spend the funds. @param _value The amount of tokens to be spent. @param _data ABI-encoded contract call to call `_to` address. @return true if the call function was executed successfully */ function approve(address _spender, uint256 _value, bytes _data) public returns (bool) { require(_spender != address(this)); super.approve(_spender, _value); require(_spender.call(_data)); return true; } /** @dev Addition to ERC20 token methods. Transfer tokens to a specified address and execute a call with the sent data on the same transaction @param _to address The address which you want to transfer to @param _value uint256 the amout of tokens to be transfered @param _data ABI-encoded contract call to call `_to` address. @return true if the call function was executed successfully */ function transfer(address _to, uint256 _value, bytes _data) public returns (bool) { require(_to != address(this)); super.transfer(_to, _value); require(_to.call(_data)); return true; } /** @dev Addition to ERC20 token methods. Transfer tokens from one address to another and make a contract call on the same transaction @param _from The address which you want to send tokens from @param _to The address which you want to transfer to @param _value The amout of tokens to be transferred @param _data ABI-encoded contract call to call `_to` address. @return true if the call function was executed successfully */ function transferFrom(address _from, address _to, uint256 _value, bytes _data) public returns (bool) { require(_to != address(this)); super.transferFrom(_from, _to, _value); require(_to.call(_data)); return true; } /** * @dev Addition to StandardToken methods. Increase the amount of tokens that * an owner allowed to a spender and execute a call with the sent data. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. * @param _data ABI-encoded contract call to call `_spender` address. */ function increaseApproval(address _spender, uint _addedValue, bytes _data) public returns (bool) { require(_spender != address(this)); super.increaseApproval(_spender, _addedValue); require(_spender.call(_data)); return true; } /** * @dev Addition to StandardToken methods. Decrease the amount of tokens that * an owner allowed to a spender and execute a call with the sent data. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. * @param _data ABI-encoded contract call to call `_spender` address. */ function decreaseApproval(address _spender, uint _subtractedValue, bytes _data) public returns (bool) { require(_spender != address(this)); super.decreaseApproval(_spender, _subtractedValue); require(_spender.call(_data)); return true; } } /** * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net * * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt */ contract Recoverable is Ownable { /// @dev Empty constructor (for now) function Recoverable() { } /// @dev This will be invoked by the owner, when owner wants to rescue tokens /// @param token Token which will we rescue to the owner from the contract function recoverTokens(ERC20Basic token) onlyOwner public { token.transfer(owner, tokensToBeReturned(token)); } /// @dev Interface function, can be overwritten by the superclass /// @param token Token which balance we will check and return /// @return The amount of tokens (in smallest denominator) the contract owns function tokensToBeReturned(ERC20Basic token) public returns (uint) { return token.balanceOf(this); } } /** * This smart contract code is Copyright 2017 TokenMarket Ltd. For more information see https://tokenmarket.net * * Licensed under the Apache License, version 2.0: https://github.com/TokenMarketNet/ico/blob/master/LICENSE.txt */ /** * Standard EIP-20 token with an interface marker. * * @notice Interface marker is used by crowdsale contracts to validate that addresses point a good token contract. * */ contract StandardTokenExt is StandardToken, ERC827Token, Recoverable { /* Interface declaration */ function isToken() public constant returns (bool weAre) { return true; } } // <ORACLIZE_API> /* Copyright (c) 2015-2016 Oraclize SRL Copyright (c) 2016 Oraclize LTD Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ contract OraclizeI { address public cbAddress; function query(uint _timestamp, string _datasource, string _arg) payable returns (bytes32 _id); function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) payable returns (bytes32 _id); function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) payable returns (bytes32 _id); function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) payable returns (bytes32 _id); function queryN(uint _timestamp, string _datasource, bytes _argN) payable returns (bytes32 _id); function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) payable returns (bytes32 _id); function getPrice(string _datasource) returns (uint _dsprice); function getPrice(string _datasource, uint gaslimit) returns (uint _dsprice); function useCoupon(string _coupon); function setProofType(byte _proofType); function setConfig(bytes32 _config); function setCustomGasPrice(uint _gasPrice); function randomDS_getSessionPubKeyHash() returns(bytes32); } contract OraclizeAddrResolverI { function getAddress() returns (address _addr); } /* Begin solidity-cborutils https://github.com/smartcontractkit/solidity-cborutils MIT License Copyright (c) 2018 SmartContract ChainLink, Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ library Buffer { struct buffer { bytes buf; uint capacity; } function init(buffer memory buf, uint _capacity) internal constant { uint capacity = _capacity; if(capacity % 32 != 0) capacity += 32 - (capacity % 32); // Allocate space for the buffer data buf.capacity = capacity; assembly { let ptr := mload(0x40) mstore(buf, ptr) mstore(ptr, 0) mstore(0x40, add(ptr, capacity)) } } function resize(buffer memory buf, uint capacity) private constant { bytes memory oldbuf = buf.buf; init(buf, capacity); append(buf, oldbuf); } function max(uint a, uint b) private constant returns(uint) { if(a > b) { return a; } return b; } /** * @dev Appends a byte array to the end of the buffer. Resizes if doing so * would exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */ function append(buffer memory buf, bytes data) internal constant returns(buffer memory) { if(data.length + buf.buf.length > buf.capacity) { resize(buf, max(buf.capacity, data.length) * 2); } uint dest; uint src; uint len = data.length; assembly { // Memory address of the buffer data let bufptr := mload(buf) // Length of existing buffer data let buflen := mload(bufptr) // Start address = buffer address + buffer length + sizeof(buffer length) dest := add(add(bufptr, buflen), 32) // Update buffer length mstore(bufptr, add(buflen, mload(data))) src := add(data, 32) } // Copy word-length chunks while possible for(; len >= 32; len -= 32) { assembly { mstore(dest, mload(src)) } dest += 32; src += 32; } // Copy remaining bytes uint mask = 256 ** (32 - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) let destpart := and(mload(dest), mask) mstore(dest, or(destpart, srcpart)) } return buf; } /** * @dev Appends a byte to the end of the buffer. Resizes if doing so would * exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */ function append(buffer memory buf, uint8 data) internal constant { if(buf.buf.length + 1 > buf.capacity) { resize(buf, buf.capacity * 2); } assembly { // Memory address of the buffer data let bufptr := mload(buf) // Length of existing buffer data let buflen := mload(bufptr) // Address = buffer address + buffer length + sizeof(buffer length) let dest := add(add(bufptr, buflen), 32) mstore8(dest, data) // Update buffer length mstore(bufptr, add(buflen, 1)) } } /** * @dev Appends a byte to the end of the buffer. Resizes if doing so would * exceed the capacity of the buffer. * @param buf The buffer to append to. * @param data The data to append. * @return The original buffer. */ function appendInt(buffer memory buf, uint data, uint len) internal constant returns(buffer memory) { if(len + buf.buf.length > buf.capacity) { resize(buf, max(buf.capacity, len) * 2); } uint mask = 256 ** len - 1; assembly { // Memory address of the buffer data let bufptr := mload(buf) // Length of existing buffer data let buflen := mload(bufptr) // Address = buffer address + buffer length + sizeof(buffer length) + len let dest := add(add(bufptr, buflen), len) mstore(dest, or(and(mload(dest), not(mask)), data)) // Update buffer length mstore(bufptr, add(buflen, len)) } return buf; } } library CBOR { using Buffer for Buffer.buffer; uint8 private constant MAJOR_TYPE_INT = 0; uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1; uint8 private constant MAJOR_TYPE_BYTES = 2; uint8 private constant MAJOR_TYPE_STRING = 3; uint8 private constant MAJOR_TYPE_ARRAY = 4; uint8 private constant MAJOR_TYPE_MAP = 5; uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7; function shl8(uint8 x, uint8 y) private constant returns (uint8) { return x * (2 ** y); } function encodeType(Buffer.buffer memory buf, uint8 major, uint value) private constant { if(value <= 23) { buf.append(uint8(shl8(major, 5) | value)); } else if(value <= 0xFF) { buf.append(uint8(shl8(major, 5) | 24)); buf.appendInt(value, 1); } else if(value <= 0xFFFF) { buf.append(uint8(shl8(major, 5) | 25)); buf.appendInt(value, 2); } else if(value <= 0xFFFFFFFF) { buf.append(uint8(shl8(major, 5) | 26)); buf.appendInt(value, 4); } else if(value <= 0xFFFFFFFFFFFFFFFF) { buf.append(uint8(shl8(major, 5) | 27)); buf.appendInt(value, 8); } } function encodeIndefiniteLengthType(Buffer.buffer memory buf, uint8 major) private constant { buf.append(uint8(shl8(major, 5) | 31)); } function encodeUInt(Buffer.buffer memory buf, uint value) internal constant { encodeType(buf, MAJOR_TYPE_INT, value); } function encodeInt(Buffer.buffer memory buf, int value) internal constant { if(value >= 0) { encodeType(buf, MAJOR_TYPE_INT, uint(value)); } else { encodeType(buf, MAJOR_TYPE_NEGATIVE_INT, uint(-1 - value)); } } function encodeBytes(Buffer.buffer memory buf, bytes value) internal constant { encodeType(buf, MAJOR_TYPE_BYTES, value.length); buf.append(value); } function encodeString(Buffer.buffer memory buf, string value) internal constant { encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length); buf.append(bytes(value)); } function startArray(Buffer.buffer memory buf) internal constant { encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY); } function startMap(Buffer.buffer memory buf) internal constant { encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP); } function endSequence(Buffer.buffer memory buf) internal constant { encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE); } } /* End solidity-cborutils */ contract usingOraclize { uint constant day = 60*60*24; uint constant week = 60*60*24*7; uint constant month = 60*60*24*30; byte constant proofType_NONE = 0x00; byte constant proofType_TLSNotary = 0x10; byte constant proofType_Ledger = 0x30; byte constant proofType_Android = 0x40; byte constant proofType_Native = 0xF0; byte constant proofStorage_IPFS = 0x01; uint8 constant networkID_auto = 0; uint8 constant networkID_mainnet = 1; uint8 constant networkID_testnet = 2; uint8 constant networkID_morden = 2; uint8 constant networkID_consensys = 161; OraclizeAddrResolverI OAR; OraclizeI oraclize; modifier oraclizeAPI { if((address(OAR)==0)||(getCodeSize(address(OAR))==0)) oraclize_setNetwork(networkID_auto); if(address(oraclize) != OAR.getAddress()) oraclize = OraclizeI(OAR.getAddress()); _; } modifier coupon(string code){ oraclize = OraclizeI(OAR.getAddress()); oraclize.useCoupon(code); _; } function oraclize_setNetwork(uint8 networkID) internal returns(bool){ if (getCodeSize(0x1d3B2638a7cC9f2CB3D298A3DA7a90B67E5506ed)>0){ //mainnet OAR = OraclizeAddrResolverI(0x1d3B2638a7cC9f2CB3D298A3DA7a90B67E5506ed); oraclize_setNetworkName("eth_mainnet"); return true; } if (getCodeSize(0xc03A2615D5efaf5F49F60B7BB6583eaec212fdf1)>0){ //ropsten testnet OAR = OraclizeAddrResolverI(0xc03A2615D5efaf5F49F60B7BB6583eaec212fdf1); oraclize_setNetworkName("eth_ropsten3"); return true; } if (getCodeSize(0xB7A07BcF2Ba2f2703b24C0691b5278999C59AC7e)>0){ //kovan testnet OAR = OraclizeAddrResolverI(0xB7A07BcF2Ba2f2703b24C0691b5278999C59AC7e); oraclize_setNetworkName("eth_kovan"); return true; } if (getCodeSize(0x146500cfd35B22E4A392Fe0aDc06De1a1368Ed48)>0){ //rinkeby testnet OAR = OraclizeAddrResolverI(0x146500cfd35B22E4A392Fe0aDc06De1a1368Ed48); oraclize_setNetworkName("eth_rinkeby"); return true; } if (getCodeSize(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475)>0){ //ethereum-bridge OAR = OraclizeAddrResolverI(0x6f485C8BF6fc43eA212E93BBF8ce046C7f1cb475); return true; } if (getCodeSize(0x20e12A1F859B3FeaE5Fb2A0A32C18F5a65555bBF)>0){ //ether.camp ide OAR = OraclizeAddrResolverI(0x20e12A1F859B3FeaE5Fb2A0A32C18F5a65555bBF); return true; } if (getCodeSize(0x51efaF4c8B3C9AfBD5aB9F4bbC82784Ab6ef8fAA)>0){ //browser-solidity OAR = OraclizeAddrResolverI(0x51efaF4c8B3C9AfBD5aB9F4bbC82784Ab6ef8fAA); return true; } return false; } function __callback(bytes32 myid, string result) { __callback(myid, result, new bytes(0)); } function __callback(bytes32 myid, string result, bytes proof) { } function oraclize_useCoupon(string code) oraclizeAPI internal { oraclize.useCoupon(code); } function oraclize_getPrice(string datasource) oraclizeAPI internal returns (uint){ return oraclize.getPrice(datasource); } function oraclize_getPrice(string datasource, uint gaslimit) oraclizeAPI internal returns (uint){ return oraclize.getPrice(datasource, gaslimit); } function oraclize_query(string datasource, string arg) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource); if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price return oraclize.query.value(price)(0, datasource, arg); } function oraclize_query(uint timestamp, string datasource, string arg) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource); if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price return oraclize.query.value(price)(timestamp, datasource, arg); } function oraclize_query(uint timestamp, string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource, gaslimit); if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price return oraclize.query_withGasLimit.value(price)(timestamp, datasource, arg, gaslimit); } function oraclize_query(string datasource, string arg, uint gaslimit) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource, gaslimit); if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price return oraclize.query_withGasLimit.value(price)(0, datasource, arg, gaslimit); } function oraclize_query(string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource); if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price return oraclize.query2.value(price)(0, datasource, arg1, arg2); } function oraclize_query(uint timestamp, string datasource, string arg1, string arg2) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource); if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price return oraclize.query2.value(price)(timestamp, datasource, arg1, arg2); } function oraclize_query(uint timestamp, string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource, gaslimit); if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price return oraclize.query2_withGasLimit.value(price)(timestamp, datasource, arg1, arg2, gaslimit); } function oraclize_query(string datasource, string arg1, string arg2, uint gaslimit) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource, gaslimit); if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price return oraclize.query2_withGasLimit.value(price)(0, datasource, arg1, arg2, gaslimit); } function oraclize_query(string datasource, string[] argN) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource); if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price bytes memory args = stra2cbor(argN); return oraclize.queryN.value(price)(0, datasource, args); } function oraclize_query(uint timestamp, string datasource, string[] argN) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource); if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price bytes memory args = stra2cbor(argN); return oraclize.queryN.value(price)(timestamp, datasource, args); } function oraclize_query(uint timestamp, string datasource, string[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource, gaslimit); if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price bytes memory args = stra2cbor(argN); return oraclize.queryN_withGasLimit.value(price)(timestamp, datasource, args, gaslimit); } function oraclize_query(string datasource, string[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource, gaslimit); if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price bytes memory args = stra2cbor(argN); return oraclize.queryN_withGasLimit.value(price)(0, datasource, args, gaslimit); } function oraclize_query(string datasource, string[1] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](1); dynargs[0] = args[0]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[1] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](1); dynargs[0] = args[0]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](1); dynargs[0] = args[0]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](1); dynargs[0] = args[0]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[2] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](2); dynargs[0] = args[0]; dynargs[1] = args[1]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[2] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](2); dynargs[0] = args[0]; dynargs[1] = args[1]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](2); dynargs[0] = args[0]; dynargs[1] = args[1]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](2); dynargs[0] = args[0]; dynargs[1] = args[1]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[3] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](3); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[3] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](3); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](3); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](3); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[4] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](4); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[4] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](4); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](4); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](4); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[5] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](5); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; dynargs[4] = args[4]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[5] args) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](5); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; dynargs[4] = args[4]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, string[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](5); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; dynargs[4] = args[4]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, string[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { string[] memory dynargs = new string[](5); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; dynargs[4] = args[4]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[] argN) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource); if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price bytes memory args = ba2cbor(argN); return oraclize.queryN.value(price)(0, datasource, args); } function oraclize_query(uint timestamp, string datasource, bytes[] argN) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource); if (price > 1 ether + tx.gasprice*200000) return 0; // unexpectedly high price bytes memory args = ba2cbor(argN); return oraclize.queryN.value(price)(timestamp, datasource, args); } function oraclize_query(uint timestamp, string datasource, bytes[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource, gaslimit); if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price bytes memory args = ba2cbor(argN); return oraclize.queryN_withGasLimit.value(price)(timestamp, datasource, args, gaslimit); } function oraclize_query(string datasource, bytes[] argN, uint gaslimit) oraclizeAPI internal returns (bytes32 id){ uint price = oraclize.getPrice(datasource, gaslimit); if (price > 1 ether + tx.gasprice*gaslimit) return 0; // unexpectedly high price bytes memory args = ba2cbor(argN); return oraclize.queryN_withGasLimit.value(price)(0, datasource, args, gaslimit); } function oraclize_query(string datasource, bytes[1] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](1); dynargs[0] = args[0]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[1] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](1); dynargs[0] = args[0]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](1); dynargs[0] = args[0]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[1] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](1); dynargs[0] = args[0]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[2] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](2); dynargs[0] = args[0]; dynargs[1] = args[1]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[2] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](2); dynargs[0] = args[0]; dynargs[1] = args[1]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](2); dynargs[0] = args[0]; dynargs[1] = args[1]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[2] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](2); dynargs[0] = args[0]; dynargs[1] = args[1]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[3] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](3); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[3] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](3); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](3); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[3] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](3); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[4] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](4); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[4] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](4); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](4); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[4] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](4); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[5] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](5); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; dynargs[4] = args[4]; return oraclize_query(datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[5] args) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](5); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; dynargs[4] = args[4]; return oraclize_query(timestamp, datasource, dynargs); } function oraclize_query(uint timestamp, string datasource, bytes[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](5); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; dynargs[4] = args[4]; return oraclize_query(timestamp, datasource, dynargs, gaslimit); } function oraclize_query(string datasource, bytes[5] args, uint gaslimit) oraclizeAPI internal returns (bytes32 id) { bytes[] memory dynargs = new bytes[](5); dynargs[0] = args[0]; dynargs[1] = args[1]; dynargs[2] = args[2]; dynargs[3] = args[3]; dynargs[4] = args[4]; return oraclize_query(datasource, dynargs, gaslimit); } function oraclize_cbAddress() oraclizeAPI internal returns (address){ return oraclize.cbAddress(); } function oraclize_setProof(byte proofP) oraclizeAPI internal { return oraclize.setProofType(proofP); } function oraclize_setCustomGasPrice(uint gasPrice) oraclizeAPI internal { return oraclize.setCustomGasPrice(gasPrice); } function oraclize_setConfig(bytes32 config) oraclizeAPI internal { return oraclize.setConfig(config); } function oraclize_randomDS_getSessionPubKeyHash() oraclizeAPI internal returns (bytes32){ return oraclize.randomDS_getSessionPubKeyHash(); } function getCodeSize(address _addr) constant internal returns(uint _size) { assembly { _size := extcodesize(_addr) } } function parseAddr(string _a) internal returns (address){ bytes memory tmp = bytes(_a); uint160 iaddr = 0; uint160 b1; uint160 b2; for (uint i=2; i<2+2*20; i+=2){ iaddr *= 256; b1 = uint160(tmp[i]); b2 = uint160(tmp[i+1]); if ((b1 >= 97)&&(b1 <= 102)) b1 -= 87; else if ((b1 >= 65)&&(b1 <= 70)) b1 -= 55; else if ((b1 >= 48)&&(b1 <= 57)) b1 -= 48; if ((b2 >= 97)&&(b2 <= 102)) b2 -= 87; else if ((b2 >= 65)&&(b2 <= 70)) b2 -= 55; else if ((b2 >= 48)&&(b2 <= 57)) b2 -= 48; iaddr += (b1*16+b2); } return address(iaddr); } function strCompare(string _a, string _b) internal returns (int) { bytes memory a = bytes(_a); bytes memory b = bytes(_b); uint minLength = a.length; if (b.length < minLength) minLength = b.length; for (uint i = 0; i < minLength; i ++) if (a[i] < b[i]) return -1; else if (a[i] > b[i]) return 1; if (a.length < b.length) return -1; else if (a.length > b.length) return 1; else return 0; } function indexOf(string _haystack, string _needle) internal returns (int) { bytes memory h = bytes(_haystack); bytes memory n = bytes(_needle); if(h.length < 1 || n.length < 1 || (n.length > h.length)) return -1; else if(h.length > (2**128 -1)) return -1; else { uint subindex = 0; for (uint i = 0; i < h.length; i ++) { if (h[i] == n[0]) { subindex = 1; while(subindex < n.length && (i + subindex) < h.length && h[i + subindex] == n[subindex]) { subindex++; } if(subindex == n.length) return int(i); } } return -1; } } function strConcat(string _a, string _b, string _c, string _d, string _e) internal returns (string) { bytes memory _ba = bytes(_a); bytes memory _bb = bytes(_b); bytes memory _bc = bytes(_c); bytes memory _bd = bytes(_d); bytes memory _be = bytes(_e); string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length); bytes memory babcde = bytes(abcde); uint k = 0; for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i]; for (i = 0; i < _bb.length; i++) babcde[k++] = _bb[i]; for (i = 0; i < _bc.length; i++) babcde[k++] = _bc[i]; for (i = 0; i < _bd.length; i++) babcde[k++] = _bd[i]; for (i = 0; i < _be.length; i++) babcde[k++] = _be[i]; return string(babcde); } function strConcat(string _a, string _b, string _c, string _d) internal returns (string) { return strConcat(_a, _b, _c, _d, ""); } function strConcat(string _a, string _b, string _c) internal returns (string) { return strConcat(_a, _b, _c, "", ""); } function strConcat(string _a, string _b) internal returns (string) { return strConcat(_a, _b, "", "", ""); } // parseInt function parseInt(string _a) internal returns (uint) { return parseInt(_a, 0); } // parseInt(parseFloat*10^_b) function parseInt(string _a, uint _b) internal returns (uint) { bytes memory bresult = bytes(_a); uint mint = 0; bool decimals = false; for (uint i=0; i<bresult.length; i++){ if ((bresult[i] >= 48)&&(bresult[i] <= 57)){ if (decimals){ if (_b == 0) break; else _b--; } mint *= 10; mint += uint(bresult[i]) - 48; } else if (bresult[i] == 46) decimals = true; } if (_b > 0) mint *= 10**_b; return mint; } function uint2str(uint i) internal returns (string){ if (i == 0) return "0"; uint j = i; uint len; while (j != 0){ len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len - 1; while (i != 0){ bstr[k--] = byte(48 + i % 10); i /= 10; } return string(bstr); } using CBOR for Buffer.buffer; function stra2cbor(string[] arr) internal constant returns (bytes) { safeMemoryCleaner(); Buffer.buffer memory buf; Buffer.init(buf, 1024); buf.startArray(); for (uint i = 0; i < arr.length; i++) { buf.encodeString(arr[i]); } buf.endSequence(); return buf.buf; } function ba2cbor(bytes[] arr) internal constant returns (bytes) { safeMemoryCleaner(); Buffer.buffer memory buf; Buffer.init(buf, 1024); buf.startArray(); for (uint i = 0; i < arr.length; i++) { buf.encodeBytes(arr[i]); } buf.endSequence(); return buf.buf; } string oraclize_network_name; function oraclize_setNetworkName(string _network_name) internal { oraclize_network_name = _network_name; } function oraclize_getNetworkName() internal returns (string) { return oraclize_network_name; } function oraclize_newRandomDSQuery(uint _delay, uint _nbytes, uint _customGasLimit) internal returns (bytes32){ if ((_nbytes == 0)||(_nbytes > 32)) throw; // Convert from seconds to ledger timer ticks _delay *= 10; bytes memory nbytes = new bytes(1); nbytes[0] = byte(_nbytes); bytes memory unonce = new bytes(32); bytes memory sessionKeyHash = new bytes(32); bytes32 sessionKeyHash_bytes32 = oraclize_randomDS_getSessionPubKeyHash(); assembly { mstore(unonce, 0x20) // the following variables can be relaxed // check relaxed random contract under ethereum-examples repo // for an idea on how to override and replace comit hash vars mstore(add(unonce, 0x20), xor(blockhash(sub(number, 1)), xor(coinbase, timestamp))) mstore(sessionKeyHash, 0x20) mstore(add(sessionKeyHash, 0x20), sessionKeyHash_bytes32) } bytes memory delay = new bytes(32); assembly { mstore(add(delay, 0x20), _delay) } bytes memory delay_bytes8 = new bytes(8); copyBytes(delay, 24, 8, delay_bytes8, 0); bytes[4] memory args = [unonce, nbytes, sessionKeyHash, delay]; bytes32 queryId = oraclize_query("random", args, _customGasLimit); bytes memory delay_bytes8_left = new bytes(8); assembly { let x := mload(add(delay_bytes8, 0x20)) mstore8(add(delay_bytes8_left, 0x27), div(x, 0x100000000000000000000000000000000000000000000000000000000000000)) mstore8(add(delay_bytes8_left, 0x26), div(x, 0x1000000000000000000000000000000000000000000000000000000000000)) mstore8(add(delay_bytes8_left, 0x25), div(x, 0x10000000000000000000000000000000000000000000000000000000000)) mstore8(add(delay_bytes8_left, 0x24), div(x, 0x100000000000000000000000000000000000000000000000000000000)) mstore8(add(delay_bytes8_left, 0x23), div(x, 0x1000000000000000000000000000000000000000000000000000000)) mstore8(add(delay_bytes8_left, 0x22), div(x, 0x10000000000000000000000000000000000000000000000000000)) mstore8(add(delay_bytes8_left, 0x21), div(x, 0x100000000000000000000000000000000000000000000000000)) mstore8(add(delay_bytes8_left, 0x20), div(x, 0x1000000000000000000000000000000000000000000000000)) } oraclize_randomDS_setCommitment(queryId, sha3(delay_bytes8_left, args[1], sha256(args[0]), args[2])); return queryId; } function oraclize_randomDS_setCommitment(bytes32 queryId, bytes32 commitment) internal { oraclize_randomDS_args[queryId] = commitment; } mapping(bytes32=>bytes32) oraclize_randomDS_args; mapping(bytes32=>bool) oraclize_randomDS_sessionKeysHashVerified; function verifySig(bytes32 tosignh, bytes dersig, bytes pubkey) internal returns (bool){ bool sigok; address signer; bytes32 sigr; bytes32 sigs; bytes memory sigr_ = new bytes(32); uint offset = 4+(uint(dersig[3]) - 0x20); sigr_ = copyBytes(dersig, offset, 32, sigr_, 0); bytes memory sigs_ = new bytes(32); offset += 32 + 2; sigs_ = copyBytes(dersig, offset+(uint(dersig[offset-1]) - 0x20), 32, sigs_, 0); assembly { sigr := mload(add(sigr_, 32)) sigs := mload(add(sigs_, 32)) } (sigok, signer) = safer_ecrecover(tosignh, 27, sigr, sigs); if (address(sha3(pubkey)) == signer) return true; else { (sigok, signer) = safer_ecrecover(tosignh, 28, sigr, sigs); return (address(sha3(pubkey)) == signer); } } function oraclize_randomDS_proofVerify__sessionKeyValidity(bytes proof, uint sig2offset) internal returns (bool) { bool sigok; // Step 6: verify the attestation signature, APPKEY1 must sign the sessionKey from the correct ledger app (CODEHASH) bytes memory sig2 = new bytes(uint(proof[sig2offset+1])+2); copyBytes(proof, sig2offset, sig2.length, sig2, 0); bytes memory appkey1_pubkey = new bytes(64); copyBytes(proof, 3+1, 64, appkey1_pubkey, 0); bytes memory tosign2 = new bytes(1+65+32); tosign2[0] = 1; //role copyBytes(proof, sig2offset-65, 65, tosign2, 1); bytes memory CODEHASH = hex"fd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c"; copyBytes(CODEHASH, 0, 32, tosign2, 1+65); sigok = verifySig(sha256(tosign2), sig2, appkey1_pubkey); if (sigok == false) return false; // Step 7: verify the APPKEY1 provenance (must be signed by Ledger) bytes memory LEDGERKEY = hex"7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e8537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e4"; bytes memory tosign3 = new bytes(1+65); tosign3[0] = 0xFE; copyBytes(proof, 3, 65, tosign3, 1); bytes memory sig3 = new bytes(uint(proof[3+65+1])+2); copyBytes(proof, 3+65, sig3.length, sig3, 0); sigok = verifySig(sha256(tosign3), sig3, LEDGERKEY); return sigok; } modifier oraclize_randomDS_proofVerify(bytes32 _queryId, string _result, bytes _proof) { // Step 1: the prefix has to match 'LP\x01' (Ledger Proof version 1) if ((_proof[0] != "L")||(_proof[1] != "P")||(_proof[2] != 1)) throw; bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName()); if (proofVerified == false) throw; _; } function oraclize_randomDS_proofVerify__returnCode(bytes32 _queryId, string _result, bytes _proof) internal returns (uint8){ // Step 1: the prefix has to match 'LP\x01' (Ledger Proof version 1) if ((_proof[0] != "L")||(_proof[1] != "P")||(_proof[2] != 1)) return 1; bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName()); if (proofVerified == false) return 2; return 0; } function matchBytes32Prefix(bytes32 content, bytes prefix, uint n_random_bytes) internal returns (bool){ bool match_ = true; if (prefix.length != n_random_bytes) throw; for (uint256 i=0; i< n_random_bytes; i++) { if (content[i] != prefix[i]) match_ = false; } return match_; } function oraclize_randomDS_proofVerify__main(bytes proof, bytes32 queryId, bytes result, string context_name) internal returns (bool){ // Step 2: the unique keyhash has to match with the sha256 of (context name + queryId) uint ledgerProofLength = 3+65+(uint(proof[3+65+1])+2)+32; bytes memory keyhash = new bytes(32); copyBytes(proof, ledgerProofLength, 32, keyhash, 0); if (!(sha3(keyhash) == sha3(sha256(context_name, queryId)))) return false; bytes memory sig1 = new bytes(uint(proof[ledgerProofLength+(32+8+1+32)+1])+2); copyBytes(proof, ledgerProofLength+(32+8+1+32), sig1.length, sig1, 0); // Step 3: we assume sig1 is valid (it will be verified during step 5) and we verify if 'result' is the prefix of sha256(sig1) if (!matchBytes32Prefix(sha256(sig1), result, uint(proof[ledgerProofLength+32+8]))) return false; // Step 4: commitment match verification, sha3(delay, nbytes, unonce, sessionKeyHash) == commitment in storage. // This is to verify that the computed args match with the ones specified in the query. bytes memory commitmentSlice1 = new bytes(8+1+32); copyBytes(proof, ledgerProofLength+32, 8+1+32, commitmentSlice1, 0); bytes memory sessionPubkey = new bytes(64); uint sig2offset = ledgerProofLength+32+(8+1+32)+sig1.length+65; copyBytes(proof, sig2offset-64, 64, sessionPubkey, 0); bytes32 sessionPubkeyHash = sha256(sessionPubkey); if (oraclize_randomDS_args[queryId] == sha3(commitmentSlice1, sessionPubkeyHash)){ //unonce, nbytes and sessionKeyHash match delete oraclize_randomDS_args[queryId]; } else return false; // Step 5: validity verification for sig1 (keyhash and args signed with the sessionKey) bytes memory tosign1 = new bytes(32+8+1+32); copyBytes(proof, ledgerProofLength, 32+8+1+32, tosign1, 0); if (!verifySig(sha256(tosign1), sig1, sessionPubkey)) return false; // verify if sessionPubkeyHash was verified already, if not.. let's do it! if (oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash] == false){ oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash] = oraclize_randomDS_proofVerify__sessionKeyValidity(proof, sig2offset); } return oraclize_randomDS_sessionKeysHashVerified[sessionPubkeyHash]; } // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license function copyBytes(bytes from, uint fromOffset, uint length, bytes to, uint toOffset) internal returns (bytes) { uint minLength = length + toOffset; if (to.length < minLength) { // Buffer too small throw; // Should be a better way? } // NOTE: the offset 32 is added to skip the `size` field of both bytes variables uint i = 32 + fromOffset; uint j = 32 + toOffset; while (i < (32 + fromOffset + length)) { assembly { let tmp := mload(add(from, i)) mstore(add(to, j), tmp) } i += 32; j += 32; } return to; } // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license // Duplicate Solidity's ecrecover, but catching the CALL return value function safer_ecrecover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal returns (bool, address) { // We do our own memory management here. Solidity uses memory offset // 0x40 to store the current end of memory. We write past it (as // writes are memory extensions), but don't update the offset so // Solidity will reuse it. The memory used here is only needed for // this context. // FIXME: inline assembly can't access return values bool ret; address addr; assembly { let size := mload(0x40) mstore(size, hash) mstore(add(size, 32), v) mstore(add(size, 64), r) mstore(add(size, 96), s) // NOTE: we can reuse the request memory because we deal with // the return code ret := call(3000, 1, 0, size, 128, size, 32) addr := mload(size) } return (ret, addr); } // the following function has been written by Alex Beregszaszi (@axic), use it under the terms of the MIT license function ecrecovery(bytes32 hash, bytes sig) internal returns (bool, address) { bytes32 r; bytes32 s; uint8 v; if (sig.length != 65) return (false, 0); // The signature format is a compact form of: // {bytes32 r}{bytes32 s}{uint8 v} // Compact means, uint8 is not padded to 32 bytes. assembly { r := mload(add(sig, 32)) s := mload(add(sig, 64)) // Here we are loading the last 32 bytes. We exploit the fact that // 'mload' will pad with zeroes if we overread. // There is no 'mload8' to do this, but that would be nicer. v := byte(0, mload(add(sig, 96))) // Alternative solution: // 'byte' is not working due to the Solidity parser, so lets // use the second best option, 'and' // v := and(mload(add(sig, 65)), 255) } // albeit non-transactional signatures are not specified by the YP, one would expect it // to match the YP range of [27, 28] // // geth uses [0, 1] and some clients have followed. This might change, see: // https://github.com/ethereum/go-ethereum/issues/2053 if (v < 27) v += 27; if (v != 27 && v != 28) return (false, 0); return safer_ecrecover(hash, v, r, s); } function safeMemoryCleaner() internal constant { assembly { let fmem := mload(0x40) codecopy(fmem, codesize, sub(msize, fmem)) } } } // </ORACLIZE_API> contract LoteoGame is Recoverable, usingOraclize { using SafeMath for uint256; StandardTokenExt public ticketToken; StandardTokenExt public bonusToken; uint256 public interval; uint256 public firstGameTime; address public ticketVault; address public bonusVault; address public serviceVault; address public feeVault; struct Game { uint256 endTime; mapping(uint256 => address) tickets; uint256 ticketsBought; uint256 ticketsUsed; address winner; uint256 prize; uint256 seed; mapping(address => uint256) ticketsByUser; } mapping(uint256 => Game) public games; uint256 public gameIndex; uint256 public maxOneTimeBuy = 100; uint256 public silencePeriod = 1800; uint256 public ticketCostInWei = 10000000000000000; uint256 public feesInWei = 0; string private apiKey = "1aed91d9"; event GameResolved(string result, address winner, uint256 prize); mapping (address => bool) public priceAgents; modifier onlyPriceAgent() { if(!priceAgents[msg.sender]) { revert(); } _; } function setPriceAgent(address addr, bool state) onlyOwner public { priceAgents[addr] = state; } function LoteoGame(address _ticketToken, address _bonusToken, uint256 _interval, uint256 _firstGameTime, uint256 _seed) { if (now > _firstGameTime) revert(); ticketToken = StandardTokenExt(_ticketToken); bonusToken = StandardTokenExt(_bonusToken); interval = _interval; firstGameTime = _firstGameTime; gameIndex = 0; games[gameIndex].endTime = firstGameTime; games[gameIndex].seed = _seed; } function() payable public { } function PRIZE_POOL() public view returns (string) { uint256 prizeInWei = games[gameIndex].ticketsBought.mul(ticketCostInWei); uint256 whole = prizeInWei.div(1 ether); uint256 fraction = prizeInWei.div(1 finney) - (whole.mul(1000)); string memory fractionString = uint2str(fraction); if (fraction < 10) { fractionString = strConcat('00', fractionString); } else if (fraction < 100) { fractionString = strConcat('0', fractionString); } return strConcat(uint2str(whole), '.', fractionString); } function LOTEU() public view returns (uint256) { return (games[gameIndex].ticketsUsed.sub(games[gameIndex].ticketsBought).mul(100)); } function LOTEU_total() public view returns (uint256) { return bonusToken.balanceOf(bonusVault); } function blockchain_FEES() public view returns (string) { uint256 whole = feesInWei.div(1 ether); uint256 fraction = feesInWei.div(1 finney) - (whole.mul(1000)); string memory fractionString = uint2str(fraction); if (fraction < 10) { fractionString = strConcat('00', fractionString); } else if (fraction < 100) { fractionString = strConcat('0', fractionString); } return strConcat(uint2str(whole), '.', fractionString); } function setTicketVault(address vault) public onlyOwner { ticketVault = vault; } function setBonusVault(address vault) public onlyOwner { bonusVault = vault; } function setServiceVault(address vault) public onlyOwner { serviceVault = vault; } function setFeeVault(address vault) public onlyOwner { feeVault = vault; } function setVaults(address _ticketVault, address _bonusVault, address _serviceVault, address _feeVault) public onlyOwner { ticketVault = _ticketVault; bonusVault = _bonusVault; serviceVault = _serviceVault; feeVault = _feeVault; } function setApiKey(string _apiKey) public onlyOwner { apiKey = _apiKey; } function setPrice(uint256 price) public onlyPriceAgent { ticketCostInWei = price; } function setFees(uint fees) public onlyPriceAgent { feesInWei = fees; } function getTicketsForUser(address user) public view returns (uint256) { return games[gameIndex].ticketsByUser[user]; } function useTickets(uint256 amount, bool bonusTicketsUsed) public { if (amount > maxOneTimeBuy) revert(); if (now > games[gameIndex].endTime.sub(silencePeriod)) revert(); ticketToken.transferFrom(msg.sender, ticketVault, amount); if (bonusTicketsUsed) { bonusToken.transferFrom(msg.sender, ticketVault, amount.mul(10000000000)); } games[gameIndex].ticketsBought = games[gameIndex].ticketsBought.add(amount); uint256 amountToUse = amount; if (bonusTicketsUsed) { amountToUse = amountToUse.mul(2); } uint256 position = games[gameIndex].ticketsUsed; for (uint256 i = 0; i < amountToUse; i++) { games[gameIndex].tickets[position] = msg.sender; position++; } games[gameIndex].ticketsUsed = games[gameIndex].ticketsUsed.add(amountToUse); games[gameIndex].ticketsByUser[msg.sender] = games[gameIndex].ticketsByUser[msg.sender].add(amountToUse); } function useTicketsForUser(address user, uint256 amount, bool bonusTicketsUsed) public onlyPriceAgent { if (amount > maxOneTimeBuy) revert(); if (now > games[gameIndex].endTime.sub(silencePeriod)) revert(); ticketToken.transferFrom(user, ticketVault, amount); if (bonusTicketsUsed) { bonusToken.transferFrom(user, ticketVault, amount.mul(10000000000)); } games[gameIndex].ticketsBought = games[gameIndex].ticketsBought.add(amount); uint256 amountToUse = amount; if (bonusTicketsUsed) { amountToUse = amountToUse.mul(2); } uint256 position = games[gameIndex].ticketsUsed; for (uint256 i = 0; i < amountToUse; i++) { games[gameIndex].tickets[position] = user; position++; } games[gameIndex].ticketsUsed = games[gameIndex].ticketsUsed.add(amountToUse); games[gameIndex].ticketsByUser[user] = games[gameIndex].ticketsByUser[user].add(amountToUse); } function __callback(bytes32 myid, string result) { if (now < games[gameIndex].endTime) revert(); if (msg.sender != oraclize_cbAddress()) revert(); uint256 random = parseInt(result); random = (games[gameIndex].seed.add(random)) % games[gameIndex].ticketsUsed; if (random >= games[gameIndex].ticketsUsed) revert(); address winner = games[gameIndex].tickets[random]; games[gameIndex].winner = winner; gameIndex++; games[gameIndex].seed = random; games[gameIndex].endTime = games[gameIndex - 1].endTime.add(interval); uint256 totalBank = ticketCostInWei.mul(games[gameIndex - 1].ticketsBought).sub(feesInWei); uint256 prize = totalBank.div(100).mul(75); uint256 service = prize.div(3); games[gameIndex - 1].prize = prize; GameResolved(result, winner, prize); if (!feeVault.send(feesInWei)) revert(); if (!winner.send(prize)) revert(); if (!serviceVault.send(service)) revert(); } function resolveGame() public { if (now < games[gameIndex].endTime) revert(); if (games[gameIndex].ticketsUsed > 0) { oraclize_query("URL", strConcat('json(https://playloteo.com/api/random-number?secret=', apiKey, '&min=0&max=', uint2str(uint(games[gameIndex].ticketsUsed) - 1), ').randomNumber'), 1000000); } else { gameIndex++; games[gameIndex].seed = games[gameIndex - 1].seed; games[gameIndex].endTime = games[gameIndex - 1].endTime.add(interval); } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"games","outputs":[{"name":"endTime","type":"uint256"},{"name":"ticketsBought","type":"uint256"},{"name":"ticketsUsed","type":"uint256"},{"name":"winner","type":"address"},{"name":"prize","type":"uint256"},{"name":"seed","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"recoverTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ticketCostInWei","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"myid","type":"bytes32"},{"name":"result","type":"string"},{"name":"proof","type":"bytes"}],"name":"__callback","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"serviceVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"user","type":"address"},{"name":"amount","type":"uint256"},{"name":"bonusTicketsUsed","type":"bool"}],"name":"useTicketsForUser","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"silencePeriod","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"fees","type":"uint256"}],"name":"setFees","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"maxOneTimeBuy","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bonusToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feeVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gameIndex","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_ticketVault","type":"address"},{"name":"_bonusVault","type":"address"},{"name":"_serviceVault","type":"address"},{"name":"_feeVault","type":"address"}],"name":"setVaults","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"addr","type":"address"},{"name":"state","type":"bool"}],"name":"setPriceAgent","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"vault","type":"address"}],"name":"setBonusVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"blockchain_FEES","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"firstGameTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"PRIZE_POOL","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ticketVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"resolveGame","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"LOTEU_total","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"interval","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LOTEU","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"amount","type":"uint256"},{"name":"bonusTicketsUsed","type":"bool"}],"name":"useTickets","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"vault","type":"address"}],"name":"setFeeVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"user","type":"address"}],"name":"getTicketsForUser","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feesInWei","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"tokensToBeReturned","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"priceAgents","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"vault","type":"address"}],"name":"setServiceVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"ticketToken","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_apiKey","type":"string"}],"name":"setApiKey","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"vault","type":"address"}],"name":"setTicketVault","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"bonusVault","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"_ticketToken","type":"address"},{"name":"_bonusToken","type":"address"},{"name":"_interval","type":"uint256"},{"name":"_firstGameTime","type":"uint256"},{"name":"_seed","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"result","type":"string"},{"indexed":false,"name":"winner","type":"address"},{"indexed":false,"name":"prize","type":"uint256"}],"name":"GameResolved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Contract Creation Code
60606040526064601055610708601155662386f26fc1000060125560006013556040805190810160405280600881526020017f3161656439316439000000000000000000000000000000000000000000000000815250601490805190602001906200006c929190620001e7565b5034156200007957600080fd5b60405160a080620047b383398101604052808051906020019091908051906020019091908051906020019091908051906020019091908051906020019091905050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550814211156200010857600080fd5b84600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600881905550816009819055506000600f81905550600954600e6000600f5481526020019081526020016000206000018190555080600e6000600f54815260200190815260200160002060060181905550505050505062000296565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200022a57805160ff19168380011785556200025b565b828001600101855582156200025b579182015b828111156200025a5782518255916020019190600101906200023d565b5b5090506200026a91906200026e565b5090565b6200029391905b808211156200028f57600081600090555060010162000275565b5090565b90565b61450d80620002a66000396000f3006060604052600436106101d8576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063117a5b90146101da57806316114acd1461026057806324ede00f1461029957806327dc297e146102c257806338bbfa501461032c57806339788aa3146103d95780633a22d2371461042e5780633cae09ac1461047b5780633d18678e146104a45780633f626a84146104c757806341d4a1ab146104f0578063478222c2146105455780635654a3411461059a5780635b871d23146105c35780635f2c1b6a14610659578063643532de1461069d57806369b8444c146106d657806375b19c9f14610764578063764a71631461078d578063795f956b1461081b5780637cd2d47c146108705780638da5cb5b1461088557806391b7f5ed146108da578063943ba310146108fd578063947a36fb1461092657806394ed0a671461094f578063a29ae3ef14610978578063a591f97f146109a6578063c1648fbd146109df578063c19e0c9114610a2c578063c45d19db14610a55578063cdc787b014610aa2578063cfcb600814610af3578063d5ed4d5a14610b2c578063d6911ac514610b81578063de87458714610bde578063eec3cc5d14610c17578063f2fde38b14610c6c575b005b34156101e557600080fd5b6101fb6004808035906020019091905050610ca5565b604051808781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001965050505050505060405180910390f35b341561026b57600080fd5b610297600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d01565b005b34156102a457600080fd5b6102ac610e42565b6040518082815260200191505060405180910390f35b34156102cd57600080fd5b61032a60048080356000191690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610e48565b005b341561033757600080fd5b6103d760048080356000191690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506112e1565b005b34156103e457600080fd5b6103ec6112e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561043957600080fd5b610479600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035151590602001909190505061130c565b005b341561048657600080fd5b61048e61184f565b6040518082815260200191505060405180910390f35b34156104af57600080fd5b6104c56004808035906020019091905050611855565b005b34156104d257600080fd5b6104da6118b7565b6040518082815260200191505060405180910390f35b34156104fb57600080fd5b6105036118bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561055057600080fd5b6105586118e3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105a557600080fd5b6105ad611909565b6040518082815260200191505060405180910390f35b34156105ce57600080fd5b610657600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061190f565b005b341561066457600080fd5b61069b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611a74565b005b34156106a857600080fd5b6106d4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b2a565b005b34156106e157600080fd5b6106e9611bc9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561072957808201518184015260208101905061070e565b50505050905090810190601f1680156107565780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561076f57600080fd5b610777611d25565b6040518082815260200191505060405180910390f35b341561079857600080fd5b6107a0611d2b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107e05780820151818401526020810190506107c5565b50505050905090810190601f16801561080d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561082657600080fd5b61082e611eb5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561087b57600080fd5b610883611edb565b005b341561089057600080fd5b610898612192565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156108e557600080fd5b6108fb60048080359060200190919050506121b7565b005b341561090857600080fd5b610910612219565b6040518082815260200191505060405180910390f35b341561093157600080fd5b610939612315565b6040518082815260200191505060405180910390f35b341561095a57600080fd5b61096261231b565b6040518082815260200191505060405180910390f35b341561098357600080fd5b6109a460048080359060200190919080351515906020019091905050612378565b005b34156109b157600080fd5b6109dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612862565b005b34156109ea57600080fd5b610a16600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612901565b6040518082815260200191505060405180910390f35b3415610a3757600080fd5b610a3f612960565b6040518082815260200191505060405180910390f35b3415610a6057600080fd5b610a8c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612966565b6040518082815260200191505060405180910390f35b3415610aad57600080fd5b610ad9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612a20565b604051808215151515815260200191505060405180910390f35b3415610afe57600080fd5b610b2a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612a40565b005b3415610b3757600080fd5b610b3f612adf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610b8c57600080fd5b610bdc600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612b05565b005b3415610be957600080fd5b610c15600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612b7a565b005b3415610c2257600080fd5b610c2a612c19565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610c7757600080fd5b610ca3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612c3f565b005b600e6020528060005260406000206000915090508060000154908060020154908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050154908060060154905086565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d5c57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610da384612966565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610e2757600080fd5b5af11515610e3457600080fd5b505050604051805190505050565b60125481565b6000806000806000600e6000600f54815260200190815260200160002060000154421015610e7557600080fd5b610e7d612d94565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610eb657600080fd5b610ebf86613087565b9450600e6000600f54815260200190815260200160002060030154610f0586600e6000600f5481526020019081526020016000206006015461309b90919063ffffffff16565b811515610f0e57fe5b069450600e6000600f5481526020019081526020016000206003015485101515610f3757600080fd5b600e6000600f548152602001908152602001600020600101600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16935083600e6000600f54815260200190815260200160002060040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600f6000815480929190600101919050555084600e6000600f54815260200190815260200160002060060181905550611039600854600e60006001600f540381526020019081526020016000206000015461309b90919063ffffffff16565b600e6000600f5481526020019081526020016000206000018190555061109960135461108b600e60006001600f54038152602001908152602001600020600201546012546130b990919063ffffffff16565b6130f490919063ffffffff16565b92506110c2604b6110b460648661310d90919063ffffffff16565b6130b990919063ffffffff16565b91506110d860038361310d90919063ffffffff16565b905081600e60006001600f54038152602001908152602001600020600501819055507fe66fe9d22798c3daf3c1ea505739176a3fd58d25a1aca2e7072c4e4adb92bb2e86858460405180806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019080838360005b8381101561119657808201518184015260208101905061117b565b50505050905090810190601f1680156111c35780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6013549081150290604051600060405180830381858888f19350505050151561123657600080fd5b8373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050151561127657600080fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156112d857600080fd5b50505050505050565b505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561136957600080fd5b60105485111561137857600080fd5b6113a5601154600e6000600f548152602001908152602001600020600001546130f490919063ffffffff16565b4211156113b157600080fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd87600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15156114cb57600080fd5b5af115156114d857600080fd5b5050506040518051905050831561163357600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd87600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166115636402540be4008a6130b990919063ffffffff16565b6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561161a57600080fd5b5af1151561162757600080fd5b50505060405180519050505b61165e85600e6000600f5481526020019081526020016000206002015461309b90919063ffffffff16565b600e6000600f54815260200190815260200160002060020181905550849250831561169a576116976002846130b990919063ffffffff16565b92505b600e6000600f548152602001908152602001600020600301549150600090505b8281101561173f5785600e6000600f548152602001908152602001600020600101600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818060010192505080806001019150506116ba565b61176a83600e6000600f5481526020019081526020016000206003015461309b90919063ffffffff16565b600e6000600f548152602001908152602001600020600301819055506117ee83600e6000600f54815260200190815260200160002060070160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461309b90919063ffffffff16565b600e6000600f54815260200190815260200160002060070160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050505050565b60115481565b601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156118ad57600080fd5b8060138190555050565b60105481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561196a57600080fd5b83600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611acf57600080fd5b80601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b8557600080fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611bd1614414565b600080611bdc614414565b611bf9670de0b6b3a764000060135461310d90919063ffffffff16565b9250611c106103e8846130b990919063ffffffff16565b611c2c66038d7ea4c6800060135461310d90919063ffffffff16565b039150611c3882613128565b9050600a821015611c8957611c826040805190810160405280600281526020017f30300000000000000000000000000000000000000000000000000000000000008152508261327a565b9050611cd5565b6064821015611cd457611cd16040805190810160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152508261327a565b90505b5b611d1d611ce184613128565b6040805190810160405280600181526020017f2e00000000000000000000000000000000000000000000000000000000000000815250836132c7565b935050505090565b60095481565b611d33614414565b6000806000611d40614414565b611d6d601254600e6000600f548152602001908152602001600020600201546130b990919063ffffffff16565b9350611d8a670de0b6b3a76400008561310d90919063ffffffff16565b9250611da16103e8846130b990919063ffffffff16565b611dbb66038d7ea4c680008661310d90919063ffffffff16565b039150611dc782613128565b9050600a821015611e1857611e116040805190810160405280600281526020017f30300000000000000000000000000000000000000000000000000000000000008152508261327a565b9050611e64565b6064821015611e6357611e606040805190810160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152508261327a565b90505b5b611eac611e7084613128565b6040805190810160405280600181526020017f2e00000000000000000000000000000000000000000000000000000000000000815250836132c7565b94505050505090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600e6000600f54815260200190815260200160002060000154421015611f0057600080fd5b6000600e6000600f5481526020019081526020016000206003015411156120f9576120f36040805190810160405280600381526020017f55524c00000000000000000000000000000000000000000000000000000000008152506120ea606060405190810160405280603481526020017f6a736f6e2868747470733a2f2f706c61796c6f74656f2e636f6d2f6170692f7281526020017f616e646f6d2d6e756d6265723f7365637265743d00000000000000000000000081525060148054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120505780601f1061202557610100808354040283529160200191612050565b820191906000526020600020905b81548152906001019060200180831161203357829003601f168201915b50505050506040805190810160405280600b81526020017f266d696e3d30266d61783d0000000000000000000000000000000000000000008152506120af6001600e6000600f5481526020019081526020016000206003015403613128565b6040805190810160405280600e81526020017f292e72616e646f6d4e756d626572000000000000000000000000000000000000815250613305565b620f424061373d565b50612190565b600f60008154809291906001019190505550600e60006001600f5403815260200190815260200160002060060154600e6000600f54815260200190815260200160002060060181905550612173600854600e60006001600f540381526020019081526020016000206000015461309b90919063ffffffff16565b600e6000600f548152602001908152602001600020600001819055505b565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561220f57600080fd5b8060128190555050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156122f957600080fd5b5af1151561230657600080fd5b50505060405180519050905090565b60085481565b60006123736064612365600e6000600f54815260200190815260200160002060020154600e6000600f548152602001908152602001600020600301546130f490919063ffffffff16565b6130b990919063ffffffff16565b905090565b600080600060105485111561238c57600080fd5b6123b9601154600e6000600f548152602001908152602001600020600001546130f490919063ffffffff16565b4211156123c557600080fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15156124df57600080fd5b5af115156124ec57600080fd5b5050506040518051905050831561264757600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166125776402540be4008a6130b990919063ffffffff16565b6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561262e57600080fd5b5af1151561263b57600080fd5b50505060405180519050505b61267285600e6000600f5481526020019081526020016000206002015461309b90919063ffffffff16565b600e6000600f5481526020019081526020016000206002018190555084925083156126ae576126ab6002846130b990919063ffffffff16565b92505b600e6000600f548152602001908152602001600020600301549150600090505b828110156127535733600e6000600f548152602001908152602001600020600101600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818060010192505080806001019150506126ce565b61277e83600e6000600f5481526020019081526020016000206003015461309b90919063ffffffff16565b600e6000600f5481526020019081526020016000206003018190555061280283600e6000600f54815260200190815260200160002060070160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461309b90919063ffffffff16565b600e6000600f54815260200190815260200160002060070160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156128bd57600080fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600e6000600f54815260200190815260200160002060070160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60135481565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515612a0257600080fd5b5af11515612a0f57600080fd5b505050604051805190509050919050565b60156020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612a9b57600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b6057600080fd5b8060149080519060200190612b76929190614428565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612bd557600080fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612c9a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515612cd657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480612e0657506000612e04600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613c5d565b145b15612e1757612e156000613c68565b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515612e9c57600080fd5b5af11515612ea957600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612fe657600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515612f8e57600080fd5b5af11515612f9b57600080fd5b50505060405180519050600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561306b57600080fd5b5af1151561307857600080fd5b50505060405180519050905090565b6000613094826000614100565b9050919050565b60008082840190508381101515156130af57fe5b8091505092915050565b60008060008414156130ce57600091506130ed565b82840290508284828115156130df57fe5b041415156130e957fe5b8091505b5092915050565b600082821115151561310257fe5b818303905092915050565b600080828481151561311b57fe5b0490508091505092915050565b613130614414565b60008061313b6144a8565b600080861415613182576040805190810160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509450613271565b8593505b6000841415156131ac578280600101935050600a848115156131a457fe5b049350613186565b826040518059106131ba5750595b9080825280601f01601f191660200182016040525091506001830390505b60008614151561326d57600a868115156131ee57fe5b066030017f01000000000000000000000000000000000000000000000000000000000000000282828060019003935081518110151561322957fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8681151561326557fe5b0495506131d8565b8194505b50505050919050565b613282614414565b6132bf8383602060405190810160405280600081525060206040519081016040528060008152506020604051908101604052806000815250613305565b905092915050565b6132cf614414565b6132fc84848460206040519081016040528060008152506020604051908101604052806000815250613305565b90509392505050565b61330d614414565b6133156144a8565b61331d6144a8565b6133256144a8565b61332d6144a8565b6133356144a8565b61333d614414565b6133456144a8565b6000808e98508d97508c96508b95508a94508451865188518a518c51010101016040518059106133725750595b9080825280601f01601f1916602001820160405250935083925060009150600090505b88518110156134485788818151811015156133ac57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838380600101945081518110151561340b57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613395565b600090505b875181101561350057878181518110151561346457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283838060010194508151811015156134c357fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061344d565b600090505b86518110156135b857868181518110151561351c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838380600101945081518110151561357b57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613505565b600090505b85518110156136705785818151811015156135d457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838380600101945081518110151561363357fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506135bd565b600090505b845181101561372857848181518110151561368c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283838060010194508151811015156136eb57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613675565b82995050505050505050505095945050505050565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806137b1575060006137af600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613c5d565b145b156137c2576137c06000613c68565b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561384757600080fd5b5af1151561385457600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561399157600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561393957600080fd5b5af1151561394657600080fd5b50505060405180519050600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015613a42578082015181840152602081019050613a27565b50505050905090810190601f168015613a6f5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1515613a8e57600080fd5b5af11515613a9b57600080fd5b505050604051805190509050823a02670de0b6b3a764000001811115613ac75760006001029150613c55565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015613b86578082015181840152602081019050613b6b565b50505050905090810190601f168015613bb35780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015613bec578082015181840152602081019050613bd1565b50505050905090810190601f168015613c195780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b1515613c3a57600080fd5b5af11515613c4757600080fd5b505050506040518051905091505b509392505050565b6000813b9050919050565b600080613c88731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed613c5d565b1115613d2a57731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613d216040805190810160405280600b81526020017f6574685f6d61696e6e65740000000000000000000000000000000000000000008152506143fa565b600190506140fb565b6000613d4973c03a2615d5efaf5f49f60b7bb6583eaec212fdf1613c5d565b1115613deb5773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613de26040805190810160405280600c81526020017f6574685f726f707374656e3300000000000000000000000000000000000000008152506143fa565b600190506140fb565b6000613e0a73b7a07bcf2ba2f2703b24c0691b5278999c59ac7e613c5d565b1115613eac5773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613ea36040805190810160405280600981526020017f6574685f6b6f76616e00000000000000000000000000000000000000000000008152506143fa565b600190506140fb565b6000613ecb73146500cfd35b22e4a392fe0adc06de1a1368ed48613c5d565b1115613f6d5773146500cfd35b22e4a392fe0adc06de1a1368ed48600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613f646040805190810160405280600b81526020017f6574685f72696e6b6562790000000000000000000000000000000000000000008152506143fa565b600190506140fb565b6000613f8c736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475613c5d565b1115613ff057736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506140fb565b600061400f7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf613c5d565b1115614073577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506140fb565b60006140927351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa613c5d565b11156140f6577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506140fb565b600090505b919050565b600061410a6144a8565b60008060008693506000925060009150600090505b83518110156143db5760307f010000000000000000000000000000000000000000000000000000000000000002848281518110151561415a57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191610158015614272575060397f010000000000000000000000000000000000000000000000000000000000000002848281518110151561420257fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561432357811561429557600086141561428b576143db565b8580600190039650505b600a83029250603084828151811015156142ab57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900403830192506143ce565b602e7f010000000000000000000000000000000000000000000000000000000000000002848281518110151561435557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156143cd57600191505b5b808060010191505061411f565b60008611156143ed5785600a0a830292505b8294505050505092915050565b8060039080519060200190614410929190614428565b5050565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061446957805160ff1916838001178555614497565b82800160010185558215614497579182015b8281111561449657825182559160200191906001019061447b565b5b5090506144a491906144bc565b5090565b602060405190810160405280600081525090565b6144de91905b808211156144da5760008160009055506001016144c2565b5090565b905600a165627a7a723058208d9e1138248e4426689ae1ba64ad6ae3869b01966029726ad8563d46fc0a00930029000000000000000000000000fb9b8fbce5cc4b6adb5861a7f5870356f0ce7027000000000000000000000000f8a3dc13b7a8da473f80660f513c4343e4edd7f70000000000000000000000000000000000000000000000000000000000093a80000000000000000000000000000000000000000000000000000000005cceb420000000000000000000000000000000000000000000000000000000005cceb420
Deployed Bytecode
0x6060604052600436106101d8576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063117a5b90146101da57806316114acd1461026057806324ede00f1461029957806327dc297e146102c257806338bbfa501461032c57806339788aa3146103d95780633a22d2371461042e5780633cae09ac1461047b5780633d18678e146104a45780633f626a84146104c757806341d4a1ab146104f0578063478222c2146105455780635654a3411461059a5780635b871d23146105c35780635f2c1b6a14610659578063643532de1461069d57806369b8444c146106d657806375b19c9f14610764578063764a71631461078d578063795f956b1461081b5780637cd2d47c146108705780638da5cb5b1461088557806391b7f5ed146108da578063943ba310146108fd578063947a36fb1461092657806394ed0a671461094f578063a29ae3ef14610978578063a591f97f146109a6578063c1648fbd146109df578063c19e0c9114610a2c578063c45d19db14610a55578063cdc787b014610aa2578063cfcb600814610af3578063d5ed4d5a14610b2c578063d6911ac514610b81578063de87458714610bde578063eec3cc5d14610c17578063f2fde38b14610c6c575b005b34156101e557600080fd5b6101fb6004808035906020019091905050610ca5565b604051808781526020018681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001965050505050505060405180910390f35b341561026b57600080fd5b610297600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d01565b005b34156102a457600080fd5b6102ac610e42565b6040518082815260200191505060405180910390f35b34156102cd57600080fd5b61032a60048080356000191690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050610e48565b005b341561033757600080fd5b6103d760048080356000191690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506112e1565b005b34156103e457600080fd5b6103ec6112e6565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561043957600080fd5b610479600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035151590602001909190505061130c565b005b341561048657600080fd5b61048e61184f565b6040518082815260200191505060405180910390f35b34156104af57600080fd5b6104c56004808035906020019091905050611855565b005b34156104d257600080fd5b6104da6118b7565b6040518082815260200191505060405180910390f35b34156104fb57600080fd5b6105036118bd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561055057600080fd5b6105586118e3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156105a557600080fd5b6105ad611909565b6040518082815260200191505060405180910390f35b34156105ce57600080fd5b610657600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061190f565b005b341561066457600080fd5b61069b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611a74565b005b34156106a857600080fd5b6106d4600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b2a565b005b34156106e157600080fd5b6106e9611bc9565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561072957808201518184015260208101905061070e565b50505050905090810190601f1680156107565780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561076f57600080fd5b610777611d25565b6040518082815260200191505060405180910390f35b341561079857600080fd5b6107a0611d2b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107e05780820151818401526020810190506107c5565b50505050905090810190601f16801561080d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561082657600080fd5b61082e611eb5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561087b57600080fd5b610883611edb565b005b341561089057600080fd5b610898612192565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156108e557600080fd5b6108fb60048080359060200190919050506121b7565b005b341561090857600080fd5b610910612219565b6040518082815260200191505060405180910390f35b341561093157600080fd5b610939612315565b6040518082815260200191505060405180910390f35b341561095a57600080fd5b61096261231b565b6040518082815260200191505060405180910390f35b341561098357600080fd5b6109a460048080359060200190919080351515906020019091905050612378565b005b34156109b157600080fd5b6109dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612862565b005b34156109ea57600080fd5b610a16600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612901565b6040518082815260200191505060405180910390f35b3415610a3757600080fd5b610a3f612960565b6040518082815260200191505060405180910390f35b3415610a6057600080fd5b610a8c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612966565b6040518082815260200191505060405180910390f35b3415610aad57600080fd5b610ad9600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612a20565b604051808215151515815260200191505060405180910390f35b3415610afe57600080fd5b610b2a600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612a40565b005b3415610b3757600080fd5b610b3f612adf565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610b8c57600080fd5b610bdc600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612b05565b005b3415610be957600080fd5b610c15600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612b7a565b005b3415610c2257600080fd5b610c2a612c19565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610c7757600080fd5b610ca3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612c3f565b005b600e6020528060005260406000206000915090508060000154908060020154908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060050154908060060154905086565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d5c57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610da384612966565b6040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610e2757600080fd5b5af11515610e3457600080fd5b505050604051805190505050565b60125481565b6000806000806000600e6000600f54815260200190815260200160002060000154421015610e7557600080fd5b610e7d612d94565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610eb657600080fd5b610ebf86613087565b9450600e6000600f54815260200190815260200160002060030154610f0586600e6000600f5481526020019081526020016000206006015461309b90919063ffffffff16565b811515610f0e57fe5b069450600e6000600f5481526020019081526020016000206003015485101515610f3757600080fd5b600e6000600f548152602001908152602001600020600101600086815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16935083600e6000600f54815260200190815260200160002060040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600f6000815480929190600101919050555084600e6000600f54815260200190815260200160002060060181905550611039600854600e60006001600f540381526020019081526020016000206000015461309b90919063ffffffff16565b600e6000600f5481526020019081526020016000206000018190555061109960135461108b600e60006001600f54038152602001908152602001600020600201546012546130b990919063ffffffff16565b6130f490919063ffffffff16565b92506110c2604b6110b460648661310d90919063ffffffff16565b6130b990919063ffffffff16565b91506110d860038361310d90919063ffffffff16565b905081600e60006001600f54038152602001908152602001600020600501819055507fe66fe9d22798c3daf3c1ea505739176a3fd58d25a1aca2e7072c4e4adb92bb2e86858460405180806020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019080838360005b8381101561119657808201518184015260208101905061117b565b50505050905090810190601f1680156111c35780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6013549081150290604051600060405180830381858888f19350505050151561123657600080fd5b8373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050151561127657600080fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015156112d857600080fd5b50505050505050565b505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561136957600080fd5b60105485111561137857600080fd5b6113a5601154600e6000600f548152602001908152602001600020600001546130f490919063ffffffff16565b4211156113b157600080fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd87600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15156114cb57600080fd5b5af115156114d857600080fd5b5050506040518051905050831561163357600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd87600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166115636402540be4008a6130b990919063ffffffff16565b6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561161a57600080fd5b5af1151561162757600080fd5b50505060405180519050505b61165e85600e6000600f5481526020019081526020016000206002015461309b90919063ffffffff16565b600e6000600f54815260200190815260200160002060020181905550849250831561169a576116976002846130b990919063ffffffff16565b92505b600e6000600f548152602001908152602001600020600301549150600090505b8281101561173f5785600e6000600f548152602001908152602001600020600101600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818060010192505080806001019150506116ba565b61176a83600e6000600f5481526020019081526020016000206003015461309b90919063ffffffff16565b600e6000600f548152602001908152602001600020600301819055506117ee83600e6000600f54815260200190815260200160002060070160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461309b90919063ffffffff16565b600e6000600f54815260200190815260200160002060070160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050505050565b60115481565b601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156118ad57600080fd5b8060138190555050565b60105481565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600f5481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561196a57600080fd5b83600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611acf57600080fd5b80601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b8557600080fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b611bd1614414565b600080611bdc614414565b611bf9670de0b6b3a764000060135461310d90919063ffffffff16565b9250611c106103e8846130b990919063ffffffff16565b611c2c66038d7ea4c6800060135461310d90919063ffffffff16565b039150611c3882613128565b9050600a821015611c8957611c826040805190810160405280600281526020017f30300000000000000000000000000000000000000000000000000000000000008152508261327a565b9050611cd5565b6064821015611cd457611cd16040805190810160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152508261327a565b90505b5b611d1d611ce184613128565b6040805190810160405280600181526020017f2e00000000000000000000000000000000000000000000000000000000000000815250836132c7565b935050505090565b60095481565b611d33614414565b6000806000611d40614414565b611d6d601254600e6000600f548152602001908152602001600020600201546130b990919063ffffffff16565b9350611d8a670de0b6b3a76400008561310d90919063ffffffff16565b9250611da16103e8846130b990919063ffffffff16565b611dbb66038d7ea4c680008661310d90919063ffffffff16565b039150611dc782613128565b9050600a821015611e1857611e116040805190810160405280600281526020017f30300000000000000000000000000000000000000000000000000000000000008152508261327a565b9050611e64565b6064821015611e6357611e606040805190810160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152508261327a565b90505b5b611eac611e7084613128565b6040805190810160405280600181526020017f2e00000000000000000000000000000000000000000000000000000000000000815250836132c7565b94505050505090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600e6000600f54815260200190815260200160002060000154421015611f0057600080fd5b6000600e6000600f5481526020019081526020016000206003015411156120f9576120f36040805190810160405280600381526020017f55524c00000000000000000000000000000000000000000000000000000000008152506120ea606060405190810160405280603481526020017f6a736f6e2868747470733a2f2f706c61796c6f74656f2e636f6d2f6170692f7281526020017f616e646f6d2d6e756d6265723f7365637265743d00000000000000000000000081525060148054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156120505780601f1061202557610100808354040283529160200191612050565b820191906000526020600020905b81548152906001019060200180831161203357829003601f168201915b50505050506040805190810160405280600b81526020017f266d696e3d30266d61783d0000000000000000000000000000000000000000008152506120af6001600e6000600f5481526020019081526020016000206003015403613128565b6040805190810160405280600e81526020017f292e72616e646f6d4e756d626572000000000000000000000000000000000000815250613305565b620f424061373d565b50612190565b600f60008154809291906001019190505550600e60006001600f5403815260200190815260200160002060060154600e6000600f54815260200190815260200160002060060181905550612173600854600e60006001600f540381526020019081526020016000206000015461309b90919063ffffffff16565b600e6000600f548152602001908152602001600020600001819055505b565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561220f57600080fd5b8060128190555050565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156122f957600080fd5b5af1151561230657600080fd5b50505060405180519050905090565b60085481565b60006123736064612365600e6000600f54815260200190815260200160002060020154600e6000600f548152602001908152602001600020600301546130f490919063ffffffff16565b6130b990919063ffffffff16565b905090565b600080600060105485111561238c57600080fd5b6123b9601154600e6000600f548152602001908152602001600020600001546130f490919063ffffffff16565b4211156123c557600080fd5b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15156124df57600080fd5b5af115156124ec57600080fd5b5050506040518051905050831561264757600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166125776402540be4008a6130b990919063ffffffff16565b6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561262e57600080fd5b5af1151561263b57600080fd5b50505060405180519050505b61267285600e6000600f5481526020019081526020016000206002015461309b90919063ffffffff16565b600e6000600f5481526020019081526020016000206002018190555084925083156126ae576126ab6002846130b990919063ffffffff16565b92505b600e6000600f548152602001908152602001600020600301549150600090505b828110156127535733600e6000600f548152602001908152602001600020600101600084815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818060010192505080806001019150506126ce565b61277e83600e6000600f5481526020019081526020016000206003015461309b90919063ffffffff16565b600e6000600f5481526020019081526020016000206003018190555061280283600e6000600f54815260200190815260200160002060070160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461309b90919063ffffffff16565b600e6000600f54815260200190815260200160002060070160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156128bd57600080fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600e6000600f54815260200190815260200160002060070160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60135481565b60008173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515612a0257600080fd5b5af11515612a0f57600080fd5b505050604051805190509050919050565b60156020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612a9b57600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b6057600080fd5b8060149080519060200190612b76929190614428565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612bd557600080fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612c9a57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515612cd657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480612e0657506000612e04600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613c5d565b145b15612e1757612e156000613c68565b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515612e9c57600080fd5b5af11515612ea957600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515612fe657600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515612f8e57600080fd5b5af11515612f9b57600080fd5b50505060405180519050600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c281d19e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561306b57600080fd5b5af1151561307857600080fd5b50505060405180519050905090565b6000613094826000614100565b9050919050565b60008082840190508381101515156130af57fe5b8091505092915050565b60008060008414156130ce57600091506130ed565b82840290508284828115156130df57fe5b041415156130e957fe5b8091505b5092915050565b600082821115151561310257fe5b818303905092915050565b600080828481151561311b57fe5b0490508091505092915050565b613130614414565b60008061313b6144a8565b600080861415613182576040805190810160405280600181526020017f30000000000000000000000000000000000000000000000000000000000000008152509450613271565b8593505b6000841415156131ac578280600101935050600a848115156131a457fe5b049350613186565b826040518059106131ba5750595b9080825280601f01601f191660200182016040525091506001830390505b60008614151561326d57600a868115156131ee57fe5b066030017f01000000000000000000000000000000000000000000000000000000000000000282828060019003935081518110151561322957fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350600a8681151561326557fe5b0495506131d8565b8194505b50505050919050565b613282614414565b6132bf8383602060405190810160405280600081525060206040519081016040528060008152506020604051908101604052806000815250613305565b905092915050565b6132cf614414565b6132fc84848460206040519081016040528060008152506020604051908101604052806000815250613305565b90509392505050565b61330d614414565b6133156144a8565b61331d6144a8565b6133256144a8565b61332d6144a8565b6133356144a8565b61333d614414565b6133456144a8565b6000808e98508d97508c96508b95508a94508451865188518a518c51010101016040518059106133725750595b9080825280601f01601f1916602001820160405250935083925060009150600090505b88518110156134485788818151811015156133ac57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838380600101945081518110151561340b57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613395565b600090505b875181101561350057878181518110151561346457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283838060010194508151811015156134c357fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350808060010191505061344d565b600090505b86518110156135b857868181518110151561351c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838380600101945081518110151561357b57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613505565b600090505b85518110156136705785818151811015156135d457fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f010000000000000000000000000000000000000000000000000000000000000002838380600101945081518110151561363357fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535080806001019150506135bd565b600090505b845181101561372857848181518110151561368c57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f01000000000000000000000000000000000000000000000000000000000000000283838060010194508151811015156136eb57fe5b9060200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508080600101915050613675565b82995050505050505050505095945050505050565b6000806000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806137b1575060006137af600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16613c5d565b145b156137c2576137c06000613c68565b505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561384757600080fd5b5af1151561385457600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561399157600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561393957600080fd5b5af1151561394657600080fd5b50505060405180519050600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ef3accc86856040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015613a42578082015181840152602081019050613a27565b50505050905090810190601f168015613a6f5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b1515613a8e57600080fd5b5af11515613a9b57600080fd5b505050604051805190509050823a02670de0b6b3a764000001811115613ac75760006001029150613c55565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c51be90f8260008888886040518663ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015613b86578082015181840152602081019050613b6b565b50505050905090810190601f168015613bb35780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015613bec578082015181840152602081019050613bd1565b50505050905090810190601f168015613c195780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b1515613c3a57600080fd5b5af11515613c4757600080fd5b505050506040518051905091505b509392505050565b6000813b9050919050565b600080613c88731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed613c5d565b1115613d2a57731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613d216040805190810160405280600b81526020017f6574685f6d61696e6e65740000000000000000000000000000000000000000008152506143fa565b600190506140fb565b6000613d4973c03a2615d5efaf5f49f60b7bb6583eaec212fdf1613c5d565b1115613deb5773c03a2615d5efaf5f49f60b7bb6583eaec212fdf1600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613de26040805190810160405280600c81526020017f6574685f726f707374656e3300000000000000000000000000000000000000008152506143fa565b600190506140fb565b6000613e0a73b7a07bcf2ba2f2703b24c0691b5278999c59ac7e613c5d565b1115613eac5773b7a07bcf2ba2f2703b24c0691b5278999c59ac7e600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613ea36040805190810160405280600981526020017f6574685f6b6f76616e00000000000000000000000000000000000000000000008152506143fa565b600190506140fb565b6000613ecb73146500cfd35b22e4a392fe0adc06de1a1368ed48613c5d565b1115613f6d5773146500cfd35b22e4a392fe0adc06de1a1368ed48600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550613f646040805190810160405280600b81526020017f6574685f72696e6b6562790000000000000000000000000000000000000000008152506143fa565b600190506140fb565b6000613f8c736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475613c5d565b1115613ff057736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506140fb565b600061400f7320e12a1f859b3feae5fb2a0a32c18f5a65555bbf613c5d565b1115614073577320e12a1f859b3feae5fb2a0a32c18f5a65555bbf600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506140fb565b60006140927351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa613c5d565b11156140f6577351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600190506140fb565b600090505b919050565b600061410a6144a8565b60008060008693506000925060009150600090505b83518110156143db5760307f010000000000000000000000000000000000000000000000000000000000000002848281518110151561415a57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191610158015614272575060397f010000000000000000000000000000000000000000000000000000000000000002848281518110151561420257fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561432357811561429557600086141561428b576143db565b8580600190039650505b600a83029250603084828151811015156142ab57fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027f0100000000000000000000000000000000000000000000000000000000000000900403830192506143ce565b602e7f010000000000000000000000000000000000000000000000000000000000000002848281518110151561435557fe5b9060200101517f010000000000000000000000000000000000000000000000000000000000000090047f0100000000000000000000000000000000000000000000000000000000000000027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156143cd57600191505b5b808060010191505061411f565b60008611156143ed5785600a0a830292505b8294505050505092915050565b8060039080519060200190614410929190614428565b5050565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061446957805160ff1916838001178555614497565b82800160010185558215614497579182015b8281111561449657825182559160200191906001019061447b565b5b5090506144a491906144bc565b5090565b602060405190810160405280600081525090565b6144de91905b808211156144da5760008160009055506001016144c2565b5090565b905600a165627a7a723058208d9e1138248e4426689ae1ba64ad6ae3869b01966029726ad8563d46fc0a00930029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000fb9b8fbce5cc4b6adb5861a7f5870356f0ce7027000000000000000000000000f8a3dc13b7a8da473f80660f513c4343e4edd7f70000000000000000000000000000000000000000000000000000000000093a80000000000000000000000000000000000000000000000000000000005cceb420000000000000000000000000000000000000000000000000000000005cceb420
-----Decoded View---------------
Arg [0] : _ticketToken (address): 0xfb9B8fBCe5Cc4b6adB5861a7f5870356f0CE7027
Arg [1] : _bonusToken (address): 0xF8A3Dc13B7A8DA473f80660f513C4343E4EDd7f7
Arg [2] : _interval (uint256): 604800
Arg [3] : _firstGameTime (uint256): 1557050400
Arg [4] : _seed (uint256): 1557050400
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000fb9b8fbce5cc4b6adb5861a7f5870356f0ce7027
Arg [1] : 000000000000000000000000f8a3dc13b7a8da473f80660f513c4343e4edd7f7
Arg [2] : 0000000000000000000000000000000000000000000000000000000000093a80
Arg [3] : 000000000000000000000000000000000000000000000000000000005cceb420
Arg [4] : 000000000000000000000000000000000000000000000000000000005cceb420
Swarm Source
bzzr://8d9e1138248e4426689ae1ba64ad6ae3869b01966029726ad8563d46fc0a0093
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,638.92 | 0.0124 | $44.95 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.