Overview
ETH Balance
0.001164601899019751 ETH
Eth Value
$3.96 (@ $3,404.10/ETH)More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,891 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Get Fund | 7302627 | 2126 days ago | IN | 0 ETH | 0.00015034 | ||||
__callback | 7254698 | 2136 days ago | IN | 0 ETH | 0.00053769 | ||||
Place Bet | 7254696 | 2136 days ago | IN | 0.1 ETH | 0.00027522 | ||||
__callback | 7249508 | 2137 days ago | IN | 0 ETH | 0.000516 | ||||
Get Fund | 7249215 | 2137 days ago | IN | 0 ETH | 0.00042095 | ||||
__callback | 7249186 | 2137 days ago | IN | 0 ETH | 0.00052963 | ||||
__callback | 7249186 | 2137 days ago | IN | 0 ETH | 0.00055982 | ||||
__callback | 7249137 | 2137 days ago | IN | 0 ETH | 0.00055883 | ||||
__callback | 7249132 | 2137 days ago | IN | 0 ETH | 0.00058216 | ||||
__callback | 7249124 | 2137 days ago | IN | 0 ETH | 0.00058089 | ||||
__callback | 7249101 | 2137 days ago | IN | 0 ETH | 0.00051534 | ||||
Place Bet | 7248853 | 2137 days ago | IN | 0.08 ETH | 0.0022018 | ||||
Place Bet | 7248797 | 2137 days ago | IN | 0.15 ETH | 0.00232527 | ||||
Place Bet | 7248760 | 2137 days ago | IN | 5 ETH | 0.00232527 | ||||
Place Bet | 7248480 | 2138 days ago | IN | 8.9 ETH | 0.00290659 | ||||
Place Bet | 7248391 | 2138 days ago | IN | 0.19 ETH | 0.0033027 | ||||
Get Fund | 7248362 | 2138 days ago | IN | 0 ETH | 0.00123016 | ||||
Place Bet | 7248305 | 2138 days ago | IN | 0.09 ETH | 0.00275225 | ||||
Place Bet | 7248039 | 2138 days ago | IN | 0.09 ETH | 0.00208128 | ||||
Refund | 7247101 | 2138 days ago | IN | 0 ETH | 0.00006805 | ||||
__callback | 7244058 | 2139 days ago | IN | 0 ETH | 0.00064529 | ||||
Place Bet | 7243976 | 2139 days ago | IN | 2.9 ETH | 0.00316726 | ||||
__callback | 7243967 | 2139 days ago | IN | 0 ETH | 0.00055755 | ||||
Refund | 7243929 | 2139 days ago | IN | 0 ETH | 0.00014413 | ||||
Place Bet | 7243875 | 2139 days ago | IN | 0.5 ETH | 0.00316726 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
7302627 | 2126 days ago | 0.0975 ETH | ||||
7254696 | 2136 days ago | 0.00287116 ETH | ||||
7249215 | 2137 days ago | 0.193 ETH | ||||
7249186 | 2137 days ago | 0.08 ETH | ||||
7249186 | 2137 days ago | 5.04948453 ETH | ||||
7249137 | 2137 days ago | 0.29 ETH | ||||
7249132 | 2137 days ago | 8.98969072 ETH | ||||
7249124 | 2137 days ago | 0.3684 ETH | ||||
7248853 | 2137 days ago | 0.00287116 ETH | ||||
7248797 | 2137 days ago | 0.00287116 ETH | ||||
7248760 | 2137 days ago | 0.00287116 ETH | ||||
7248480 | 2138 days ago | 0.00287116 ETH | ||||
7248391 | 2138 days ago | 0.00287116 ETH | ||||
7248362 | 2138 days ago | 9 ETH | ||||
7248305 | 2138 days ago | 0.00287116 ETH | ||||
7248039 | 2138 days ago | 0.00287116 ETH | ||||
7243976 | 2139 days ago | 0.00287116 ETH | ||||
7243967 | 2139 days ago | 2.92741451 ETH | ||||
7243875 | 2139 days ago | 0.00287116 ETH | ||||
7243658 | 2139 days ago | 0.00287116 ETH | ||||
7241765 | 2139 days ago | 14.5 ETH | ||||
7241672 | 2139 days ago | 0.00287116 ETH | ||||
7241667 | 2139 days ago | 13.00010284 ETH | ||||
7241663 | 2139 days ago | 0.00287116 ETH | ||||
7241658 | 2139 days ago | 12.89931091 ETH |
Loading...
Loading
Contract Name:
Game
Compiler Version
v0.4.24+commit.e67f0147
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2019-01-26 */ pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b); return c; } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 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, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a); uint256 c = a - b; return c; } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a); return c; } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0); return a % b; } } // <ORACLIZE_API> // Release targetted at solc 0.4.25 to silence compiler warning/error messages, compatible down to 0.4.22 /* 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. */ // This api is currently targeted at 0.4.22 to 0.4.25 (stable builds), please import oraclizeAPI_pre0.4.sol or oraclizeAPI_0.4 where necessary pragma solidity >= 0.4.22 < 0.5;// Incompatible compiler version... please select one stated within pragma solidity or use different oraclizeAPI version contract OraclizeI { address public cbAddress; function query(uint _timestamp, string _datasource, string _arg) external payable returns (bytes32 _id); function query_withGasLimit(uint _timestamp, string _datasource, string _arg, uint _gaslimit) external payable returns (bytes32 _id); function query2(uint _timestamp, string _datasource, string _arg1, string _arg2) public payable returns (bytes32 _id); function query2_withGasLimit(uint _timestamp, string _datasource, string _arg1, string _arg2, uint _gaslimit) external payable returns (bytes32 _id); function queryN(uint _timestamp, string _datasource, bytes _argN) public payable returns (bytes32 _id); function queryN_withGasLimit(uint _timestamp, string _datasource, bytes _argN, uint _gaslimit) external payable returns (bytes32 _id); function getPrice(string _datasource) public returns (uint _dsprice); function getPrice(string _datasource, uint gaslimit) public returns (uint _dsprice); function setProofType(byte _proofType) external; function setCustomGasPrice(uint _gasPrice) external; function randomDS_getSessionPubKeyHash() external constant returns(bytes32); } contract OraclizeAddrResolverI { function getAddress() public 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 pure { 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 pure { bytes memory oldbuf = buf.buf; init(buf, capacity); append(buf, oldbuf); } function max(uint a, uint b) private pure 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 pure 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 pure { 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 pure 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 encodeType(Buffer.buffer memory buf, uint8 major, uint value) private pure { if(value <= 23) { buf.append(uint8((major << 5) | value)); } else if(value <= 0xFF) { buf.append(uint8((major << 5) | 24)); buf.appendInt(value, 1); } else if(value <= 0xFFFF) { buf.append(uint8((major << 5) | 25)); buf.appendInt(value, 2); } else if(value <= 0xFFFFFFFF) { buf.append(uint8((major << 5) | 26)); buf.appendInt(value, 4); } else if(value <= 0xFFFFFFFFFFFFFFFF) { buf.append(uint8((major << 5) | 27)); buf.appendInt(value, 8); } } function encodeIndefiniteLengthType(Buffer.buffer memory buf, uint8 major) private pure { buf.append(uint8((major << 5) | 31)); } function encodeUInt(Buffer.buffer memory buf, uint value) internal pure { encodeType(buf, MAJOR_TYPE_INT, value); } function encodeInt(Buffer.buffer memory buf, int value) internal pure { 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 pure { encodeType(buf, MAJOR_TYPE_BYTES, value.length); buf.append(value); } function encodeString(Buffer.buffer memory buf, string value) internal pure { encodeType(buf, MAJOR_TYPE_STRING, bytes(value).length); buf.append(bytes(value)); } function startArray(Buffer.buffer memory buf) internal pure { encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY); } function startMap(Buffer.buffer memory buf) internal pure { encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP); } function endSequence(Buffer.buffer memory buf) internal pure { 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()); _; } function oraclize_setNetwork(uint8 networkID) internal returns(bool){ return oraclize_setNetwork(); networkID; // silence the warning and remain backwards compatible } function oraclize_setNetwork() 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) public { __callback(myid, result, new bytes(0)); } function __callback(bytes32 myid, string result, bytes proof) public { return; // Following should never be reached with a preceding return, however // this is just a placeholder function, ideally meant to be defined in // child contract when proofs are used myid; result; proof; // Silence compiler warnings oraclize = OraclizeI(0); // Additional compiler silence about making function pure/view. } 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_randomDS_getSessionPubKeyHash() oraclizeAPI internal returns (bytes32){ return oraclize.randomDS_getSessionPubKeyHash(); } function getCodeSize(address _addr) view internal returns(uint _size) { assembly { _size := extcodesize(_addr) } } function parseAddr(string _a) internal pure 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 pure 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 pure 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 pure 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 pure returns (string) { return strConcat(_a, _b, _c, _d, ""); } function strConcat(string _a, string _b, string _c) internal pure returns (string) { return strConcat(_a, _b, _c, "", ""); } function strConcat(string _a, string _b) internal pure returns (string) { return strConcat(_a, _b, "", "", ""); } // parseInt function parseInt(string _a) internal pure returns (uint) { return parseInt(_a, 0); } // parseInt(parseFloat*10^_b) function parseInt(string _a, uint _b) internal pure 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 pure 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 pure 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 pure 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 view returns (string) { return oraclize_network_name; } function oraclize_newRandomDSQuery(uint _delay, uint _nbytes, uint _customGasLimit) internal returns (bytes32){ require((_nbytes > 0) && (_nbytes <= 32)); // 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, keccak256(abi.encodePacked(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(keccak256(pubkey)) == signer) return true; else { (sigok, signer) = safer_ecrecover(tosignh, 28, sigr, sigs); return (address(keccak256(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] = byte(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) require((_proof[0] == "L") && (_proof[1] == "P") && (_proof[2] == 1)); bool proofVerified = oraclize_randomDS_proofVerify__main(_proof, _queryId, bytes(_result), oraclize_getNetworkName()); require(proofVerified); _; } 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 pure returns (bool){ bool match_ = true; require(prefix.length == n_random_bytes); 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 (!(keccak256(keyhash) == keccak256(abi.encodePacked(sha256(abi.encodePacked(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, keccak256(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] == keccak256(abi.encodePacked(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 pure returns (bytes) { uint minLength = length + toOffset; // Buffer too small require(to.length >= minLength); // 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 pure { assembly { let fmem := mload(0x40) codecopy(fmem, codesize, sub(msize, fmem)) } } } // </ORACLIZE_API> pragma solidity ^0.4.24; /** * @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 private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner()); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @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 { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } pragma solidity ^0.4.24; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } pragma solidity ^0.4.24; /** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string name, string symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns (string) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns (string) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { return _decimals; } } contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { return _balances[owner]; } /** * @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 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) { _transfer(msg.sender, 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) { require(spender != address(0)); _allowed[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @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) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); _transfer(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } /** * @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 * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].add(addedValue); emit 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 * Emits an Approval event. * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { require(spender != address(0)); _allowed[msg.sender][spender] = _allowed[msg.sender][spender].sub(subtractedValue); emit Approval(msg.sender, spender, _allowed[msg.sender][spender]); return true; } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { require(to != address(0)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } } contract BonusToken is ERC20, ERC20Detailed, Ownable { address public gameAddress; address public investTokenAddress; uint public maxLotteryParticipants; mapping (address => uint256) public ethLotteryBalances; address[] public ethLotteryParticipants; uint256 public ethLotteryBank; bool public isEthLottery; mapping (address => uint256) public tokensLotteryBalances; address[] public tokensLotteryParticipants; uint256 public tokensLotteryBank; bool public isTokensLottery; modifier onlyGame() { require(msg.sender == gameAddress); _; } modifier tokenIsAvailable { require(investTokenAddress != address(0)); _; } constructor (address startGameAddress) public ERC20Detailed("Bet Token", "BET", 18) { setGameAddress(startGameAddress); } function setGameAddress(address newGameAddress) public onlyOwner { require(newGameAddress != address(0)); gameAddress = newGameAddress; } function buyTokens(address buyer, uint256 tokensAmount) public onlyGame { _mint(buyer, tokensAmount * 10**18); } function startEthLottery() public onlyGame { isEthLottery = true; } function startTokensLottery() public onlyGame tokenIsAvailable { isTokensLottery = true; } function restartEthLottery() public onlyGame { for (uint i = 0; i < ethLotteryParticipants.length; i++) { ethLotteryBalances[ethLotteryParticipants[i]] = 0; } ethLotteryParticipants = new address[](0); ethLotteryBank = 0; isEthLottery = false; } function restartTokensLottery() public onlyGame tokenIsAvailable { for (uint i = 0; i < tokensLotteryParticipants.length; i++) { tokensLotteryBalances[tokensLotteryParticipants[i]] = 0; } tokensLotteryParticipants = new address[](0); tokensLotteryBank = 0; isTokensLottery = false; } function updateEthLotteryBank(uint256 value) public onlyGame { ethLotteryBank = ethLotteryBank.sub(value); } function updateTokensLotteryBank(uint256 value) public onlyGame { tokensLotteryBank = tokensLotteryBank.sub(value); } function swapTokens(address account, uint256 tokensToBurnAmount) public { require(msg.sender == investTokenAddress); _burn(account, tokensToBurnAmount); } function sendToEthLottery(uint256 value) public { require(!isEthLottery); require(ethLotteryParticipants.length < maxLotteryParticipants); address account = msg.sender; _burn(account, value); if (ethLotteryBalances[account] == 0) { ethLotteryParticipants.push(account); } ethLotteryBalances[account] = ethLotteryBalances[account].add(value); ethLotteryBank = ethLotteryBank.add(value); } function sendToTokensLottery(uint256 value) public tokenIsAvailable { require(!isTokensLottery); require(tokensLotteryParticipants.length < maxLotteryParticipants); address account = msg.sender; _burn(account, value); if (tokensLotteryBalances[account] == 0) { tokensLotteryParticipants.push(account); } tokensLotteryBalances[account] = tokensLotteryBalances[account].add(value); tokensLotteryBank = tokensLotteryBank.add(value); } function ethLotteryParticipants() public view returns(address[]) { return ethLotteryParticipants; } function tokensLotteryParticipants() public view returns(address[]) { return tokensLotteryParticipants; } function setInvestTokenAddress(address newInvestTokenAddress) external onlyOwner { require(newInvestTokenAddress != address(0)); investTokenAddress = newInvestTokenAddress; } function setMaxLotteryParticipants(uint256 participants) external onlyOwner { maxLotteryParticipants = participants; } } contract Game is usingOraclize, Ownable { using SafeMath for uint; uint public constant GAME_COIN_FlIP = 0; uint public constant GAME_DICE = 1; uint public constant GAME_TWO_DICE = 2; uint public constant GAME_ETHEROLL = 3; uint public constant LOTTERY_FEE = 0.002 ether; uint public constant BENEFICIAR_FEE_PERCENT = 2; uint public constant MIN_BET = 0.01 ether; struct Query { uint amount; address gamer; uint[] values; uint prize; uint range; uint game; uint time; bool ended; } mapping(bytes32 => Query) public queries; mapping(address => uint) public waitingPrizes; mapping(address => bool) public isBet; mapping(address => uint) public betsBalances; mapping(address => uint) public minRanges; mapping(address => uint) public maxRanges; address[] public tokensHolders; address[] public players; bytes32 public lotteryQueryId; uint public lotterySize; uint public lotteryStage; uint public lotteryRound; uint public lastLotteryTime; uint public lastSendBonusTokensTime; uint public callbackGas; // Gas for user __callback function by Oraclize uint public beneficiarFund; address public beneficiar; BonusToken public token; uint private playersIndex; event PlaceBet(address indexed gamer, bytes32 queryId); event Bet(address indexed gamer, uint indexed game, uint amount, uint result, uint[] winResult, uint prize, uint timestamp); event WinLottery(address indexed gamer, uint prize, uint ticketsAmount, uint indexed round); constructor(address startBeneficiar) public valideAddress(startBeneficiar) { oraclize_setProof(proofType_Ledger); oraclize_setCustomGasPrice(5000000000); // 5 gwei callbackGas = 300000; beneficiar = startBeneficiar; } modifier valideAddress(address addr) { require(addr != address(0)); _; } /* * @param game Game mode (0, 1, 2, 3), watch constants * @param values User selected numbers, length = 1 for coin flip game * @param referrer Referrer address (default is 0x0) * * NOTE: ALL USER NUMBERS START WITH 0 * NOTE: ALL USER NUMBERS MUST GO ASCENDING * * call this function for place bet to coin flip game with number 0 (eagle) * placeBet(0, [0]); * * call this function for place bet to dice game with numbers 1, 2, 3, 4 * placeBet(1, [0, 1, 2, 3]); * * call this function for place bet to two dice game with numbers 2, 3, 4, 7, 8, 11, 12 * placeBet(2, [0, 1, 2, 5, 6, 9, 10]); * * call this function for place bet to etheroll game with numbers 1-38 * placeBet(3, [37]); */ function placeBet(uint game, uint[] values) payable external { require(msg.value >= MIN_BET); require(game == GAME_COIN_FlIP || game == GAME_DICE || game == GAME_TWO_DICE || game == GAME_ETHEROLL); require(valideBet(game, values)); uint range; uint winChance; if (game == GAME_COIN_FlIP) { require(values.length == 1); range = 2; winChance = 5000; } else if (game == GAME_DICE) { require(values.length <= 5); range = 6; winChance = 1667; winChance = winChance.mul(values.length); } else if (game == GAME_TWO_DICE) { require(values.length <= 10); range = 11; for (uint i = 0; i < values.length; i++) { if (values[i] == 0 || values[i] == 10) winChance = winChance.add(278); else if (values[i] == 1 || values[i] == 9) winChance = winChance.add(556); else if (values[i] == 2 || values[i] == 8) winChance = winChance.add(833); else if (values[i] == 3 || values[i] == 7) winChance = winChance.add(1111); else if (values[i] == 4 || values[i] == 6) winChance = winChance.add(1389); else if (values[i] == 5) winChance = winChance.add(1667); } } else if (game == GAME_ETHEROLL) { require(values.length == 1); range = 100; winChance = uint(100).mul(values[0] + 1); } address sender = msg.sender; uint weiAmount = msg.value; if (!isBet[sender]) { players.push(sender); isBet[sender] = true; } bytes32 queryId = random(); weiAmount = fee(weiAmount); betsBalances[sender] = betsBalances[sender].add(weiAmount); uint prize = weiAmount.mul(10000).div(winChance); newQuery(queryId, msg.value, sender, values, prize, range); queries[queryId].game = game; emit PlaceBet(sender, queryId); } function lottery() external onlyOwner valideAddress(address(token)) { require(now - lastLotteryTime >= 24 hours); require(token.ethLotteryBank() > 0); require(lotterySize > 0); if (!token.isEthLottery()) { address[] memory lotteryParticipants = token.ethLotteryParticipants(); for (uint i = 0; i < lotteryParticipants.length; i++) { address participant = lotteryParticipants[i]; uint participantBalance = token.ethLotteryBalances(participant); if (participantBalance > 0) { tokensHolders.push(participant); } } updateLotteryRanges(); lotteryRound++; } token.startEthLottery(); lotteryQueryId = random(); } function sendBonusTokens(uint playersIterations) external onlyOwner { require(now - lastSendBonusTokensTime >= 24 hours); uint playersIterationsNumber; if (players.length.sub(playersIndex) < playersIterations) { playersIterationsNumber = players.length.sub(playersIndex); } else { playersIterationsNumber = playersIterations; } for (uint i; i < playersIterationsNumber; i++) { address player = players[playersIndex]; uint tokensAmount; uint betBalance = betsBalances[player]; while (betBalance >= 1 ether) { tokensAmount = tokensAmount.add(100); betBalance = betBalance.sub(1 ether); } if (tokensAmount > 0) { token.buyTokens(player, tokensAmount); } playersIndex++; } if (playersIndex == players.length) { playersIndex = 0; lastSendBonusTokensTime = now; } } function refund() external { require(waitingPrizes[msg.sender] > 0, '0'); require(address(this).balance >= waitingPrizes[msg.sender]); waitingPrizes[msg.sender] = 0; msg.sender.transfer(waitingPrizes[msg.sender]); } function refundBet(bytes32 queryId) external { require(!queries[queryId].ended); require(now - queries[queryId].time > 24 hours); queries[queryId].ended = true; msg.sender.transfer(queries[queryId].amount); } function getPlayers() external view returns(address[]) { return players; } function setOraclizeGasPrice(uint gasPrice) external onlyOwner { oraclize_setCustomGasPrice(gasPrice); } function setOraclizeGasLimit(uint gasLimit) external onlyOwner { callbackGas = gasLimit; } function setBeneficiarAddress(address newBeneficiar) external onlyOwner valideAddress(newBeneficiar) { beneficiar = newBeneficiar; } function setTokenAddress(address tokenAddress) external onlyOwner valideAddress(tokenAddress) { token = BonusToken(tokenAddress); } function getFund(uint weiAmount) external onlyOwner { msg.sender.transfer(weiAmount); } function getBeneficiarFund() external { require(msg.sender == beneficiar); uint256 fund = beneficiarFund; beneficiarFund = 0; beneficiar.transfer(fund); } function __callback(bytes32 myId, string result, bytes proof) public { require((msg.sender == oraclize_cbAddress()), 'Sender must be Oraclize'); Query storage query = queries[myId]; require(!query.ended); uint randomNumber; uint i; if (query.gamer != address(0)) { if (oraclize_randomDS_proofVerify__returnCode(myId, result, proof) != 0) { sendWin(query.gamer, query.amount); } else { randomNumber = uint(keccak256(result)) % query.range; bool isWin; for (i = 0; i < query.values.length; i++) { if (query.game == GAME_ETHEROLL) { if (randomNumber <= query.values[i]) { sendWin(query.gamer, query.prize); isWin = true; } } else { if (randomNumber == query.values[i]) { sendWin(query.gamer, query.prize); isWin = true; break; } } } if (isWin) { emit Bet(query.gamer, query.game, query.amount, randomNumber, query.values, query.prize, now); } else { emit Bet(query.gamer, query.game, query.amount, randomNumber, query.values, 0, now); } } query.ended = true; } else if (myId == lotteryQueryId) { require(oraclize_randomDS_proofVerify__returnCode(myId, result, proof) == 0); randomNumber = uint(keccak256(result)) % token.ethLotteryBank(); uint prize = 0; if (lotteryStage == 0) { prize = lotterySize.div(2); } else if (lotteryStage == 1) { prize = lotterySize.div(4); } else if (lotteryStage == 2) { prize = lotterySize.mul(12).div(100); } else if (lotteryStage == 3) { prize = lotterySize.mul(8).div(100); } else { prize = lotterySize.div(20); } for (i = 0; i < tokensHolders.length; i++) { address tokensHolder = tokensHolders[i]; if (randomNumber >= minRanges[tokensHolder] && randomNumber < maxRanges[tokensHolder]) { deleteTokensHolder(i); sendWin(tokensHolder, prize); emit WinLottery(tokensHolder, prize, token.ethLotteryBalances(tokensHolder), lotteryRound); lotteryStage++; updateLotteryRanges(); token.updateEthLotteryBank(token.ethLotteryBalances(tokensHolder)); break; } } if (lotteryStage == 5 || tokensHolders.length == 0) { tokensHolders = new address[](0); lotterySize = 0; lotteryStage = 0; lastLotteryTime = now; token.restartEthLottery(); } else { lotteryQueryId = random(); } } } function updateLotteryRanges() private { uint range = 0; for (uint i = 0; i < tokensHolders.length; i++) { address participant = tokensHolders[i]; uint participantBalance = token.ethLotteryBalances(participant); minRanges[participant] = range; range = range.add(participantBalance); maxRanges[participant] = range; } } function valideBet(uint game, uint[] values) private pure returns(bool) { require(values.length > 0); for (uint i = 0; i < values.length; i++) { if (i == 0) { if (game == GAME_ETHEROLL && values[i] > 96) { return false; } } if (i != values.length - 1) { if (values[i + 1] <= values[i]) { return false; } } } return true; } function fee(uint weiAmount) private returns(uint) { uint beneficiarFee = weiAmount.mul(BENEFICIAR_FEE_PERCENT).div(100); beneficiarFund = beneficiarFund.add(beneficiarFee); lotterySize = lotterySize.add(LOTTERY_FEE); weiAmount = weiAmount.sub(beneficiarFee).sub(LOTTERY_FEE); return weiAmount; } function newQuery(bytes32 queryId, uint amount, address gamer, uint[] values, uint prize, uint range) private { queries[queryId].gamer = gamer; queries[queryId].amount = amount; queries[queryId].values = values; queries[queryId].prize = prize; queries[queryId].range = range; queries[queryId].time = now; } function random() private returns(bytes32 queryId) { require(address(this).balance >= oraclize_getPrice('random', callbackGas)); queryId = oraclize_newRandomDSQuery(0, 4, callbackGas); require(queryId != 0, 'Oraclize error'); } function sendWin(address winner, uint weiAmount) private { if (address(this).balance >= weiAmount) { winner.transfer(weiAmount); } else { waitingPrizes[winner] = waitingPrizes[winner].add(weiAmount); } } function deleteTokensHolder(uint index) private { tokensHolders[index] = tokensHolders[tokensHolders.length - 1]; delete tokensHolders[tokensHolders.length - 1]; tokensHolders.length--; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"constant":true,"inputs":[],"name":"GAME_TWO_DICE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"waitingPrizes","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"queries","outputs":[{"name":"amount","type":"uint256"},{"name":"gamer","type":"address"},{"name":"prize","type":"uint256"},{"name":"range","type":"uint256"},{"name":"game","type":"uint256"},{"name":"time","type":"uint256"},{"name":"ended","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"tokenAddress","type":"address"}],"name":"setTokenAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","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":"game","type":"uint256"},{"name":"values","type":"uint256[]"}],"name":"placeBet","outputs":[],"payable":true,"stateMutability":"payable","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":"lastLotteryTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"GAME_COIN_FlIP","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"weiAmount","type":"uint256"}],"name":"getFund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lastSendBonusTokensTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"MIN_BET","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"gasPrice","type":"uint256"}],"name":"setOraclizeGasPrice","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"beneficiarFund","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lotterySize","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"maxRanges","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getPlayers","outputs":[{"name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"gasLimit","type":"uint256"}],"name":"setOraclizeGasLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"betsBalances","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"callbackGas","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"tokensHolders","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"LOTTERY_FEE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lotteryStage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"lottery","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"GAME_ETHEROLL","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lotteryRound","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"getBeneficiarFund","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"lotteryQueryId","outputs":[{"name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"BENEFICIAR_FEE_PERCENT","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"queryId","type":"bytes32"}],"name":"refundBet","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"playersIterations","type":"uint256"}],"name":"sendBonusTokens","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"GAME_DICE","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"minRanges","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newBeneficiar","type":"address"}],"name":"setBeneficiarAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"isBet","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"uint256"}],"name":"players","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"token","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"beneficiar","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"startBeneficiar","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gamer","type":"address"},{"indexed":false,"name":"queryId","type":"bytes32"}],"name":"PlaceBet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gamer","type":"address"},{"indexed":true,"name":"game","type":"uint256"},{"indexed":false,"name":"amount","type":"uint256"},{"indexed":false,"name":"result","type":"uint256"},{"indexed":false,"name":"winResult","type":"uint256[]"},{"indexed":false,"name":"prize","type":"uint256"},{"indexed":false,"name":"timestamp","type":"uint256"}],"name":"Bet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"gamer","type":"address"},{"indexed":false,"name":"prize","type":"uint256"},{"indexed":false,"name":"ticketsAmount","type":"uint256"},{"indexed":true,"name":"round","type":"uint256"}],"name":"WinLottery","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405160208062005ae6833981016040819052905160058054600160a060020a0319163317908190559091600160a060020a0391909116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a380600160a060020a03811615156200008957600080fd5b620000bd7f300000000000000000000000000000000000000000000000000000000000000064010000000062000104810204565b620000d664012a05f20064010000000062000365810204565b50620493e060145560168054600160a060020a031916600160a060020a039290921691909117905562000a10565b600054600160a060020a031615806200013a57506000546200013890600160a060020a031664010000000062000589810204565b155b1562000157576200015560006401000000006200058d810204565b505b6000809054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620001c357600080fd5b505af1158015620001d8573d6000803e3d6000fd5b505050506040513d6020811015620001ef57600080fd5b5051600154600160a060020a03908116911614620002c1576000809054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200027357600080fd5b505af115801562000288573d6000803e3d6000fd5b505050506040513d60208110156200029f57600080fd5b505160018054600160a060020a031916600160a060020a039092169190911790555b600154604080517f688dcfd70000000000000000000000000000000000000000000000000000000081527fff00000000000000000000000000000000000000000000000000000000000000841660048201529051600160a060020a039092169163688dcfd79160248082019260009290919082900301818387803b1580156200034957600080fd5b505af11580156200035e573d6000803e3d6000fd5b5050505050565b600054600160a060020a031615806200039b57506000546200039990600160a060020a031664010000000062000589810204565b155b15620003b857620003b660006401000000006200058d810204565b505b6000809054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1580156200042457600080fd5b505af115801562000439573d6000803e3d6000fd5b505050506040513d60208110156200045057600080fd5b5051600154600160a060020a0390811691161462000522576000809054906101000a9004600160a060020a0316600160a060020a03166338cc48316040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015620004d457600080fd5b505af1158015620004e9573d6000803e3d6000fd5b505050506040513d60208110156200050057600080fd5b505160018054600160a060020a031916600160a060020a039092169190911790555b600154604080517fca6ad1e4000000000000000000000000000000000000000000000000000000008152600481018490529051600160a060020a039092169163ca6ad1e49160248082019260009290919082900301818387803b1580156200034957600080fd5b3b90565b6000620005a2640100000000620005a8810204565b92915050565b600080620005d3731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed64010000000062000589810204565b1115620006515760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed17905560408051808201909152600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152620006489064010000000062000955810204565b50600162000952565b60006200067b73c03a2615d5efaf5f49f60b7bb6583eaec212fdf164010000000062000589810204565b1115620006f05760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf117905560408051808201909152600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152620006489064010000000062000955810204565b60006200071a73b7a07bcf2ba2f2703b24c0691b5278999c59ac7e64010000000062000589810204565b11156200078f5760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e17905560408051808201909152600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152620006489064010000000062000955810204565b6000620007b973146500cfd35b22e4a392fe0adc06de1a1368ed4864010000000062000589810204565b11156200082e5760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed4817905560408051808201909152600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152620006489064010000000062000955810204565b600062000858736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47564010000000062000589810204565b11156200088e575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475179055600162000952565b6000620008b87320e12a1f859b3feae5fb2a0a32c18f5a65555bbf64010000000062000589810204565b1115620008ee575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf179055600162000952565b6000620009187351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa64010000000062000589810204565b11156200094e575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa179055600162000952565b5060005b90565b80516200096a9060029060208401906200096e565b5050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620009b157805160ff1916838001178555620009e1565b82800160010185558215620009e1579182015b82811115620009e1578251825591602001919060010190620009c4565b50620009ef929150620009f3565b5090565b6200095291905b80821115620009ef5760008155600101620009fa565b6150c68062000a206000396000f3006080604052600436106101f55763ffffffff60e060020a6000350416630ee4aa4b81146101fa57806314fe75fa1461022157806321dfb6001461024257806326a4e8d2146102a057806327dc297e146102c357806330d146551461031e57806338bbfa5014610335578063442208b2146103d05780634968d33d146103e557806352c8df64146103fa5780635529519014610412578063590e1ae3146104275780636540742f1461043c578063715018a61461045157806371c82c1414610466578063792b95a21461047e57806383c49d36146104935780638a03bd38146104a85780638b5b9ccc146104c95780638da5cb5b146105315780638ddf792b146105625780638f32d59b1461057a57806392376edc146105a3578063a10132ad146105c4578063a1a4a27b146105d9578063aab306f7146105f1578063b464e7ec14610606578063ba13a5721461061b578063bf14782914610630578063c519642614610645578063c63d93591461065a578063ca9db4b51461066f578063d93a8ece146101fa578063df320b2914610684578063e978e8ff1461069c578063f027af76146106b4578063f06dedaf146106c9578063f0963099146106ea578063f2fde38b1461070b578063f4786c121461072c578063f71d96cb1461074d578063fc0c546a14610765578063fedf70e31461077a575b600080fd5b34801561020657600080fd5b5061020f61078f565b60405190815260200160405180910390f35b34801561022d57600080fd5b5061020f600160a060020a0360043516610794565b34801561024e57600080fd5b5061025a6004356107a8565b604051968752600160a060020a0390951660208701526040808701949094526060860192909252608085015260a084015290151560c083015260e0909101905180910390f35b3480156102ac57600080fd5b506102c1600160a060020a03600435166107f2565b005b3480156102cf57600080fd5b506102c16004803590369060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094975061083e9650505050505050565b6102c160048035906024803590810191013561087c565b34801561034157600080fd5b506102c16004803590369060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509497969560208082019650903587018082019550359350839250601f830181900481020190506040519081016040528181529291906020840183838082843750949750610d189650505050505050565b3480156103dc57600080fd5b5061020f61157d565b3480156103f157600080fd5b5061020f611583565b34801561040657600080fd5b506102c1600435611588565b34801561041e57600080fd5b5061020f6115c9565b34801561043357600080fd5b506102c16115cf565b34801561044857600080fd5b5061020f6116b9565b34801561045d57600080fd5b506102c16116c4565b34801561047257600080fd5b506102c1600435611724565b34801561048a57600080fd5b5061020f611740565b34801561049f57600080fd5b5061020f611746565b3480156104b457600080fd5b5061020f600160a060020a036004351661174c565b3480156104d557600080fd5b506104de611760565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561051d578082015183820152602001610505565b505050509050019250505060405180910390f35b34801561053d57600080fd5b506105466117c3565b604051600160a060020a03909116815260200160405180910390f35b34801561056e57600080fd5b506102c16004356117d2565b34801561058657600080fd5b5061058f6117ea565b604051901515815260200160405180910390f35b3480156105af57600080fd5b5061020f600160a060020a03600435166117fb565b3480156105d057600080fd5b5061020f61180f565b3480156105e557600080fd5b50610546600435611815565b3480156105fd57600080fd5b5061020f61183c565b34801561061257600080fd5b5061020f611847565b34801561062757600080fd5b506102c161184d565b34801561063c57600080fd5b5061020f611bea565b34801561065157600080fd5b5061020f611bef565b34801561066657600080fd5b506102c1611bf5565b34801561067b57600080fd5b5061020f611c52565b34801561069057600080fd5b506102c1600435611c58565b3480156106a857600080fd5b506102c1600435611cfe565b3480156106c057600080fd5b5061020f611e9d565b3480156106d557600080fd5b5061020f600160a060020a0360043516611ea2565b3480156106f657600080fd5b506102c1600160a060020a0360043516611eb6565b34801561071757600080fd5b506102c1600160a060020a0360043516611f02565b34801561073857600080fd5b5061058f600160a060020a0360043516611f1e565b34801561075957600080fd5b50610546600435611f35565b34801561077157600080fd5b50610546611f43565b34801561078657600080fd5b50610546611f52565b600281565b600760205280600052604060002054905081565b6006602052806000526040600020805460018201546003830154600484015460058501546006860154600790960154949650600160a060020a039093169491939092919060ff1687565b6107fa6117ea565b151561080557600080fd5b80600160a060020a038116151561081b57600080fd5b5060178054600160a060020a031916600160a060020a0392909216919091179055565b61087882826000604051818152601f19601f8301168101602001604052908015610872578160200160208202803883390190505b50610d18565b5050565b6000808080808080662386f26fc1000034101561089857600080fd5b8915806108a5575060018a145b806108b0575060028a145b806108bb575060038a145b15156108c657600080fd5b6108fd8a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843750611f61945050505050565b151561090857600080fd5b89151561092a576001881461091c57600080fd5b600296506113889550610b89565b60018a141561096157600588111561094157600080fd5b60069650610683955061095a868963ffffffff61201516565b9550610b89565b60028a1415610b4257600a88111561097857600080fd5b600b9650600094505b87851015610b3d5788888681811061099557fe5b90506020020135600014806109bc57508888868181106109b157fe5b90506020020135600a145b156109da576109d38661011663ffffffff61204a16565b9550610b32565b8888868181106109e657fe5b9050602002013560011480610a0d5750888886818110610a0257fe5b905060200201356009145b15610a24576109d38661022c63ffffffff61204a16565b888886818110610a3057fe5b9050602002013560021480610a575750888886818110610a4c57fe5b905060200201356008145b15610a6e576109d38661034163ffffffff61204a16565b888886818110610a7a57fe5b9050602002013560031480610aa15750888886818110610a9657fe5b905060200201356007145b15610ab8576109d38661045763ffffffff61204a16565b888886818110610ac457fe5b9050602002013560041480610aeb5750888886818110610ae057fe5b905060200201356006145b15610b02576109d38661056d63ffffffff61204a16565b888886818110610b0e57fe5b9050602002013560051415610b3257610b2f8661068363ffffffff61204a16565b95505b600190940193610981565b610b89565b60038a1415610b895760018814610b5857600080fd5b60649650610b8689896000818110610b6c57fe5b90506020020135600101606461201590919063ffffffff16565b95505b3360008181526008602052909450349350604090205460ff161515610c0057600d8054600181018083556000928352869290919060209020018054600160a060020a031916600160a060020a039384161790555084166000908152600860205260019060409020805460ff19169115159190911790555b610c0861205c565b9150610c1383612128565b600160a060020a03851660009081526009602052909350610c4190849060409020549063ffffffff61204a16565b600160a060020a038516600090815260096020526040902055610c7c86610c708561271063ffffffff61201516565b9063ffffffff61219e16565b9050610cbb8234868c8c80806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050858c6121c1565b600082815260066020528a906040902060050155600160a060020a0384167f6a3e1ac12e8d08f67ee82a5221dfbce3935bb6bfede3c1cd1f788c8c23958b2a8360405190815260200160405180910390a250505050505050505050565b600080600080600080610d2961226c565b600160a060020a03163314610d9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f53656e646572206d757374206265204f7261636c697a65000000000000000000604482015260640160405180910390fd5b6000898152600660205260409020600781015490965060ff1615610dc157600080fd5b6001860154600160a060020a0316156110b457610ddf89898961243e565b60ff1615610e065760018601548654610e0191600160a060020a031690612568565b6110a0565b8560040154886040518082805190602001908083835b60208310610e3b5780518252601f199092019160209182019101610e1c565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020811515610e7057fe5b069450600093505b6002860154841015610f2c57600386600501541415610ed95760028601805485908110610ea157fe5b90600052602060002001548511610ed45760018601546003870154610ecf91600160a060020a031690612568565b600192505b610f21565b60028601805485908110610ee957fe5b9060005260206000200154851415610f215760018601546003870154610f1891600160a060020a031690612568565b60019250610f2c565b600190930192610e78565b8215610fee576005860154600187015487546003890154600160a060020a03909216917f85b65c042eafbc764a36000b8d433effc34c374aa7f899d06d2c02b57df768949190899060028c01904260405180868152602001858152602001806020018481526020018381526020018281038252858181548152602001915080548015610fd757602002820191906000526020600020905b815481526020019060010190808311610fc3575b5050965050505050505060405180910390a36110a0565b600586015460018701548754600160a060020a03909116907f85b65c042eafbc764a36000b8d433effc34c374aa7f899d06d2c02b57df76894908860028b016000426040518086815260200185815260200180602001848152602001838152602001828103825285818154815260200191508054801561108d57602002820191906000526020600020905b815481526020019060010190808311611079575b5050965050505050505060405180910390a35b60078601805460ff19166001179055611572565b600e54891415611572576110c989898961243e565b60ff16156110d657600080fd5b601754600160a060020a031663a31c76d26040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561111657600080fd5b505af115801561112a573d6000803e3d6000fd5b505050506040513d602081101561114057600080fd5b81019080805192508a915060409050518082805190602001908083835b6020831061117c5780518252601f19909201916020918201910161115d565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390208115156111b157fe5b06945060009150601054600014156111de57600f546111d790600263ffffffff61219e16565b9150611260565b601054600114156111fd57600f546111d790600463ffffffff61219e16565b60105460021415611223576111d76064610c70600c600f5461201590919063ffffffff16565b60105460031415611249576111d76064610c706008600f5461201590919063ffffffff16565b600f5461125d90601463ffffffff61219e16565b91505b600093505b600c548410156114a557600c80548590811061127d57fe5b9060005260206000200154600160a060020a03166000818152600a602052909150604090205485101580156112c95750600160a060020a0381166000908152600b602052604090205485105b1561149a576112d7846125f5565b6112e18183612568565b601154601754600160a060020a03808416917f8383d9a295d83dac204e1f527f5e3920c91b66cd0bfb9cbed63c56e639683a38918691166343b3f2bf8660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15801561135d57600080fd5b505af1158015611371573d6000803e3d6000fd5b505050506040513d602081101561138757600080fd5b810190808051925060409150505191825260208201526040908101905180910390a36010805460010190556113ba612691565b601754600160a060020a0316630a0f6d44816343b3f2bf8460405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15801561141157600080fd5b505af1158015611425573d6000803e3d6000fd5b505050506040513d602081101561143b57600080fd5b810190808051925060409150505160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15801561147d57600080fd5b505af1158015611491573d6000803e3d6000fd5b505050506114a5565b600190930192611265565b601054600514806114b65750600c54155b156115665760006040519080825280602002602001820160405280156114e6578160200160208202803883390190505b50600c9080516114fa929160200190614ede565b506000600f81905560105542601255601754600160a060020a03166346c363606040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561154957600080fd5b505af115801561155d573d6000803e3d6000fd5b50505050611572565b61156e61205c565b600e555b505050505050505050565b60125481565b600081565b6115906117ea565b151561159b57600080fd5b3381156108fc0282604051600060405180830381858888f19350505050158015610878573d6000803e3d6000fd5b60135481565b336000908152600760205260408120541161164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f3000000000000000000000000000000000000000000000000000000000000000604482015260640160405180910390fd5b336000908152600760205260409020543031101561166757600080fd5b3360009081526007602052604081205533600081815260076020526108fc9060409020549081150290604051600060405180830381858888f193505050501580156116b6573d6000803e3d6000fd5b50565b662386f26fc1000081565b6116cc6117ea565b15156116d757600080fd5b600554600090600160a060020a03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360058054600160a060020a0319169055565b61172c6117ea565b151561173757600080fd5b6116b6816127a1565b60155481565b600f5481565b600b60205280600052604060002054905081565b6060600d8054806020026020016040519081016040528092919081815260200182805480156117b857602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161179a575b505050505090505b90565b600554600160a060020a031690565b6117da6117ea565b15156117e557600080fd5b601455565b600554600160a060020a0316331490565b600960205280600052604060002054905081565b60145481565b600c80548290811061182357fe5b9060005260206000200154600160a060020a0316905081565b66071afd498d000081565b60105481565b6060600080600061185c6117ea565b151561186757600080fd5b601754600160a060020a031680151561187f57600080fd5b6201518060125442031015151561189557600080fd5b601754600090600160a060020a031663a31c76d26040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156118d857600080fd5b505af11580156118ec573d6000803e3d6000fd5b505050506040513d602081101561190257600080fd5b81019080805193909311925061191a91505057600080fd5b600f5460001061192957600080fd5b601754600160a060020a031663d8701ecc6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561196957600080fd5b505af115801561197d573d6000803e3d6000fd5b505050506040513d602081101561199357600080fd5b81019080805115159250611b8091505057601754600160a060020a0316638526edbe6040518163ffffffff1660e060020a028152600401600060405180830381600087803b1580156119e457600080fd5b505af11580156119f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611a2157600080fd5b810190808051640100000000811115611a3957600080fd5b82016020810184811115611a4c57600080fd5b8151856020820283011164010000000082111715611a6957600080fd5b5090985060009750505050505b8451841015611b6e57848481518110611a8b57fe5b90602001906020020151601754909350600160a060020a03166343b3f2bf8460405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b158015611ae957600080fd5b505af1158015611afd573d6000803e3d6000fd5b505050506040513d6020811015611b1357600080fd5b8101908080519450505060008311159050611b6357600c8054600181018083556000928352859290919060209020018054600160a060020a031916600160a060020a039390931692909217909155505b600190930192611a76565b611b76612691565b6011805460010190555b601754600160a060020a0316634b98089c6040518163ffffffff1660e060020a028152600401600060405180830381600087803b158015611bc057600080fd5b505af1158015611bd4573d6000803e3d6000fd5b50505050611be061205c565b600e555050505050565b600381565b60115481565b601654600090600160a060020a03163314611c0f57600080fd5b50601580546000909155601654600160a060020a031681156108fc0282604051600060405180830381858888f19350505050158015610878573d6000803e3d6000fd5b600e5481565b60008181526006602052604090206007015460ff1615611c7757600080fd5b6000818152600660205262015180906040902060060154420311611c9a57600080fd5b6000818152600660205260019060409020600701805460ff19169115159190911790556000818152600660205233906108fc906040902054801590910290604051600060405180830381858888f19350505050158015610878573d6000803e3d6000fd5b6000806000806000611d0e6117ea565b1515611d1957600080fd5b62015180601354420310151515611d2f57600080fd5b601854600d548791611d47919063ffffffff61295e16565b1015611d6957601854600d54611d629163ffffffff61295e16565b9450611d6d565b8594505b84841015611e7f57600d601854815481101515611d8657fe5b9060005260206000200154600160a060020a031660008181526009602052909350604090205490505b670de0b6b3a76400008110611df057611dcf82606463ffffffff61204a16565b9150611de981670de0b6b3a764000063ffffffff61295e16565b9050611daf565b6000821115611e6957601754600160a060020a0316630752881a848460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b158015611e5057600080fd5b505af1158015611e64573d6000803e3d6000fd5b505050505b6018805460019081019091559390930192611d6d565b600d546018541415611e95576000601855426013555b505050505050565b600181565b600a60205280600052604060002054905081565b611ebe6117ea565b1515611ec957600080fd5b80600160a060020a0381161515611edf57600080fd5b5060168054600160a060020a031916600160a060020a0392909216919091179055565b611f0a6117ea565b1515611f1557600080fd5b6116b681612975565b60086020528060005260406000205460ff16905081565b600d80548290811061182357fe5b601754600160a060020a031681565b601654600160a060020a031681565b6000806000835111611f7257600080fd5b5060005b825181101561200957801515611fb957600384148015611fab57506060838281518110611f9f57fe5b90602001906020020151115b15611fb9576000915061200e565b6001835103811461200157828181518110611fd057fe5b90602001906020020151838260010181518110611fe957fe5b9060200190602002015111612001576000915061200e565b600101611f76565b600191505b5092915050565b600080831515612028576000915061200e565b5082820282848281151561203857fe5b041461204357600080fd5b9392505050565b60008282018381101561204357600080fd5b600061209d60408051908101604052600681527f72616e646f6d000000000000000000000000000000000000000000000000000060208201526014546129e8565b303110156120aa57600080fd5b6120b960006004601454612c33565b90508015156117c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4f7261636c697a65206572726f72000000000000000000000000000000000000604482015260640160405180910390fd5b6000806121416064610c7085600263ffffffff61201516565b601554909150612157908263ffffffff61204a16565b601555600f546121749066071afd498d000063ffffffff61204a16565b600f5561204366071afd498d0000612192858463ffffffff61295e16565b9063ffffffff61295e16565b6000808083116121ad57600080fd5b82848115156121b857fe5b04949350505050565b600086815260066020528490604090206001018054600160a060020a031916600160a060020a0392909216919091179055600086815260066020528590604090205560008681526006602052839060409020600201908051612227929160200190614f45565b50600086815260066020528290604090206003015560008681526006602052819060409020600401556000868152600660205242906040902060060155505050505050565b60008054600160a060020a03161580612297575060005461229590600160a060020a0316613176565b155b156122a8576122a6600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156122e857600080fd5b505af11580156122fc573d6000803e3d6000fd5b505050506040513d602081101561231257600080fd5b810190808051600154600160a060020a0390811691161492506123c691505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561237257600080fd5b505af1158015612386573d6000803e3d6000fd5b505050506040513d602081101561239c57600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a031663c281d19e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561240657600080fd5b505af115801561241a573d6000803e3d6000fd5b505050506040513d602081101561243057600080fd5b810190808051935050505090565b6000808260008151811061244e57fe5b016020015160f860020a900460f860020a02600160f860020a0319167f4c000000000000000000000000000000000000000000000000000000000000001415806124e05750826001815181106124a057fe5b016020015160f860020a900460f860020a02600160f860020a0319167f500000000000000000000000000000000000000000000000000000000000000014155b806125285750826002815181106124f357fe5b01602001517fff0000000000000000000000000000000000000000000000000000000000000060f860020a9182900482021614155b156125365760019150612560565b612549838686612544613184565b61321d565b905080151561255b5760029150612560565b600091505b509392505050565b303181116125ad57600160a060020a03821681156108fc0282604051600060405180830381858888f193505050501580156125a7573d6000803e3d6000fd5b50610878565b600160a060020a038216600090815260076020526125d890829060409020549063ffffffff61204a16565b600160a060020a0383166000908152600760205260409020555050565b600c8054600019810190811061260757fe5b9060005260206000200154600c8054600160a060020a03909216918390811061262c57fe5b906000526020600020018054600160a060020a031916600160a060020a0392909216919091179055600c8054600019810190811061266657fe5b906000526020600020018054600160a060020a0319169055600c805490610878906000198301614f8c565b60008080805b600c5483101561279b57600c8054849081106126af57fe5b9060005260206000200154601754600160a060020a039182169350166343b3f2bf8360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15801561271057600080fd5b505af1158015612724573d6000803e3d6000fd5b505050506040513d602081101561273a57600080fd5b810190808051600160a060020a0386166000908152600a6020529094508793506040925090502055612772848263ffffffff61204a16565b600160a060020a0383166000908152600b60205290945084906040902055600190920191612697565b50505050565b600054600160a060020a031615806127cb57506000546127c990600160a060020a0316613176565b155b156127dc576127da600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561281c57600080fd5b505af1158015612830573d6000803e3d6000fd5b505050506040513d602081101561284657600080fd5b810190808051600154600160a060020a0390811691161492506128fa91505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156128a657600080fd5b505af11580156128ba573d6000803e3d6000fd5b505050506040513d60208110156128d057600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a031663ca6ad1e48260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15801561294357600080fd5b505af1158015612957573d6000803e3d6000fd5b5050505050565b6000808383111561296e57600080fd5b5050900390565b600160a060020a038116151561298a57600080fd5b600554600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360058054600160a060020a031916600160a060020a0392909216919091179055565b60008054600160a060020a03161580612a135750600054612a1190600160a060020a0316613176565b155b15612a2457612a22600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015612a6457600080fd5b505af1158015612a78573d6000803e3d6000fd5b505050506040513d6020811015612a8e57600080fd5b810190808051600154600160a060020a039081169116149250612b4291505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015612aee57600080fd5b505af1158015612b02573d6000803e3d6000fd5b505050506040513d6020811015612b1857600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a0316632ef3accc84846040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612baa578082015183820152602001612b92565b50505050905090810190601f168015612bd75780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015612bf757600080fd5b505af1158015612c0b573d6000803e3d6000fd5b505050506040513d6020811015612c2157600080fd5b81019080805193505050505b92915050565b600060608060606000606080612c47614fb0565b6000606060008c118015612c5c575060208c11155b1515612c6757600080fd5b600a8d029c506001604051818152601f19601f8301168101602001604052908015612c9c578160200160208202803883390190505b5098508b60f860020a0289600081518110612cb357fe5b906020010190600160f860020a031916908160001a9053506020604051818152601f19601f8301168101602001604052908015612cfa578160200160208202803883390190505b5097506020604051818152601f19601f8301168101602001604052908015612d2c578160200160208202803883390190505b509650612d37613945565b9550602088524241186001430340186020890152602087528560208801526020604051818152601f19601f8301168101602001604052908015612d84578160200160208202803883390190505b5094508c60208601526008604051818152601f19601f8301168101602001604052908015612dbc578160200160208202803883390190505b509350612dcf8560186008876000613adf565b506080604051908101604052808981526020018a8152602001888152602001868152509250612e3260408051908101604052600681527f72616e646f6d00000000000000000000000000000000000000000000000000006020820152848d613b2e565b91506008604051818152601f19601f8301168101602001604052908015612e63578160200160208202803883390190505b509050602084015160f860020a810460278301537e01000000000000000000000000000000000000000000000000000000000000810460268301537d0100000000000000000000000000000000000000000000000000000000008104602583015360e060020a810460248301537b01000000000000000000000000000000000000000000000000000000810460238301537a01000000000000000000000000000000000000000000000000000081046022830153790100000000000000000000000000000000000000000000000000810460218301537801000000000000000000000000000000000000000000000000810460208301535061316682826020860151600287516040518082805190602001908083835b60208310612f985780518252601f199092019160209182019101612f79565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015612fdc573d6000803e3d6000fd5b5050506040513d6020811015612ff157600080fd5b8101908080519250505060408801516040516020018085805190602001908083835b602083106130325780518252601f199092019160209182019101613013565b6001836020036101000a038019825116818451161790925250505091909101905084805190602001908083835b6020831061307e5780518252601f19909201916020918201910161305f565b6001836020036101000a038019825116818451161790925250505091909101848152602001905082805190602001908083835b602083106130d05780518252601f1990920191602091820191016130b1565b6001836020036101000a03801982511681845116179092525050509190910195506040945050505050516020818303038152906040526040518082805190602001908083835b602083106131355780518252601f199092019160209182019101613116565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020613d49565b509b9a5050505050505050505050565b3b90565b6000612c2d613d5e565b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117b85780601f106131f1576101008083540402835291602001916117b8565b820191906000526020600020905b8154815290600101906020018083116131ff57509395945050505050565b60008060608060608060008060608c60458151811061323857fe5b016020015160f860020a9081900481020460660197506020604051818152601f19601f830116810160200160405290801561327d578160200160208202803883390190505b50965061328f8d8960208a6000613adf565b5060028a8d6040516020018083805190602001908083835b602083106132c65780518252601f1990920191602091820191016132a7565b6001836020036101000a038019825116818451161790925250505091909101928352505060200190506040516020818303038152906040526040518082805190602001908083835b6020831061332d5780518252601f19909201916020918201910161330e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015613371573d6000803e3d6000fd5b5050506040513d602081101561338657600080fd5b81019080805192506040915050516020810191909152604090810190516020818303038152906040526040518082805190602001908083835b602083106133de5780518252601f1990920191602091820191016133bf565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020876040518082805190602001908083835b6020831061343a5780518252601f19909201916020918201910161341b565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020146134745760009850613935565b8c604a89018151811061348357fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f83011681016020016040529080156134cc578160200160208202803883390190505b5095506134e18d896049018851896000613adf565b506135b26002876040518082805190602001908083835b602083106135175780518252601f1990920191602091820191016134f8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af115801561355b573d6000803e3d6000fd5b5050506040513d602081101561357057600080fd5b81019080805190602001909291905050508c8f8b6020016008018151811061359457fe5b016020015160f860020a900460f860020a0260f860020a9004614082565b15156135c15760009850613935565b6029604051818152601f19601f83011681016020016040529080156135f0578160200160208202803883390190505b5094506136058d896020016029886000613adf565b5060408051818152601f19601f8301168101602001604052908015613634578160200160208202803883390190505b5093508551886020016029010160410192506136588d604085036040876000613adf565b506002846040518082805190602001908083835b6020831061368b5780518252601f19909201916020918201910161366c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156136cf573d6000803e3d6000fd5b5050506040513d60208110156136e457600080fd5b810190808051945087925084915060409050516020018083805190602001908083835b602083106137265780518252601f199092019160209182019101613707565b6001836020036101000a038019825116818451161790925250505091909101928352505060200190506040516020818303038152906040526040518082805190602001908083835b6020831061378d5780518252601f19909201916020918201910161376e565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902060008d81526003602052604090205414156137e55760008c8152600360205260409020600090556137ee565b60009850613935565b6049604051818152601f19601f830116810160200160405290801561381d578160200160208202803883390190505b50905061382f8d896049846000613adf565b506138d16002826040518082805190602001908083835b602083106138655780518252601f199092019160209182019101613846565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156138a9573d6000803e3d6000fd5b5050506040513d60208110156138be57600080fd5b8101908080519250899150879050614108565b15156138e05760009850613935565b60008281526004602052604090205460ff161515613920576139028d8461432d565b6000838152600460205260409020805460ff19169115159190911790555b60008281526004602052604090205460ff1698505b5050505050505050949350505050565b60008054600160a060020a03161580613970575060005461396e90600160a060020a0316613176565b155b156139815761397f600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156139c157600080fd5b505af11580156139d5573d6000803e3d6000fd5b505050506040513d60208110156139eb57600080fd5b810190808051600154600160a060020a039081169116149250613a9f91505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015613a4b57600080fd5b505af1158015613a5f573d6000803e3d6000fd5b505050506040513d6020811015613a7557600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a031663abaa5f3e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561240657600080fd5b60608382016000808286511015613af557600080fd5b505060208087019084015b868860200101821015613b2157818901518682015260209182019101613b00565b5093979650505050505050565b60008054606090600160a060020a03161580613b5c5750600054613b5a90600160a060020a0316613176565b155b15613b6d57613b6b600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015613bad57600080fd5b505af1158015613bc1573d6000803e3d6000fd5b505050506040513d6020811015613bd757600080fd5b810190808051600154600160a060020a039081169116149250613c8b91505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015613c3757600080fd5b505af1158015613c4b573d6000803e3d6000fd5b505050506040513d6020811015613c6157600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b6004604051908082528060200260200182016040528015613cc057816020015b6060815260200190600190039081613cab5790505b509050835181600081518110613cd257fe5b60209081029091010152836001602002015181600181518110613cf157fe5b6020908102919091010152604084015181600281518110613d0e57fe5b6020908102919091010152606084015181600381518110613d2b57fe5b60209081029091010152613d4085828561475a565b95945050505050565b60008281526003602052819060409020555050565b600080613d7e731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed613176565b1115613dee5760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed179055613de660408051908101604052600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152614b32565b5060016117c0565b6000613e0d73c03a2615d5efaf5f49f60b7bb6583eaec212fdf1613176565b1115613e755760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf1179055613de660408051908101604052600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152614b32565b6000613e9473b7a07bcf2ba2f2703b24c0691b5278999c59ac7e613176565b1115613efc5760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e179055613de660408051908101604052600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152614b32565b6000613f1b73146500cfd35b22e4a392fe0adc06de1a1368ed48613176565b1115613f835760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed48179055613de660408051908101604052600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152614b32565b6000613fa2736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475613176565b1115613fd6575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47517905560016117c0565b6000613ff57320e12a1f859b3feae5fb2a0a32c18f5a65555bbf613176565b1115614029575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf17905560016117c0565b60006140487351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa613176565b111561407c575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa17905560016117c0565b50600090565b60006001818385511461409457600080fd5b5060005b838110156140fb578481815181106140ac57fe5b016020015160f860020a900460f860020a02600160f860020a03191686826020811015156140d657fe5b1a60f860020a02600160f860020a0319161415156140f357600091505b600101614098565b8192505b50509392505050565b60008060008060006060600060606020604051818152601f19601f8301168101602001604052908015614145578160200160208202803883390190505b50925060208a60038151811061415757fe5b016020015160f860020a900460f860020a0260f860020a90040360040191506141858a836020866000613adf565b92506020604051818152601f19601f83011681016020016040529080156141b6578160200160208202803883390190505b5090506022820191506141fa8a60208c60018603815181106141d457fe5b016020015160f860020a900460f860020a0260f860020a90040384016020846000613adf565b905060208301519450602081015193506142178b601b8787614b45565b9097509550600160a060020a038616896040518082805190602001908083835b602083106142565780518252601f199092019160209182019101614237565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020600160a060020a0316141561429a576001975061431f565b6142a78b601c8787614b45565b9097509550600160a060020a038616896040518082805190602001908083835b602083106142e65780518252601f1990920191602091820191016142c7565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020600160a060020a03161497505b505050505050509392505050565b60008060608060608060608060608a8a6001018151811061434a57fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f8301168101602001604052908015614393578160200160208202803883390190505b5096506143a58b8b89518a6000613adf565b5060408051818152601f19601f83011681016020016040529080156143d4578160200160208202803883390190505b5095506143e78b60046040896000613adf565b506062604051818152601f19601f8301168101602001604052908015614417578160200160208202803883390190505b50945060f860020a8560008151811061442c57fe5b906020010190600160f860020a031916908160001a9053506144568b60418c036041886001613adf565b506040805190810160405280602081526020017ffd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c815250935061449f8460006020886042613adf565b506145416002866040518082805190602001908083835b602083106144d55780518252601f1990920191602091820191016144b6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015614519573d6000803e3d6000fd5b5050506040513d602081101561452e57600080fd5b81019080805192508a9150899050614108565b9750871515614553576000985061474c565b606060405190810160405280604081526020017f7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e881526020017f537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e481525092506042604051818152601f19601f83011681016020016040529080156145e1578160200160208202803883390190505b5091507ffe000000000000000000000000000000000000000000000000000000000000008260008151811061461257fe5b906020010190600160f860020a031916908160001a90535061463a8b60036041856001613adf565b508a60458151811061464857fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f8301168101602001604052908015614691578160200160208202803883390190505b5090506146a48b60448351846000613adf565b506147466002836040518082805190602001908083835b602083106146da5780518252601f1990920191602091820191016146bb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af115801561471e573d6000803e3d6000fd5b5050506040513d602081101561473357600080fd5b8101908080519250849150869050614108565b97508798505b505050505050505092915050565b600080548190606090600160a060020a0316158061478a575060005461478890600160a060020a0316613176565b155b1561479b57614799600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156147db57600080fd5b505af11580156147ef573d6000803e3d6000fd5b505050506040513d602081101561480557600080fd5b810190808051600154600160a060020a0390811691161492506148b991505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561486557600080fd5b505af1158015614879573d6000803e3d6000fd5b505050506040513d602081101561488f57600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a0316632ef3accc87866040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015614921578082015183820152602001614909565b50505050905090810190601f16801561494e5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561496e57600080fd5b505af1158015614982573d6000803e3d6000fd5b505050506040513d602081101561499857600080fd5b8101908080519450505050670de0b6b3a76400003a8502018211156149c057600092506140ff565b6149c985614b85565b600154909150600160a060020a031663c55c1cb68360008985896040518663ffffffff1660e060020a028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015614a42578082015183820152602001614a2a565b50505050905090810190601f168015614a6f5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015614aa5578082015183820152602001614a8d565b50505050905090810190601f168015614ad25780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b158015614af457600080fd5b505af1158015614b08573d6000803e3d6000fd5b50505050506040513d6020811015614b1f57600080fd5b8101908080519998505050505050505050565b6002818051610878929160200190614fd7565b60008060008060405188815287602082015286604082015285606082015260208160808360006001610bb8f1925080519299929850919650505050505050565b6060614b8f615044565b6000614b99614bfc565b614ba582610400614c08565b614bae82614c36565b5060005b8351811015614be957614be1848281518110614bca57fe5b90602001906020020151839063ffffffff614c4116565b600101614bb2565b614bf282614c63565b8151949350505050565b60405180590338823950565b806020810615614c1b5760208106602003015b60208301819052604051928390526000835290910160405250565b6116b6816004614c6a565b614c4e8260028351614c83565b614c5e828263ffffffff614d8116565b505050565b6116b68160075b61087882601f602060ff8516021763ffffffff614e1e16565b60178111614ca457614c9f8360ff848116602002168317614e1e565b614c5e565b60ff8111614cdd57614cc5836018602060ff8616021763ffffffff614e1e16565b614cd78382600163ffffffff614e5716565b50614c5e565b61ffff8111614d1157614cff836019602060ff8616021763ffffffff614e1e16565b614cd78382600263ffffffff614e5716565b63ffffffff8111614d4757614d3583601a602060ff8616021763ffffffff614e1e16565b614cd78382600463ffffffff614e5716565b67ffffffffffffffff8111614c5e57614d6f83601b602060ff8616021763ffffffff614e1e16565b61279b8382600863ffffffff614e5716565b614d89615044565b60008060008086602001518751518751011115614dbb57614dbb87614db389602001518951614ead565b600202614ec4565b8551915086518051602081830101955087510190526020860192505b60208210614dfa5782518452602084019350602083019250602082039150614dd7565b6001826020036101000a039050801983511681855116179093525093949350505050565b81602001518251516001011115614e4057614e40828360200151600202614ec4565b815180516020818301018381535060010190525050565b614e5f615044565b6000846020015185515184011115614e8357614e8385614db3876020015186614ead565b6001836101000a039050845180518481830101868419825116179052909301909252509192915050565b600081831115614ebe575081612c2d565b50919050565b606082519050614ed48383614c08565b61279b8382614d81565b828054828255906000526020600020908101928215614f35579160200282015b82811115614f355782518254600160a060020a031916600160a060020a039190911617825560209290920191600190910190614efe565b50614f4192915061505c565b5090565b828054828255906000526020600020908101928215614f80579160200282015b82811115614f80578251825591602001919060010190614f65565b50614f41929150615080565b815481835581811115614c5e5781836000526020600020614c5e9281019101615080565b60806040519081016040526004815b6060815260200190600190039081614fbf5790505090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061501857805160ff1916838001178555614f80565b82800160010185558215614f805791820182811115614f80578251825591602001919060010190614f65565b60408051908101604052606081526000602082015290565b6117c091905b80821115614f41578054600160a060020a0319168155600101615062565b6117c091905b80821115614f4157600081556001016150865600a165627a7a7230582020490c23beeb70d00b7f82ea2678e6e93cc1ed63698e15171d2cdadf341f9bae0029000000000000000000000000a0cb1378459c42c9765c53038d0d619991d56fd4
Deployed Bytecode
0x6080604052600436106101f55763ffffffff60e060020a6000350416630ee4aa4b81146101fa57806314fe75fa1461022157806321dfb6001461024257806326a4e8d2146102a057806327dc297e146102c357806330d146551461031e57806338bbfa5014610335578063442208b2146103d05780634968d33d146103e557806352c8df64146103fa5780635529519014610412578063590e1ae3146104275780636540742f1461043c578063715018a61461045157806371c82c1414610466578063792b95a21461047e57806383c49d36146104935780638a03bd38146104a85780638b5b9ccc146104c95780638da5cb5b146105315780638ddf792b146105625780638f32d59b1461057a57806392376edc146105a3578063a10132ad146105c4578063a1a4a27b146105d9578063aab306f7146105f1578063b464e7ec14610606578063ba13a5721461061b578063bf14782914610630578063c519642614610645578063c63d93591461065a578063ca9db4b51461066f578063d93a8ece146101fa578063df320b2914610684578063e978e8ff1461069c578063f027af76146106b4578063f06dedaf146106c9578063f0963099146106ea578063f2fde38b1461070b578063f4786c121461072c578063f71d96cb1461074d578063fc0c546a14610765578063fedf70e31461077a575b600080fd5b34801561020657600080fd5b5061020f61078f565b60405190815260200160405180910390f35b34801561022d57600080fd5b5061020f600160a060020a0360043516610794565b34801561024e57600080fd5b5061025a6004356107a8565b604051968752600160a060020a0390951660208701526040808701949094526060860192909252608085015260a084015290151560c083015260e0909101905180910390f35b3480156102ac57600080fd5b506102c1600160a060020a03600435166107f2565b005b3480156102cf57600080fd5b506102c16004803590369060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094975061083e9650505050505050565b6102c160048035906024803590810191013561087c565b34801561034157600080fd5b506102c16004803590369060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509497969560208082019650903587018082019550359350839250601f830181900481020190506040519081016040528181529291906020840183838082843750949750610d189650505050505050565b3480156103dc57600080fd5b5061020f61157d565b3480156103f157600080fd5b5061020f611583565b34801561040657600080fd5b506102c1600435611588565b34801561041e57600080fd5b5061020f6115c9565b34801561043357600080fd5b506102c16115cf565b34801561044857600080fd5b5061020f6116b9565b34801561045d57600080fd5b506102c16116c4565b34801561047257600080fd5b506102c1600435611724565b34801561048a57600080fd5b5061020f611740565b34801561049f57600080fd5b5061020f611746565b3480156104b457600080fd5b5061020f600160a060020a036004351661174c565b3480156104d557600080fd5b506104de611760565b60405160208082528190810183818151815260200191508051906020019060200280838360005b8381101561051d578082015183820152602001610505565b505050509050019250505060405180910390f35b34801561053d57600080fd5b506105466117c3565b604051600160a060020a03909116815260200160405180910390f35b34801561056e57600080fd5b506102c16004356117d2565b34801561058657600080fd5b5061058f6117ea565b604051901515815260200160405180910390f35b3480156105af57600080fd5b5061020f600160a060020a03600435166117fb565b3480156105d057600080fd5b5061020f61180f565b3480156105e557600080fd5b50610546600435611815565b3480156105fd57600080fd5b5061020f61183c565b34801561061257600080fd5b5061020f611847565b34801561062757600080fd5b506102c161184d565b34801561063c57600080fd5b5061020f611bea565b34801561065157600080fd5b5061020f611bef565b34801561066657600080fd5b506102c1611bf5565b34801561067b57600080fd5b5061020f611c52565b34801561069057600080fd5b506102c1600435611c58565b3480156106a857600080fd5b506102c1600435611cfe565b3480156106c057600080fd5b5061020f611e9d565b3480156106d557600080fd5b5061020f600160a060020a0360043516611ea2565b3480156106f657600080fd5b506102c1600160a060020a0360043516611eb6565b34801561071757600080fd5b506102c1600160a060020a0360043516611f02565b34801561073857600080fd5b5061058f600160a060020a0360043516611f1e565b34801561075957600080fd5b50610546600435611f35565b34801561077157600080fd5b50610546611f43565b34801561078657600080fd5b50610546611f52565b600281565b600760205280600052604060002054905081565b6006602052806000526040600020805460018201546003830154600484015460058501546006860154600790960154949650600160a060020a039093169491939092919060ff1687565b6107fa6117ea565b151561080557600080fd5b80600160a060020a038116151561081b57600080fd5b5060178054600160a060020a031916600160a060020a0392909216919091179055565b61087882826000604051818152601f19601f8301168101602001604052908015610872578160200160208202803883390190505b50610d18565b5050565b6000808080808080662386f26fc1000034101561089857600080fd5b8915806108a5575060018a145b806108b0575060028a145b806108bb575060038a145b15156108c657600080fd5b6108fd8a8a8a8080602002602001604051908101604052809392919081815260200183836020028082843750611f61945050505050565b151561090857600080fd5b89151561092a576001881461091c57600080fd5b600296506113889550610b89565b60018a141561096157600588111561094157600080fd5b60069650610683955061095a868963ffffffff61201516565b9550610b89565b60028a1415610b4257600a88111561097857600080fd5b600b9650600094505b87851015610b3d5788888681811061099557fe5b90506020020135600014806109bc57508888868181106109b157fe5b90506020020135600a145b156109da576109d38661011663ffffffff61204a16565b9550610b32565b8888868181106109e657fe5b9050602002013560011480610a0d5750888886818110610a0257fe5b905060200201356009145b15610a24576109d38661022c63ffffffff61204a16565b888886818110610a3057fe5b9050602002013560021480610a575750888886818110610a4c57fe5b905060200201356008145b15610a6e576109d38661034163ffffffff61204a16565b888886818110610a7a57fe5b9050602002013560031480610aa15750888886818110610a9657fe5b905060200201356007145b15610ab8576109d38661045763ffffffff61204a16565b888886818110610ac457fe5b9050602002013560041480610aeb5750888886818110610ae057fe5b905060200201356006145b15610b02576109d38661056d63ffffffff61204a16565b888886818110610b0e57fe5b9050602002013560051415610b3257610b2f8661068363ffffffff61204a16565b95505b600190940193610981565b610b89565b60038a1415610b895760018814610b5857600080fd5b60649650610b8689896000818110610b6c57fe5b90506020020135600101606461201590919063ffffffff16565b95505b3360008181526008602052909450349350604090205460ff161515610c0057600d8054600181018083556000928352869290919060209020018054600160a060020a031916600160a060020a039384161790555084166000908152600860205260019060409020805460ff19169115159190911790555b610c0861205c565b9150610c1383612128565b600160a060020a03851660009081526009602052909350610c4190849060409020549063ffffffff61204a16565b600160a060020a038516600090815260096020526040902055610c7c86610c708561271063ffffffff61201516565b9063ffffffff61219e16565b9050610cbb8234868c8c80806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050858c6121c1565b600082815260066020528a906040902060050155600160a060020a0384167f6a3e1ac12e8d08f67ee82a5221dfbce3935bb6bfede3c1cd1f788c8c23958b2a8360405190815260200160405180910390a250505050505050505050565b600080600080600080610d2961226c565b600160a060020a03163314610d9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f53656e646572206d757374206265204f7261636c697a65000000000000000000604482015260640160405180910390fd5b6000898152600660205260409020600781015490965060ff1615610dc157600080fd5b6001860154600160a060020a0316156110b457610ddf89898961243e565b60ff1615610e065760018601548654610e0191600160a060020a031690612568565b6110a0565b8560040154886040518082805190602001908083835b60208310610e3b5780518252601f199092019160209182019101610e1c565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020811515610e7057fe5b069450600093505b6002860154841015610f2c57600386600501541415610ed95760028601805485908110610ea157fe5b90600052602060002001548511610ed45760018601546003870154610ecf91600160a060020a031690612568565b600192505b610f21565b60028601805485908110610ee957fe5b9060005260206000200154851415610f215760018601546003870154610f1891600160a060020a031690612568565b60019250610f2c565b600190930192610e78565b8215610fee576005860154600187015487546003890154600160a060020a03909216917f85b65c042eafbc764a36000b8d433effc34c374aa7f899d06d2c02b57df768949190899060028c01904260405180868152602001858152602001806020018481526020018381526020018281038252858181548152602001915080548015610fd757602002820191906000526020600020905b815481526020019060010190808311610fc3575b5050965050505050505060405180910390a36110a0565b600586015460018701548754600160a060020a03909116907f85b65c042eafbc764a36000b8d433effc34c374aa7f899d06d2c02b57df76894908860028b016000426040518086815260200185815260200180602001848152602001838152602001828103825285818154815260200191508054801561108d57602002820191906000526020600020905b815481526020019060010190808311611079575b5050965050505050505060405180910390a35b60078601805460ff19166001179055611572565b600e54891415611572576110c989898961243e565b60ff16156110d657600080fd5b601754600160a060020a031663a31c76d26040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561111657600080fd5b505af115801561112a573d6000803e3d6000fd5b505050506040513d602081101561114057600080fd5b81019080805192508a915060409050518082805190602001908083835b6020831061117c5780518252601f19909201916020918201910161115d565b6001836020036101000a038019825116818451161790925250505091909101925060409150505180910390208115156111b157fe5b06945060009150601054600014156111de57600f546111d790600263ffffffff61219e16565b9150611260565b601054600114156111fd57600f546111d790600463ffffffff61219e16565b60105460021415611223576111d76064610c70600c600f5461201590919063ffffffff16565b60105460031415611249576111d76064610c706008600f5461201590919063ffffffff16565b600f5461125d90601463ffffffff61219e16565b91505b600093505b600c548410156114a557600c80548590811061127d57fe5b9060005260206000200154600160a060020a03166000818152600a602052909150604090205485101580156112c95750600160a060020a0381166000908152600b602052604090205485105b1561149a576112d7846125f5565b6112e18183612568565b601154601754600160a060020a03808416917f8383d9a295d83dac204e1f527f5e3920c91b66cd0bfb9cbed63c56e639683a38918691166343b3f2bf8660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15801561135d57600080fd5b505af1158015611371573d6000803e3d6000fd5b505050506040513d602081101561138757600080fd5b810190808051925060409150505191825260208201526040908101905180910390a36010805460010190556113ba612691565b601754600160a060020a0316630a0f6d44816343b3f2bf8460405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15801561141157600080fd5b505af1158015611425573d6000803e3d6000fd5b505050506040513d602081101561143b57600080fd5b810190808051925060409150505160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15801561147d57600080fd5b505af1158015611491573d6000803e3d6000fd5b505050506114a5565b600190930192611265565b601054600514806114b65750600c54155b156115665760006040519080825280602002602001820160405280156114e6578160200160208202803883390190505b50600c9080516114fa929160200190614ede565b506000600f81905560105542601255601754600160a060020a03166346c363606040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561154957600080fd5b505af115801561155d573d6000803e3d6000fd5b50505050611572565b61156e61205c565b600e555b505050505050505050565b60125481565b600081565b6115906117ea565b151561159b57600080fd5b3381156108fc0282604051600060405180830381858888f19350505050158015610878573d6000803e3d6000fd5b60135481565b336000908152600760205260408120541161164a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600160248201527f3000000000000000000000000000000000000000000000000000000000000000604482015260640160405180910390fd5b336000908152600760205260409020543031101561166757600080fd5b3360009081526007602052604081205533600081815260076020526108fc9060409020549081150290604051600060405180830381858888f193505050501580156116b6573d6000803e3d6000fd5b50565b662386f26fc1000081565b6116cc6117ea565b15156116d757600080fd5b600554600090600160a060020a03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360058054600160a060020a0319169055565b61172c6117ea565b151561173757600080fd5b6116b6816127a1565b60155481565b600f5481565b600b60205280600052604060002054905081565b6060600d8054806020026020016040519081016040528092919081815260200182805480156117b857602002820191906000526020600020905b8154600160a060020a0316815260019091019060200180831161179a575b505050505090505b90565b600554600160a060020a031690565b6117da6117ea565b15156117e557600080fd5b601455565b600554600160a060020a0316331490565b600960205280600052604060002054905081565b60145481565b600c80548290811061182357fe5b9060005260206000200154600160a060020a0316905081565b66071afd498d000081565b60105481565b6060600080600061185c6117ea565b151561186757600080fd5b601754600160a060020a031680151561187f57600080fd5b6201518060125442031015151561189557600080fd5b601754600090600160a060020a031663a31c76d26040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156118d857600080fd5b505af11580156118ec573d6000803e3d6000fd5b505050506040513d602081101561190257600080fd5b81019080805193909311925061191a91505057600080fd5b600f5460001061192957600080fd5b601754600160a060020a031663d8701ecc6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561196957600080fd5b505af115801561197d573d6000803e3d6000fd5b505050506040513d602081101561199357600080fd5b81019080805115159250611b8091505057601754600160a060020a0316638526edbe6040518163ffffffff1660e060020a028152600401600060405180830381600087803b1580156119e457600080fd5b505af11580156119f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015611a2157600080fd5b810190808051640100000000811115611a3957600080fd5b82016020810184811115611a4c57600080fd5b8151856020820283011164010000000082111715611a6957600080fd5b5090985060009750505050505b8451841015611b6e57848481518110611a8b57fe5b90602001906020020151601754909350600160a060020a03166343b3f2bf8460405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b158015611ae957600080fd5b505af1158015611afd573d6000803e3d6000fd5b505050506040513d6020811015611b1357600080fd5b8101908080519450505060008311159050611b6357600c8054600181018083556000928352859290919060209020018054600160a060020a031916600160a060020a039390931692909217909155505b600190930192611a76565b611b76612691565b6011805460010190555b601754600160a060020a0316634b98089c6040518163ffffffff1660e060020a028152600401600060405180830381600087803b158015611bc057600080fd5b505af1158015611bd4573d6000803e3d6000fd5b50505050611be061205c565b600e555050505050565b600381565b60115481565b601654600090600160a060020a03163314611c0f57600080fd5b50601580546000909155601654600160a060020a031681156108fc0282604051600060405180830381858888f19350505050158015610878573d6000803e3d6000fd5b600e5481565b60008181526006602052604090206007015460ff1615611c7757600080fd5b6000818152600660205262015180906040902060060154420311611c9a57600080fd5b6000818152600660205260019060409020600701805460ff19169115159190911790556000818152600660205233906108fc906040902054801590910290604051600060405180830381858888f19350505050158015610878573d6000803e3d6000fd5b6000806000806000611d0e6117ea565b1515611d1957600080fd5b62015180601354420310151515611d2f57600080fd5b601854600d548791611d47919063ffffffff61295e16565b1015611d6957601854600d54611d629163ffffffff61295e16565b9450611d6d565b8594505b84841015611e7f57600d601854815481101515611d8657fe5b9060005260206000200154600160a060020a031660008181526009602052909350604090205490505b670de0b6b3a76400008110611df057611dcf82606463ffffffff61204a16565b9150611de981670de0b6b3a764000063ffffffff61295e16565b9050611daf565b6000821115611e6957601754600160a060020a0316630752881a848460405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401600060405180830381600087803b158015611e5057600080fd5b505af1158015611e64573d6000803e3d6000fd5b505050505b6018805460019081019091559390930192611d6d565b600d546018541415611e95576000601855426013555b505050505050565b600181565b600a60205280600052604060002054905081565b611ebe6117ea565b1515611ec957600080fd5b80600160a060020a0381161515611edf57600080fd5b5060168054600160a060020a031916600160a060020a0392909216919091179055565b611f0a6117ea565b1515611f1557600080fd5b6116b681612975565b60086020528060005260406000205460ff16905081565b600d80548290811061182357fe5b601754600160a060020a031681565b601654600160a060020a031681565b6000806000835111611f7257600080fd5b5060005b825181101561200957801515611fb957600384148015611fab57506060838281518110611f9f57fe5b90602001906020020151115b15611fb9576000915061200e565b6001835103811461200157828181518110611fd057fe5b90602001906020020151838260010181518110611fe957fe5b9060200190602002015111612001576000915061200e565b600101611f76565b600191505b5092915050565b600080831515612028576000915061200e565b5082820282848281151561203857fe5b041461204357600080fd5b9392505050565b60008282018381101561204357600080fd5b600061209d60408051908101604052600681527f72616e646f6d000000000000000000000000000000000000000000000000000060208201526014546129e8565b303110156120aa57600080fd5b6120b960006004601454612c33565b90508015156117c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4f7261636c697a65206572726f72000000000000000000000000000000000000604482015260640160405180910390fd5b6000806121416064610c7085600263ffffffff61201516565b601554909150612157908263ffffffff61204a16565b601555600f546121749066071afd498d000063ffffffff61204a16565b600f5561204366071afd498d0000612192858463ffffffff61295e16565b9063ffffffff61295e16565b6000808083116121ad57600080fd5b82848115156121b857fe5b04949350505050565b600086815260066020528490604090206001018054600160a060020a031916600160a060020a0392909216919091179055600086815260066020528590604090205560008681526006602052839060409020600201908051612227929160200190614f45565b50600086815260066020528290604090206003015560008681526006602052819060409020600401556000868152600660205242906040902060060155505050505050565b60008054600160a060020a03161580612297575060005461229590600160a060020a0316613176565b155b156122a8576122a6600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156122e857600080fd5b505af11580156122fc573d6000803e3d6000fd5b505050506040513d602081101561231257600080fd5b810190808051600154600160a060020a0390811691161492506123c691505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561237257600080fd5b505af1158015612386573d6000803e3d6000fd5b505050506040513d602081101561239c57600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a031663c281d19e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561240657600080fd5b505af115801561241a573d6000803e3d6000fd5b505050506040513d602081101561243057600080fd5b810190808051935050505090565b6000808260008151811061244e57fe5b016020015160f860020a900460f860020a02600160f860020a0319167f4c000000000000000000000000000000000000000000000000000000000000001415806124e05750826001815181106124a057fe5b016020015160f860020a900460f860020a02600160f860020a0319167f500000000000000000000000000000000000000000000000000000000000000014155b806125285750826002815181106124f357fe5b01602001517fff0000000000000000000000000000000000000000000000000000000000000060f860020a9182900482021614155b156125365760019150612560565b612549838686612544613184565b61321d565b905080151561255b5760029150612560565b600091505b509392505050565b303181116125ad57600160a060020a03821681156108fc0282604051600060405180830381858888f193505050501580156125a7573d6000803e3d6000fd5b50610878565b600160a060020a038216600090815260076020526125d890829060409020549063ffffffff61204a16565b600160a060020a0383166000908152600760205260409020555050565b600c8054600019810190811061260757fe5b9060005260206000200154600c8054600160a060020a03909216918390811061262c57fe5b906000526020600020018054600160a060020a031916600160a060020a0392909216919091179055600c8054600019810190811061266657fe5b906000526020600020018054600160a060020a0319169055600c805490610878906000198301614f8c565b60008080805b600c5483101561279b57600c8054849081106126af57fe5b9060005260206000200154601754600160a060020a039182169350166343b3f2bf8360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15801561271057600080fd5b505af1158015612724573d6000803e3d6000fd5b505050506040513d602081101561273a57600080fd5b810190808051600160a060020a0386166000908152600a6020529094508793506040925090502055612772848263ffffffff61204a16565b600160a060020a0383166000908152600b60205290945084906040902055600190920191612697565b50505050565b600054600160a060020a031615806127cb57506000546127c990600160a060020a0316613176565b155b156127dc576127da600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561281c57600080fd5b505af1158015612830573d6000803e3d6000fd5b505050506040513d602081101561284657600080fd5b810190808051600154600160a060020a0390811691161492506128fa91505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156128a657600080fd5b505af11580156128ba573d6000803e3d6000fd5b505050506040513d60208110156128d057600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a031663ca6ad1e48260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15801561294357600080fd5b505af1158015612957573d6000803e3d6000fd5b5050505050565b6000808383111561296e57600080fd5b5050900390565b600160a060020a038116151561298a57600080fd5b600554600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360058054600160a060020a031916600160a060020a0392909216919091179055565b60008054600160a060020a03161580612a135750600054612a1190600160a060020a0316613176565b155b15612a2457612a22600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015612a6457600080fd5b505af1158015612a78573d6000803e3d6000fd5b505050506040513d6020811015612a8e57600080fd5b810190808051600154600160a060020a039081169116149250612b4291505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015612aee57600080fd5b505af1158015612b02573d6000803e3d6000fd5b505050506040513d6020811015612b1857600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a0316632ef3accc84846040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015612baa578082015183820152602001612b92565b50505050905090810190601f168015612bd75780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b158015612bf757600080fd5b505af1158015612c0b573d6000803e3d6000fd5b505050506040513d6020811015612c2157600080fd5b81019080805193505050505b92915050565b600060608060606000606080612c47614fb0565b6000606060008c118015612c5c575060208c11155b1515612c6757600080fd5b600a8d029c506001604051818152601f19601f8301168101602001604052908015612c9c578160200160208202803883390190505b5098508b60f860020a0289600081518110612cb357fe5b906020010190600160f860020a031916908160001a9053506020604051818152601f19601f8301168101602001604052908015612cfa578160200160208202803883390190505b5097506020604051818152601f19601f8301168101602001604052908015612d2c578160200160208202803883390190505b509650612d37613945565b9550602088524241186001430340186020890152602087528560208801526020604051818152601f19601f8301168101602001604052908015612d84578160200160208202803883390190505b5094508c60208601526008604051818152601f19601f8301168101602001604052908015612dbc578160200160208202803883390190505b509350612dcf8560186008876000613adf565b506080604051908101604052808981526020018a8152602001888152602001868152509250612e3260408051908101604052600681527f72616e646f6d00000000000000000000000000000000000000000000000000006020820152848d613b2e565b91506008604051818152601f19601f8301168101602001604052908015612e63578160200160208202803883390190505b509050602084015160f860020a810460278301537e01000000000000000000000000000000000000000000000000000000000000810460268301537d0100000000000000000000000000000000000000000000000000000000008104602583015360e060020a810460248301537b01000000000000000000000000000000000000000000000000000000810460238301537a01000000000000000000000000000000000000000000000000000081046022830153790100000000000000000000000000000000000000000000000000810460218301537801000000000000000000000000000000000000000000000000810460208301535061316682826020860151600287516040518082805190602001908083835b60208310612f985780518252601f199092019160209182019101612f79565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015612fdc573d6000803e3d6000fd5b5050506040513d6020811015612ff157600080fd5b8101908080519250505060408801516040516020018085805190602001908083835b602083106130325780518252601f199092019160209182019101613013565b6001836020036101000a038019825116818451161790925250505091909101905084805190602001908083835b6020831061307e5780518252601f19909201916020918201910161305f565b6001836020036101000a038019825116818451161790925250505091909101848152602001905082805190602001908083835b602083106130d05780518252601f1990920191602091820191016130b1565b6001836020036101000a03801982511681845116179092525050509190910195506040945050505050516020818303038152906040526040518082805190602001908083835b602083106131355780518252601f199092019160209182019101613116565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020613d49565b509b9a5050505050505050505050565b3b90565b6000612c2d613d5e565b606060028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117b85780601f106131f1576101008083540402835291602001916117b8565b820191906000526020600020905b8154815290600101906020018083116131ff57509395945050505050565b60008060608060608060008060608c60458151811061323857fe5b016020015160f860020a9081900481020460660197506020604051818152601f19601f830116810160200160405290801561327d578160200160208202803883390190505b50965061328f8d8960208a6000613adf565b5060028a8d6040516020018083805190602001908083835b602083106132c65780518252601f1990920191602091820191016132a7565b6001836020036101000a038019825116818451161790925250505091909101928352505060200190506040516020818303038152906040526040518082805190602001908083835b6020831061332d5780518252601f19909201916020918201910161330e565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015613371573d6000803e3d6000fd5b5050506040513d602081101561338657600080fd5b81019080805192506040915050516020810191909152604090810190516020818303038152906040526040518082805190602001908083835b602083106133de5780518252601f1990920191602091820191016133bf565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020876040518082805190602001908083835b6020831061343a5780518252601f19909201916020918201910161341b565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020146134745760009850613935565b8c604a89018151811061348357fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f83011681016020016040529080156134cc578160200160208202803883390190505b5095506134e18d896049018851896000613adf565b506135b26002876040518082805190602001908083835b602083106135175780518252601f1990920191602091820191016134f8565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af115801561355b573d6000803e3d6000fd5b5050506040513d602081101561357057600080fd5b81019080805190602001909291905050508c8f8b6020016008018151811061359457fe5b016020015160f860020a900460f860020a0260f860020a9004614082565b15156135c15760009850613935565b6029604051818152601f19601f83011681016020016040529080156135f0578160200160208202803883390190505b5094506136058d896020016029886000613adf565b5060408051818152601f19601f8301168101602001604052908015613634578160200160208202803883390190505b5093508551886020016029010160410192506136588d604085036040876000613adf565b506002846040518082805190602001908083835b6020831061368b5780518252601f19909201916020918201910161366c565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156136cf573d6000803e3d6000fd5b5050506040513d60208110156136e457600080fd5b810190808051945087925084915060409050516020018083805190602001908083835b602083106137265780518252601f199092019160209182019101613707565b6001836020036101000a038019825116818451161790925250505091909101928352505060200190506040516020818303038152906040526040518082805190602001908083835b6020831061378d5780518252601f19909201916020918201910161376e565b6001836020036101000a0380198251168184511617909252505050919091019250604091505051809103902060008d81526003602052604090205414156137e55760008c8152600360205260409020600090556137ee565b60009850613935565b6049604051818152601f19601f830116810160200160405290801561381d578160200160208202803883390190505b50905061382f8d896049846000613adf565b506138d16002826040518082805190602001908083835b602083106138655780518252601f199092019160209182019101613846565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af11580156138a9573d6000803e3d6000fd5b5050506040513d60208110156138be57600080fd5b8101908080519250899150879050614108565b15156138e05760009850613935565b60008281526004602052604090205460ff161515613920576139028d8461432d565b6000838152600460205260409020805460ff19169115159190911790555b60008281526004602052604090205460ff1698505b5050505050505050949350505050565b60008054600160a060020a03161580613970575060005461396e90600160a060020a0316613176565b155b156139815761397f600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156139c157600080fd5b505af11580156139d5573d6000803e3d6000fd5b505050506040513d60208110156139eb57600080fd5b810190808051600154600160a060020a039081169116149250613a9f91505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015613a4b57600080fd5b505af1158015613a5f573d6000803e3d6000fd5b505050506040513d6020811015613a7557600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a031663abaa5f3e6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561240657600080fd5b60608382016000808286511015613af557600080fd5b505060208087019084015b868860200101821015613b2157818901518682015260209182019101613b00565b5093979650505050505050565b60008054606090600160a060020a03161580613b5c5750600054613b5a90600160a060020a0316613176565b155b15613b6d57613b6b600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015613bad57600080fd5b505af1158015613bc1573d6000803e3d6000fd5b505050506040513d6020811015613bd757600080fd5b810190808051600154600160a060020a039081169116149250613c8b91505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b158015613c3757600080fd5b505af1158015613c4b573d6000803e3d6000fd5b505050506040513d6020811015613c6157600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b6004604051908082528060200260200182016040528015613cc057816020015b6060815260200190600190039081613cab5790505b509050835181600081518110613cd257fe5b60209081029091010152836001602002015181600181518110613cf157fe5b6020908102919091010152604084015181600281518110613d0e57fe5b6020908102919091010152606084015181600381518110613d2b57fe5b60209081029091010152613d4085828561475a565b95945050505050565b60008281526003602052819060409020555050565b600080613d7e731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed613176565b1115613dee5760008054600160a060020a031916731d3b2638a7cc9f2cb3d298a3da7a90b67e5506ed179055613de660408051908101604052600b81527f6574685f6d61696e6e65740000000000000000000000000000000000000000006020820152614b32565b5060016117c0565b6000613e0d73c03a2615d5efaf5f49f60b7bb6583eaec212fdf1613176565b1115613e755760008054600160a060020a03191673c03a2615d5efaf5f49f60b7bb6583eaec212fdf1179055613de660408051908101604052600c81527f6574685f726f707374656e3300000000000000000000000000000000000000006020820152614b32565b6000613e9473b7a07bcf2ba2f2703b24c0691b5278999c59ac7e613176565b1115613efc5760008054600160a060020a03191673b7a07bcf2ba2f2703b24c0691b5278999c59ac7e179055613de660408051908101604052600981527f6574685f6b6f76616e00000000000000000000000000000000000000000000006020820152614b32565b6000613f1b73146500cfd35b22e4a392fe0adc06de1a1368ed48613176565b1115613f835760008054600160a060020a03191673146500cfd35b22e4a392fe0adc06de1a1368ed48179055613de660408051908101604052600b81527f6574685f72696e6b6562790000000000000000000000000000000000000000006020820152614b32565b6000613fa2736f485c8bf6fc43ea212e93bbf8ce046c7f1cb475613176565b1115613fd6575060008054600160a060020a031916736f485c8bf6fc43ea212e93bbf8ce046c7f1cb47517905560016117c0565b6000613ff57320e12a1f859b3feae5fb2a0a32c18f5a65555bbf613176565b1115614029575060008054600160a060020a0319167320e12a1f859b3feae5fb2a0a32c18f5a65555bbf17905560016117c0565b60006140487351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa613176565b111561407c575060008054600160a060020a0319167351efaf4c8b3c9afbd5ab9f4bbc82784ab6ef8faa17905560016117c0565b50600090565b60006001818385511461409457600080fd5b5060005b838110156140fb578481815181106140ac57fe5b016020015160f860020a900460f860020a02600160f860020a03191686826020811015156140d657fe5b1a60f860020a02600160f860020a0319161415156140f357600091505b600101614098565b8192505b50509392505050565b60008060008060006060600060606020604051818152601f19601f8301168101602001604052908015614145578160200160208202803883390190505b50925060208a60038151811061415757fe5b016020015160f860020a900460f860020a0260f860020a90040360040191506141858a836020866000613adf565b92506020604051818152601f19601f83011681016020016040529080156141b6578160200160208202803883390190505b5090506022820191506141fa8a60208c60018603815181106141d457fe5b016020015160f860020a900460f860020a0260f860020a90040384016020846000613adf565b905060208301519450602081015193506142178b601b8787614b45565b9097509550600160a060020a038616896040518082805190602001908083835b602083106142565780518252601f199092019160209182019101614237565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020600160a060020a0316141561429a576001975061431f565b6142a78b601c8787614b45565b9097509550600160a060020a038616896040518082805190602001908083835b602083106142e65780518252601f1990920191602091820191016142c7565b6001836020036101000a03801982511681845116179092525050509190910192506040915050518091039020600160a060020a03161497505b505050505050509392505050565b60008060608060608060608060608a8a6001018151811061434a57fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f8301168101602001604052908015614393578160200160208202803883390190505b5096506143a58b8b89518a6000613adf565b5060408051818152601f19601f83011681016020016040529080156143d4578160200160208202803883390190505b5095506143e78b60046040896000613adf565b506062604051818152601f19601f8301168101602001604052908015614417578160200160208202803883390190505b50945060f860020a8560008151811061442c57fe5b906020010190600160f860020a031916908160001a9053506144568b60418c036041886001613adf565b506040805190810160405280602081526020017ffd94fa71bc0ba10d39d464d0d8f465efeef0a2764e3887fcc9df41ded20f505c815250935061449f8460006020886042613adf565b506145416002866040518082805190602001908083835b602083106144d55780518252601f1990920191602091820191016144b6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af1158015614519573d6000803e3d6000fd5b5050506040513d602081101561452e57600080fd5b81019080805192508a9150899050614108565b9750871515614553576000985061474c565b606060405190810160405280604081526020017f7fb956469c5c9b89840d55b43537e66a98dd4811ea0a27224272c2e5622911e881526020017f537a2f8e86a46baec82864e98dd01e9ccc2f8bc5dfc9cbe5a91a290498dd96e481525092506042604051818152601f19601f83011681016020016040529080156145e1578160200160208202803883390190505b5091507ffe000000000000000000000000000000000000000000000000000000000000008260008151811061461257fe5b906020010190600160f860020a031916908160001a90535061463a8b60036041856001613adf565b508a60458151811061464857fe5b016020015160f860020a900460f860020a0260f860020a9004600201604051818152601f19601f8301168101602001604052908015614691578160200160208202803883390190505b5090506146a48b60448351846000613adf565b506147466002836040518082805190602001908083835b602083106146da5780518252601f1990920191602091820191016146bb565b6001836020036101000a0380198251168184511680821785525050505050509050019150506020604051808303816000865af115801561471e573d6000803e3d6000fd5b5050506040513d602081101561473357600080fd5b8101908080519250849150869050614108565b97508798505b505050505050505092915050565b600080548190606090600160a060020a0316158061478a575060005461478890600160a060020a0316613176565b155b1561479b57614799600061317a565b505b600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156147db57600080fd5b505af11580156147ef573d6000803e3d6000fd5b505050506040513d602081101561480557600080fd5b810190808051600154600160a060020a0390811691161492506148b991505057600054600160a060020a03166338cc48316040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561486557600080fd5b505af1158015614879573d6000803e3d6000fd5b505050506040513d602081101561488f57600080fd5b81019080805160018054600160a060020a031916600160a060020a03929092169190911790555050505b600154600160a060020a0316632ef3accc87866040518363ffffffff1660e060020a0281526004018080602001838152602001828103825284818151815260200191508051906020019080838360005b83811015614921578082015183820152602001614909565b50505050905090810190601f16801561494e5780820380516001836020036101000a031916815260200191505b509350505050602060405180830381600087803b15801561496e57600080fd5b505af1158015614982573d6000803e3d6000fd5b505050506040513d602081101561499857600080fd5b8101908080519450505050670de0b6b3a76400003a8502018211156149c057600092506140ff565b6149c985614b85565b600154909150600160a060020a031663c55c1cb68360008985896040518663ffffffff1660e060020a028152600401808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015614a42578082015183820152602001614a2a565b50505050905090810190601f168015614a6f5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015614aa5578082015183820152602001614a8d565b50505050905090810190601f168015614ad25780820380516001836020036101000a031916815260200191505b5096505050505050506020604051808303818588803b158015614af457600080fd5b505af1158015614b08573d6000803e3d6000fd5b50505050506040513d6020811015614b1f57600080fd5b8101908080519998505050505050505050565b6002818051610878929160200190614fd7565b60008060008060405188815287602082015286604082015285606082015260208160808360006001610bb8f1925080519299929850919650505050505050565b6060614b8f615044565b6000614b99614bfc565b614ba582610400614c08565b614bae82614c36565b5060005b8351811015614be957614be1848281518110614bca57fe5b90602001906020020151839063ffffffff614c4116565b600101614bb2565b614bf282614c63565b8151949350505050565b60405180590338823950565b806020810615614c1b5760208106602003015b60208301819052604051928390526000835290910160405250565b6116b6816004614c6a565b614c4e8260028351614c83565b614c5e828263ffffffff614d8116565b505050565b6116b68160075b61087882601f602060ff8516021763ffffffff614e1e16565b60178111614ca457614c9f8360ff848116602002168317614e1e565b614c5e565b60ff8111614cdd57614cc5836018602060ff8616021763ffffffff614e1e16565b614cd78382600163ffffffff614e5716565b50614c5e565b61ffff8111614d1157614cff836019602060ff8616021763ffffffff614e1e16565b614cd78382600263ffffffff614e5716565b63ffffffff8111614d4757614d3583601a602060ff8616021763ffffffff614e1e16565b614cd78382600463ffffffff614e5716565b67ffffffffffffffff8111614c5e57614d6f83601b602060ff8616021763ffffffff614e1e16565b61279b8382600863ffffffff614e5716565b614d89615044565b60008060008086602001518751518751011115614dbb57614dbb87614db389602001518951614ead565b600202614ec4565b8551915086518051602081830101955087510190526020860192505b60208210614dfa5782518452602084019350602083019250602082039150614dd7565b6001826020036101000a039050801983511681855116179093525093949350505050565b81602001518251516001011115614e4057614e40828360200151600202614ec4565b815180516020818301018381535060010190525050565b614e5f615044565b6000846020015185515184011115614e8357614e8385614db3876020015186614ead565b6001836101000a039050845180518481830101868419825116179052909301909252509192915050565b600081831115614ebe575081612c2d565b50919050565b606082519050614ed48383614c08565b61279b8382614d81565b828054828255906000526020600020908101928215614f35579160200282015b82811115614f355782518254600160a060020a031916600160a060020a039190911617825560209290920191600190910190614efe565b50614f4192915061505c565b5090565b828054828255906000526020600020908101928215614f80579160200282015b82811115614f80578251825591602001919060010190614f65565b50614f41929150615080565b815481835581811115614c5e5781836000526020600020614c5e9281019101615080565b60806040519081016040526004815b6060815260200190600190039081614fbf5790505090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061501857805160ff1916838001178555614f80565b82800160010185558215614f805791820182811115614f80578251825591602001919060010190614f65565b60408051908101604052606081526000602082015290565b6117c091905b80821115614f41578054600160a060020a0319168155600101615062565b6117c091905b80821115614f4157600081556001016150865600a165627a7a7230582020490c23beeb70d00b7f82ea2678e6e93cc1ed63698e15171d2cdadf341f9bae0029
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a0cb1378459c42c9765c53038d0d619991d56fd4
-----Decoded View---------------
Arg [0] : startBeneficiar (address): 0xa0CB1378459C42C9765c53038d0D619991D56FD4
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000a0cb1378459c42c9765c53038d0d619991d56fd4
Swarm Source
bzzr://20490c23beeb70d00b7f82ea2678e6e93cc1ed63698e15171d2cdadf341f9bae
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,404.1 | 0.0011646 | $3.96 |
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.