diff --git a/.gitignore b/.gitignore index 3bbfc6ba..1c62c67a 100644 --- a/.gitignore +++ b/.gitignore @@ -49,8 +49,8 @@ eudatPassword\.txt contracts/populus\.ini -\.node-xmlhttprequest-sync-18637 - -\.#main\.js +contractCalls/\.node-xmlhttprequest-sync-13830 contract/receipt\.txt + +\.#main\.js diff --git a/.node-xmlhttprequest-sync-18637 b/.node-xmlhttprequest-sync-18637 new file mode 100644 index 00000000..e69de29b diff --git a/Driver.py b/Driver.py index e681ddc3..ed6d350d 100755 --- a/Driver.py +++ b/Driver.py @@ -74,10 +74,10 @@ def isSlurmOn(): contractCallPath = constants.EBLOCPATH + '/contractCalls'; os.environ['contractCallPath'] = contractCallPath; # --------------- -header = "var mylib = require('" + eblocPath + "/eBlocBrokerHeader.js')"; os.environ['header'] = header; +header = "var eBlocBroker = require('" + eblocPath + "/eBlocBrokerHeader.js')"; os.environ['header'] = header; clusterID = constants.CLUSTER_ID; os.environ['clusterID'] = clusterID; -isClusterExist = contractCall('echo "$header; console.log( \'\' + mylib.isClusterExist(\'$clusterID\') )"'); +isClusterExist = contractCall('echo "$header; console.log( \'\' + eBlocBroker.isClusterExist(\'$clusterID\') )"'); if (isClusterExist.lower() == "false"): print("Error: Your Ethereum address (" + clusterID + ") \n" @@ -135,7 +135,7 @@ def isSlurmOn(): logTest(blockReadFrom); sys.exit(); - clusterGainedAmount = contractCall('echo "$header; console.log( \'\' + mylib.getClusterReceivedAmount(\'$clusterID\') )"'); + clusterGainedAmount = contractCall('echo "$header; console.log( \'\' + eBlocBroker.getClusterReceivedAmount(\'$clusterID\') )"'); squeueStatus = os.popen("squeue").read(); if "squeue: error:" in str(squeueStatus): @@ -161,7 +161,7 @@ def isSlurmOn(): printFlag = 1; time.sleep(2); - currentBlockNumber = contractCall('echo "$header; console.log( \'\' + mylib.blockNumber )"'); + currentBlockNumber = contractCall('echo "$header; console.log( \'\' + eBlocBroker.blockNumber )"'); if (passedPrintFlag == 0): logTest("Passed incremented block number... Continue to wait from block number: " + blockReadFrom); @@ -171,7 +171,7 @@ def isSlurmOn(): os.environ['blockReadFrom'] = str(blockReadFrom) # Starting reading event's location has been updated # Waits here until new job submitted into the cluster - returnVal = contractCall('echo "$header; console.log( \'\' + mylib.LogJob($blockReadFrom, \'$jobsReadFromPath\') )"'); + returnVal = contractCall('echo "$header; console.log( \'\' + eBlocBroker.LogJob($blockReadFrom, \'$jobsReadFromPath\') )"'); if os.path.isfile(jobsReadFromPath): #{ Waits until generated file on log is completed fR = open(jobsReadFromPath, 'r' ) diff --git a/contract/.cache/v/cache/lastfailed b/contract/.cache/v/cache/lastfailed new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/contract/.cache/v/cache/lastfailed @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/contract/.cache/v/populus/project/compiled_contracts b/contract/.cache/v/populus/project/compiled_contracts new file mode 100644 index 00000000..c491d58f --- /dev/null +++ b/contract/.cache/v/populus/project/compiled_contracts @@ -0,0 +1,1644 @@ +{ + "Library": { + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "self", + "type": "Library.intervalNode storage" + }, + { + "name": "index", + "type": "uint32" + } + ], + "name": "printIndex", + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "int32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "self", + "type": "Library.intervalNode storage" + }, + { + "name": "startTime", + "type": "uint256" + }, + { + "name": "endTime", + "type": "uint256" + }, + { + "name": "coreNum", + "type": "int32" + } + ], + "name": "receiptCheck", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "self", + "type": "Library.data storage" + }, + { + "name": "clusterName", + "type": "string" + }, + { + "name": "fID", + "type": "string" + }, + { + "name": "clusterMiniLockId", + "type": "string" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "coreNumber", + "type": "uint32" + }, + { + "name": "ipfsID", + "type": "bytes32" + } + ], + "name": "update", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "self", + "type": "Library.intervalNode storage" + } + ], + "name": "getReceiptListSize", + "outputs": [ + { + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "self", + "type": "Library.intervalNode storage" + }, + { + "name": "coreNum", + "type": "uint32" + } + ], + "name": "constructReceiptList", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "self", + "type": "Library.data storage" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "fID", + "type": "string" + }, + { + "name": "miniLockId", + "type": "string" + }, + { + "name": "memLen", + "type": "uint32" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "coreNumber", + "type": "uint32" + }, + { + "name": "ipfsID", + "type": "bytes32" + } + ], + "name": "constructCluster", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b610ecd8061001e6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630d71749f1461007b57806311a8894a146100c35780635b8a773f146101115780636822911814610217578063a12d0d8e1461024f578063b2116c8714610276575b600080fd5b6100a0600480803590602001909190803563ffffffff1690602001909190505061038b565b604051808381526020018260030b60030b81526020019250505060405180910390f35b6100f7600480803590602001909190803590602001909190803590602001909190803560030b90602001909190505061046f565b604051808215151515815260200191505060405180910390f35b610215600480803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803563ffffffff16906020019091908035600019169060200190919050506109ff565b005b61022d6004808035906020019091905050610a8f565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610274600480803590602001909190803563ffffffff16906020019091905050610abc565b005b610389600480803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803590602001909190803563ffffffff1690602001909190803560001916906020019091905050610c8d565b005b6000806000808560010160009054906101000a900463ffffffff169150600090505b8463ffffffff1681101561040357856000018263ffffffff168154811015156103d257fe5b906000526020600020906002020160010160049054906101000a900463ffffffff16915080806001019150506103ad565b856000018263ffffffff1681548110151561041a57fe5b906000526020600020906002020160000154866000018363ffffffff1681548110151561044357fe5b906000526020600020906002020160010160009054906101000a900460030b9350935050509250929050565b600080600080600080600080600096508b60010160009054906101000a900463ffffffff1695508b6000018663ffffffff168154811015156104ad57fe5b9060005260206000209060020201600001548a10156105b757600196508b6000018663ffffffff168154811015156104e157fe5b906000526020600020906002020192508b6000018360010160049054906101000a900463ffffffff1663ffffffff1681548110151561051c57fe5b906000526020600020906002020191505b8260010160009054906101000a900460030b8401935081600001548a10151561056c578260010160049054906101000a900463ffffffff1695506105b6565b8192508b6000018260010160049054906101000a900463ffffffff1663ffffffff1681548110151561059a57fe5b906000526020600020906002020191506001156105b65761052d565b5b8b60000180548060010182816105cd9190610d75565b9160005260206000209060020201600060606040519081016040528060018f0381526020018d60030b81526020018a63ffffffff1681525090919091506000820151816000015560208201518160010160006101000a81548163ffffffff021916908360030b63ffffffff16021790555060408201518160010160046101000a81548163ffffffff021916908363ffffffff1602179055505050508615156106cc578594508893508b60000160018d60000180549050038d60010160006101000a81548163ffffffff021916908363ffffffff160217905563ffffffff168154811015156106b757fe5b90600052602060002090600202019250610714565b8260010160049054906101000a900463ffffffff16945082905060018c60000180549050038360010160046101000a81548163ffffffff021916908363ffffffff1602179055505b8b6000018360010160049054906101000a900463ffffffff1663ffffffff1681548110151561073f57fe5b906000526020600020906002020191505b81600001548b1115610876578b60000180548060010182816107729190610d75565b916000526020600020906002020160006060604051908101604052808f81526020018d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0260030b81526020018760010160049054906101000a900463ffffffff1663ffffffff1681525090919091506000820151816000015560208201518160010160006101000a81548163ffffffff021916908360030b63ffffffff16021790555060408201518160010160046101000a81548163ffffffff021916908363ffffffff16021790555050505060018c60000180549050038360010160046101000a81548163ffffffff021916908363ffffffff160217905550600197506109f0565b8160010160009054906101000a900460030b840193508b60010160049054906101000a900463ffffffff1660030b8460030b13156109a5578b60000160018d60000180549050038154811015156108c957fe5b90600052602060002090600202016000808201600090556001820160006101000a81549063ffffffff02191690556001820160046101000a81549063ffffffff0219169055505086151561093f57848c60010160006101000a81548163ffffffff021916908363ffffffff160217905550610963565b848160010160046101000a81548163ffffffff021916908363ffffffff1602179055505b60018c60010160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff160217905550600097506109f0565b8192508b6000018260010160049054906101000a900463ffffffff1663ffffffff168154811015156109d357fe5b906000526020600020906002020191506001156109ef57610750565b5b50505050505050949350505050565b85876005019080519060200190610a17929190610da7565b5084876007019080519060200190610a30929190610da7565b5083876006019080519060200190610a49929190610da7565b50828760010181905550818760090160010160046101000a81548163ffffffff021916908363ffffffff1602179055508087600401816000191690555050505050505050565b60008160010160089054906101000a900463ffffffff1663ffffffff168260000180549050039050919050565b816000018054806001018281610ad29190610d75565b9160005260206000209060020201600060606040519081016040528060008152602001600060030b8152602001600063ffffffff1681525090919091506000820151816000015560208201518160010160006101000a81548163ffffffff021916908360030b63ffffffff16021790555060408201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550505050816000018054806001018281610b839190610d75565b9160005260206000209060020201600060606040519081016040528060008152602001600060030b8152602001600063ffffffff1681525090919091506000820151816000015560208201518160010160006101000a81548163ffffffff021916908360030b63ffffffff16021790555060408201518160010160046101000a81548163ffffffff021916908363ffffffff16021790555050505060018260010160006101000a81548163ffffffff021916908363ffffffff160217905550808260010160046101000a81548163ffffffff021916908363ffffffff16021790555060008260010160086101000a81548163ffffffff021916908363ffffffff1602179055505050565b86886005019080519060200190610ca5929190610da7565b5085886007019080519060200190610cbe929190610da7565b5084886006019080519060200190610cd7929190610da7565b508088600401816000191690555060018860000160006101000a81548160ff02191690831515021790555060018860000160016101000a81548160ff02191690831515021790555060008860020181905550838860000160026101000a81548163ffffffff021916908363ffffffff160217905550828860010181905550438860030181905550610d6b8860090183610abc565b5050505050505050565b815481835581811511610da257600202816002028360005260206000209182019101610da19190610e27565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610de857805160ff1916838001178555610e16565b82800160010185558215610e16579182015b82811115610e15578251825591602001919060010190610dfa565b5b509050610e239190610e7c565b5090565b610e7991905b80821115610e75576000808201600090556001820160006101000a81549063ffffffff02191690556001820160046101000a81549063ffffffff021916905550600201610e2d565b5090565b90565b610e9e91905b80821115610e9a576000816000905550600101610e82565b5090565b905600a165627a7a72305820c67e1f08b6b1aa541f75fab02520ee0c75c55286815eedd725f700b1ab993e2f0029", + "bytecode_runtime": "0x60606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630d71749f1461007b57806311a8894a146100c35780635b8a773f146101115780636822911814610217578063a12d0d8e1461024f578063b2116c8714610276575b600080fd5b6100a0600480803590602001909190803563ffffffff1690602001909190505061038b565b604051808381526020018260030b60030b81526020019250505060405180910390f35b6100f7600480803590602001909190803590602001909190803590602001909190803560030b90602001909190505061046f565b604051808215151515815260200191505060405180910390f35b610215600480803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803563ffffffff16906020019091908035600019169060200190919050506109ff565b005b61022d6004808035906020019091905050610a8f565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b610274600480803590602001909190803563ffffffff16906020019091905050610abc565b005b610389600480803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803590602001909190803563ffffffff1690602001909190803560001916906020019091905050610c8d565b005b6000806000808560010160009054906101000a900463ffffffff169150600090505b8463ffffffff1681101561040357856000018263ffffffff168154811015156103d257fe5b906000526020600020906002020160010160049054906101000a900463ffffffff16915080806001019150506103ad565b856000018263ffffffff1681548110151561041a57fe5b906000526020600020906002020160000154866000018363ffffffff1681548110151561044357fe5b906000526020600020906002020160010160009054906101000a900460030b9350935050509250929050565b600080600080600080600080600096508b60010160009054906101000a900463ffffffff1695508b6000018663ffffffff168154811015156104ad57fe5b9060005260206000209060020201600001548a10156105b757600196508b6000018663ffffffff168154811015156104e157fe5b906000526020600020906002020192508b6000018360010160049054906101000a900463ffffffff1663ffffffff1681548110151561051c57fe5b906000526020600020906002020191505b8260010160009054906101000a900460030b8401935081600001548a10151561056c578260010160049054906101000a900463ffffffff1695506105b6565b8192508b6000018260010160049054906101000a900463ffffffff1663ffffffff1681548110151561059a57fe5b906000526020600020906002020191506001156105b65761052d565b5b8b60000180548060010182816105cd9190610d75565b9160005260206000209060020201600060606040519081016040528060018f0381526020018d60030b81526020018a63ffffffff1681525090919091506000820151816000015560208201518160010160006101000a81548163ffffffff021916908360030b63ffffffff16021790555060408201518160010160046101000a81548163ffffffff021916908363ffffffff1602179055505050508615156106cc578594508893508b60000160018d60000180549050038d60010160006101000a81548163ffffffff021916908363ffffffff160217905563ffffffff168154811015156106b757fe5b90600052602060002090600202019250610714565b8260010160049054906101000a900463ffffffff16945082905060018c60000180549050038360010160046101000a81548163ffffffff021916908363ffffffff1602179055505b8b6000018360010160049054906101000a900463ffffffff1663ffffffff1681548110151561073f57fe5b906000526020600020906002020191505b81600001548b1115610876578b60000180548060010182816107729190610d75565b916000526020600020906002020160006060604051908101604052808f81526020018d7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0260030b81526020018760010160049054906101000a900463ffffffff1663ffffffff1681525090919091506000820151816000015560208201518160010160006101000a81548163ffffffff021916908360030b63ffffffff16021790555060408201518160010160046101000a81548163ffffffff021916908363ffffffff16021790555050505060018c60000180549050038360010160046101000a81548163ffffffff021916908363ffffffff160217905550600197506109f0565b8160010160009054906101000a900460030b840193508b60010160049054906101000a900463ffffffff1660030b8460030b13156109a5578b60000160018d60000180549050038154811015156108c957fe5b90600052602060002090600202016000808201600090556001820160006101000a81549063ffffffff02191690556001820160046101000a81549063ffffffff0219169055505086151561093f57848c60010160006101000a81548163ffffffff021916908363ffffffff160217905550610963565b848160010160046101000a81548163ffffffff021916908363ffffffff1602179055505b60018c60010160088282829054906101000a900463ffffffff160192506101000a81548163ffffffff021916908363ffffffff160217905550600097506109f0565b8192508b6000018260010160049054906101000a900463ffffffff1663ffffffff168154811015156109d357fe5b906000526020600020906002020191506001156109ef57610750565b5b50505050505050949350505050565b85876005019080519060200190610a17929190610da7565b5084876007019080519060200190610a30929190610da7565b5083876006019080519060200190610a49929190610da7565b50828760010181905550818760090160010160046101000a81548163ffffffff021916908363ffffffff1602179055508087600401816000191690555050505050505050565b60008160010160089054906101000a900463ffffffff1663ffffffff168260000180549050039050919050565b816000018054806001018281610ad29190610d75565b9160005260206000209060020201600060606040519081016040528060008152602001600060030b8152602001600063ffffffff1681525090919091506000820151816000015560208201518160010160006101000a81548163ffffffff021916908360030b63ffffffff16021790555060408201518160010160046101000a81548163ffffffff021916908363ffffffff160217905550505050816000018054806001018281610b839190610d75565b9160005260206000209060020201600060606040519081016040528060008152602001600060030b8152602001600063ffffffff1681525090919091506000820151816000015560208201518160010160006101000a81548163ffffffff021916908360030b63ffffffff16021790555060408201518160010160046101000a81548163ffffffff021916908363ffffffff16021790555050505060018260010160006101000a81548163ffffffff021916908363ffffffff160217905550808260010160046101000a81548163ffffffff021916908363ffffffff16021790555060008260010160086101000a81548163ffffffff021916908363ffffffff1602179055505050565b86886005019080519060200190610ca5929190610da7565b5085886007019080519060200190610cbe929190610da7565b5084886006019080519060200190610cd7929190610da7565b508088600401816000191690555060018860000160006101000a81548160ff02191690831515021790555060018860000160016101000a81548160ff02191690831515021790555060008860020181905550838860000160026101000a81548163ffffffff021916908363ffffffff160217905550828860010181905550438860030181905550610d6b8860090183610abc565b5050505050505050565b815481835581811511610da257600202816002028360005260206000209182019101610da19190610e27565b5b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610de857805160ff1916838001178555610e16565b82800160010185558215610e16579182015b82811115610e15578251825591602001919060010190610dfa565b5b509050610e239190610e7c565b5090565b610e7991905b80821115610e75576000808201600090556001820160006101000a81549063ffffffff02191690556001820160046101000a81549063ffffffff021916905550600201610e2d565b5090565b90565b610e9e91905b80821115610e9a576000816000905550600101610e82565b5090565b905600a165627a7a72305820c67e1f08b6b1aa541f75fab02520ee0c75c55286815eedd725f700b1ab993e2f0029", + "devdoc": { + "methods": {} + }, + "direct_dependencies": [], + "full_dependencies": [], + "linkrefs": [], + "linkrefs_runtime": [], + "metadata": { + "compiler": { + "version": "0.4.17+commit.b9e4d5b6" + }, + "language": "Solidity", + "output": { + "abi": [ + { + "constant": true, + "inputs": [ + { + "name": "self", + "type": "Library.intervalNode storage" + }, + { + "name": "index", + "type": "uint32" + } + ], + "name": "printIndex", + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "int32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "self", + "type": "Library.intervalNode storage" + }, + { + "name": "startTime", + "type": "uint256" + }, + { + "name": "endTime", + "type": "uint256" + }, + { + "name": "coreNum", + "type": "int32" + } + ], + "name": "receiptCheck", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "self", + "type": "Library.data storage" + }, + { + "name": "clusterName", + "type": "string" + }, + { + "name": "fID", + "type": "string" + }, + { + "name": "clusterMiniLockId", + "type": "string" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "coreNumber", + "type": "uint32" + }, + { + "name": "ipfsID", + "type": "bytes32" + } + ], + "name": "update", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "self", + "type": "Library.intervalNode storage" + } + ], + "name": "getReceiptListSize", + "outputs": [ + { + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "self", + "type": "Library.intervalNode storage" + }, + { + "name": "coreNum", + "type": "uint32" + } + ], + "name": "constructReceiptList", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "self", + "type": "Library.data storage" + }, + { + "name": "name", + "type": "string" + }, + { + "name": "fID", + "type": "string" + }, + { + "name": "miniLockId", + "type": "string" + }, + { + "name": "memLen", + "type": "uint32" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "coreNumber", + "type": "uint32" + }, + { + "name": "ipfsID", + "type": "bytes32" + } + ], + "name": "constructCluster", + "outputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + } + ], + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } + }, + "settings": { + "compilationTarget": { + "contracts/Library.sol": "Library" + }, + "libraries": {}, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "remappings": [] + }, + "sources": { + "contracts/Library.sol": { + "keccak256": "0xa0399a0dd8764b955a0a6ec083ed36fa1a13ec02dc29d64edd81955990a14fcb", + "urls": [ + "bzzr://792207dd5a1b3f5f07f425f5f3704ad07ececf8384fb08146ef6d8aef56eb070" + ] + } + }, + "version": 1 + }, + "name": "Library", + "ordered_full_dependencies": [], + "source_path": "contracts/Library.sol", + "userdoc": { + "methods": {} + } + }, + "eBlocBroker": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "coreNumber", + "type": "uint32" + }, + { + "name": "clusterName", + "type": "string" + }, + { + "name": "fID", + "type": "string" + }, + { + "name": "miniLockId", + "type": "string" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "ipfsID", + "type": "bytes32" + } + ], + "name": "updateCluster", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "jobKey", + "type": "string" + }, + { + "name": "index", + "type": "uint256" + } + ], + "name": "getJobInfo", + "outputs": [ + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "uint32" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "jobKey", + "type": "string" + }, + { + "name": "core", + "type": "uint32" + }, + { + "name": "jobDesc", + "type": "string" + }, + { + "name": "coreMinuteGas", + "type": "uint32" + }, + { + "name": "storageType", + "type": "uint8" + }, + { + "name": "miniLockId", + "type": "string" + } + ], + "name": "submitJob", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + } + ], + "name": "getClusterReceivedAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "jobKey", + "type": "string" + }, + { + "name": "index", + "type": "uint32" + }, + { + "name": "jobRunTimeMinute", + "type": "uint32" + }, + { + "name": "ipfsHashOut", + "type": "string" + }, + { + "name": "storageType", + "type": "uint8" + }, + { + "name": "endTime", + "type": "uint256" + } + ], + "name": "receiptCheck", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + } + ], + "name": "getClusterReceiptSize", + "outputs": [ + { + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "coreNumber", + "type": "uint32" + }, + { + "name": "clusterName", + "type": "string" + }, + { + "name": "fID", + "type": "string" + }, + { + "name": "miniLockId", + "type": "string" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "ipfsID", + "type": "bytes32" + } + ], + "name": "registerCluster", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getClusterAddresses", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getDeployedBlockNumber", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + } + ], + "name": "getClusterInfo", + "outputs": [ + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deregisterCluster", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "index", + "type": "uint32" + } + ], + "name": "getClusterReceiptNode", + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "int32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + } + ], + "name": "isClusterExist", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "jobKey", + "type": "string" + } + ], + "name": "getJobSize", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "jobKey", + "type": "string" + }, + { + "name": "index", + "type": "uint32" + }, + { + "name": "stateId", + "type": "uint8" + }, + { + "name": "startTime", + "type": "uint256" + } + ], + "name": "setJobStatus", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "jobKey", + "type": "string" + }, + { + "name": "index", + "type": "uint32" + } + ], + "name": "refund", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "cluster", + "type": "address" + }, + { + "indexed": false, + "name": "jobKey", + "type": "string" + }, + { + "indexed": false, + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "name": "storageType", + "type": "uint8" + }, + { + "indexed": false, + "name": "miniLockId", + "type": "string" + }, + { + "indexed": false, + "name": "desc", + "type": "string" + } + ], + "name": "LogJob", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "cluster", + "type": "address" + }, + { + "indexed": false, + "name": "jobKey", + "type": "string" + }, + { + "indexed": false, + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "name": "recieved", + "type": "uint256" + }, + { + "indexed": false, + "name": "returned", + "type": "uint256" + }, + { + "indexed": false, + "name": "endTime", + "type": "uint256" + }, + { + "indexed": false, + "name": "ipfsHashOut", + "type": "string" + }, + { + "indexed": false, + "name": "storageType", + "type": "uint8" + } + ], + "name": "LogReceipt", + "type": "event" + } + ], + "bytecode": "0x6060604052341561000f57600080fd5b43600081905550612f74806100256000396000f300606060405236156100e4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630ed93b7f146100e957806312879bd6146102095780631d49114e146102d75780633355e7711461041057806336a9d00e1461045d5780635a742da9146105485780637dfd5be3146105a15780638cd728c9146106c157806394e150e71461072b578063a318b70f14610754578063a6084957146108fb578063bb69a70914610928578063d7e8916d14610991578063e28a2a94146109e2578063eb84d50914610a72578063fe55ba3514610b0b575b600080fd5b34156100f457600080fd5b6101ef600480803563ffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803560001916906020019091905050610bae565b604051808215151515815260200191505060405180910390f35b341561021457600080fd5b61028c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091908035906020019091905050610def565b604051808760ff1660ff1681526020018663ffffffff1663ffffffff168152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b6103f6600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803560ff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061100d565b604051808215151515815260200191505060405180910390f35b341561041b57600080fd5b610447600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061154e565b6040518082815260200191505060405180910390f35b341561046857600080fd5b61052e600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803563ffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803560ff1690602001909190803590602001909190505061159a565b604051808215151515815260200191505060405180910390f35b341561055357600080fd5b61057f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b8b565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b34156105ac57600080fd5b6106a7600480803563ffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803560001916906020019091905050611c65565b604051808215151515815260200191505060405180910390f35b34156106cc57600080fd5b6106d4612218565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107175780820151818401526020810190506106fc565b505050509050019250505060405180910390f35b341561073657600080fd5b61073e6122ac565b6040518082815260200191505060405180910390f35b341561075f57600080fd5b61078b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506122b5565b60405180806020018060200180602001878152602001868152602001856000191660001916815260200184810384528a818151815260200191508051906020019080838360005b838110156107ed5780820151818401526020810190506107d2565b50505050905090810190601f16801561081a5780820380516001836020036101000a031916815260200191505b50848103835289818151815260200191508051906020019080838360005b83811015610853578082015181840152602081019050610838565b50505050905090810190601f1680156108805780820380516001836020036101000a031916815260200191505b50848103825288818151815260200191508051906020019080838360005b838110156108b957808201518184015260208101905061089e565b50505050905090810190601f1680156108e65780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390f35b341561090657600080fd5b61090e612666565b604051808215151515815260200191505060405180910390f35b341561093357600080fd5b61096e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803563ffffffff1690602001909190505061275f565b604051808381526020018260030b60030b81526020019250505060405180910390f35b341561099c57600080fd5b6109c8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612857565b604051808215151515815260200191505060405180910390f35b34156109ed57600080fd5b610a5c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506128c1565b6040518082815260200191505060405180910390f35b3415610a7d57600080fd5b610af1600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803560ff169060200190919080359060200190919050506129d5565b604051808215151515815260200191505060405180910390f35b3415610b1657600080fd5b610b94600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff16906020019091905050612b22565b604051808215151515815260200191505060405180910390f35b6000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073__contracts/Library.sol:Library_________635b8a773f9091888888888d896040518863ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808881526020018060200180602001806020018781526020018663ffffffff1663ffffffff168152602001856000191660001916815260200184810384528a818151815260200191508051906020019080838360005b83811015610cb0578082015181840152602081019050610c95565b50505050905090810190601f168015610cdd5780820380516001836020036101000a031916815260200191505b50848103835289818151815260200191508051906020019080838360005b83811015610d16578082015181840152602081019050610cfb565b50505050905090810190601f168015610d435780820380516001836020036101000a031916815260200191505b50848103825288818151815260200191508051906020019080838360005b83811015610d7c578082015181840152602081019050610d61565b50505050905090810190601f168015610da95780820380516001836020036101000a031916815260200191505b509a505050505050505050505060006040518083038186803b1515610dcd57600080fd5b6102c65a03f41515610dde57600080fd5b505050600190509695505050505050565b600080600080600080610e00612d7c565b600d60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600801896040518082805190602001908083835b602083101515610e785780518252602082019150602081019050602083039250610e53565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902088815481101515610eb857fe5b906000526020600020906005020161010060405190810160405290816000820160009054906101000a900460ff1660ff1660ff168152602001600182015481526020016002820160009054906101000a900460ff161515151581526020016002820160019054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016002820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016002820160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815260200160048201548152505090508060000151816080015182602001518360e001518460c0015185606001518063ffffffff1690509650965096509650965096505093975093979195509350565b600080848460008263ffffffff16148061102e57506105a08263ffffffff16115b15801561103e575060048160ff16105b151561104957600080fd5b8860008163ffffffff161415151561106057600080fd5b600d60008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002093508963ffffffff168863ffffffff16856001015402023410806110d257508360000160019054906101000a900460ff16155b806110ff57508360090160010160049054906101000a900463ffffffff1663ffffffff168a63ffffffff16115b1561110957600080fd5b836008018b6040518082805190602001908083835b602083101515611143578051825260208201915060208101905060208303925061111e565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902080548060010182816111889190612de9565b9160005260206000209060050201600061010060405190810160405280600260038111156111b257fe5b60ff168152602001600081526020016000151581526020018c63ffffffff1681526020018e63ffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018860010154815260200134815250909190915060008201518160000160006101000a81548160ff021916908360ff1602179055506020820151816001015560408201518160020160006101000a81548160ff02191690831515021790555060608201518160020160016101000a81548163ffffffff021916908363ffffffff16021790555060808201518160020160056101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160020160096101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c0820151816003015560e082015181600401555050507f780c34c5752a59a12b51aa606e062fff2b443dd98a4689f02e2f25e32884bb5f8c8c6001876008018f6040518082805190602001908083835b6020831015156113675780518252602082019150602081019050602083039250611342565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902080549050038a8a8e604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018681526020018560ff1660ff1681526020018060200180602001848103845289818151815260200191508051906020019080838360005b8381101561142e578082015181840152602081019050611413565b50505050905090810190601f16801561145b5780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019080838360005b83811015611494578082015181840152602081019050611479565b50505050905090810190601f1680156114c15780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b838110156114fa5780820151818401526020810190506114df565b50505050905090810190601f1680156115275780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a16001945050505050979650505050505050565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201549050919050565b600080600080844281111515156115b057600080fd5b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206008018b6040518082805190602001908083835b6020831015156116285780518252602082019150602081019050602083039250611603565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208a63ffffffff1681548110151561166e57fe5b90600052602060002090600502019350836004015492508360020160059054906101000a900463ffffffff1663ffffffff168963ffffffff16856003015402029150828211806116cc57508360020160009054906101000a900460ff165b156116d657600080fd5b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060090173__contracts/Library.sol:Library_________6311a8894a90918660010154898860020160059054906101000a900463ffffffff166000604051602001526040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018481526020018381526020018260030b60030b815260200194505050505060206040518083038186803b15156117c257600080fd5b6102c65a03f415156117d357600080fd5b50505060405180519050151561186d5760018460020160006101000a81548160ff0219169083151502179055508360020160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f19350505050151561186457600080fd5b60009450611b7d565b81600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008282540192505081905550600160038111156118ca57fe5b8460000160006101000a81548160ff021916908360ff16021790555060018460020160006101000a81548160ff0219169083151502179055507fc8112e3bb1670320064af6c9fb641efd71df7a65190620e2bdb041798e6f1cdc338c8c8760020160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff168860040154878903428f8f604051808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018963ffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001878152602001868152602001858152602001806020018460ff1660ff16815260200183810383528b818151815260200191508051906020019080838360005b83811015611a29578082015181840152602081019050611a0e565b50505050905090810190601f168015611a565780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015611a8f578082015181840152602081019050611a74565b50505050905090810190601f168015611abc5780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501515611b1257600080fd5b8360020160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8385039081150290604051600060405180830381858888f193505050501515611b7857600080fd5b600194505b505050509695505050505050565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060090173__contracts/Library.sol:Library_________636822911890916000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505060206040518083038186803b1515611c4357600080fd5b6102c65a03f41515611c5457600080fd5b505050604051805190509050919050565b600080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff168015611cd557508060000160019054906101000a900460ff165b15611cdf57600080fd5b8060000160009054906101000a900460ff168015611d0c57508060000160019054906101000a900460ff16155b15611f995733600c8260000160029054906101000a900463ffffffff1663ffffffff16815481101515611d3b57fe5b906000526020600020900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073__contracts/Library.sol:Library_________635b8a773f9091898989898e8a6040518863ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808881526020018060200180602001806020018781526020018663ffffffff1663ffffffff168152602001856000191660001916815260200184810384528a818151815260200191508051906020019080838360005b83811015611e46578082015181840152602081019050611e2b565b50505050905090810190601f168015611e735780820380516001836020036101000a031916815260200191505b50848103835289818151815260200191508051906020019080838360005b83811015611eac578082015181840152602081019050611e91565b50505050905090810190601f168015611ed95780820380516001836020036101000a031916815260200191505b50848103825288818151815260200191508051906020019080838360005b83811015611f12578082015181840152602081019050611ef7565b50505050905090810190601f168015611f3f5780820380516001836020036101000a031916815260200191505b509a505050505050505050505060006040518083038186803b1515611f6357600080fd5b6102c65a03f41515611f7457600080fd5b50505060018160000160016101000a81548160ff021916908315150217905550612209565b8073__contracts/Library.sol:Library_________63b2116c879091898989600c805490508a8f8b6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018060200180602001806020018863ffffffff1663ffffffff1681526020018781526020018663ffffffff1663ffffffff168152602001856000191660001916815260200184810384528b818151815260200191508051906020019080838360005b83811015612073578082015181840152602081019050612058565b50505050905090810190601f1680156120a05780820380516001836020036101000a031916815260200191505b5084810383528a818151815260200191508051906020019080838360005b838110156120d95780820151818401526020810190506120be565b50505050905090810190601f1680156121065780820380516001836020036101000a031916815260200191505b50848103825289818151815260200191508051906020019080838360005b8381101561213f578082015181840152602081019050612124565b50505050905090810190601f16801561216c5780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060006040518083038186803b151561219157600080fd5b6102c65a03f415156121a257600080fd5b505050600c80548060010182816121b99190612e1b565b9160005260206000209001600033909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b60019150509695505050505050565b612220612e47565b600c8054806020026020016040519081016040528092919081815260200182805480156122a257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612258575b5050505050905090565b60008054905090565b6122bd612e5b565b6122c5612e5b565b6122cd612e5b565b6000806000600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600501600d60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600701600d60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600601600d60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060090160010160049054906101000a900463ffffffff16600d60008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600d60008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040154858054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125095780601f106124de57610100808354040283529160200191612509565b820191906000526020600020905b8154815290600101906020018083116124ec57829003601f168201915b50505050509550848054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125a55780601f1061257a576101008083540402835291602001916125a5565b820191906000526020600020905b81548152906001019060200180831161258857829003601f168201915b50505050509450838054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126415780601f1061261657610100808354040283529160200191612641565b820191906000526020600020905b81548152906001019060200180831161262457829003601f168201915b505050505093508263ffffffff16925095509550955095509550955091939550919395565b6000600c600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160029054906101000a900463ffffffff1663ffffffff168154811015156126cf57fe5b906000526020600020900160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160016101000a81548160ff0219169083151502179055506001905090565b600080600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060090173__contracts/Library.sol:Library_________630d71749f9091856000604051604001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018263ffffffff1663ffffffff16815260200192505050604080518083038186803b151561282b57600080fd5b6102c65a03f4151561283c57600080fd5b50505060405180519060200180519050915091509250929050565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156128b757600190506128bc565b600090505b919050565b6000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561291e57600080fd5b600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600801826040518082805190602001908083835b6020831015156129965780518252602082019150602081019050602083039250612971565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902080549050905092915050565b600080824281111515156129e857600080fd5b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600801876040518082805190602001908083835b602083101515612a605780518252602082019150602081019050602083039250612a3b565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208663ffffffff16815481101515612aa657fe5b906000526020600020906005020191508160020160009054906101000a900460ff1680612ad65750600f8560ff16115b15612ae057600080fd5b60008560ff16141515612b1457848260000160006101000a81548160ff021916908360ff1602179055508382600101819055505b600192505050949350505050565b600080600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600801846040518082805190602001908083835b602083101515612b9d5780518252602082019150602081019050602083039250612b78565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208363ffffffff16815481101515612be357fe5b906000526020600020906005020190508060020160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580612c6057508060020160009054906101000a900460ff165b15612c6a57600080fd5b60026003811115612c7757fe5b60ff168160000160009054906101000a900460ff1660ff161415612cde573373ffffffffffffffffffffffffffffffffffffffff166108fc82600401549081150290604051600060405180830381858888f193505050501515612cd957600080fd5b612d53565b610258603c8260020160019054906101000a900463ffffffff16020163ffffffff16816001015442031115612d52573373ffffffffffffffffffffffffffffffffffffffff166108fc82600401549081150290604051600060405180830381858888f193505050501515612d5157600080fd5b5b5b60018160020160006101000a81548160ff02191690831515021790555060019150509392505050565b61010060405190810160405280600060ff16815260200160008152602001600015158152602001600063ffffffff168152602001600063ffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b815481835581811511612e1657600502816005028360005260206000209182019101612e159190612e6f565b5b505050565b815481835581811511612e4257818360005260206000209182019101612e419190612f23565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b612f2091905b80821115612f1c57600080820160006101000a81549060ff021916905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549063ffffffff02191690556002820160056101000a81549063ffffffff02191690556002820160096101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160009055600482016000905550600501612e75565b5090565b90565b612f4591905b80821115612f41576000816000905550600101612f29565b5090565b905600a165627a7a72305820e6340096f63ea5eb0b3df1bf8ed299807496841a5ebd5652678910bb2b0912690029", + "bytecode_runtime": "0x606060405236156100e4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630ed93b7f146100e957806312879bd6146102095780631d49114e146102d75780633355e7711461041057806336a9d00e1461045d5780635a742da9146105485780637dfd5be3146105a15780638cd728c9146106c157806394e150e71461072b578063a318b70f14610754578063a6084957146108fb578063bb69a70914610928578063d7e8916d14610991578063e28a2a94146109e2578063eb84d50914610a72578063fe55ba3514610b0b575b600080fd5b34156100f457600080fd5b6101ef600480803563ffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803560001916906020019091905050610bae565b604051808215151515815260200191505060405180910390f35b341561021457600080fd5b61028c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091908035906020019091905050610def565b604051808760ff1660ff1681526020018663ffffffff1663ffffffff168152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b6103f6600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803560ff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061100d565b604051808215151515815260200191505060405180910390f35b341561041b57600080fd5b610447600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061154e565b6040518082815260200191505060405180910390f35b341561046857600080fd5b61052e600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803563ffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803560ff1690602001909190803590602001909190505061159a565b604051808215151515815260200191505060405180910390f35b341561055357600080fd5b61057f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b8b565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b34156105ac57600080fd5b6106a7600480803563ffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803560001916906020019091905050611c65565b604051808215151515815260200191505060405180910390f35b34156106cc57600080fd5b6106d4612218565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156107175780820151818401526020810190506106fc565b505050509050019250505060405180910390f35b341561073657600080fd5b61073e6122ac565b6040518082815260200191505060405180910390f35b341561075f57600080fd5b61078b600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506122b5565b60405180806020018060200180602001878152602001868152602001856000191660001916815260200184810384528a818151815260200191508051906020019080838360005b838110156107ed5780820151818401526020810190506107d2565b50505050905090810190601f16801561081a5780820380516001836020036101000a031916815260200191505b50848103835289818151815260200191508051906020019080838360005b83811015610853578082015181840152602081019050610838565b50505050905090810190601f1680156108805780820380516001836020036101000a031916815260200191505b50848103825288818151815260200191508051906020019080838360005b838110156108b957808201518184015260208101905061089e565b50505050905090810190601f1680156108e65780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390f35b341561090657600080fd5b61090e612666565b604051808215151515815260200191505060405180910390f35b341561093357600080fd5b61096e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803563ffffffff1690602001909190505061275f565b604051808381526020018260030b60030b81526020019250505060405180910390f35b341561099c57600080fd5b6109c8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612857565b604051808215151515815260200191505060405180910390f35b34156109ed57600080fd5b610a5c600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506128c1565b6040518082815260200191505060405180910390f35b3415610a7d57600080fd5b610af1600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff1690602001909190803560ff169060200190919080359060200190919050506129d5565b604051808215151515815260200191505060405180910390f35b3415610b1657600080fd5b610b94600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803563ffffffff16906020019091905050612b22565b604051808215151515815260200191505060405180910390f35b6000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073__contracts/Library.sol:Library_________635b8a773f9091888888888d896040518863ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808881526020018060200180602001806020018781526020018663ffffffff1663ffffffff168152602001856000191660001916815260200184810384528a818151815260200191508051906020019080838360005b83811015610cb0578082015181840152602081019050610c95565b50505050905090810190601f168015610cdd5780820380516001836020036101000a031916815260200191505b50848103835289818151815260200191508051906020019080838360005b83811015610d16578082015181840152602081019050610cfb565b50505050905090810190601f168015610d435780820380516001836020036101000a031916815260200191505b50848103825288818151815260200191508051906020019080838360005b83811015610d7c578082015181840152602081019050610d61565b50505050905090810190601f168015610da95780820380516001836020036101000a031916815260200191505b509a505050505050505050505060006040518083038186803b1515610dcd57600080fd5b6102c65a03f41515610dde57600080fd5b505050600190509695505050505050565b600080600080600080610e00612d7c565b600d60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600801896040518082805190602001908083835b602083101515610e785780518252602082019150602081019050602083039250610e53565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902088815481101515610eb857fe5b906000526020600020906005020161010060405190810160405290816000820160009054906101000a900460ff1660ff1660ff168152602001600182015481526020016002820160009054906101000a900460ff161515151581526020016002820160019054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016002820160059054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016002820160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016003820154815260200160048201548152505090508060000151816080015182602001518360e001518460c0015185606001518063ffffffff1690509650965096509650965096505093975093979195509350565b600080848460008263ffffffff16148061102e57506105a08263ffffffff16115b15801561103e575060048160ff16105b151561104957600080fd5b8860008163ffffffff161415151561106057600080fd5b600d60008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002093508963ffffffff168863ffffffff16856001015402023410806110d257508360000160019054906101000a900460ff16155b806110ff57508360090160010160049054906101000a900463ffffffff1663ffffffff168a63ffffffff16115b1561110957600080fd5b836008018b6040518082805190602001908083835b602083101515611143578051825260208201915060208101905060208303925061111e565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902080548060010182816111889190612de9565b9160005260206000209060050201600061010060405190810160405280600260038111156111b257fe5b60ff168152602001600081526020016000151581526020018c63ffffffff1681526020018e63ffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018860010154815260200134815250909190915060008201518160000160006101000a81548160ff021916908360ff1602179055506020820151816001015560408201518160020160006101000a81548160ff02191690831515021790555060608201518160020160016101000a81548163ffffffff021916908363ffffffff16021790555060808201518160020160056101000a81548163ffffffff021916908363ffffffff16021790555060a08201518160020160096101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060c0820151816003015560e082015181600401555050507f780c34c5752a59a12b51aa606e062fff2b443dd98a4689f02e2f25e32884bb5f8c8c6001876008018f6040518082805190602001908083835b6020831015156113675780518252602082019150602081019050602083039250611342565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902080549050038a8a8e604051808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018681526020018560ff1660ff1681526020018060200180602001848103845289818151815260200191508051906020019080838360005b8381101561142e578082015181840152602081019050611413565b50505050905090810190601f16801561145b5780820380516001836020036101000a031916815260200191505b50848103835286818151815260200191508051906020019080838360005b83811015611494578082015181840152602081019050611479565b50505050905090810190601f1680156114c15780820380516001836020036101000a031916815260200191505b50848103825285818151815260200191508051906020019080838360005b838110156114fa5780820151818401526020810190506114df565b50505050905090810190601f1680156115275780820380516001836020036101000a031916815260200191505b50995050505050505050505060405180910390a16001945050505050979650505050505050565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201549050919050565b600080600080844281111515156115b057600080fd5b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206008018b6040518082805190602001908083835b6020831015156116285780518252602082019150602081019050602083039250611603565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208a63ffffffff1681548110151561166e57fe5b90600052602060002090600502019350836004015492508360020160059054906101000a900463ffffffff1663ffffffff168963ffffffff16856003015402029150828211806116cc57508360020160009054906101000a900460ff165b156116d657600080fd5b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060090173__contracts/Library.sol:Library_________6311a8894a90918660010154898860020160059054906101000a900463ffffffff166000604051602001526040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808581526020018481526020018381526020018260030b60030b815260200194505050505060206040518083038186803b15156117c257600080fd5b6102c65a03f415156117d357600080fd5b50505060405180519050151561186d5760018460020160006101000a81548160ff0219169083151502179055508360020160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f19350505050151561186457600080fd5b60009450611b7d565b81600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160008282540192505081905550600160038111156118ca57fe5b8460000160006101000a81548160ff021916908360ff16021790555060018460020160006101000a81548160ff0219169083151502179055507fc8112e3bb1670320064af6c9fb641efd71df7a65190620e2bdb041798e6f1cdc338c8c8760020160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff168860040154878903428f8f604051808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001806020018963ffffffff1681526020018873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001878152602001868152602001858152602001806020018460ff1660ff16815260200183810383528b818151815260200191508051906020019080838360005b83811015611a29578082015181840152602081019050611a0e565b50505050905090810190601f168015611a565780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015611a8f578082015181840152602081019050611a74565b50505050905090810190601f168015611abc5780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060405180910390a13373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501515611b1257600080fd5b8360020160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8385039081150290604051600060405180830381858888f193505050501515611b7857600080fd5b600194505b505050509695505050505050565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060090173__contracts/Library.sol:Library_________636822911890916000604051602001526040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082815260200191505060206040518083038186803b1515611c4357600080fd5b6102c65a03f41515611c5457600080fd5b505050604051805190509050919050565b600080600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff168015611cd557508060000160019054906101000a900460ff165b15611cdf57600080fd5b8060000160009054906101000a900460ff168015611d0c57508060000160019054906101000a900460ff16155b15611f995733600c8260000160029054906101000a900463ffffffff1663ffffffff16815481101515611d3b57fe5b906000526020600020900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073__contracts/Library.sol:Library_________635b8a773f9091898989898e8a6040518863ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808881526020018060200180602001806020018781526020018663ffffffff1663ffffffff168152602001856000191660001916815260200184810384528a818151815260200191508051906020019080838360005b83811015611e46578082015181840152602081019050611e2b565b50505050905090810190601f168015611e735780820380516001836020036101000a031916815260200191505b50848103835289818151815260200191508051906020019080838360005b83811015611eac578082015181840152602081019050611e91565b50505050905090810190601f168015611ed95780820380516001836020036101000a031916815260200191505b50848103825288818151815260200191508051906020019080838360005b83811015611f12578082015181840152602081019050611ef7565b50505050905090810190601f168015611f3f5780820380516001836020036101000a031916815260200191505b509a505050505050505050505060006040518083038186803b1515611f6357600080fd5b6102c65a03f41515611f7457600080fd5b50505060018160000160016101000a81548160ff021916908315150217905550612209565b8073__contracts/Library.sol:Library_________63b2116c879091898989600c805490508a8f8b6040518963ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808981526020018060200180602001806020018863ffffffff1663ffffffff1681526020018781526020018663ffffffff1663ffffffff168152602001856000191660001916815260200184810384528b818151815260200191508051906020019080838360005b83811015612073578082015181840152602081019050612058565b50505050905090810190601f1680156120a05780820380516001836020036101000a031916815260200191505b5084810383528a818151815260200191508051906020019080838360005b838110156120d95780820151818401526020810190506120be565b50505050905090810190601f1680156121065780820380516001836020036101000a031916815260200191505b50848103825289818151815260200191508051906020019080838360005b8381101561213f578082015181840152602081019050612124565b50505050905090810190601f16801561216c5780820380516001836020036101000a031916815260200191505b509b50505050505050505050505060006040518083038186803b151561219157600080fd5b6102c65a03f415156121a257600080fd5b505050600c80548060010182816121b99190612e1b565b9160005260206000209001600033909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505b60019150509695505050505050565b612220612e47565b600c8054806020026020016040519081016040528092919081815260200182805480156122a257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612258575b5050505050905090565b60008054905090565b6122bd612e5b565b6122c5612e5b565b6122cd612e5b565b6000806000600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600501600d60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600701600d60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600601600d60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060090160010160049054906101000a900463ffffffff16600d60008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154600d60008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040154858054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125095780601f106124de57610100808354040283529160200191612509565b820191906000526020600020905b8154815290600101906020018083116124ec57829003601f168201915b50505050509550848054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156125a55780601f1061257a576101008083540402835291602001916125a5565b820191906000526020600020905b81548152906001019060200180831161258857829003601f168201915b50505050509450838054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126415780601f1061261657610100808354040283529160200191612641565b820191906000526020600020905b81548152906001019060200180831161262457829003601f168201915b505050505093508263ffffffff16925095509550955095509550955091939550919395565b6000600c600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160029054906101000a900463ffffffff1663ffffffff168154811015156126cf57fe5b906000526020600020900160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160016101000a81548160ff0219169083151502179055506001905090565b600080600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060090173__contracts/Library.sol:Library_________630d71749f9091856000604051604001526040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808381526020018263ffffffff1663ffffffff16815260200192505050604080518083038186803b151561282b57600080fd5b6102c65a03f4151561283c57600080fd5b50505060405180519060200180519050915091509250929050565b6000600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16156128b757600190506128bc565b600090505b919050565b6000600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151561291e57600080fd5b600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600801826040518082805190602001908083835b6020831015156129965780518252602082019150602081019050602083039250612971565b6001836020036101000a038019825116818451168082178552505050505050905001915050908152602001604051809103902080549050905092915050565b600080824281111515156129e857600080fd5b600d60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600801876040518082805190602001908083835b602083101515612a605780518252602082019150602081019050602083039250612a3b565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208663ffffffff16815481101515612aa657fe5b906000526020600020906005020191508160020160009054906101000a900460ff1680612ad65750600f8560ff16115b15612ae057600080fd5b60008560ff16141515612b1457848260000160006101000a81548160ff021916908360ff1602179055508382600101819055505b600192505050949350505050565b600080600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600801846040518082805190602001908083835b602083101515612b9d5780518252602082019150602081019050602083039250612b78565b6001836020036101000a03801982511681845116808217855250505050505090500191505090815260200160405180910390208363ffffffff16815481101515612be357fe5b906000526020600020906005020190508060020160099054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141580612c6057508060020160009054906101000a900460ff165b15612c6a57600080fd5b60026003811115612c7757fe5b60ff168160000160009054906101000a900460ff1660ff161415612cde573373ffffffffffffffffffffffffffffffffffffffff166108fc82600401549081150290604051600060405180830381858888f193505050501515612cd957600080fd5b612d53565b610258603c8260020160019054906101000a900463ffffffff16020163ffffffff16816001015442031115612d52573373ffffffffffffffffffffffffffffffffffffffff166108fc82600401549081150290604051600060405180830381858888f193505050501515612d5157600080fd5b5b5b60018160020160006101000a81548160ff02191690831515021790555060019150509392505050565b61010060405190810160405280600060ff16815260200160008152602001600015158152602001600063ffffffff168152602001600063ffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152602001600081525090565b815481835581811511612e1657600502816005028360005260206000209182019101612e159190612e6f565b5b505050565b815481835581811511612e4257818360005260206000209182019101612e419190612f23565b5b505050565b602060405190810160405280600081525090565b602060405190810160405280600081525090565b612f2091905b80821115612f1c57600080820160006101000a81549060ff021916905560018201600090556002820160006101000a81549060ff02191690556002820160016101000a81549063ffffffff02191690556002820160056101000a81549063ffffffff02191690556002820160096101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556003820160009055600482016000905550600501612e75565b5090565b90565b612f4591905b80821115612f41576000816000905550600101612f29565b5090565b905600a165627a7a72305820e6340096f63ea5eb0b3df1bf8ed299807496841a5ebd5652678910bb2b0912690029", + "devdoc": { + "methods": {} + }, + "direct_dependencies": [ + "Library" + ], + "full_dependencies": [ + "Library" + ], + "linkrefs": [ + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 6188 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 11902 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 14316 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 15192 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 16258 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 20374 + } + ], + "linkrefs_runtime": [ + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 6114 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 11828 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 14242 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 15118 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 16184 + }, + { + "length": 40, + "name": "Library", + "source_path": "contracts/Library.sol", + "start": 20300 + } + ], + "metadata": { + "compiler": { + "version": "0.4.17+commit.b9e4d5b6" + }, + "language": "Solidity", + "output": { + "abi": [ + { + "constant": false, + "inputs": [ + { + "name": "coreNumber", + "type": "uint32" + }, + { + "name": "clusterName", + "type": "string" + }, + { + "name": "fID", + "type": "string" + }, + { + "name": "miniLockId", + "type": "string" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "ipfsID", + "type": "bytes32" + } + ], + "name": "updateCluster", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "jobKey", + "type": "string" + }, + { + "name": "index", + "type": "uint256" + } + ], + "name": "getJobInfo", + "outputs": [ + { + "name": "", + "type": "uint8" + }, + { + "name": "", + "type": "uint32" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "jobKey", + "type": "string" + }, + { + "name": "core", + "type": "uint32" + }, + { + "name": "jobDesc", + "type": "string" + }, + { + "name": "coreMinuteGas", + "type": "uint32" + }, + { + "name": "storageType", + "type": "uint8" + }, + { + "name": "miniLockId", + "type": "string" + } + ], + "name": "submitJob", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": true, + "stateMutability": "payable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + } + ], + "name": "getClusterReceivedAmount", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "jobKey", + "type": "string" + }, + { + "name": "index", + "type": "uint32" + }, + { + "name": "jobRunTimeMinute", + "type": "uint32" + }, + { + "name": "ipfsHashOut", + "type": "string" + }, + { + "name": "storageType", + "type": "uint8" + }, + { + "name": "endTime", + "type": "uint256" + } + ], + "name": "receiptCheck", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + } + ], + "name": "getClusterReceiptSize", + "outputs": [ + { + "name": "", + "type": "uint32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "coreNumber", + "type": "uint32" + }, + { + "name": "clusterName", + "type": "string" + }, + { + "name": "fID", + "type": "string" + }, + { + "name": "miniLockId", + "type": "string" + }, + { + "name": "price", + "type": "uint256" + }, + { + "name": "ipfsID", + "type": "bytes32" + } + ], + "name": "registerCluster", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getClusterAddresses", + "outputs": [ + { + "name": "", + "type": "address[]" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "getDeployedBlockNumber", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + } + ], + "name": "getClusterInfo", + "outputs": [ + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "string" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "bytes32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [], + "name": "deregisterCluster", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "index", + "type": "uint32" + } + ], + "name": "getClusterReceiptNode", + "outputs": [ + { + "name": "", + "type": "uint256" + }, + { + "name": "", + "type": "int32" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + } + ], + "name": "isClusterExist", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "jobKey", + "type": "string" + } + ], + "name": "getJobSize", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "jobKey", + "type": "string" + }, + { + "name": "index", + "type": "uint32" + }, + { + "name": "stateId", + "type": "uint8" + }, + { + "name": "startTime", + "type": "uint256" + } + ], + "name": "setJobStatus", + "outputs": [ + { + "name": "success", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "clusterAddr", + "type": "address" + }, + { + "name": "jobKey", + "type": "string" + }, + { + "name": "index", + "type": "uint32" + } + ], + "name": "refund", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "payable": false, + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "cluster", + "type": "address" + }, + { + "indexed": false, + "name": "jobKey", + "type": "string" + }, + { + "indexed": false, + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "name": "storageType", + "type": "uint8" + }, + { + "indexed": false, + "name": "miniLockId", + "type": "string" + }, + { + "indexed": false, + "name": "desc", + "type": "string" + } + ], + "name": "LogJob", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "name": "cluster", + "type": "address" + }, + { + "indexed": false, + "name": "jobKey", + "type": "string" + }, + { + "indexed": false, + "name": "index", + "type": "uint256" + }, + { + "indexed": false, + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "name": "recieved", + "type": "uint256" + }, + { + "indexed": false, + "name": "returned", + "type": "uint256" + }, + { + "indexed": false, + "name": "endTime", + "type": "uint256" + }, + { + "indexed": false, + "name": "ipfsHashOut", + "type": "string" + }, + { + "indexed": false, + "name": "storageType", + "type": "uint8" + } + ], + "name": "LogReceipt", + "type": "event" + } + ], + "devdoc": { + "methods": {} + }, + "userdoc": { + "methods": {} + } + }, + "settings": { + "compilationTarget": { + "contracts/eBlocBroker.sol": "eBlocBroker" + }, + "libraries": {}, + "optimizer": { + "enabled": false, + "runs": 200 + }, + "remappings": [] + }, + "sources": { + "contracts/Library.sol": { + "keccak256": "0xa0399a0dd8764b955a0a6ec083ed36fa1a13ec02dc29d64edd81955990a14fcb", + "urls": [ + "bzzr://792207dd5a1b3f5f07f425f5f3704ad07ececf8384fb08146ef6d8aef56eb070" + ] + }, + "contracts/eBlocBroker.sol": { + "keccak256": "0x5b623c82f20f78c152ec590d8089fbeba8904369111aaedd8871baeac3432c34", + "urls": [ + "bzzr://affd4f2d4ea2f740be6866eb581ed6f441781b9cfc850ccf20997ccb9f037ffa" + ] + } + }, + "version": 1 + }, + "name": "eBlocBroker", + "ordered_full_dependencies": [ + "Library" + ], + "source_path": "contracts/eBlocBroker.sol", + "userdoc": { + "methods": {} + } + } +} \ No newline at end of file diff --git a/contract/.cache/v/populus/project/compiled_contracts_mtime b/contract/.cache/v/populus/project/compiled_contracts_mtime new file mode 100644 index 00000000..2153d897 --- /dev/null +++ b/contract/.cache/v/populus/project/compiled_contracts_mtime @@ -0,0 +1 @@ +1520698158.4366739 \ No newline at end of file diff --git a/contractCalls/getJobInfo.py b/contractCalls/getJobInfo.py index b3c8717a..564c877e 100644 --- a/contractCalls/getJobInfo.py +++ b/contractCalls/getJobInfo.py @@ -33,7 +33,7 @@ def ipfsBytesToString(ipfsID): else: clusterAddress = "0x6af0204187a93710317542d383a1b547fa42e705"; jobKey = "3d8e2dc2-b855-1036-807f-9dbd8c6b1579=267575587427153420186990249657380315186"; - index = 1; + index = 5; print(eBlocBroker.call().getJobInfo(clusterAddress, jobKey, index)); #} diff --git a/driverFunc.py b/driverFunc.py index 0c51d03a..c0bfcdf8 100755 --- a/driverFunc.py +++ b/driverFunc.py @@ -68,7 +68,7 @@ def driverEudatCall(jobKey, index): owner = jobKeyTemp[0] folderName = jobKeyTemp[1] - header = "var mylib = require('" + eblocPath + "/eBlocBrokerHeader.js')"; os.environ['header'] = header; + header = "var eBlocBroker = require('" + eblocPath + "/eBlocBrokerHeader.js')"; os.environ['header'] = header; f = open(eblocPath + '/eudatPassword.txt', 'r') # Password is read from the file. password.txt is have only user access password = f.read().rstrip('\n').replace(" ", ""); f.close() @@ -179,7 +179,7 @@ def driverIpfsCall(ipfsHash, index, ipfsType, miniLockId): else: os.environ['miniLockId'] = miniLockId - header = "var mylib = require('" + eblocPath + "/eBlocBrokerHeader.js')"; os.environ['header'] = header; + header = "var eBlocBroker = require('" + eblocPath + "/eBlocBrokerHeader.js')"; os.environ['header'] = header; logTest( "ipfsHash: " + ipfsHash); jobSavePath = ipfsHashes + '/' + ipfsHash + "_" + index; @@ -236,7 +236,7 @@ def driverIpfsCall(ipfsHash, index, ipfsType, miniLockId): os.system("cp run.sh ${ipfsHash}_${index}_${folderIndex}_${shareToken}_$miniLockId.sh"); - jobInfo = contractCall('echo "$header; console.log( \'\' + mylib.getJobInfo( \'$clusterID\', \'$ipfsHash\', \'$index\' ) )"'); + jobInfo = contractCall('echo "$header; console.log( \'\' + eBlocBroker.getJobInfo( \'$clusterID\', \'$ipfsHash\', \'$index\' ) )"'); jobInfo = jobInfo.split(','); jobCoreNum = jobInfo[1] diff --git a/eBlocBrokerHeader.js b/eBlocBrokerHeader.js index f9b8c2c8..16ab5f99 100755 --- a/eBlocBrokerHeader.js +++ b/eBlocBrokerHeader.js @@ -1,4 +1,4 @@ -var mylib = require('./contract.js'); +var eBlocBroker = require('./contract.js'); Web3 = require("web3"); web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); @@ -8,11 +8,12 @@ if(!web3.isConnected()){ process.exit(); } -var COINBASE="0xffffffffffffffffffffffffffffffffffffffff"; //Should be the address of the cluster. +//web3.eth.defaultAccount=web3.eth.accounts[0]; //check calismaya bilir. +var COINBASE="0x6af0204187a93710317542d383a1b547fa42e705"; //Should be the address of the cluster. web3.eth.defaultAccount = COINBASE; var whoami = web3.eth.defaultAccount; -var myContractInstance = web3.eth.contract(mylib.abi).at(mylib.address); +var myContractInstance = web3.eth.contract(eBlocBroker.abi).at(eBlocBroker.address); var blockNumber = web3.eth.blockNumber; var gasLimit = 4500000; @@ -37,8 +38,8 @@ job_state_id['14'] = 'SUSPENDED' job_state_id['15'] = 'TIMEOUT' //Global variables are used. -exports.address = mylib.address; -exports.abi = mylib.abi; +exports.address = eBlocBroker.address; +exports.abi = eBlocBroker.abi; exports.whoami = whoami; exports.blockNumber = blockNumber; exports.job_state_id = job_state_id; @@ -66,7 +67,7 @@ exports.isTransactionPassed = function(transaction_id) { var web3 = web3_extended.create(options); if(!web3.isConnected()) console.log("not connected"); - var myContractInstance = web3.eth.contract(mylib.abi).at(mylib.address); + var myContractInstance = web3.eth.contract(eBlocBroker.abi).at(eBlocBroker.address); var checkPassed = 0; var receipt = web3.eth.getTransactionReceipt( transaction_id ); diff --git a/eBlocBrokerNodeCall.js b/eBlocBrokerNodeCall.js index 41d71bf1..32b7c202 100755 --- a/eBlocBrokerNodeCall.js +++ b/eBlocBrokerNodeCall.js @@ -1,5 +1,5 @@ var nodePaths = require('./nodePaths'); -var mylib = require(nodePaths.EBLOCBROKER + '/eBlocBrokerHeader.js'); +var eBlocBroker = require(nodePaths.EBLOCBROKER + '/eBlocBrokerHeader.js'); const args = process.argv; @@ -7,14 +7,14 @@ var setJobStatus = "setJobStatus" var val = args[2]; if( args[2].toString() == "setJobStatus" ){ - mylib.setJobStatus(args[3], args[4], args[5], args[6]); + eBlocBroker.setJobStatus(args[3], args[4], args[5], args[6]); } else if( args[2].toString() == "getJobInfo" ){ - console.log('' + mylib.getJobInfo( args[3], args[4], args[5] )); + console.log('' + eBlocBroker.getJobInfo( args[3], args[4], args[5] )); } else if( args[2].toString() == "receiptCheck" ){ - mylib.receiptCheck(args[3], args[4], args[5], args[6], args[7], args[8]); + eBlocBroker.receiptCheck(args[3], args[4], args[5], args[6], args[7], args[8]); } else if( args[2].toString() == "bs58_encode" ){ - mylib.bs58_encode( args[3] ); + eBlocBroker.bs58_encode( args[3] ); } diff --git a/endCode.py b/endCode.py index 5ac29f3a..0441b951 100755 --- a/endCode.py +++ b/endCode.py @@ -26,7 +26,7 @@ def endCall(jobKey, index, storageType, shareToken, miniLockId, folderName): programPath = constants.PROGRAM_PATH encodedShareToken = base64.b64encode(shareToken + ':') - header = "var mylib = require('" + eblocPath + "/eBlocBrokerHeader.js')"; os.environ['header'] = header; + header = "var eBlocBroker = require('" + eblocPath + "/eBlocBrokerHeader.js')"; os.environ['header'] = header; os.environ['programPath'] = str(programPath) os.environ['cluster_id'] = constants.CLUSTER_ID diff --git a/jobResults.py b/jobResults.py index 6c4045c8..7220d677 100644 --- a/jobResults.py +++ b/jobResults.py @@ -3,12 +3,10 @@ # Paths--------- eblocPath = constants.EBLOCPATH; contractCallPath = constants.EBLOCPATH + '/contractCalls'; os.environ['contractCallPath'] = contractCallPath; +fname = constants.LOG_PATH + '/queuedJobs.txt'; # --------------- -fname="/home/alper/.eBlocBroker/queuedJobs.txt"; - sum1=0; - counter = 1; with open(fname, "r") as ins: array = [] @@ -30,9 +28,6 @@ print(str(counter) + " " + res[1] + " " + res[2] + " " + res[3] + " | " + constants.job_state_code[r[0]] + "," + r[1] + "," + r[2] + "," + r[3] + "," + r[4] + "," + r[5]); counter = counter + 1; -print(counter) - - +print(counter) print("GAINED: " + str(sum1)); - diff --git a/log.js b/log.js index 6812da9a..3f51c3a8 100755 --- a/log.js +++ b/log.js @@ -1,10 +1,11 @@ var nodePaths = require('./nodePaths'); -var mylib = require(nodePaths.EBLOCBROKER + '/eBlocBrokerHeader.js'); +var eBlocBroker = require(nodePaths.EBLOCBROKER + '/eBlocBrokerHeader.js'); -console.log('' + mylib.getDeployedBlockNumber()) +console.log('' + eBlocBroker.getDeployedBlockNumber()) -readFrom = 1799549; //mylib.getDeployedBlockNumber(); +readFrom = 1799549; //eBlocBroker.getDeployedBlockNumber(); + +eBlocBroker.LogReceipt(readFrom, nodePaths.LOG_PATH + '/queuedJobs.txt'); +//eBlocBroker.LogJob(readFrom, nodePaths.LOG_PATH + '/queuedJobs.txt' ); /* Prints jobs, which are not COMPLETED */ -mylib.LogJob(readFrom, nodePaths.LOG_PATH + '/queuedJobs.txt' ); /* Prints jobs, which are not COMPLETED */ -//mylib.LogReceipt(readFrom, nodePaths.LOG_PATH + '/queuedJobs.txt'); diff --git a/main.js b/main.js index 577fe060..c1958e97 100755 --- a/main.js +++ b/main.js @@ -1,44 +1,44 @@ var conv = require('binstring'); var nodePaths = require('./nodePaths'); -var mylib = require(nodePaths.EBLOCBROKER + '/eBlocBrokerHeader.js'); +var eBlocBroker = require(nodePaths.EBLOCBROKER + '/eBlocBrokerHeader.js'); printLog = 1 clusterID = "0x6af0204187a93710317542d383a1b547fa42e705"; tx="0x5224a5a7a7a957f57ce18330b9f1b8ea50fd4746f37fcf642061a2d6ced519f3" -//console.log( "TransactionPassed ?= " + tx + " " + mylib.isTransactionPassed(tx) ); +//console.log( "TransactionPassed ?= " + tx + " " + eBlocBroker.isTransactionPassed(tx) ); -//mylib.updateCluster( 4, "ebloc", "0x", "0x", 1, "0x"); +//eBlocBroker.updateCluster( 4, "ebloc", "0x", "0x", 1, "0x"); -//console.log( "Contract's deployed block number: " + mylib.getDeployedBlockNumber() ); +//console.log( "Contract's deployed block number: " + eBlocBroker.getDeployedBlockNumber() ); -//a = "1220" + mylib.getClusterIpfsId(clusterID).substr(2); -//console.log( "ClusterInfo: " + mylib.getClusterInfo(clusterID) /*+ " " + mylib.bs58_decode(a)*/ ); +//a = "1220" + eBlocBroker.getClusterIpfsId(clusterID).substr(2); +//console.log( "ClusterInfo: " + eBlocBroker.getClusterInfo(clusterID) /*+ " " + eBlocBroker.bs58_decode(a)*/ ); //TEST-SIDE /* for(i = 2; i < 12; i++) - mylib.setMiniLockId( "jj2Fn8St9tzLeErBiXA6oiZatnDwJ2YrnLY3Uyn4msD8k", i ) + eBlocBroker.setMiniLockId( "jj2Fn8St9tzLeErBiXA6oiZatnDwJ2YrnLY3Uyn4msD8k", i ) for(i = 2; i < 12; i++) - console.log( "miniLockId of web3.eth.accounts[" + i + "]: " + mylib.getMiniLockId( i ) ) + console.log( "miniLockId of web3.eth.accounts[" + i + "]: " + eBlocBroker.getMiniLockId( i ) ) */ //LOG-RECEIPT -console.log( "Cluster Gained Amount: " + mylib.getClusterReceivedAmount(clusterID)) +console.log( "Cluster Gained Amount: " + eBlocBroker.getClusterReceivedAmount(clusterID)) var fs = require('fs'); var array = fs.readFileSync(nodePaths.LOG_PATH + '/queuedJobs.txt').toString().split("\n"); for(i in array) { var arr = array[i].split(" "); if( array[i] != '' && clusterID == arr[1] ){ - var str = mylib.getJobInfo(arr[1], arr[2], 0).toString().split(","); + var str = eBlocBroker.getJobInfo(arr[1], arr[2], 0).toString().split(","); str = str.toString() //str = str.replace('0x0000000000000000000000000000000000000000000000000000000000000000,', '') - console.log( "Job " + i + ": " + " | "+ arr[2], arr[3], arr[4], arr[5] + "|" + mylib.job_state_id[str[0]] + ' ' +str); + console.log( "Job " + i + ": " + " | "+ arr[2], arr[3], arr[4], arr[5] + "|" + eBlocBroker.job_state_id[str[0]] + ' ' +str); } } @@ -47,7 +47,7 @@ for(i in array) { if (printLog==1) { sum=0; sum1=0; - console.log( "Cluster Gained Amount: " + mylib.getClusterReceivedAmount(clusterID) ) + console.log( "Cluster Gained Amount: " + eBlocBroker.getClusterReceivedAmount(clusterID) ) console.log( "Status|Core|StartTimeStamp|Recieved|CoreMinutePrice|CoreMinuteGas" ) var fs = require('fs'); var array = fs.readFileSync(nodePaths.LOG_PATH + '/queuedJobs.txt').toString().split("\n"); @@ -55,13 +55,13 @@ if (printLog==1) { var arr = array[i].split(" "); if( array[i] != '' && clusterID == arr[1] ){ - var str = mylib.getJobInfo(arr[1], arr[2], arr[3]).toString().split(","); + var str = eBlocBroker.getJobInfo(arr[1], arr[2], arr[3]).toString().split(","); if(str[0] == '1'){ sum += parseInt(str[3]) sum1+=(parseInt(arr[7]) - parseInt(arr[8])) } - console.log( "Job "+ i +": " + mylib.job_state_id[str[0]] + ' ' + str[1] + " " + str[2] + " " + str[3] + " " + str[4] + " " + str[5] + " | " + console.log( "Job "+ i +": " + eBlocBroker.job_state_id[str[0]] + ' ' + str[1] + " " + str[2] + " " + str[3] + " " + str[4] + " " + str[5] + " | " + arr[2], arr[3], arr[4], arr[5], arr[6], arr[7], arr[8] ); } } diff --git a/transactionCheck.js b/transactionCheck.js index 4ff7bfb7..1b5ab1d2 100644 --- a/transactionCheck.js +++ b/transactionCheck.js @@ -1,5 +1,5 @@ var nodePaths = require('./nodePaths'); -var mylib = require(nodePaths.EBLOCBROKER + '/eBlocBrokerHeader.js'); +var eBlocBroker = require(nodePaths.EBLOCBROKER + '/eBlocBrokerHeader.js'); var lineReader = require('readline').createInterface({ input: require('fs').createReadStream('t.txt') @@ -11,7 +11,7 @@ lineReader.on('line', function (line) { //console.log(line[0]) tx=line[0] - max += console.log( '' + mylib.getTransactionGas(line[0])) + max += console.log( '' + eBlocBroker.getTransactionGas(line[0])) }); console.log("max: " + max);