From 284905ffbab7b511eb4d7a145a3057fd30e7197f Mon Sep 17 00:00:00 2001 From: Ev Date: Fri, 16 Nov 2018 20:55:42 -0200 Subject: [PATCH] Static files (#502) --- ...s => 8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.js} | 8 ++++---- ...6113a04929a5e54ac1c6fbe1e0f272eae43bb.stats.json} | 12 ++++++------ build/index.html | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) rename build/{c343094781f62cf18159e309d76082c04627c34b.js => 8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.js} (99%) rename build/{c343094781f62cf18159e309d76082c04627c34b.stats.json => 8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.stats.json} (99%) diff --git a/build/c343094781f62cf18159e309d76082c04627c34b.js b/build/8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.js similarity index 99% rename from build/c343094781f62cf18159e309d76082c04627c34b.js rename to build/8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.js index 6023154b2..74abf4e79 100644 --- a/build/c343094781f62cf18159e309d76082c04627c34b.js +++ b/build/8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.js @@ -296,7 +296,7 @@ Mongo=Package.mongo.Mongo,Session=Package.session.Session,$=Package.jquery.$,jQu (function(){var e={},t=function(t){var n=e["ct_"+t._id]=Object.assign({},TokenContract);if(n.options.address=t.address,n.address=t.address,n){var s=(t.checkpointBlock||0)-ethereumConfig.rollBackBy;s<0&&(s=0),n.tokenEvents||(n.tokenEvents=[]);var o=n.tokenEvents;_.each(Transactions.find({tokenId:t._id,blockNumber:{$exists:!0,$gt:s}}).fetch(),function(e){e&&Transactions.remove({_id:e._id})}),Helpers.eventLogs("Checking Token Transfers for "+t.address+" (_id: "+t._id+") from block #",s);var r=n.events.allEvents({fromBlock:s,toBlock:"latest"});o.push(r);var a=EthBlocks.latest.number,c=n;c.getPastEvents||(c=new web3.eth.Contract(n.options.jsonInterface,n.options.address)),c.getPastEvents("allEvents",{fromBlock:s},function(e,n){e||Tokens.update({_id:t._id},{$set:{checkpointBlock:(a||EthBlocks.latest.number)-ethereumConfig.rollBackBy}})}),r.on("data",function(e){if(EthBlocks.latest.number&&e.blockNumber>EthBlocks.latest.number&&Tokens.update({_id:t._id},{$set:{checkpointBlock:e.blockNumber}}),"Transfer"===e.event&&(Helpers.getAccountByAddress(e.returnValues.from)||Helpers.getAccountByAddress(e.returnValues.to))){Helpers.eventLogs("Transfer for "+t.address+" arrived in block: #"+e.blockNumber,Number(e.returnValues.value)),e.tokenId=t._id;var n=addTransaction(e,e.returnValues.from,e.returnValues.to,e.returnValues.value.toString(10));if(!n||!n.blockNumber){var s=Helpers.makeId("tx",e.transactionHash);Helpers.showNotification("wallet.transactions.notifications.tokenTransfer",{token:t.name,to:Helpers.getAccountNameByAddress(e.returnValues.to),from:Helpers.getAccountNameByAddress(e.returnValues.from),amount:Helpers.formatNumberByDecimals(e.returnValues.value,t.decimals)},function(){EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:s}},{class:"transaction-info"})})}}})}};observeTokens=function(){collectionObservers[collectionObservers.length]=Tokens.find({}).observe({added:function(e){web3.eth.getCode(e.address,function(n,s){n?console.log("Couldn't check Token code of ",e,n):s&&s.length>2?(Tokens.update(e._id,{$unset:{disabled:""}}),t(e)):Tokens.update(e._id,{$set:{disabled:!0}})})},removed:function(t){var n=e["ct_"+t._id];n&&_.each(n.tokenEvents,function(e){e.unsubscribe(),n.tokenEvents.shift()})}})}}).call(this); -(function(){addTransactionAfterSend=function(t,e,a,n,s,o,r,c){var i=void 0,d=void 0,u=Helpers.makeId("tx",t);_.isObject(r)&&(d=r.contract.name.replace(/([A-Z])/g," $1"),i=r.contract.jsonInterface,r=r.data),Transactions.upsert(u,{$set:{tokenId:c,value:e,from:a,to:n,timestamp:moment().unix(),transactionHash:t,gasPrice:s,gasUsed:o,fee:String(s*o),data:r,jsonInterface:i,contractName:d}}),EthAccounts.update({address:a},{$addToSet:{transactions:u}}),EthAccounts.update({address:n},{$addToSet:{transactions:u}})},addTransaction=function(e,a,n,s){var o=Helpers.makeId("tx",e.transactionHash);Transactions.upsert(o,{to:n,from:a,value:s});var r=web3.eth.getBlock(e.blockNumber,!1,function(a,n){a||web3.eth.getTransaction(e.transactionHash,function(a,s){!a&&s&&web3.eth.getTransactionReceipt(e.transactionHash,function(a,r){delete s.hash,s.transactionHash=e.transactionHash;var c={_id:o,timestamp:n.timestamp};e.tokenId&&(c.tokenId=e.tokenId),e.returnValues&&e.returnValues.operation&&(c.operation=e.returnValues.operation),a||t(c,s,r)})})});return Transactions.findOne(o)};var t=function(t,e,a){var n=t._id||Helpers.makeId("tx",e.transactionHash||t.transactionHash);if(n){var s=Transactions.findOne({_id:n});if(s&&(t._id=n,e&&(t.blockNumber=e.blockNumber,t.blockHash=e.blockHash,t.transactionIndex=e.transactionIndex,e.transactionHash&&(t.transactionHash=e.transactionHash),t.data=e.input||e.data||null,_.isString(t.data)&&"0x"===t.data&&(t.data=null),t.gasPrice=e.gasPrice.toString(10)),a&&e&&(!t.contractAddress&&a.contractAddress&&web3.eth.getCode(a.contractAddress,function(t,e){if(!t&&e.length>2&&(Transactions.update({_id:n},{$set:{deployedData:e}}),s&&s.jsonInterface)){CustomContracts.upsert({address:a.contractAddress},{$set:{address:a.contractAddress,name:(s.contractName||"New Contract")+" "+a.contractAddress.substr(2,4),jsonInterface:s.jsonInterface}});var o=_.pluck(s.jsonInterface,"name"),r=_.contains(o,"transfer")&&_.contains(o,"Transfer")&&_.contains(o,"balanceOf");if(console.log("isToken: ",r),r){tokenId=Helpers.makeId("token",a.contractAddress),Tokens.upsert(tokenId,{$set:{address:a.contractAddress,name:s.name+" "+a.contractAddress.substr(2,4),symbol:s.name+a.contractAddress.substr(2,4),balances:{},decimals:0}});var c=TokenContract;c.options.address=a.contractAddress,c.methods.name().call().then(function(t){return Tokens.upsert(tokenId,{$set:{name:t}}),CustomContracts.upsert({address:a.contractAddress},{$set:{name:TAPi18n.__("wallet.tokens.admin",{name:t})}}),null}),c.methods.decimals().call().then(function(t){return Tokens.upsert(tokenId,{$set:{decimals:Number(t)}}),null}),c.methods.symbol().call().then(function(t){return Tokens.upsert(tokenId,{$set:{symbol:t}}),null})}}}),t.contractAddress=a.contractAddress,t.gasUsed=a.gasUsed,t.gasLimit=e.gas,t.outOfGas=a.gasUsed===e.gas,t.fee=new BigNumber(e.gasPrice).times(new BigNumber(a.gasUsed)).toString(10)),s&&(s.tokenId&&!t.tokenId&&(t.tokenId=s.tokenId,t.from=s.from,t.to=s.to,t.value=s.value),delete t._id,Transactions.update({_id:n},{$set:t})),t.outOfGas)){var o=TAPi18n.__("wallet.transactions.error.outOfGas",{from:Helpers.getAccountNameByAddress(t.from),to:Helpers.getAccountNameByAddress(t.to)});EthAccounts.findOne({address:t.from})?web3.eth.getBalance(t.from,t.blockNumber,function(e,a){e||web3.eth.getBalance(t.from,t.blockNumber-1,function(e,s){e||a.toString(10)===s.toString(10)?GlobalNotification.warning({content:o,duration:10}):(console.log(t.transactionHash,"Removed out of gas, as balance changed"),Transactions.update({_id:n},{$set:{outOfGas:!1}}))})}):GlobalNotification.warning({content:o,duration:10})}}};observeTransactions=function(){var e=function(e){var a=0;if(!e.confirmed&&e.transactionHash)var n=function(n,o){if(console.log("updateTransactions",n,o),!n){var r=e.blockNumber&&EthBlocks.latest.number?EthBlocks.latest.number+1-e.blockNumber:0;if(a++,!(e=Transactions.findOne(e._id)))return void s.unsubscribe();r=0&&(Helpers.eventLogs("Checking transaction "+e.transactionHash+". Current confirmations: "+r),web3.eth.getTransaction(e.transactionHash,function(a,n){web3.eth.getTransactionReceipt(e.transactionHash,function(a,s){!a&&s&&n&&(n.blockNumber!==e.blockNumber?t(e,n,s):n.blockNumber&&e.disabled?Transactions.update(e._id,{$unset:{disabled:""}}):n.blockNumber||Transactions.update(e._id,{$set:{disabled:!0}}))})})),(r>ethereumConfig.requiredConfirmations||a>2*ethereumConfig.requiredConfirmations)&&web3.eth.getTransaction(e.transactionHash,function(a,n){web3.eth.getTransactionReceipt(e.transactionHash,function(a,o){if(!a)if(n&&n.blockNumber)n.blockNumber&&web3.eth.getBlock(n.blockNumber,function(a,r){a||(r.hash===n.blockHash?(e.confirmed=!0,t(e,n,o),e.disabled&&Transactions.update(e._id,{$unset:{disabled:""}})):Transactions.remove(e._id),s.unsubscribe())});else{var r=TAPi18n.__("wallet.transactions.error.outOfGas",{from:Helpers.getAccountNameByAddress(e.from),to:Helpers.getAccountNameByAddress(e.to)});Helpers.eventLogs(r),GlobalNotification.warning({content:r,duration:10}),Transactions.remove(e._id),s.unsubscribe()}})})}},s=web3.eth.subscribe("newBlockHeaders",function(t,e){n(t,e?e.hash:null)})};collectionObservers[collectionObservers.length]=Transactions.find({}).observe({added:function(t){var a=EthBlocks.latest.number-t.blockNumber;if(Wallets.update({address:t.from},{$addToSet:{transactions:t._id}}),Wallets.update({address:t.to},{$addToSet:{transactions:t._id}}),t.operation&&checkConfirmation(Helpers.makeId("pc",t.operation)),t.confirmed||e(t),"main"==Session.get("network")&&t.timestamp&&(!t.exchangeRates||!t.exchangeRates.btc||!t.exchangeRates.usd||!t.exchangeRates.eur||!t.exchangeRates.gbp||!t.exchangeRates.brl)){var n="https://min-api.cryptocompare.com/data/pricehistorical?fsym=ETH&tsyms=BTC,USD,EUR,GBP,BRL&ts="+t.timestamp;"undefined"!=typeof mist&&(n+="&extraParams=Mist-"+mist.version),HTTP.get(n,function(e,a){if(!e&&a&&200===a.statusCode){var n=JSON.parse(a.content);n&&"Error"!==n.Response&&_.each(n,function(e,a){if(e&&_.isFinite(e)){var n,s={};s["exchangeRates."+a.toLowerCase()]={price:String(e),timestamp:null},Transactions.update(t._id,{$set:s})}})}else console.warn("Cannot connect to https://min-api.cryptocompare.com/ to get price ticker data, please check your internet connection.")})}},changed:function(t){Wallets.update({address:t.from},{$addToSet:{transactions:t._id}}),Wallets.update({address:t.to},{$addToSet:{transactions:t._id}}),t.operation&&checkConfirmation(Helpers.makeId("pc",t.operation))},removed:function(t){Wallets.update({address:t.from},{$pull:{transactions:t._id}}),Wallets.update({address:t.to},{$pull:{transactions:t._id}}),EthAccounts.update({address:t.from},{$pull:{transactions:t._id}}),EthAccounts.update({address:t.to},{$pull:{transactions:t._id}})}})}}).call(this); +(function(){addTransactionAfterSend=function(t,e,a,n,s,o,r,c){var i=void 0,d=void 0,u=void 0,l=Helpers.makeId("tx",t);_.isObject(u)&&(d=u.contract.name.replace(/([A-Z])/g," $1"),i=u.contract.jsonInterface,u=r.data),Transactions.upsert(l,{$set:{tokenId:c,value:e,from:a,to:n,timestamp:moment().unix(),transactionHash:t,gasPrice:s,gasUsed:o,fee:String(s*o),data:u,jsonInterface:i,contractName:d}}),EthAccounts.update({address:a},{$addToSet:{transactions:l}}),EthAccounts.update({address:n},{$addToSet:{transactions:l}})},addTransaction=function(e,a,n,s){var o=Helpers.makeId("tx",e.transactionHash);Transactions.upsert(o,{to:n,from:a,value:s});var r=web3.eth.getBlock(e.blockNumber,!1,function(a,n){a||web3.eth.getTransaction(e.transactionHash,function(a,s){!a&&s&&web3.eth.getTransactionReceipt(e.transactionHash,function(a,r){delete s.hash,s.transactionHash=e.transactionHash;var c={_id:o,timestamp:n.timestamp};e.tokenId&&(c.tokenId=e.tokenId),e.returnValues&&e.returnValues.operation&&(c.operation=e.returnValues.operation),a||t(c,s,r)})})});return Transactions.findOne(o)};var t=function(t,e,a){var n=t._id||Helpers.makeId("tx",e.transactionHash||t.transactionHash);if(n){var s=Transactions.findOne({_id:n});if(s&&(t._id=n,e&&(t.blockNumber=e.blockNumber,t.blockHash=e.blockHash,t.transactionIndex=e.transactionIndex,e.transactionHash&&(t.transactionHash=e.transactionHash),t.data=e.input||e.data||null,_.isString(t.data)&&"0x"===t.data&&(t.data=null),t.gasPrice=e.gasPrice.toString(10)),a&&e&&(!t.contractAddress&&a.contractAddress&&web3.eth.getCode(a.contractAddress,function(t,e){if(!t&&e.length>2&&(Transactions.update({_id:n},{$set:{deployedData:e}}),s&&s.jsonInterface)){CustomContracts.upsert({address:a.contractAddress},{$set:{address:a.contractAddress,name:(s.contractName||"New Contract")+" "+a.contractAddress.substr(2,4),jsonInterface:s.jsonInterface}});var o=_.pluck(s.jsonInterface,"name"),r=_.contains(o,"transfer")&&_.contains(o,"Transfer")&&_.contains(o,"balanceOf");if(console.log("isToken: ",r),r){tokenId=Helpers.makeId("token",a.contractAddress),Tokens.upsert(tokenId,{$set:{address:a.contractAddress,name:s.name+" "+a.contractAddress.substr(2,4),symbol:s.name+a.contractAddress.substr(2,4),balances:{},decimals:0}});var c=TokenContract;c.options.address=a.contractAddress,c.methods.name().call().then(function(t){return Tokens.upsert(tokenId,{$set:{name:t}}),CustomContracts.upsert({address:a.contractAddress},{$set:{name:TAPi18n.__("wallet.tokens.admin",{name:t})}}),null}),c.methods.decimals().call().then(function(t){return Tokens.upsert(tokenId,{$set:{decimals:Number(t)}}),null}),c.methods.symbol().call().then(function(t){return Tokens.upsert(tokenId,{$set:{symbol:t}}),null})}}}),t.contractAddress=a.contractAddress,t.gasUsed=a.gasUsed,t.gasLimit=e.gas,t.outOfGas=a.gasUsed===e.gas,t.fee=new BigNumber(e.gasPrice).times(new BigNumber(a.gasUsed)).toString(10)),s&&(s.tokenId&&!t.tokenId&&(t.tokenId=s.tokenId,t.from=s.from,t.to=s.to,t.value=s.value),delete t._id,Transactions.update({_id:n},{$set:t})),t.outOfGas)){var o=TAPi18n.__("wallet.transactions.error.outOfGas",{from:Helpers.getAccountNameByAddress(t.from),to:Helpers.getAccountNameByAddress(t.to)});EthAccounts.findOne({address:t.from})?web3.eth.getBalance(t.from,t.blockNumber,function(e,a){e||web3.eth.getBalance(t.from,t.blockNumber-1,function(e,s){e||a.toString(10)===s.toString(10)?GlobalNotification.warning({content:o,duration:10}):(console.log(t.transactionHash,"Removed out of gas, as balance changed"),Transactions.update({_id:n},{$set:{outOfGas:!1}}))})}):GlobalNotification.warning({content:o,duration:10})}}};observeTransactions=function(){var e=function(e){var a=0;if(!e.confirmed&&e.transactionHash)var n=function(n,o){if(console.log("updateTransactions",n,o),!n){var r=e.blockNumber&&EthBlocks.latest.number?EthBlocks.latest.number+1-e.blockNumber:0;if(a++,!(e=Transactions.findOne(e._id)))return void s.unsubscribe();r=0&&(Helpers.eventLogs("Checking transaction "+e.transactionHash+". Current confirmations: "+r),web3.eth.getTransaction(e.transactionHash,function(a,n){web3.eth.getTransactionReceipt(e.transactionHash,function(a,s){!a&&s&&n&&(n.blockNumber!==e.blockNumber?t(e,n,s):n.blockNumber&&e.disabled?Transactions.update(e._id,{$unset:{disabled:""}}):n.blockNumber||Transactions.update(e._id,{$set:{disabled:!0}}))})})),(r>ethereumConfig.requiredConfirmations||a>2*ethereumConfig.requiredConfirmations)&&web3.eth.getTransaction(e.transactionHash,function(a,n){web3.eth.getTransactionReceipt(e.transactionHash,function(a,o){if(!a)if(n&&n.blockNumber)n.blockNumber&&web3.eth.getBlock(n.blockNumber,function(a,r){a||(r.hash===n.blockHash?(e.confirmed=!0,t(e,n,o),e.disabled&&Transactions.update(e._id,{$unset:{disabled:""}})):Transactions.remove(e._id),s.unsubscribe())});else{var r=TAPi18n.__("wallet.transactions.error.outOfGas",{from:Helpers.getAccountNameByAddress(e.from),to:Helpers.getAccountNameByAddress(e.to)});Helpers.eventLogs(r),GlobalNotification.warning({content:r,duration:10}),Transactions.remove(e._id),s.unsubscribe()}})})}},s=web3.eth.subscribe("newBlockHeaders",function(t,e){n(t,e?e.hash:null)})};collectionObservers[collectionObservers.length]=Transactions.find({}).observe({added:function(t){var a=EthBlocks.latest.number-t.blockNumber;if(Wallets.update({address:t.from},{$addToSet:{transactions:t._id}}),Wallets.update({address:t.to},{$addToSet:{transactions:t._id}}),t.operation&&checkConfirmation(Helpers.makeId("pc",t.operation)),t.confirmed||e(t),"main"==Session.get("network")&&t.timestamp&&(!t.exchangeRates||!t.exchangeRates.btc||!t.exchangeRates.usd||!t.exchangeRates.eur||!t.exchangeRates.gbp||!t.exchangeRates.brl)){var n="https://min-api.cryptocompare.com/data/pricehistorical?fsym=ETH&tsyms=BTC,USD,EUR,GBP,BRL&ts="+t.timestamp;"undefined"!=typeof mist&&(n+="&extraParams=Mist-"+mist.version),HTTP.get(n,function(e,a){if(!e&&a&&200===a.statusCode){var n=JSON.parse(a.content);n&&"Error"!==n.Response&&_.each(n,function(e,a){if(e&&_.isFinite(e)){var n,s={};s["exchangeRates."+a.toLowerCase()]={price:String(e),timestamp:null},Transactions.update(t._id,{$set:s})}})}else console.warn("Cannot connect to https://min-api.cryptocompare.com/ to get price ticker data, please check your internet connection.")})}},changed:function(t){Wallets.update({address:t.from},{$addToSet:{transactions:t._id}}),Wallets.update({address:t.to},{$addToSet:{transactions:t._id}}),t.operation&&checkConfirmation(Helpers.makeId("pc",t.operation))},removed:function(t){Wallets.update({address:t.from},{$pull:{transactions:t._id}}),Wallets.update({address:t.to},{$pull:{transactions:t._id}}),EthAccounts.update({address:t.from},{$pull:{transactions:t._id}}),EthAccounts.update({address:t.to},{$pull:{transactions:t._id}})}})}}).call(this); (function(){var f=["0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d9146100f75780632f54bf6e146101085780635c52c2f51461011d5780637065cb481461012b578063797af6271461013c578063b20d30a914610151578063b61d27f614610162578063ba51a6df1461017f578063cbf0b0c014610190578063f00d4b5d146101a1576100f15b600034116100a1576100ee565b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b61010260043561049f565b60006000f35b610113600435610636565b8060005260206000f35b6101256106b0565b60006000f35b61013660043561034e565b60006000f35b610147600435610a19565b8060005260206000f35b61015c600435610678565b60006000f35b610175600435602435606460443561072d565b8060005260206000f35b61018a6004356105cf565b60006000f35b61019b6004356106e8565b60006000f35b6101af6004356024356101b5565b60006000f35b60006040600036808284378201915050604090036040206101d581610d2a565b6101de57610347565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821461021e57610224565b50610349565b61022d83610636565b6102365761023c565b50610349565b82600260005083610100811061024e57005b90900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b60406000368082843782019150506040900360402061036c81610d2a565b6103755761049a565b61037e82610636565b6103875761038d565b5061049c565b60fa60016000505410156103a0576103aa565b6103a8610ec4565b505b60fa60016000505410156103bd576103c3565b5061049c565b600160008181505480929190600101919050555081600260005060016000505461010081106103ee57005b90900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b60006040600036808284378201915050604090036040206104bf81610d2a565b6104c8576105c9565b61010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082146105085761050e565b506105cb565b6000600260005083610100811061052157005b90900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b6040600036808284378201915050604090036040206105ed81610d2a565b6105f657610631565b816000600050819055507facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054119050610673565b919050565b60406000368082843782019150506040900360402061069681610d2a565b61069f576106ab565b81610105600050819055505b505b50565b6040600036808284378201915050604090036040206106ce81610d2a565b6106d7576106e4565b6000610104600050819055505b505b565b60406000368082843782019150506040900360402061070681610d2a565b61070f57610728565b8173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b60006107388461117d565b61074157610808565b7f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f16107fa57005b505060006001029050610a11565b6040600036808284378201915050604090036040209050805061082a81610a19565b15801561088a57506000610107600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61089357610a10565b84610107600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010760005060008381526020019081526020016000206000506001016000508190555082826101076000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610965579182015b82811115610964578235826000505591602001919060010190610946565b5b5090505b808211156109835760008181506000905550600101610969565b5050600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b600081610a2581610d2a565b610a2e57610d23565b6000610107600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415610a8f57610d22565b610107600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610107600050600085815260200190815260200160002060005060010160005054600060006000610107600050600089815260200190815260200160002060005060020160005080548015610b5457820191906000526020600020905b815481529060010190602001808311610b40575b5050600084866185025a03f1610b6657005b50507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101076000506000868152602001908152602001600020600050600101600050548152602001610107600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016101076000506000868152602001908152602001600020600050600201600090918254815260200182825080548015610c8157820191906000526020600020905b815481529060010190602001808311610c6d575b5050915050604090036040a1610107600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f0160209004906000526020600020908101905b80821115610d145760008181506000905550600101610cfa565b505050506001915050610d25565b5b505b919050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054935060008414610d7457610d79565b610ebb565b610103600050600087815260200190815260200160002060009250925060008383506000016000505414610dac57610dcf565b600060005054838350600001600050819055506000838350600101600050819055505b8360020a9050600081848450600101600050541614610ded57610eba565b7fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a16001838350600001600050541115610e7f578282506000016000818150548092919060019003919050555080838350600101600082828250541792505081905550610eb9565b6101036000506000878152602001908152602001600020600060008201600050600090556001820160005060009055505060019450610ebb565b5b5b50505050919050565b60006000600190505b600160005054811015611178575b60016000505481108015610f3a575060006002600050826101008110610efd57005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15610f4c578080600101915050610edb565b5b6001600160005054118015610fb15750600060026000506001600050546101008110610f7557005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610fd057600160008181505480929190600190039190505550610f4d565b600160005054811080156110345750600060026000506001600050546101008110610ff757005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b801561108a57506000600260005082610100811061104e57005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b61109357611173565b600260005060016000505461010081106110a957005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660026000508261010081106110de57005b90900160006101000a81548173ffffffffffffffffffffffffffffffffffffffff02191690830217905550806101026000506000600260005084610100811061112357005b90900160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055505b610ecd565b5b5090565b60006101066000505461118e611216565b11611198576111b7565b6000610104600050819055506111ac611216565b610106600050819055505b61010460005054826101046000505401101580156111e357506101056000505482610104600050540111155b6111ec57611208565b8161010460008282825054019250508190555060019050611211565b60009050611211565b919050565b60006201518042049050611225565b9056","0x60003560e060020a90048063173825d9146100cb5780632f54bf6e146100dc5780635c52c2f5146100f15780637065cb48146100ff5780637fe6589114610110578063b20d30a914610125578063b61d27f614610136578063ba51a6df14610153578063cbf0b0c014610164578063f00d4b5d14610175576100c560003411610087576100c3565b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c600033600160a060020a031681526020013481526020016000a15b565b60006000f35b6100d6600435610277565b60006000f35b6100e76004356106a2565b8060005260206000f35b6100f9610248565b60006000f35b61010a600435610189565b60006000f35b61011b6004356104b6565b8060005260206000f35b61013060043561092e565b60006000f35b61014960243560443560646004356106cb565b8060005260206000f35b61015e60043561045b565b60006000f35b61016f60043561066f565b60006000f35b610183600435602435610345565b60006000f35b60006000368082843782019150506000206101a38161095d565b6101ac57610243565b6101b5826106a2565b6101be576101c4565b50610245565b60018054908160010190555081600260006001548152602001908152602001600020819055506001546003600084600160a060020a03168152602001908152602001600020819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3600083600160a060020a031681526020016000a15b505b50565b60006000368082843782019150506000206102628161095d565b61026b57610274565b60006005819055505b50565b600060006000368082843782019150506000206102938161095d565b61029c5761033f565b6003600084600160a060020a03168152602001908152602001600020549150816000146102c8576102ce565b50610341565b6000600260008481526020019081526020016000208190555060006003600085600160a060020a03168152602001908152602001600020819055507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da600084600160a060020a031681526020016000a15b505b5050565b600060006000368082843782019150506000206103618161095d565b61036a57610454565b6003600085600160a060020a03168152602001908152602001600020549150816000146103965761039c565b50610456565b6103a5836106a2565b6103ae576103b4565b50610456565b82600260008481526020019081526020016000208190555060006003600086600160a060020a0316815260200190815260200160002081905550816003600085600160a060020a03168152602001908152602001600020819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c600085600160a060020a0316815260200184600160a060020a031681526020016000a15b505b505050565b60006000368082843782019150506000206104758161095d565b61047e576104b2565b816000819055507facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da60008381526020016000a15b5050565b6000816104c28161095d565b6104cb57610668565b6008600084815260200190815260200160002054600160a060020a0316600014156104f557610667565b6008600084815260200190815260200160002054600160a060020a03166008600085815260200190815260200160002060010154600060006000600860008981526020019081526020016000206002018054801561056f57820191906000526020600020905b81548152906001019060200180831161055b575b50506000848660155a03f15050507f9429218cfc8c83da55f9eaf3044e7b5103fc2bb9a01bf70078cf2496c40c4ebf600033600160a060020a03168152602001848152602001600860008681526020019081526020016000206001015481526020016008600086815260200190815260200160002054600160a060020a03168152602001600860008681526020019081526020016000206002018054801561063357820191906000526020600020905b81548152906001019060200180831161061f575b50506000a160086000848152602001908152602001600020600081556001016000815560010160009055600191505061066a565b5b505b919050565b60006000368082843782019150506000206106898161095d565b6106925761069e565b81600160a060020a0316ff5b5050565b600060006003600084600160a060020a0316815260200190815260200160002054119050919050565b60006106d683610a79565b6106df576107a9565b7f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd004600033600160a060020a0316815260200184815260200185600160a060020a03168152602001838054801561075157820191906000526020600020905b81548152906001019060200180831161073d575b50506000a183600160a060020a031683600060006000868054801561079257820191906000526020600020905b81548152906001019060200180831161077e575b50506000848660155a03f150505060009050610927565b600060003680828437820191505060002090506107c5816104b6565b1580156107ee57506008600082815260200190815260200160002054600160a060020a03166000145b6107f757610926565b836008600083815260200190815260200160002081905550826008600083815260200190815260200160002060010181905550816008600083815260200190815260200160002060020190818054918054808355916000526020600020906000526020600020601f602080828701049185010460005b8082111561088557838101548582015560010161086d565b84019450508201935050505b808211156108a55760008155600101610891565b5050507fa2e1b6b12a6df8430c7c33911158a9e7087012ca1031dd9fa69d7a4bc449569f600082815260200133600160a060020a0316815260200184815260200185600160a060020a03168152602001838054801561092057820191906000526020600020905b81548152906001019060200180831161090c575b50506000a15b5b9392505050565b60006000368082843782019150506000206109488161095d565b61095157610959565b816006819055505b5050565b60006000600060006003600033600160a060020a031681526020019081526020016000205492508260001461099157610996565b610a71565b60046000868152602001908152602001600020915081546000146109b9576109cc565b6000548281905550600082600101819055505b8260020a9050808260010154166000146109e557610a70565b7f261c71777cbfc40a4342386d9dfc020c8b168f13b3d6f834b789f6f3083439e3600033600160a060020a031681526020018681526020016000a18154600114610a48578180549081600190039055508082600101908154179081905550610a6f565b60046000868152602001908152602001600020600081556001016000905560019350610a71565b5b5b505050919050565b6000610a84336106a2565b610a8d57610afc565b600754610a98610b02565b11610aa257610ab9565b6000600581905550610ab2610b02565b6007819055505b600554826005540110158015610ad55750600654826005540111155b610ade57610af3565b81600590815401908190555060019050610afd565b60009050610afd565b5b919050565b600062015180420490509056","0x60e060020a600035048063173825d9146100ca5780632f54bf6e146100db5780635c52c2f5146100f05780637065cb48146100fe5780637fe658911461010f578063b20d30a914610124578063b61d27f614610135578063ba51a6df1461014f578063cbf0b0c014610160578063f00d4b5d14610171576100c460003411610086576100c2565b7fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c600033600160a060020a031681526020013481526020016000a15b565b60006000f35b6100d56004356103a4565b60006000f35b6100e66004356104c3565b8060005260206000f35b6100f86101af565b60006000f35b6101096004356102ea565b60006000f35b61011a600435610778565b8060005260206000f35b61012f600435610185565b60006000f35b610145600435602435600061051a565b8060005260206000f35b61015a60043561046d565b60006000f35b61016b6004356104ec565b60006000f35b61017f6004356024356101d9565b60006000f35b60003660008237360160002061019a81610931565b6101a3576101ab565b816006819055505b5050565b6000366000823736016000206101c481610931565b6101cd576101d6565b60006005819055505b50565b60006000366000823736016000206101f081610931565b6101f9576102e3565b6003600085600160a060020a03168152602001908152602001600020549150816000146102255761022b565b506102e5565b610234836104c3565b61023d57610243565b506102e5565b82600260008481526020019081526020016000208190555060006003600086600160a060020a0316815260200190815260200160002081905550816003600085600160a060020a03168152602001908152602001600020819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c600085600160a060020a0316815260200184600160a060020a031681526020016000a15b505b505050565b6000366000823736016000206102ff81610931565b6103085761039f565b610311826104c3565b61031a57610320565b506103a1565b60018054908160010190555081600260006001548152602001908152602001600020819055506001546003600084600160a060020a03168152602001908152602001600020819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3600083600160a060020a031681526020016000a15b505b50565b60006000366000823736016000206103bb81610931565b6103c457610467565b6003600084600160a060020a03168152602001908152602001600020549150816000146103f0576103f6565b50610469565b6000600260008481526020019081526020016000208190555060006003600085600160a060020a03168152602001908152602001600020819055507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da600084600160a060020a031681526020016000a15b505b5050565b60003660008237360160002061048281610931565b61048b576104bf565b816000819055507facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da60008381526020016000a15b5050565b600060006003600084600160a060020a0316815260200190815260200160002054119050919050565b60003660008237360160002061050181610931565b61050a57610516565b81600160a060020a0316ff5b5050565b600061052583610a4d565b61052e576105f8565b7f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd004600033600160a060020a0316815260200184815260200185600160a060020a0316815260200183805480156105a057820191906000526020600020905b81548152906001019060200180831161058c575b50506000a183600160a060020a03168360006000600086805480156105e157820191906000526020600020905b8154815290600101906020018083116105cd575b50506000848660155a03f150505060009050610771565b600036600082373601600020905061060f81610778565b15801561063857506008600082815260200190815260200160002054600160a060020a03166000145b61064157610770565b836008600083815260200190815260200160002081905550826008600083815260200190815260200160002060010181905550816008600083815260200190815260200160002060020190818054918054808355916000526020600020906000526020600020601f602080828701049185010460005b808211156106cf5783810154858201556001016106b7565b84019450508201935050505b808211156106ef57600081556001016106db565b5050507fa2e1b6b12a6df8430c7c33911158a9e7087012ca1031dd9fa69d7a4bc449569f600082815260200133600160a060020a0316815260200184815260200185600160a060020a03168152602001838054801561076a57820191906000526020600020905b815481529060010190602001808311610756575b50506000a15b5b9392505050565b60008161078481610931565b61078d5761092a565b6008600084815260200190815260200160002054600160a060020a0316600014156107b757610929565b6008600084815260200190815260200160002054600160a060020a03166008600085815260200190815260200160002060010154600060006000600860008981526020019081526020016000206002018054801561083157820191906000526020600020905b81548152906001019060200180831161081d575b50506000848660155a03f15050507f9429218cfc8c83da55f9eaf3044e7b5103fc2bb9a01bf70078cf2496c40c4ebf600033600160a060020a03168152602001848152602001600860008681526020019081526020016000206001015481526020016008600086815260200190815260200160002054600160a060020a0316815260200160086000868152602001908152602001600020600201805480156108f557820191906000526020600020905b8154815290600101906020018083116108e1575b50506000a160086000848152602001908152602001600020600081556001016000815560010160009055600191505061092c565b5b505b919050565b60006000600060006003600033600160a060020a03168152602001908152602001600020549250826000146109655761096a565b610a45565b600460008681526020019081526020016000209150815460001461098d576109a0565b6000548281905550600082600101819055505b8260020a9050808260010154166000146109b957610a44565b7f261c71777cbfc40a4342386d9dfc020c8b168f13b3d6f834b789f6f3083439e3600033600160a060020a031681526020018681526020016000a18154600114610a1c578180549081600190039055508082600101908154179081905550610a43565b60046000868152602001908152602001600020600081556001016000905560019350610a45565b5b5b505050919050565b6000610a58336104c3565b610a6157610ad0565b600754610a6c610ad6565b11610a7657610a8d565b6000600581905550610a86610ad6565b6007819055505b600554826005540110158015610aa95750600654826005540111155b610ab257610ac7565b81600590815401908190555060019050610ad1565b60009050610ad1565b5b919050565b600062015180420490509056","0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d9146100fe5780632f54bf6e146101155780635c52c2f5146101305780637065cb4814610141578063797af62714610158578063b20d30a914610173578063b61d27f61461018a578063b75c7dc6146101bc578063ba51a6df146101d3578063cbf0b0c0146101ea578063f00d4b5d14610201576100f85b60003411156100f5577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b61010f6004803590602001506105e9565b60006000f35b61012660048035906020015061079a565b8060005260206000f35b61013b600450610810565b60006000f35b6101526004803590602001506104ab565b60006000f35b610169600480359060200150610b6f565b8060005260206000f35b6101846004803590602001506107dc565b60006000f35b6101b26004803590602001803590602001803590602001906004018035906020019150610885565b8060005260206000f35b6101cd60048035906020015061021e565b60006000f35b6101e460048035906020015061071c565b60006000f35b6101fb600480359060200150610844565b60006000f35b610218600480359060200180359060200150610321565b60006000f35b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054935060008414156102675761031a565b8360020a925061010360005060008681526020019081526020016000206000915091506000838383506001016000505416111561031957818150600001600081815054809291906001019190505550828282506001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b60403373ffffffffffffffffffffffffffffffffffffffff168152602001868152602001604090036040a15b5b5050505050565b600060406000368082843782019150506040900360402061034181610e78565b156104a45761034f8361079a565b1561035a57506104a6565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082141561039c57506104a6565b6103a4611315565b8273ffffffffffffffffffffffffffffffffffffffff1660026000508361010081106103cc57005b90900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b6040600036808284378201915050604090036040206104c981610e78565b156105e4576104d78261079a565b156104e257506105e6565b6104ea611315565b60fa600160005054101515610503576105016110db565b505b60fa60016000505410151561051857506105e6565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811061055957005b9090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b600060406000368082843782019150506040900360402061060981610e78565b156107165761010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156106505750610718565b600160016000505403600060005054111561066b5750610718565b6000600260005083610100811061067e57005b90900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506106c6611315565b6106ce6110db565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b60406000368082843782019150506040900360402061073a81610e78565b15610795576001600050548211156107525750610797565b81600060005081905550610764611315565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050541190506107d7565b919050565b6040600036808284378201915050604090036040206107fa81610e78565b1561080b5781610106600050819055505b505b50565b60406000368082843782019150506040900360402061082e81610e78565b15610840576000610105600050819055505b505b565b60406000368082843782019150506040900360402061086281610e78565b15610880578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b600061089084611275565b1561095c577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f161094e57005b505060006001029050610b67565b6040600036808284378201915050438152602001604090036040209050805061098481610b6f565b1580156109e457506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610b665784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610abb579182015b82811115610aba578235826000505591602001919060010190610a9c565b5b5090505b80821115610ad95760008181506000905550600101610abf565b5050600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b600081610b7b81610e78565b15610e71576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610e7057610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610108600050600085815260200190815260200160002060005060010160005054600060006000610108600050600089815260200190815260200160002060005060020160005080548015610ca257820191906000526020600020905b815481529060010190602001808311610c8e575b5050600084866185025a03f1610cb457005b50507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101086000506000868152602001908152602001600020600050600101600050548152602001610108600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016101086000506000868152602001908152602001600020600050600201600090918254815260200182825080548015610dcf57820191906000526020600020905b815481529060010190602001808311610dbb575b5050915050604090036040a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f0160209004906000526020600020908101905b80821115610e625760008181506000905550600101610e48565b505050506001915050610e73565b5b505b919050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505493506000841415610ec3576110d2565b61010360005060008781526020019081526020016000206000925092506000838350600001600050541415610f9b576000600050548383506000016000508190555060008383506001016000508190555061010460005080548091906001019090815481835581811511610f5d578183600052602060002091820191015b80821115610f5b5760008181506000905550600101610f41565b505b50505083835060020160005081905550856101046000508484506002016000505481548110610f8857005b9060005260206000209001600050819055505b8360020a9050600081848450600101600050541614156110d1577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a16001838350600001600050541115156110a0576101046000506101036000506000888152602001908152602001600020600050600201600050548154811061104557005b906000526020600020900160005060009055610103600050600087815260200190815260200160002060006000820160005060009055600182016000506000905560028201600050600090555050600194506110d2566110d0565b82825060000160008181505480929190600190039190505550808383506001016000828282505417925050819055505b5b5b50505050919050565b60006000600190505b600160005054811015611270575b6001600050548110801561111e57506000600260005082610100811061111457005b9090016000505414155b156111305780806001019150506110f2565b5b6001600160005054118015611162575060006002600050600160005054610100811061115957005b90900160005054145b1561118157600160008181505480929190600190039190505550611131565b600160005054811080156111b257506000600260005060016000505461010081106111a857005b9090016000505414155b80156111d55750600060026000508261010081106111cc57005b90900160005054145b1561126b57600260005060016000505461010081106111f057005b90900160005054600260005082610100811061120857005b90900160005081905550806101026000506000600260005084610100811061122c57005b9090016000505481526020019081526020016000206000508190555060006002600050600160005054610100811061126057005b909001600050819055505b6110e4565b5b5090565b60006112803361079a565b1561130f57610107600050546112946114df565b11156112b9576000610105600050819055506112ae6114df565b610107600050819055505b61010560005054826101056000505401101580156112e557506101066000505482610105600050540111155b15611306578161010560008282825054019250508190555060019050611310565b60009050611310565b5b919050565b60006000610104600050549150600090505b818110156113e7576101086000506000610104600050838154811061134857005b906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f0160209004906000526020600020908101905b808211156113d557600081815060009055506001016113bb565b505050505b8060010190508050611327565b6113ef6113f4565b5b5050565b60006000610104600050549150600090505b818110156114a4576000600102610104600050828154811061142457005b906000526020600020900160005054141515611496576101036000506000610104600050838154811061145357005b9060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b8060010190508050611406565b610104600050805460008255906000526020600020908101905b808211156114d857600081815060009055506001016114be565b50505b5050565b600062015180420490506114ee565b9056","0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461011f5780632f54bf6e146101365780634123cb6b146101515780635c52c2f5146101665780637065cb4814610177578063746c91711461018e578063797af627146101a3578063b20d30a9146101be578063b61d27f6146101d5578063b75c7dc614610207578063ba51a6df1461021e578063cbf0b0c014610235578063f00d4b5d1461024c578063f1736d8614610269576101195b6000341115610116577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b610130600480359060200150610cb5565b60006000f35b610147600480359060200150610e71565b8060005260206000f35b61015c600450610287565b8060005260206000f35b610171600450610ef7565b60006000f35b610188600480359060200150610b72565b60006000f35b61019960045061027e565b8060005260206000f35b6101b46004803590602001506105cc565b8060005260206000f35b6101cf600480359060200150610ebd565b60006000f35b6101fd60048035906020018035906020018035906020019060040180359060200191506102d7565b8060005260206000f35b6102186004803590602001506108e0565b60006000f35b61022f600480359060200150610ded565b60006000f35b610246600480359060200150610290565b60006000f35b6102636004803590602001803590602001506109e3565b60006000f35b610274600450610eb3565b8060005260206000f35b60006000505481565b60016000505481565b6040600036808284378201915050438152602001604090036040206102b4816110bb565b156102d2578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b60006102e284610f31565b156103ad577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f115610002575050600060010290506105c4565b604060003680828437820191505043815260200160409003604020905080506103d5816105cc565b15801561043557506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b156105c35784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f0160209004810192821561050c579182015b8281111561050b5782358260005055916020019190600101906104ed565b5b5090506105379190610519565b808211156105335760008181506000905550600101610519565b5090565b50600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b6000816105d8816110bb565b156108d9576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156108d857610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166101086000506000858152602001908152602001600020600050600101600050546000600060006101086000506000898152602001908152602001600020600050600201600050805480156106ff57820191906000526020600020905b8154815290600101906020018083116106eb575b5050600084866185025a03f1156100025750507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101086000506000868152602001908152602001600020600050600101600050548152602001610108600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001610108600050600086815260200190815260200160002060005060020160009091825481526020018282508054801561082b57820191906000526020600020905b815481529060010190602001808311610817575b5050915050604090036040a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f0160209004906000526020600020908101906108cb91906108ad565b808211156108c757600081815060009055506001016108ad565b5090565b50505060019150506108db565b5b505b919050565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505493506000841415610929576109dc565b8360020a92506101036000506000868152602001908152602001600020600091509150600083838350600101600050541611156109db57818150600001600081815054809291906001019190505550828282506001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b60403373ffffffffffffffffffffffffffffffffffffffff168152602001868152602001604090036040a15b5b5050505050565b6000604060003680828437820191505043815260200160409003604020610a09816110bb565b15610b6b57610a1783610e71565b15610a225750610b6d565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821415610a645750610b6d565b610a6c610fd1565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b604060003680828437820191505043815260200160409003604020610b96816110bb565b15610cb057610ba482610e71565b15610baf5750610cb2565b610bb7610fd1565b60fa600160005054101515610bd057610bce611328565b505b60fa600160005054101515610be55750610cb2565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811015610002579090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b6000604060003680828437820191505043815260200160409003604020610cdb816110bb565b15610de75761010260005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821415610d225750610de9565b6001600160005054036000600050541115610d3d5750610de9565b60006002600050836101008110156100025790900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550610d97610fd1565b610d9f611328565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b604060003680828437820191505043815260200160409003604020610e11816110bb565b15610e6c57600160005054821115610e295750610e6e565b81600060005081905550610e3b610fd1565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054119050610eae565b919050565b6101066000505481565b604060003680828437820191505043815260200160409003604020610ee1816110bb565b15610ef25781610106600050819055505b505b50565b604060003680828437820191505043815260200160409003604020610f1b816110bb565b15610f2d576000610105600050819055505b505b565b6000610f3c33610e71565b15610fcb5761010760005054610f506114ba565b1115610f7557600061010560005081905550610f6a6114ba565b610107600050819055505b6101056000505482610105600050540110158015610fa157506101066000505482610105600050540111155b15610fc2578161010560008282825054019250508190555060019050610fcc565b60009050610fcc565b5b919050565b60006000610104600050549150600090505b818110156110ae57610108600050600061010460005083815481101561000257906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f01602090049060005260206000209081019061109d919061107f565b80821115611099576000818150600090555060010161107f565b5090565b5050505b8060010190508050610fe3565b6110b66114cc565b5b5050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054935060008414156111065761131f565b610103600050600087815260200190815260200160002060009250925060008383506000016000505414156111e95760006000505483835060000160005081905550600083835060010160005081905550610104600050805480919060010190908154818355818115116111ac578183600052602060002091820191016111ab919061118d565b808211156111a7576000818150600090555060010161118d565b5090565b5b5050508383506002016000508190555085610104600050848450600201600050548154811015610002579060005260206000209001600050819055505b8360020a90506000818484506001016000505416141561131e577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a16001838350600001600050541115156112ed576101046000506101036000506000888152602001908152602001600020600050600201600050548154811015610002579060005260206000209001600050600090556101036000506000878152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001945061131f5661131d565b82825060000160008181505480929190600190039190505550808383506001016000828282505417925050819055505b5b5b50505050919050565b60006000600190505b6001600050548110156114b5575b6001600050548110801561136a57506000600260005082610100811015610002579090016000505414155b1561137c57808060010191505061133f565b5b60016001600050541180156113ad5750600060026000506001600050546101008110156100025790900160005054145b156113cc5760016000818150548092919060019003919050555061137d565b600160005054811080156113fc575060006002600050600160005054610100811015610002579090016000505414155b801561141e575060006002600050826101008110156100025790900160005054145b156114b05760026000506001600050546101008110156100025790900160005054600260005082610100811015610002579090016000508190555080610102600050600060026000508461010081101561000257909001600050548152602001908152602001600020600050819055506000600260005060016000505461010081101561000257909001600050819055505b611331565b5b5090565b600062015180420490506114c9565b90565b60006000610104600050549150600090505b8181101561157a5760006001026101046000508281548110156100025790600052602060002090016000505414151561156c576101036000506000610104600050838154811015610002579060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b80600101905080506114de565b610104600050805460008255906000526020600020908101906115bb919061159d565b808211156115b7576000818150600090555060010161159d565b5090565b505b505056","0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461011f5780632f54bf6e146101365780634123cb6b146101515780635c52c2f5146101665780637065cb4814610177578063746c91711461018e578063797af627146101a3578063b20d30a9146101be578063b61d27f6146101d5578063b75c7dc614610207578063ba51a6df1461021e578063cbf0b0c014610235578063f00d4b5d1461024c578063f1736d8614610269576101195b6000341115610116577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b610130600480359060200150610665565b60006000f35b610147600480359060200150610821565b8060005260206000f35b61015c600450610287565b8060005260206000f35b6101716004506108a7565b60006000f35b610188600480359060200150610522565b60006000f35b61019960045061027e565b8060005260206000f35b6101b4600480359060200150610c1d565b8060005260206000f35b6101cf60048035906020015061086d565b60006000f35b6101fd6004803590602001803590602001803590602001906004018035906020019150610928565b8060005260206000f35b610218600480359060200150610290565b60006000f35b61022f60048035906020015061079d565b60006000f35b6102466004803590602001506108e1565b60006000f35b610263600480359060200180359060200150610393565b60006000f35b610274600450610863565b8060005260206000f35b60006000505481565b60016000505481565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054935060008414156102d95761038c565b8360020a925061010360005060008681526020019081526020016000206000915091506000838383506001016000505416111561038b57818150600001600081815054809291906001019190505550828282506001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b60403373ffffffffffffffffffffffffffffffffffffffff168152602001868152602001604090036040a15b5b5050505050565b60006040600036808284378201915050438152602001604090036040206103b981610f31565b1561051b576103c783610821565b156103d2575061051d565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821415610414575061051d565b61041c6113d0565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b60406000368082843782019150504381526020016040900360402061054681610f31565b156106605761055482610821565b1561055f5750610662565b6105676113d0565b60fa6001600050541015156105805761057e61119e565b505b60fa6001600050541015156105955750610662565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811015610002579090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b600060406000368082843782019150504381526020016040900360402061068b81610f31565b156107975761010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156106d25750610799565b60016001600050540360006000505411156106ed5750610799565b60006002600050836101008110156100025790900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506107476113d0565b61074f61119e565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b6040600036808284378201915050438152602001604090036040206107c181610f31565b1561081c576001600050548211156107d9575061081e565b816000600050819055506107eb6113d0565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505411905061085e565b919050565b6101066000505481565b60406000368082843782019150504381526020016040900360402061089181610f31565b156108a25781610106600050819055505b505b50565b6040600036808284378201915050438152602001604090036040206108cb81610f31565b156108dd576000610105600050819055505b505b565b60406000368082843782019150504381526020016040900360402061090581610f31565b15610923578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b600061093384611330565b156109fe577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f11561000257505060006001029050610c15565b60406000368082843782019150504381526020016040900360402090508050610a2681610c1d565b158015610a8657506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610c145784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610b5d579182015b82811115610b5c578235826000505591602001919060010190610b3e565b5b509050610b889190610b6a565b80821115610b845760008181506000905550600101610b6a565b5090565b50600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b600081610c2981610f31565b15610f2a576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610f2957610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610108600050600085815260200190815260200160002060005060010160005054600060006000610108600050600089815260200190815260200160002060005060020160005080548015610d5057820191906000526020600020905b815481529060010190602001808311610d3c575b5050600084866185025a03f1156100025750507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101086000506000868152602001908152602001600020600050600101600050548152602001610108600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016101086000506000868152602001908152602001600020600050600201600090918254815260200182825080548015610e7c57820191906000526020600020905b815481529060010190602001808311610e68575b5050915050604090036040a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f016020900490600052602060002090810190610f1c9190610efe565b80821115610f185760008181506000905550600101610efe565b5090565b5050506001915050610f2c565b5b505b919050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505493506000841415610f7c57611195565b6101036000506000878152602001908152602001600020600092509250600083835060000160005054141561105f576000600050548383506000016000508190555060008383506001016000508190555061010460005080548091906001019090815481835581811511611022578183600052602060002091820191016110219190611003565b8082111561101d5760008181506000905550600101611003565b5090565b5b5050508383506002016000508190555085610104600050848450600201600050548154811015610002579060005260206000209001600050819055505b8360020a905060008184845060010160005054161415611194577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a1600183835060000160005054111515611163576101046000506101036000506000888152602001908152602001600020600050600201600050548154811015610002579060005260206000209001600050600090556101036000506000878152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001945061119556611193565b82825060000160008181505480929190600190039190505550808383506001016000828282505417925050819055505b5b5b50505050919050565b60006000600190505b60016000505481101561132b575b600160005054811080156111e057506000600260005082610100811015610002579090016000505414155b156111f25780806001019150506111b5565b5b60016001600050541180156112235750600060026000506001600050546101008110156100025790900160005054145b15611242576001600081815054809291906001900391905055506111f3565b60016000505481108015611272575060006002600050600160005054610100811015610002579090016000505414155b8015611294575060006002600050826101008110156100025790900160005054145b156113265760026000506001600050546101008110156100025790900160005054600260005082610100811015610002579090016000508190555080610102600050600060026000508461010081101561000257909001600050548152602001908152602001600020600050819055506000600260005060016000505461010081101561000257909001600050819055505b6111a7565b5b5090565b600061133b33610821565b156113ca576101076000505461134f6115af565b1115611374576000610105600050819055506113696115af565b610107600050819055505b61010560005054826101056000505401101580156113a057506101066000505482610105600050540111155b156113c15781610105600082828250540192505081905550600190506113cb565b600090506113cb565b5b919050565b60006000610104600050549150600090505b818110156114ad57610108600050600061010460005083815481101561000257906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f01602090049060005260206000209081019061149c919061147e565b80821115611498576000818150600090555060010161147e565b5090565b5050505b80600101905080506113e2565b6114b56114ba565b5b5050565b60006000610104600050549150600090505b818110156115685760006001026101046000508281548110156100025790600052602060002090016000505414151561155a576101036000506000610104600050838154811015610002579060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b80600101905080506114cc565b610104600050805460008255906000526020600020908101906115a9919061158b565b808211156115a5576000818150600090555060010161158b565b5090565b505b5050565b600062015180420490506115be565b9056","0x6000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461012a5780632f54bf6e146101415780634123cb6b1461015c5780635c52c2f5146101715780637065cb4814610182578063746c917114610199578063797af627146101ae578063b20d30a9146101c9578063b61d27f6146101e0578063b75c7dc614610212578063ba51a6df14610229578063c2cf732614610240578063cbf0b0c014610261578063f00d4b5d14610278578063f1736d8614610295576101245b6000341115610121577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c60403373ffffffffffffffffffffffffffffffffffffffff168152602001348152602001604090036040a15b5b565b60006000f35b61013b60048035906020015061058e565b60006000f35b61015260048035906020015061074a565b8060005260206000f35b6101676004506102b3565b8060005260206000f35b61017c600450610877565b60006000f35b61019360048035906020015061044b565b60006000f35b6101a46004506102aa565b8060005260206000f35b6101bf600480359060200150610bed565b8060005260206000f35b6101da60048035906020015061083d565b60006000f35b61020860048035906020018035906020018035906020019060040180359060200191506108f8565b8060005260206000f35b610223600480359060200150610f01565b60006000f35b61023a6004803590602001506106c6565b60006000f35b61025760048035906020018035906020015061078c565b8060005260206000f35b6102726004803590602001506108b1565b60006000f35b61028f6004803590602001803590602001506102bc565b60006000f35b6102a0600450610833565b8060005260206000f35b60006000505481565b60016000505481565b60006040600036808284378201915050438152602001604090036040206102e281611320565b15610444576102f08361074a565b156102fb5750610446565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082141561033d5750610446565b610345611236565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c60408573ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b505050565b60406000368082843782019150504381526020016040900360402061046f81611320565b156105895761047d8261074a565b15610488575061058b565b610490611236565b60fa6001600050541015156104a9576104a7611004565b505b60fa6001600050541015156104be575061058b565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811015610002579090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c360408373ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b50565b60006040600036808284378201915050438152602001604090036040206105b481611320565b156106c05761010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156105fb57506106c2565b600160016000505403600060005054111561061657506106c2565b60006002600050836101008110156100025790900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550610670611236565b610678611004565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da60408473ffffffffffffffffffffffffffffffffffffffff168152602001604090036040a15b505b5050565b6040600036808284378201915050438152602001604090036040206106ea81611320565b15610745576001600050548211156107025750610747565b81600060005081905550610714611236565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da6040838152602001604090036040a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054119050610787565b919050565b60006000600060006000610103600050600088815260200190815260200160002060009350935061010260005060008773ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156107f85760009450610829565b8160020a90506000818585506001016000505416141561081f576000945061082956610828565b60019450610829565b5b5050505092915050565b6101066000505481565b60406000368082843782019150504381526020016040900360402061086181611320565b156108725781610106600050819055505b505b50565b60406000368082843782019150504381526020016040900360402061089b81611320565b156108ad576000610105600050819055505b505b565b6040600036808284378201915050438152602001604090036040206108d581611320565b156108f3578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b600061090384611196565b156109ce577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00460403373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a18473ffffffffffffffffffffffffffffffffffffffff16846000600060008787808284378201915050600084866185025a03f11561000257505060006001029050610be5565b604060003680828437820191505043815260200160409003604020905080506109f681610bed565b158015610a5657506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610be45784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610b2d579182015b82811115610b2c578235826000505591602001919060010190610b0e565b5b509050610b589190610b3a565b80821115610b545760008181506000905550600101610b3a565b5090565b50600050507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf3260408281526020013373ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018673ffffffffffffffffffffffffffffffffffffffff168152602001848490918181526020018282808284378201915050915050604090036040a15b5b949350505050565b600081610bf981611320565b15610efa576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610ef957610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610108600050600085815260200190815260200160002060005060010160005054600060006000610108600050600089815260200190815260200160002060005060020160005080548015610d2057820191906000526020600020905b815481529060010190602001808311610d0c575b5050600084866185025a03f1156100025750507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a60403373ffffffffffffffffffffffffffffffffffffffff1681526020018481526020016101086000506000868152602001908152602001600020600050600101600050548152602001610108600050600086815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016101086000506000868152602001908152602001600020600050600201600090918254815260200182825080548015610e4c57820191906000526020600020905b815481529060010190602001808311610e38575b5050915050604090036040a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f016020900490600052602060002090810190610eec9190610ece565b80821115610ee85760008181506000905550600101610ece565b5090565b5050506001915050610efc565b5b505b919050565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505493506000841415610f4a57610ffd565b8360020a9250610103600050600086815260200190815260200160002060009150915060008383835060010160005054161115610ffc57818150600001600081815054809291906001019190505550828282506001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b60403373ffffffffffffffffffffffffffffffffffffffff168152602001868152602001604090036040a15b5b5050505050565b60006000600190505b600160005054811015611191575b6001600050548110801561104657506000600260005082610100811015610002579090016000505414155b1561105857808060010191505061101b565b5b60016001600050541180156110895750600060026000506001600050546101008110156100025790900160005054145b156110a857600160008181505480929190600190039190505550611059565b600160005054811080156110d8575060006002600050600160005054610100811015610002579090016000505414155b80156110fa575060006002600050826101008110156100025790900160005054145b1561118c5760026000506001600050546101008110156100025790900160005054600260005082610100811015610002579090016000508190555080610102600050600060026000508461010081101561000257909001600050548152602001908152602001600020600050819055506000600260005060016000505461010081101561000257909001600050819055505b61100d565b5b5090565b60006111a13361074a565b1561123057610107600050546111b5611682565b11156111da576000610105600050819055506111cf611682565b610107600050819055505b610105600050548261010560005054011015801561120657506101066000505482610105600050540111155b15611227578161010560008282825054019250508190555060019050611231565b60009050611231565b5b919050565b60006000610104600050549150600090505b8181101561131357610108600050600061010460005083815481101561000257906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f01602090049060005260206000209081019061130291906112e4565b808211156112fe57600081815060009055506001016112e4565b5090565b5050505b8060010190508050611248565b61131b61158d565b5b5050565b6000600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549350600084141561136b57611584565b6101036000506000878152602001908152602001600020600092509250600083835060000160005054141561144e5760006000505483835060000160005081905550600083835060010160005081905550610104600050805480919060010190908154818355818115116114115781836000526020600020918201910161141091906113f2565b8082111561140c57600081815060009055506001016113f2565b5090565b5b5050508383506002016000508190555085610104600050848450600201600050548154811015610002579060005260206000209001600050819055505b8360020a905060008184845060010160005054161415611583577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda60403373ffffffffffffffffffffffffffffffffffffffff168152602001878152602001604090036040a1600183835060000160005054111515611552576101046000506101036000506000888152602001908152602001600020600050600201600050548154811015610002579060005260206000209001600050600090556101036000506000878152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001945061158456611582565b82825060000160008181505480929190600190039190505550808383506001016000828282505417925050819055505b5b5b50505050919050565b60006000610104600050549150600090505b8181101561163b5760006001026101046000508281548110156100025790600052602060002090016000505414151561162d576101036000506000610104600050838154811015610002579060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b806001019050805061159f565b6101046000508054600082559060005260206000209081019061167c919061165e565b80821115611678576000818150600090555060010161165e565b5090565b505b5050565b60006201518042049050611691565b9056","0x606060405236156100d7576000357c010000000000000000000000000000000000000000000000000000000090048063173825d91461013f5780632f54bf6e146101525780634123cb6b146101795780635c52c2f51461019a5780637065cb48146101a7578063746c9171146101ba578063797af627146101db578063b20d30a914610202578063b61d27f614610215578063b75c7dc614610253578063ba51a6df14610266578063c2cf732614610279578063cbf0b0c0146102a6578063f00d4b5d146102b9578063f1736d86146102d2576100d7565b61013d5b600034111561013a577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b565b005b6101506004803590602001506106ed565b005b6101636004803590602001506108cd565b6040518082815260200191505060405180910390f35b6101846004506109b9565b6040518082815260200191505060405180910390f35b6101a5600450610a07565b005b6101b8600480359060200150610598565b005b6101c56004506109b0565b6040518082815260200191505060405180910390f35b6101ec600480359060200150610de9565b6040518082815260200191505060405180910390f35b6102136004803590602001506109c2565b005b61023d6004803590602001803590602001803590602001906004018035906020019150610aa8565b6040518082815260200191505060405180910390f35b6102646004803590602001506102f3565b005b610277600480359060200150610837565b005b61029060048035906020018035906020015061090f565b6040518082815260200191505060405180910390f35b6102b7600480359060200150610a56565b005b6102d06004803590602001803590602001506103f5565b005b6102dd600450610a4c565b6040518082815260200191505060405180910390f35b60006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549250600083141561033a576103ef565b8260020a91506101036000506000858152602001908152602001600020600050905060008282600101600050541611156103ee578060000160008181505480929190600101919050555081816001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b3385604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b50505050565b600060003643604051808484808284378201915050828152602001935050505060405180910390206104268161112b565b1561059157610434836108cd565b1561043f5750610593565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156104815750610593565b6104896115bd565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c8484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b505b505050565b60003643604051808484808284378201915050828152602001935050505060405180910390206105c78161112b565b156106e8576105d5826108cd565b156105e057506106ea565b6105e86115bd565b60fa600160005054101515610601576105ff61138b565b505b60fa60016000505410151561061657506106ea565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff166002600050600160005054610100811015610002579090016000508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c382604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b505b50565b6000600036436040518084848082843782019150508281526020019350505050604051809103902061071e8161112b565b156108315761010260005060008473ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156107655750610833565b60016001600050540360006000505411156107805750610833565b60006002600050836101008110156100025790900160005081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506107da6115bd565b6107e261138b565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da83604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b505b5050565b60003643604051808484808284378201915050828152602001935050505060405180910390206108668161112b565b156108c85760016000505482111561087e57506108ca565b816000600050819055506108906115bd565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da826040518082815260200191505060405180910390a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505411905061090a565b919050565b60006000600060006101036000506000878152602001908152602001600020600050925061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082141561097857600093506109a7565b8160020a9050600081846001016000505416141561099d57600093506109a7566109a6565b600193506109a7565b5b50505092915050565b60006000505481565b60016000505481565b60003643604051808484808284378201915050828152602001935050505060405180910390206109f18161112b565b15610a025781610105600050819055505b505b50565b6000364360405180848480828437820191505082815260200193505050506040518091039020610a368161112b565b15610a48576000610106600050819055505b505b565b6101056000505481565b6000364360405180848480828437820191505082815260200193505050506040518091039020610a858161112b565b15610aa3578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b6000610ab3336108cd565b15610de057610ac18461151d565b15610baa577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd0043385878686604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a18473ffffffffffffffffffffffffffffffffffffffff168484846040518083838082843782019150509250505060006040518083038185876185025a03f1925050505060006001029050610de1565b600036436040518084848082843782019150508281526020019350505050604051809103902090508050610bdd81610de9565b158015610c3d57506000610108600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610ddf5784610108600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908302179055508361010860005060008381526020019081526020016000206000506001016000508190555082826101086000506000848152602001908152602001600020600050600201600050919082805482825590600052602060002090601f01602090048101928215610d14579182015b82811115610d13578235826000505591602001919060010190610cf5565b5b509050610d3f9190610d21565b80821115610d3b5760008181506000905550600101610d21565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32813386888787604051808781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b5b5b949350505050565b600081610df58161112b565b15611124576000610108600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561112357610108600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166101086000506000858152602001908152602001600020600050600101600050546101086000506000868152602001908152602001600020600050600201600050604051808280548015610f2457820191906000526020600020905b815481529060010190602001808311610f0757829003601f168201915b505091505060006040518083038185876185025a03f192505050507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a3384610108600050600087815260200190815260200160002060005060010160005054610108600050600088815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166101086000506000898152602001908152602001600020600050600201600050604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818154815260200191508054801561107057820191906000526020600020905b81548152906001019060200180831161105357829003601f168201915b5050965050505050505060405180910390a1610108600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f01602090049060005260206000209081019061111691906110f8565b8082111561111257600081815060009055506001016110f8565b5090565b5050506001915050611126565b5b505b919050565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549250600083141561117457611383565b6101036000506000868152602001908152602001600020600050915060008260000160005054141561124c57600060005054826000016000508190555060008260010160005081905550610104600050805480919060010190908154818355818115116112135781836000526020600020918201910161121291906111f4565b8082111561120e57600081815060009055506001016111f4565b5090565b5b50505082600201600050819055508461010460005083600201600050548154811015610002579060005260206000209001600050819055505b8260020a90506000818360010160005054161415611382577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda3386604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a160018260000160005054111515611355576101046000506101036000506000878152602001908152602001600020600050600201600050548154811015610002579060005260206000209001600050600090556101036000506000868152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001935061138356611381565b816000016000818150548092919060019003919050555080826001016000828282505417925050819055505b5b5b505050919050565b60006000600190505b600160005054811015611518575b600160005054811080156113cd57506000600260005082610100811015610002579090016000505414155b156113df5780806001019150506113a2565b5b60016001600050541180156114105750600060026000506001600050546101008110156100025790900160005054145b1561142f576001600081815054809291906001900391905055506113e0565b6001600050548110801561145f575060006002600050600160005054610100811015610002579090016000505414155b8015611481575060006002600050826101008110156100025790900160005054145b156115135760026000506001600050546101008110156100025790900160005054600260005082610100811015610002579090016000508190555080610102600050600060026000508461010081101561000257909001600050548152602001908152602001600020600050819055506000600260005060016000505461010081101561000257909001600050819055505b611394565b5b5090565b6000611528336108cd565b156115b7576101076000505461153c61179c565b11156115615760006101066000508190555061155661179c565b610107600050819055505b610106600050548261010660005054011015801561158d57506101056000505482610106600050540111155b156115ae5781610106600082828250540192505081905550600190506115b8565b600090506115b8565b5b919050565b60006000610104600050549150600090505b8181101561169a57610108600050600061010460005083815481101561000257906000526020600020900160005054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460008255601f016020900490600052602060002090810190611689919061166b565b80821115611685576000818150600090555060010161166b565b5090565b5050505b80600101905080506115cf565b6116a26116a7565b5b5050565b60006000610104600050549150600090505b8181101561175557600060010261010460005082815481101561000257906000526020600020900160005054141515611747576101036000506000610104600050838154811015610002579060005260206000209001600050548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b80600101905080506116b9565b610104600050805460008255906000526020600020908101906117969190611778565b808211156117925760008181506000905550600101611778565b5090565b505b5050565b600062015180420490506117ab565b9056","0x606060405236156100b95760e060020a6000350463173825d9811461010b5780632f54bf6e146101665780634123cb6b1461018e5780635c52c2f5146101975780637065cb48146101c8578063746c9171146101fc578063797af62714610205578063b20d30a914610218578063b61d27f61461024c578063b75c7dc61461026d578063ba51a6df1461029c578063c2cf7326146102d0578063cbf0b0c01461030e578063f00d4b5d14610342578063f1736d861461037b575b61038560003411156101095760408051600160a060020a033216815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b565b6103856004356000600036436040518084848082843750505090910190815260405190819003602001902090506105e9815b600160a060020a03321660009081526101026020526040812054818082811415610c0357610d5b565b6103876004355b600160a060020a03811660009081526101026020526040812054115b919050565b61038760015481565b610385600036436040518084848082843750505090910190815260405190819003602001902090506103aa8161013d565b610385600435600036436040518084848082843750505090910190815260405190819003602001902090506103c98161013d565b61038760005481565b6103876004355b6000816109738161013d565b610385600435600036436040518084848082843750505090910190815260405190819003602001902090506103998161013d565b61038760048035906024803591604435918201910135600061072f3261016d565b610385600435600160a060020a03321660009081526101026020526040812054908082811415610564576105e3565b610385600435600036436040518084848082843750505090910190815260405190819003602001902090506106a98161013d565b610387600435602435600082815261010360209081526040808320600160a060020a0385168452610102909252822054828181141561070257610726565b610385600435600036436040518084848082843750505090910190815260405190819003602001902090506103b88161013d565b610385600435602435600060003643604051808484808284375050509091019081526040519081900360200190209050610b358161013d565b6103876101055481565b005b60408051918252519081900360200190f35b156103a5576101058290555b505b50565b156103a75760006101065550565b156103a55781600160a060020a0316ff5b156103a5576103d78261016d565b156103e257506103a7565b6104605b6101045460005b81811015610ea857610104805461010891600091849081101561000257600080516020610f6383398151915201548252506020918252604081208054600160a060020a0319168155600181018290556002810180548382559083528383209193610f2d92601f929092010481019061095b565b60015460fa90106104755761047361048a565b505b60015460fa90106104c757506103a7565b6106175b600060015b60015481101561096f575b600154811080156104ba5750600281610100811015610002570154600014155b15610d635760010161049a565b60018054810190819055600160a060020a038316906002906101008110156100025790900160005081905550600160005054610102600050600084600160a060020a03168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3826040518082600160a060020a0316815260200191505060405180910390a15050565b50506000828152610103602052604081206001810154600284900a9290831611156105e35780546001828101805492909101835590839003905560408051600160a060020a03321681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b50505050565b1561065557600160a060020a03831660009081526101026020526040812054925082141561065a57506103a5565b5060408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a15b505050565b600160016000505403600060005054111561067557506103a5565b600060028361010081101561000257508301819055600160a060020a038416815261010260205260408120556104866103e6565b156103a5576001548211156106be57506103a7565b60008290556106cb6103e6565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15050565b506001820154600282900a908116600014156107215760009350610726565b600193505b50505092915050565b1561094b57610743846000610e3d3261016d565b156107ff577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00432858786866040518086600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a184600160a060020a03168484846040518083838082843750505090810191506000908083038185876185025a03f1506000935061094b92505050565b6000364360405180848480828437505050909101908152604051908190036020019020915061082f90508161020c565b158015610852575060008181526101086020526040812054600160a060020a0316145b1561094b5760008181526101086020908152604082208054600160a060020a03191688178155600181018790556002018054858255818452928290209092601f01919091048101908490868215610953579182015b828111156109535782358260005055916020019190600101906108a7565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328132868887876040518087815260200186600160a060020a0316815260200185815260200184600160a060020a03168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b949350505050565b506108c59291505b8082111561096f576000815560010161095b565b5090565b15610b225760008381526101086020526040812054600160a060020a031614610b225760408051600091909120805460018201546002929092018054600160a060020a03929092169390918190839080156109f357820191906000526020600020905b8154815290600101906020018083116109d657829003601f168201915b505091505060006040518083038185876185025a03f150505060008481526101086020908152604080519281902080546001820154600160a060020a033281811688529587018b905293860181905292166060850181905260a06080860181815260029390930180549187018290527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a959293909160c083019084908015610ac557820191906000526020600020905b815481529060010190602001808311610aa857829003601f168201915b5050965050505050505060405180910390a160008381526101086020908152604082208054600160a060020a031916815560018101839055600281018054848255908452828420919392610b2892601f929092010481019061095b565b50919050565b5050506001915050610189565b156105e357610b438361016d565b15610b4e5750610655565b600160a060020a038416600090815261010260205260408120549250821415610b775750610655565b610b7f6103e6565b600160a060020a03831660028361010081101561000257508301819055600160a060020a03851660008181526101026020908152604080832083905584835291829020869055815192835282019290925281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a150505050565b60008581526101036020526040812080549093501415610c8b576000805483556001838101919091556101048054918201808255828015829011610c5a57818360005260206000209182019101610c5a919061095b565b50505060028301819055610104805487929081101561000257600091909152600080516020610f6383398151915201555b506001810154600283900a90811660001415610d5b5760408051600160a060020a03321681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610d48576000858152610103602052604090206002015461010480549091908110156100025760406000908120600080516020610f638339815191529290920181905580825560018083018290556002909201559450610d5b9050565b8154600019018255600182018054821790555b505050919050565b5b60018054118015610d8657506001546002906101008110156100025701546000145b15610d9a5760018054600019019055610d64565b60015481108015610dbd5750600154600290610100811015610002570154600014155b8015610dd757506002816101008110156100025701546000145b15610e3857600154600290610100811015610002578101549082610100811015610002578101919091558190610102906000908361010081101561000257810154825260209290925260408120929092556001546101008110156100025701555b61048f565b156101895761010754610e535b62015180420490565b1115610e6c57600061010655610e67610e4a565b610107555b6101065480830110801590610e8a5750610106546101055490830111155b15610ea057506101068054820190556001610189565b506000610189565b6103a56101045460005b81811015610f385761010480548290811015610002576000918252600080516020610f63833981519152015414610f2557610104805461010391600091849081101561000257600080516020610f6383398151915201548252506020919091526040812081815560018101829055600201555b600101610eb2565b5050506001016103ed565b610104805460008083559190915261065590600080516020610f638339815191529081019061095b56004c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe","0x606060405236156100c45760e060020a6000350463173825d981146101165780632f54bf6e146101715780634123cb6b1461019957806354fd4d50146101a25780635c52c2f5146101af5780637065cb48146101e0578063746c917114610214578063797af6271461021d578063b20d30a914610230578063b61d27f614610264578063b75c7dc614610285578063ba51a6df146102b4578063c2cf7326146102e8578063cbf0b0c014610326578063f00d4b5d1461035a578063f1736d8614610393575b61039d60003411156101145760408051600160a060020a033216815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b565b61039d6004356000600036436040518084848082843750505090910190815260405190819003602001902090506106b8815b600160a060020a03321660009081526101026020526040812054818082811415610c2e57610d86565b61039f6004355b600160a060020a03811660009081526101026020526040812054115b919050565b61039f60015481565b6103b16101085460ff1681565b61039d6000364360405180848480828437505050909101908152604051908190036020019020905061080981610148565b61039d6004356000364360405180848480828437505050909101908152604051908190036020019020905061063081610148565b61039f60005481565b61039f6004355b600081610a6c81610148565b61039d600435600036436040518084848082843750505090910190815260405190819003602001902090506107fd81610148565b61039f60048035906024803591604435918201910135600061082832610178565b61039d600435600160a060020a033216600090815261010260205260408120549080828114156103c757610446565b61039d6004356000364360405180848480828437505050909101908152604051908190036020019020905061077781610148565b61039f600435602435600082815261010360209081526040808320600160a060020a038516845261010290925282205482818114156107d0576107f4565b61039d6004356000364360405180848480828437505050909101908152604051908190036020019020905061081781610148565b61039d6004356024356000600036436040518084848082843750505090910190815260405190819003602001902090506104d181610148565b61039f6101055481565b005b60408051918252519081900360200190f35b6040805160ff9092168252519081900360200190f35b50506000828152610103602052604081206001810154600284900a9290831611156104465780546001828101805492909101835590839003905560408051600160a060020a03321681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b50505050565b600160a060020a03831660028361010081101561000257508301819055600160a060020a03851660008181526101026020908152604080832083905584835291829020869055815192835282019290925281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a1505b505050565b15610446576104df83610178565b156104ea57506104cc565b600160a060020a03841660009081526101026020526040812054925082141561051357506104cc565b61044c5b6101045460005b81811015610ed357610104805461010991600091849081101561000257600080516020610f8e83398151915201548252506020918252604081208054600160a060020a0319168155600181018290556002810180548382559083528383209193610f5892601f9290920104810190610a54565b60018054810190819055600160a060020a038316906002906101008110156100025790900160005081905550600160005054610102600050600084600160a060020a03168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3826040518082600160a060020a0316815260200191505060405180910390a15b505b50565b1561062b5761063e82610178565b15610649575061062d565b610651610517565b60015460fa90106106665761066461067b565b505b60015460fa9010610591575061062d565b6107355b600060015b600154811015610a68575b600154811080156106ab5750600281610100811015610002570154600014155b15610d8e5760010161068b565b156104cc57600160a060020a0383166000908152610102602052604081205492508214156106e6575061062b565b6001600160005054036000600050541115610701575061062b565b600060028361010081101561000257508301819055600160a060020a03841681526101026020526040812055610677610517565b5060408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a1505050565b1561062b5760015482111561078c575061062d565b6000829055610799610517565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15050565b506001820154600282900a908116600014156107ef57600093506107f4565b600193505b50505092915050565b1561062b575061010555565b1561062d5760006101065550565b1561062b5781600160a060020a0316ff5b15610a445761083c846000610e6832610178565b156108f8577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00432858786866040518086600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a184600160a060020a03168484846040518083838082843750505090810191506000908083038185876185025a03f15060009350610a4492505050565b60003643604051808484808284375050509091019081526040519081900360200190209150610928905081610224565b15801561094b575060008181526101096020526040812054600160a060020a0316145b15610a445760008181526101096020908152604082208054600160a060020a03191688178155600181018790556002018054858255818452928290209092601f01919091048101908490868215610a4c579182015b82811115610a4c5782358260005055916020019190600101906109a0565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328132868887876040518087815260200186600160a060020a0316815260200185815260200184600160a060020a03168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b949350505050565b506109be9291505b80821115610a685760008155600101610a54565b5090565b15610c1b5760008381526101096020526040812054600160a060020a031614610c1b5760408051600091909120805460018201546002929092018054600160a060020a0392909216939091819083908015610aec57820191906000526020600020905b815481529060010190602001808311610acf57829003601f168201915b505091505060006040518083038185876185025a03f150505060008481526101096020908152604080519281902080546001820154600160a060020a033281811688529587018b905293860181905292166060850181905260a06080860181815260029390930180549187018290527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a959293909160c083019084908015610bbe57820191906000526020600020905b815481529060010190602001808311610ba157829003601f168201915b5050965050505050505060405180910390a160008381526101096020908152604082208054600160a060020a031916815560018101839055600281018054848255908452828420919392610c2192601f9290920104810190610a54565b50919050565b5050506001915050610194565b60008581526101036020526040812080549093501415610cb6576000805483556001838101919091556101048054918201808255828015829011610c8557818360005260206000209182019101610c859190610a54565b50505060028301819055610104805487929081101561000257600091909152600080516020610f8e83398151915201555b506001810154600283900a90811660001415610d865760408051600160a060020a03321681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610d73576000858152610103602052604090206002015461010480549091908110156100025760406000908120600080516020610f8e8339815191529290920181905580825560018083018290556002909201559450610d869050565b8154600019018255600182018054821790555b505050919050565b5b60018054118015610db157506001546002906101008110156100025701546000145b15610dc55760018054600019019055610d8f565b60015481108015610de85750600154600290610100811015610002570154600014155b8015610e0257506002816101008110156100025701546000145b15610e6357600154600290610100811015610002578101549082610100811015610002578101919091558190610102906000908361010081101561000257810154825260209290925260408120929092556001546101008110156100025701555b610680565b156101945761010754610e7e5b62015180420490565b1115610e9757600061010655610e92610e75565b610107555b6101065480830110801590610eb55750610106546101055490830111155b15610ecb57506101068054820190556001610194565b506000610194565b61062b6101045460005b81811015610f635761010480548290811015610002576000918252600080516020610f8e833981519152015414610f5057610104805461010391600091849081101561000257600080516020610f8e83398151915201548252506020919091526040812081815560018101829055600201555b600101610edd565b50505060010161051e565b61010480546000808355919091526104cc90600080516020610f8e83398151915290810190610a5456004c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe","0x606060405236156100da5760e060020a6000350463173825d9811461012c5780632f54bf6e146101875780634123cb6b146101af57806352375093146101b857806354fd4d50146101c25780635c52c2f5146101cc578063659010e7146101fd5780637065cb4814610207578063746c91711461023b578063797af62714610244578063b20d30a914610257578063b61d27f61461028b578063b75c7dc6146102ac578063ba51a6df146102db578063c2cf73261461030f578063cbf0b0c01461034d578063f00d4b5d14610381578063f1736d86146103ba575b6103c4600034111561012a5760408051600160a060020a033216815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b565b6103c46004356000600036436040518084848082843750505090910190815260405190819003602001902090506106c9815b600160a060020a03321660009081526101026020526040812054818082811415610c3f57610d97565b6103c66004355b600160a060020a03811660009081526101026020526040812054115b919050565b6103c660015481565b6103c66101075481565b6103c66101085481565b6103c46000364360405180848480828437505050909101908152604051908190036020019020905061081a8161015e565b6103c66101065481565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506106418161015e565b6103c660005481565b6103c66004355b600081610a7d8161015e565b6103c46004356000364360405180848480828437505050909101908152604051908190036020019020905061080e8161015e565b6103c66004803590602480359160443591820191013560006108393261018e565b6103c4600435600160a060020a033216600090815261010260205260408120549080828114156103d857610457565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506107888161015e565b6103c6600435602435600082815261010360209081526040808320600160a060020a038516845261010290925282205482818114156107e157610805565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506108288161015e565b6103c46004356024356000600036436040518084848082843750505090910190815260405190819003602001902090506104e28161015e565b6103c66101055481565b005b60408051918252519081900360200190f35b50506000828152610103602052604081206001810154600284900a9290831611156104575780546001828101805492909101835590839003905560408051600160a060020a03321681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b50505050565b600160a060020a03831660028361010081101561000257508301819055600160a060020a03851660008181526101026020908152604080832083905584835291829020869055815192835282019290925281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a1505b505050565b15610457576104f08361018e565b156104fb57506104dd565b600160a060020a03841660009081526101026020526040812054925082141561052457506104dd565b61045d5b6101045460005b81811015610ee457610104805461010991600091849081101561000257600080516020610f9f83398151915201548252506020918252604081208054600160a060020a0319168155600181018290556002810180548382559083528383209193610f6992601f9290920104810190610a65565b60018054810190819055600160a060020a038316906002906101008110156100025790900160005081905550600160005054610102600050600084600160a060020a03168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3826040518082600160a060020a0316815260200191505060405180910390a15b505b50565b1561063c5761064f8261018e565b1561065a575061063e565b610662610528565b60015460fa90106106775761067561068c565b505b60015460fa90106105a2575061063e565b6107465b600060015b600154811015610a79575b600154811080156106bc5750600281610100811015610002570154600014155b15610d9f5760010161069c565b156104dd57600160a060020a0383166000908152610102602052604081205492508214156106f7575061063c565b6001600160005054036000600050541115610712575061063c565b600060028361010081101561000257508301819055600160a060020a03841681526101026020526040812055610688610528565b5060408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a1505050565b1561063c5760015482111561079d575061063e565b60008290556107aa610528565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15050565b506001820154600282900a908116600014156108005760009350610805565b600193505b50505092915050565b1561063c575061010555565b1561063e5760006101065550565b1561063c5781600160a060020a0316ff5b15610a555761084d846000610e793261018e565b15610909577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00432858786866040518086600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a184600160a060020a03168484846040518083838082843750505090810191506000908083038185876185025a03f15060009350610a5592505050565b6000364360405180848480828437505050909101908152604051908190036020019020915061093990508161024b565b15801561095c575060008181526101096020526040812054600160a060020a0316145b15610a555760008181526101096020908152604082208054600160a060020a03191688178155600181018790556002018054858255818452928290209092601f01919091048101908490868215610a5d579182015b82811115610a5d5782358260005055916020019190600101906109b1565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328132868887876040518087815260200186600160a060020a0316815260200185815260200184600160a060020a03168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b949350505050565b506109cf9291505b80821115610a795760008155600101610a65565b5090565b15610c2c5760008381526101096020526040812054600160a060020a031614610c2c5760408051600091909120805460018201546002929092018054600160a060020a0392909216939091819083908015610afd57820191906000526020600020905b815481529060010190602001808311610ae057829003601f168201915b505091505060006040518083038185876185025a03f150505060008481526101096020908152604080519281902080546001820154600160a060020a033281811688529587018b905293860181905292166060850181905260a06080860181815260029390930180549187018290527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a959293909160c083019084908015610bcf57820191906000526020600020905b815481529060010190602001808311610bb257829003601f168201915b5050965050505050505060405180910390a160008381526101096020908152604082208054600160a060020a031916815560018101839055600281018054848255908452828420919392610c3292601f9290920104810190610a65565b50919050565b50505060019150506101aa565b60008581526101036020526040812080549093501415610cc7576000805483556001838101919091556101048054918201808255828015829011610c9657818360005260206000209182019101610c969190610a65565b50505060028301819055610104805487929081101561000257600091909152600080516020610f9f83398151915201555b506001810154600283900a90811660001415610d975760408051600160a060020a03321681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610d84576000858152610103602052604090206002015461010480549091908110156100025760406000908120600080516020610f9f8339815191529290920181905580825560018083018290556002909201559450610d979050565b8154600019018255600182018054821790555b505050919050565b5b60018054118015610dc257506001546002906101008110156100025701546000145b15610dd65760018054600019019055610da0565b60015481108015610df95750600154600290610100811015610002570154600014155b8015610e1357506002816101008110156100025701546000145b15610e7457600154600290610100811015610002578101549082610100811015610002578101919091558190610102906000908361010081101561000257810154825260209290925260408120929092556001546101008110156100025701555b610691565b156101aa5761010754610e8f5b62015180420490565b1115610ea857600061010655610ea3610e86565b610107555b6101065480830110801590610ec65750610106546101055490830111155b15610edc575061010680548201905560016101aa565b5060006101aa565b61063c6101045460005b81811015610f745761010480548290811015610002576000918252600080516020610f9f833981519152015414610f6157610104805461010391600091849081101561000257600080516020610f9f83398151915201548252506020919091526040812081815560018101829055600201555b600101610eee565b50505060010161052f565b61010480546000808355919091526104dd90600080516020610f9f83398151915290810190610a6556004c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe"],b=["0x60606040523615600d57600d565b606a5b7328aa4f0b12d6b0601e45836a14caa9ab1ad28b8173ffffffffffffffffffffffffffffffffffffffff16600036604051808383808284378201915050925050506000604051808303816000866161da5a03f2915050505b565b00","0x3660008037602060003660008073bfa69ba91385206bfdd2d8b9c1a5d6c10097a85b60325a03f260206000f3","0x3660008037602060003660003473d658a4b8247c14868f3c512fa5cbb6e458e4a98961235a5a03f260206000f3","0x3660008037602060003660003473a8b566789c430c906d0eb6b2916e550a9c493d8a61235a5a03f260206000f3"],a=["0x3660008037602060003660003473cafecafecafecafecafecafecafecafecafecafe61235a5a03f260206000f3","0x3660008037602060003660003473cafecafecafecafecafecafecafecafecafecafe61235a5a03f21560015760206000f3"],e=function(e){!e.address||e.vulnerabilities&&void 0!==e.vulnerabilities.txorigin||web3.eth.getCode(e.address,function(c,d){if(!c&&d.length>2){var t=!1,n=!!_.find(f,function(f){return d===f}),r=!!_.find(b,function(f){return d===f}),o=!!_.find(a,function(f){var b;return new RegExp(f.replace("cafecafecafecafecafecafecafecafecafecafe","[a-z0-9]{40}"),"i").test(d)});(n||r||o)&&(t=!0,EthElements.Modal.question({text:TAPi18n.__("wallet.app.warnings.txOriginVulnerabilityPopup"),ok:function(){FlowRouter.go("/account/"+e.address)},cancel:!0,modalQuestionOkButtonText:TAPi18n.__("wallet.app.warnings.checkThisNow"),modalQuestionCancelButtonText:TAPi18n.__("wallet.app.warnings.checkThisLater")},{closeable:!1})),Wallets.update(e._id,{$set:{vulnerabilities:{txorigin:t}}})}})},c=function(){function f(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()+f()};updateContractData=function(f){var b=contracts["ct_"+f._id];if(b){if(!b.options.address){if(!b.address)return void console.error("No contract address for contract",b);b.options.address=b.address}b.methods.m_dailyLimit().call().then(function(b){return Wallets.update(f._id,{$set:{dailyLimit:b.toString(10)}}),null}),b.methods.m_required().call().then(function(b){return Wallets.update(f._id,{$set:{requiredSignatures:b.toString(10)}}),null}),f.version>=1&&b.methods.m_spentToday().call().then(function(a){return b.methods.m_lastDay().call().then(function(b){if(a&&_.isFinite(a.toString(10))){var e=new Date,c=Math.floor(e/864e5);Wallets.update(f._id,{$set:{dailyLimitSpent:c===Number(b)?a.toString(10):"0"}})}}),null}),checkOwner(f),_.isUndefined(f.version)&&f.address&&b.methods.version().call().then(function(b){return b.toString(10)&&(Wallets.update(f._id,{$set:{version:Number(b)}}),f.version=Number(b)),null})}},checkOwner=function(f){web3.utils.isAddress(f.address)&&checkWalletOwners(f.address).then(function(b){return Wallets.update(f._id,{$set:{owners:b.owners}}),null},function(){})},confirmOrRevoke=function(f,b){var a=Helpers.makeId("pc",b.returnValues.operation);a&&f.hasConfirmed(b.returnValues.operation,b.returnValues.owner,function(f,e){var c=PendingConfirmations.findOne(a),d={$set:{from:b.address}};c&&c.sending===b.returnValues.owner&&(d.$unset={sending:""}),Helpers.eventLogs("CHECK OPERATION: "+b.returnValues.operation+" owner: "+b.returnValues.owner,e),e?c?d.$addToSet={confirmedOwners:b.returnValues.owner}:d.$set.confirmedOwners=[b.returnValues.owner]:c?d.$pull={confirmedOwners:b.returnValues.owner}:d.$set.confirmedOwners=[],PendingConfirmations.upsert(a,d)})};var d=function(f,b){var a=(f.checkpointBlock||0)-ethereumConfig.rollBackBy;(b||a<0)&&(a=f.creationBlock);var c=contracts["ct_"+f._id];if(c){c.walletEvents||(c.walletEvents=[]);var t=c.walletEvents;if(_.each(c.walletEvents,function(f){f.unsubscribe(),c.walletEvents.shift()}),f.imported)Helpers.eventLogs("Imported wallet: "+f.address+" checking for any log from block #"+f.creationBlock),web3.eth.subscribe("logs",{address:f.address,fromBlock:f.creationBlock},function(b,a){if(!b){var e=EthBlocks.latest.number;0!==a.length&&a.forEach(function(f){f.blockNumberEthBlocks.latest.number&&Wallets.update({_id:f._id},{$set:{checkpointBlock:b.blockNumber}}),"Deposit"===b.event){if(b.removed)return void Transactions.remove({_id:Helpers.makeId("tx",b.transactionHash)});var a;if(Helpers.eventLogs("Deposit for "+f.address+" arrived in block: #"+b.blockNumber,Number(b.returnValues.value)),!(a=addTransaction(b,b.returnValues.from,f.address,b.returnValues.value.toString(10)))||!a.tokenId){var e=Helpers.makeId("tx",b.transactionHash);Helpers.showNotification("wallet.transactions.notifications.incomingTransaction",{to:Helpers.getAccountNameByAddress(f.address),from:Helpers.getAccountNameByAddress(b.returnValues.from),amount:EthTools.formatBalance(b.returnValues.value,"0,0.00[000000] unit","ether")},function(){EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:e}},{class:"transaction-info"})})}}if("SingleTransact"===b.event||"MultiTransact"===b.event){if(b.removed)return void Transactions.remove({_id:Helpers.makeId("tx",b.transactionHash)});var a;if(Helpers.eventLogs(b.event+" for "+f.address+" arrived in block: #"+b.blockNumber,Number(b.returnValues.value)),!(a=addTransaction(b,f.address,b.returnValues.to,b.returnValues.value.toString(10)))||!a.tokenId){var e=Helpers.makeId("tx",b.transactionHash);Helpers.showNotification("wallet.transactions.notifications.outgoingTransaction",{to:Helpers.getAccountNameByAddress(b.returnValues.to),from:Helpers.getAccountNameByAddress(f.address),amount:EthTools.formatBalance(b.returnValues.value,"0,0.00[000000] unit","ether")},function(){EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:e}},{class:"transaction-info"})})}}"ConfirmationNeeded"===b.event&&(Helpers.eventLogs("ConfirmationNeeded for "+f.address+" arrived in block: #"+b.blockNumber,b.returnValues.value.toNumber()+", Operation "+b.returnValues.operation),web3.eth.getBlock(b.blockNumber,!0,function(a,e){if(!a&&e){var c=Helpers.makeId("pc",b.returnValues.operation),d=Wallets.find({$or:[{address:b.address},{address:b.returnValues.to}]}).fetch(),t=PendingConfirmations.findOne(c);if(!(from=Wallets.findOne({address:b.address}))||!EthAccounts.findOne({address:{$in:from.owners}}))return;PendingConfirmations.upsert(c,{$set:{confirmedOwners:t?t.confirmedOwners:[],initiator:b.returnValues.initiator,operation:b.returnValues.operation,value:b.returnValues.value.toString(10),to:b.returnValues.to,from:f.address,timestamp:e.timestamp,blockNumber:b.blockNumber,blockHash:b.blockHash,transactionHash:b.transactionHash,transactionIndex:b.transactionIndex}}),t&&!t.operation&&Helpers.showNotification("wallet.transactions.notifications.pendingConfirmation",{initiator:Helpers.getAccountNameByAddress(b.returnValues.initiator),to:Helpers.getAccountNameByAddress(b.returnValues.to),from:Helpers.getAccountNameByAddress(f.address),amount:EthTools.formatBalance(b.returnValues.value,"0,0.00[000000] unit","ether")},function(){FlowRouter.go("/account/"+f.address)});var n=Helpers.makeId("tx",b.transactionHash);Meteor.setTimeout(function(){Transactions.remove(n)},500)}})),"OwnerAdded"===b.event&&(Helpers.eventLogs("OwnerAdded for "+f.address+" arrived in block: #"+b.blockNumber,b.returnValues),checkOwner(f)),"OwnerRemoved"===b.event&&(Helpers.eventLogs("OwnerRemoved for "+f.address+" arrived in block: #"+b.blockNumber,b.returnValues),checkOwner(f)),"RequirementChanged"===b.event&&Helpers.eventLogs("RequirementChanged for "+f.address+" arrived in block: #"+b.blockNumber,b.returnValues),"Confirmation"===b.event&&(Helpers.eventLogs("Operation confirmation for "+f.address+" arrived in block: #"+b.blockNumber,b.returnValues),confirmOrRevoke(c,b)),"Revoke"===b.event&&(Helpers.eventLogs("Operation revokation for "+f.address+" arrived in block: #"+b.blockNumber,b.returnValues),confirmOrRevoke(c,b))})}else Helpers.eventLogs("Contract address not set, checking for contract receipt"),web3.eth.getTransactionReceipt(f.transactionHash,function(b,a){if(b)console.log("Error from observeWallets getTransactionReceipt: ",b);else if(a){if(!a.contractAddress)return void console.log("No contract address for transaction hash: ",f.transactionHash);web3.eth.getCode(a.contractAddress,function(b,c){Helpers.eventLogs("Contract created on "+a.contractAddress),!b&&c.length>2?(Wallets.update(f._id,{$set:{creationBlock:a.blockNumber,address:a.contractAddress}}),f=Wallets.findOne(f._id),WalletContract.options.address=a.contractAddress,WalletContract.address=a.contractAddress,contracts["ct_"+f._id]=WalletContract,d(f),e(f)):(Helpers.eventLogs("Contract created on "+a.contractAddress+", but didn't stored the code!"),Wallets.remove(f._id))})}})}};observeWallets=function(){var f=function(f,b){var a=EthBlocks.latest.number-f.creationBlock;if(f.address&&(!b||b&&!b.address)&&a0?(Helpers.eventLogs("Checking wallet address "+f.address+" for code. Current confirmations: "+a),web3.eth.getCode(f.address,function(b,a){b||(a.length>2?updateContractData(f):(Wallets.remove(f._id),e.unsubscribe()))})):a>ethereumConfig.requiredConfirmations&&e.unsubscribe()})};collectionObservers[collectionObservers.length]=Wallets.find({}).observe({added:function(b){if(b.address)WalletContract.options.address=b.address,contracts["ct_"+b._id]=WalletContract,web3.eth.getBalance(b.address,function(f,a){f||Wallets.update(b._id,{$set:{balance:a.toString(10)}})}),web3.eth.getCode(b.address,function(a,e){a?console.log("Couldn't check Wallet code of ",b,a):e&&e.length>2?(Wallets.update(b._id,{$unset:{disabled:""}}),updateContractData(b),d(b),f(b,{})):Wallets.update(b._id,{$set:{disabled:!0}})}),e(b);else{if(b.transactionHash)return contracts["ct_"+b._id]=WalletContract,void(b.creationBlock+50<=EthBlocks.latest.number?Wallets.remove(b._id):d(b));if(_.isEmpty(b.owners))return;if(-1!==b.code.indexOf("cafecafecafecafecafecafecafecafecafecafe"))return GlobalNotification.error({content:TAPi18n.__("wallet.newWallet.error.stubHasNoOrigWalletAddress"),closeable:!1}),void Wallets.remove(b._id);Helpers.checkChain(function(f){if(f)return Wallets.remove(b._id),void GlobalNotification.error({content:TAPi18n.__("wallet.app.error.wrongChain"),closeable:!1});console.log("Deploying Wallet with following options",b),WalletContract.deploy({data:b.code,arguments:[b.owners,b.requiredSignatures||1,b.dailyLimit||ethereumConfig.dailyLimitDefault]}).send({from:b.deployFrom,gas:3e6},function(f,a){if(f)return console.log("Error while deploying wallet",f),GlobalNotification.error({content:f.message,duration:8}),void Wallets.remove(b._id);b.transactionHash=a,console.log("Contract transaction hash: ",a),Wallets.update(b._id,{$set:{transactionHash:a}})}).on("receipt",function(f){console.log("Contract receipt: ",f)}).then(function(f){return f.address=f.options.address,console.log("Contract Address: ",f.options.address),contracts["ct_"+b._id]=f,Wallets.update(b._id,{$set:{creationBlock:EthBlocks.latest.number-1,checkpointBlock:EthBlocks.latest.number-1,address:f.options.address},$unset:{code:""}}),b.address=f.options.address,delete b.code,updateContractData(b),d(b),EthElements.Modal.question({template:"views_modals_backupContractAddress",data:{address:f.options.address},ok:!0},{closeable:!1}),null})})}},changed:function(f,b){f.transactions!=b.transactions&&updateContractData(f)},removed:function(f){var b=contracts["ct_"+f._id];b&&(b.walletEvents||(b.walletEvents=[]),_.each(b.walletEvents,function(f){f.unsubscribe(),b.walletEvents.shift()}),delete contracts["ct_"+f._id],_.each(Transactions.find({from:f.address}).fetch(),function(f){Wallets.findOne({transactions:f._id})||EthAccounts.findOne({transactions:f._id})||Transactions.remove(f._id)}),_.each(PendingConfirmations.find({from:f.address}).fetch(),function(f){PendingConfirmations.remove(f._id)}))}})}}).call(this); @@ -306,7 +306,7 @@ Mongo=Package.mongo.Mongo,Session=Package.session.Session,$=Package.jquery.$,jQu (function(){var f="0x273930d21e01ee25e4c219b63259d214872220a2",e="0x1d649ca03d1bcd84877482c1dd8d3f9a7398728f";walletInterface=[{constant:!1,inputs:[{name:"_owner",type:"address"}],name:"removeOwner",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_addr",type:"address"}],name:"isOwner",outputs:[{name:"",type:"bool"}],type:"function"},{constant:!0,inputs:[],name:"m_numOwners",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!0,inputs:[],name:"m_lastDay",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!0,inputs:[],name:"version",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!1,inputs:[],name:"resetSpentToday",outputs:[],type:"function"},{constant:!0,inputs:[],name:"m_spentToday",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!1,inputs:[{name:"_owner",type:"address"}],name:"addOwner",outputs:[],type:"function"},{constant:!0,inputs:[],name:"m_required",outputs:[{name:"",type:"uint256"}],type:"function"},{constant:!1,inputs:[{name:"_h",type:"bytes32"}],name:"confirm",outputs:[{name:"",type:"bool"}],type:"function"},{constant:!1,inputs:[{name:"_newLimit",type:"uint256"}],name:"setDailyLimit",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"},{name:"_value",type:"uint256"},{name:"_data",type:"bytes"}],name:"execute",outputs:[{name:"_r",type:"bytes32"}],type:"function"},{constant:!1,inputs:[{name:"_operation",type:"bytes32"}],name:"revoke",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_newRequired",type:"uint256"}],name:"changeRequirement",outputs:[],type:"function"},{constant:!0,inputs:[{name:"_operation",type:"bytes32"},{name:"_owner",type:"address"}],name:"hasConfirmed",outputs:[{name:"",type:"bool"}],type:"function"},{constant:!1,inputs:[{name:"_to",type:"address"}],name:"kill",outputs:[],type:"function"},{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"}],name:"changeOwner",outputs:[],type:"function"},{constant:!0,inputs:[],name:"m_dailyLimit",outputs:[{name:"",type:"uint256"}],type:"function"},{inputs:[{name:"_owners",type:"address[]"},{name:"_required",type:"uint256"},{name:"_daylimit",type:"uint256"}],type:"constructor"},{anonymous:!1,inputs:[{indexed:!1,name:"owner",type:"address"},{indexed:!1,name:"operation",type:"bytes32"}],name:"Confirmation",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"owner",type:"address"},{indexed:!1,name:"operation",type:"bytes32"}],name:"Revoke",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"oldOwner",type:"address"},{indexed:!1,name:"newOwner",type:"address"}],name:"OwnerChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newOwner",type:"address"}],name:"OwnerAdded",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"oldOwner",type:"address"}],name:"OwnerRemoved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"newRequirement",type:"uint256"}],name:"RequirementChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"from",type:"address"},{indexed:!1,name:"value",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"owner",type:"address"},{indexed:!1,name:"value",type:"uint256"},{indexed:!1,name:"to",type:"address"},{indexed:!1,name:"data",type:"bytes"}],name:"SingleTransact",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"owner",type:"address"},{indexed:!1,name:"operation",type:"bytes32"},{indexed:!1,name:"value",type:"uint256"},{indexed:!1,name:"to",type:"address"},{indexed:!1,name:"data",type:"bytes"}],name:"MultiTransact",type:"event"},{anonymous:!1,inputs:[{indexed:!1,name:"operation",type:"bytes32"},{indexed:!1,name:"initiator",type:"address"},{indexed:!1,name:"value",type:"uint256"},{indexed:!1,name:"to",type:"address"},{indexed:!1,name:"data",type:"bytes"}],name:"ConfirmationNeeded",type:"event"}],WalletContract=new web3.eth.Contract(walletInterface),walletABI="0x60606040526002610108600050556040516110e53803806110e583398101604052805160805160a051919092019190808383815160019081018155600090600160a060020a0332169060029060038390559183525061010260205260408220555b82518110156100eb57828181518110156100025790602001906020020151600160a060020a03166002600050826002016101008110156100025790900160005081905550806002016101026000506000858481518110156100025790602001906020020151600160a060020a0316815260200190815260200160002060005081905550600101610060565b81600060005081905550505050806101056000508190555061010f62015180420490565b6101075550505050610fbf806101266000396000f300606060405236156100da5760e060020a6000350463173825d9811461012c5780632f54bf6e146101875780634123cb6b146101af57806352375093146101b857806354fd4d50146101c25780635c52c2f5146101cc578063659010e7146101fd5780637065cb4814610207578063746c91711461023b578063797af62714610244578063b20d30a914610257578063b61d27f61461028b578063b75c7dc6146102ac578063ba51a6df146102db578063c2cf73261461030f578063cbf0b0c01461034d578063f00d4b5d14610381578063f1736d86146103ba575b6103c4600034111561012a5760408051600160a060020a033216815234602082015281517fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c929181900390910190a15b565b6103c46004356000600036436040518084848082843750505090910190815260405190819003602001902090506106c9815b600160a060020a03321660009081526101026020526040812054818082811415610c3f57610d97565b6103c66004355b600160a060020a03811660009081526101026020526040812054115b919050565b6103c660015481565b6103c66101075481565b6103c66101085481565b6103c46000364360405180848480828437505050909101908152604051908190036020019020905061081a8161015e565b6103c66101065481565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506106418161015e565b6103c660005481565b6103c66004355b600081610a7d8161015e565b6103c46004356000364360405180848480828437505050909101908152604051908190036020019020905061080e8161015e565b6103c66004803590602480359160443591820191013560006108393261018e565b6103c4600435600160a060020a033216600090815261010260205260408120549080828114156103d857610457565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506107888161015e565b6103c6600435602435600082815261010360209081526040808320600160a060020a038516845261010290925282205482818114156107e157610805565b6103c4600435600036436040518084848082843750505090910190815260405190819003602001902090506108288161015e565b6103c46004356024356000600036436040518084848082843750505090910190815260405190819003602001902090506104e28161015e565b6103c66101055481565b005b60408051918252519081900360200190f35b50506000828152610103602052604081206001810154600284900a9290831611156104575780546001828101805492909101835590839003905560408051600160a060020a03321681526020810186905281517fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b929181900390910190a15b50505050565b600160a060020a03831660028361010081101561000257508301819055600160a060020a03851660008181526101026020908152604080832083905584835291829020869055815192835282019290925281517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c929181900390910190a1505b505050565b15610457576104f08361018e565b156104fb57506104dd565b600160a060020a03841660009081526101026020526040812054925082141561052457506104dd565b61045d5b6101045460005b81811015610ee457610104805461010991600091849081101561000257600080516020610f9f83398151915201548252506020918252604081208054600160a060020a0319168155600181018290556002810180548382559083528383209193610f6992601f9290920104810190610a65565b60018054810190819055600160a060020a038316906002906101008110156100025790900160005081905550600160005054610102600050600084600160a060020a03168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c3826040518082600160a060020a0316815260200191505060405180910390a15b505b50565b1561063c5761064f8261018e565b1561065a575061063e565b610662610528565b60015460fa90106106775761067561068c565b505b60015460fa90106105a2575061063e565b6107465b600060015b600154811015610a79575b600154811080156106bc5750600281610100811015610002570154600014155b15610d9f5760010161069c565b156104dd57600160a060020a0383166000908152610102602052604081205492508214156106f7575061063c565b6001600160005054036000600050541115610712575061063c565b600060028361010081101561000257508301819055600160a060020a03841681526101026020526040812055610688610528565b5060408051600160a060020a038516815290517f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da9181900360200190a1505050565b1561063c5760015482111561079d575061063e565b60008290556107aa610528565b6040805183815290517facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da9181900360200190a15050565b506001820154600282900a908116600014156108005760009350610805565b600193505b50505092915050565b1561063c575061010555565b1561063e5760006101065550565b1561063c5781600160a060020a0316ff5b15610a555761084d846000610e793261018e565b15610909577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd00432858786866040518086600160a060020a0316815260200185815260200184600160a060020a031681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a184600160a060020a03168484846040518083838082843750505090810191506000908083038185876185025a03f15060009350610a5592505050565b6000364360405180848480828437505050909101908152604051908190036020019020915061093990508161024b565b15801561095c575060008181526101096020526040812054600160a060020a0316145b15610a555760008181526101096020908152604082208054600160a060020a03191688178155600181018790556002018054858255818452928290209092601f01919091048101908490868215610a5d579182015b82811115610a5d5782358260005055916020019190600101906109b1565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf328132868887876040518087815260200186600160a060020a0316815260200185815260200184600160a060020a03168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b949350505050565b506109cf9291505b80821115610a795760008155600101610a65565b5090565b15610c2c5760008381526101096020526040812054600160a060020a031614610c2c5760408051600091909120805460018201546002929092018054600160a060020a0392909216939091819083908015610afd57820191906000526020600020905b815481529060010190602001808311610ae057829003601f168201915b505091505060006040518083038185876185025a03f150505060008481526101096020908152604080519281902080546001820154600160a060020a033281811688529587018b905293860181905292166060850181905260a06080860181815260029390930180549187018290527fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a975094958a959293909160c083019084908015610bcf57820191906000526020600020905b815481529060010190602001808311610bb257829003601f168201915b5050965050505050505060405180910390a160008381526101096020908152604082208054600160a060020a031916815560018101839055600281018054848255908452828420919392610c3292601f9290920104810190610a65565b50919050565b50505060019150506101aa565b60008581526101036020526040812080549093501415610cc7576000805483556001838101919091556101048054918201808255828015829011610c9657818360005260206000209182019101610c969190610a65565b50505060028301819055610104805487929081101561000257600091909152600080516020610f9f83398151915201555b506001810154600283900a90811660001415610d975760408051600160a060020a03321681526020810187905281517fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda929181900390910190a1815460019011610d84576000858152610103602052604090206002015461010480549091908110156100025760406000908120600080516020610f9f8339815191529290920181905580825560018083018290556002909201559450610d979050565b8154600019018255600182018054821790555b505050919050565b5b60018054118015610dc257506001546002906101008110156100025701546000145b15610dd65760018054600019019055610da0565b60015481108015610df95750600154600290610100811015610002570154600014155b8015610e1357506002816101008110156100025701546000145b15610e7457600154600290610100811015610002578101549082610100811015610002578101919091558190610102906000908361010081101561000257810154825260209290925260408120929092556001546101008110156100025701555b610691565b156101aa5761010754610e8f5b62015180420490565b1115610ea857600061010655610ea3610e86565b610107555b6101065480830110801590610ec65750610106546101055490830111155b15610edc575061010680548201905560016101aa565b5060006101aa565b61063c6101045460005b81811015610f745761010480548290811015610002576000918252600080516020610f9f833981519152015414610f6157610104805461010391600091849081101561000257600080516020610f9f83398151915201548252506020919091526040812081815560018101829055600201555b600101610eee565b50505060010161052f565b61010480546000808355919091526104dd90600080516020610f9f83398151915290810190610a6556004c0be60200faa20559308cb7b5a1bb3255c16cb1cab91f525b5ae7a03d02fabe",walletStubABI="0x6060604052600261010860005055604051611b51380380611b51833981016040528080518201919060200180519060200190919080519060200190919050505b805b83835b600060018351016001600050819055503373ffffffffffffffffffffffffffffffffffffffff16600260005060016101008110156100025790900160005b5081905550600161010260005060003373ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005081905550600090505b825181101561016e5782818151811015610002579060200190602002015173ffffffffffffffffffffffffffffffffffffffff166002600050826002016101008110156100025790900160005b508190555080600201610102600050600085848151811015610002579060200190602002015173ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055505b80600101905080506100c2565b816000600050819055505b505050806101056000508190555061018f6101ad565b610107600050819055505b505b505050611992806101bf6000396000f35b600062015180420490506101bc565b9056606060405236156100f8576000357c010000000000000000000000000000000000000000000000000000000090048063173825d9146101605780632f54bf6e146101785780634123cb6b146101a457806352375093146101c757806354fd4d50146101ea5780635c52c2f51461020d578063659010e71461021c5780637065cb481461023f578063746c917114610257578063797af6271461027a578063b20d30a9146102a6578063b61d27f6146102be578063b75c7dc614610307578063ba51a6df1461031f578063c2cf732614610337578063cbf0b0c01461036c578063f00d4b5d14610384578063f1736d86146103a5576100f8565b61015e5b600034111561015b577fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3334604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b565b005b61017660048080359060200190919050506107c4565b005b61018e60048080359060200190919050506109a5565b6040518082815260200191505060405180910390f35b6101b16004805050610a91565b6040518082815260200191505060405180910390f35b6101d46004805050610b38565b6040518082815260200191505060405180910390f35b6101f76004805050610b42565b6040518082815260200191505060405180910390f35b61021a6004805050610adf565b005b6102296004805050610b2e565b6040518082815260200191505060405180910390f35b610255600480803590602001909190505061066e565b005b6102646004805050610a88565b6040518082815260200191505060405180910390f35b6102906004808035906020019091905050610f0e565b6040518082815260200191505060405180910390f35b6102bc6004808035906020019091905050610a9a565b005b6102f160048080359060200190919080359060200190919080359060200190820180359060200191909192905050610b9e565b6040518082815260200191505060405180910390f35b61031d60048080359060200190919050506103c8565b005b610335600480803590602001909190505061090f565b005b61035660048080359060200190919080359060200190919050506109e7565b6040518082815260200191505060405180910390f35b6103826004808035906020019091905050610b4c565b005b6103a360048080359060200190919080359060200190919050506104ca565b005b6103b26004805050610b24565b6040518082815260200191505060405180910390f35b60006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549250600083141561040f576104c4565b8260020a91506101036000506000858152602001908152602001600020600050905060008282600101600050541611156104c3578060000160008181505480929190600101919050555081816001016000828282505403925050819055507fc7fb647e59b18047309aa15aad418e5d7ca96d173ad704f1031a2c3d7591734b3385604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b5b50505050565b600060003643604051808484808284378201915050828152602001935050505060405180910390206104fb816112db565b1561066757610509836109a5565b156105145750610669565b61010260005060008573ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060005054915060008214156105565750610669565b61055e611777565b8273ffffffffffffffffffffffffffffffffffffffff166002600050836101008110156100025790900160005b5081905550600061010260005060008673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055508161010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c8484604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a15b505b505050565b600036436040518084848082843782019150508281526020019350505050604051809103902061069d816112db565b156107bf576106ab826109a5565b156106b657506107c1565b6106be611777565b60fa6001600050541015156106d7576106d561153d565b505b60fa6001600050541015156106ec57506107c1565b60016000818150548092919060010191905055508173ffffffffffffffffffffffffffffffffffffffff1660026000506001600050546101008110156100025790900160005b508190555060016000505461010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055507f994a936646fe87ffe4f1e469d3d6aa417d6b855598397f323de5b449f765f0c382604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b505b50565b600060003643604051808484808284378201915050828152602001935050505060405180910390206107f5816112db565b156109095761010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549150600082141561083c575061090b565b6001600160005054036000600050541115610857575061090b565b60006002600050836101008110156100025790900160005b5081905550600061010260005060008573ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050819055506108b2611777565b6108ba61153d565b507f58619076adf5bb0943d100ef88d52d7c3fd691b19d3a9071b555b651fbf418da83604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a15b505b5050565b600036436040518084848082843782019150508281526020019350505050604051809103902061093e816112db565b156109a05760016000505482111561095657506109a2565b81600060005081905550610968611777565b7facbdb084c721332ac59f9b8e392196c9eb0e4932862da8eb9beaf0dad4f550da826040518082815260200191505060405180910390a15b505b50565b6000600061010260005060008473ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050541190506109e2565b919050565b60006000600060006101036000506000878152602001908152602001600020600050925061010260005060008673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000505491506000821415610a505760009350610a7f565b8160020a90506000818460010160005054161415610a755760009350610a7f56610a7e565b60019350610a7f565b5b50505092915050565b60006000505481565b60016000505481565b6000364360405180848480828437820191505082815260200193505050506040518091039020610ac9816112db565b15610ada5781610105600050819055505b505b50565b6000364360405180848480828437820191505082815260200193505050506040518091039020610b0e816112db565b15610b20576000610106600050819055505b505b565b6101056000505481565b6101066000505481565b6101076000505481565b6101086000505481565b6000364360405180848480828437820191505082815260200193505050506040518091039020610b7b816112db565b15610b99578173ffffffffffffffffffffffffffffffffffffffff16ff5b505b50565b6000610ba9336109a5565b15610f0557610bb7846116d7565b15610ca0577f92ca3a80853e6663fa31fa10b99225f18d4902939b4c53a9caae9043f6efd0043385878686604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018060200182810382528484828181526020019250808284378201915050965050505050505060405180910390a18473ffffffffffffffffffffffffffffffffffffffff168484846040518083838082843782019150509250505060006040518083038185876185025a03f1925050505060006001029050610f06565b600036436040518084848082843782019150508281526020019350505050604051809103902090508050610cd381610f0e565b158015610d3357506000610109600050600083815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15610f045784610109600050600083815260200190815260200160002060005060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff0219169083021790555083610109600050600083815260200190815260200160002060005060010160005081905550828261010960005060008481526020019081526020016000206000506002016000509190828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610e0857803560ff1916838001178555610e39565b82800160010185558215610e39579182015b82811115610e38578235826000505591602001919060010190610e1a565b5b509050610e649190610e46565b80821115610e605760008181506000905550600101610e46565b5090565b50507f1733cbb53659d713b79580f79f3f9ff215f78a7c7aa45890f3b89fc5cddfbf32813386888787604051808781526020018673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018473ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252848482818152602001925080828437820191505097505050505050505060405180910390a15b5b5b949350505050565b600081610f1a816112db565b156112d4576000610109600050600085815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156112d357610109600050600084815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610109600050600085815260200190815260200160002060005060010160005054610109600050600086815260200190815260200160002060005060020160005060405180828054600181600116156101000203166002900480156110765780601f1061104b57610100808354040283529160200191611076565b820191906000526020600020905b81548152906001019060200180831161105957829003601f168201915b505091505060006040518083038185876185025a03f192505050507fe7c957c06e9a662c1a6c77366179f5b702b97651dc28eee7d5bf1dff6e40bb4a3384610109600050600087815260200190815260200160002060005060010160005054610109600050600088815260200190815260200160002060005060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166101096000506000898152602001908152602001600020600050600201600050604051808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001806020018281038252838181546001816001161561010002031660029004815260200191508054600181600116156101000203166002900480156112005780601f106111d557610100808354040283529160200191611200565b820191906000526020600020905b8154815290600101906020018083116111e357829003601f168201915b5050965050505050505060405180910390a1610109600050600084815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460018160011615610100020316600290046000825580601f1061128957506112c6565b601f0160209004906000526020600020908101906112c591906112a7565b808211156112c157600081815060009055506001016112a7565b5090565b5b50505060019150506112d6565b5b505b919050565b600060006000600061010260005060003373ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600050549250600083141561132457611535565b610103600050600086815260200190815260200160002060005091506000826000016000505414156113fd57600060005054826000016000508190555060008260010160005081905550610104600050805480919060010190908154818355818115116113c3578183600052602060002091820191016113c291906113a4565b808211156113be57600081815060009055506001016113a4565b5090565b5b5050508260020160005081905550846101046000508360020160005054815481101561000257906000526020600020900160005b50819055505b8260020a90506000818360010160005054161415611534577fe1c52dc63b719ade82e8bea94cc41a0d5d28e4aaf536adb5e9cccc9ff8c1aeda3386604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a16001826000016000505411151561150757610104600050610103600050600087815260200190815260200160002060005060020160005054815481101561000257906000526020600020900160005b50600090556101036000506000868152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550506001935061153556611533565b816000016000818150548092919060019003919050555080826001016000828282505417925050819055505b5b5b505050919050565b60006000600190505b6001600050548110156116d2575b60016000505481108015611580575060006002600050826101008110156100025790900160005b505414155b15611592578080600101915050611554565b5b60016001600050541180156115c45750600060026000506001600050546101008110156100025790900160005b5054145b156115e357600160008181505480929190600190039190505550611593565b600160005054811080156116145750600060026000506001600050546101008110156100025790900160005b505414155b8015611637575060006002600050826101008110156100025790900160005b5054145b156116cd5760026000506001600050546101008110156100025790900160005b50546002600050826101008110156100025790900160005b50819055508061010260005060006002600050846101008110156100025790900160005b5054815260200190815260200160002060005081905550600060026000506001600050546101008110156100025790900160005b50819055505b611546565b5b5090565b60006116e2336109a5565b1561177157610107600050546116f6611980565b111561171b57600061010660005081905550611710611980565b610107600050819055505b610106600050548261010660005054011015801561174757506101056000505482610106600050540111155b15611768578161010660008282825054019250508190555060019050611772565b60009050611772565b5b919050565b60006000610104600050805490509150600090505b8181101561187857610109600050600061010460005083815481101561000257906000526020600020900160005b5054815260200190815260200160002060006000820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055600182016000506000905560028201600050805460018160011615610100020316600290046000825580601f1061182a5750611867565b601f0160209004906000526020600020908101906118669190611848565b808211156118625760008181506000905550600101611848565b5090565b5b5050505b806001019050805061178c565b611880611885565b5b5050565b60006000610104600050805490509150600090505b8181101561193857600060010261010460005082815481101561000257906000526020600020900160005b505414151561192a57610103600050600061010460005083815481101561000257906000526020600020900160005b50548152602001908152602001600020600060008201600050600090556001820160005060009055600282016000506000905550505b5b806001019050805061189a565b61010460005080546000825590600052602060002090810190611979919061195b565b80821115611975576000818150600090555060010161195b565b5090565b5b505b5050565b6000620151804204905061198f565b9056",originalContractAddress=f,contractVersions=[{original:"971ac1efe62de02ab7497cf2cad2b93ce990a8d11c3a544943baf807e42eab7d",stub:!1,address:"0x4efc6389b88569a375668b7b3bd4a9b6c8f4a942"},{original:"8207780d6fb31803373aff97360562231187ebb0da6b4678eeb68ceb16897509",stub:"",address:"0x273930d21e01ee25e4c219b63259d214872220a2"}];var a=function(f){return walletStubABI=walletStubABI.replace("cafecafecafecafecafecafecafecafecafecafe",f.replace("0x","")),originalContractAddress=f,walletStubABI},b=function(){var f=web3.eth.accounts[0];EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.modals.testnetWallet.walletNeedsDeployment",{account:f})),cancel:!0,ok:function(){EthElements.Modal.show("views_modals_loading",{closeable:!1}),WalletContract.new([],"","",{from:f,data:walletABI,gas:2e6},function(f,e){f?(GlobalNotification.error({content:f.message,duration:8}),EthElements.Modal.hide()):e.address?(console.log("Contract created at: ",e.address),LocalStore.set("ethereum_testnetWalletContractAddress",e.address),a(e.address),EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.modals.testnetWallet.testnetWalletDeployed",{address:web3.utils.toChecksumAddress(e.address)})),ok:!0})):console.log("Contract creation transaction hash: ",e.transactionHash)})}},{closeable:!1})},t=function(b,t){web3.eth.getCode(b,function(n,d){n?GlobalNotification.error({content:n.message,duration:8}):d.length>2?(a(b),b===f&&console.log("Use Main-net wallet as code base for stubs on address: ",b),b===e&&console.log("Use Test-net wallet as code base for stubs on address: ",b)):t()})};checkForOriginalWallet=function(){var f},checkWalletOwners=function(f){return new P(function(e,a){var b={owners:!1,info:""};if(web3.utils.isAddress(f)){f=f.toLowerCase(),WalletContract.options.address=f;var t=WalletContract;t.methods.m_numOwners().call(function(n,d){if(n&&a(n),(d=Number(d))>0){var c=[];P.all(_.map(_.range(d),function(e){return new P(function(a,b){web3.eth.getStorageAt(f,2+e,function(f,e){if(!f){if(e=e.replace("0x000000000000000000000000","0x"),e=web3.utils.toChecksumAddress(e),c.length>d)return a();web3.utils.isAddress(e)&&"0x0000000000000000000000000000000000000000"!==e?t.methods.isOwner(e).call({from:e},function(f,b){!f&&b&&(c.push(e),(c=_.uniq(c)).sort()),a()}):a()}})})})).then(function(){return b.owners=c,(account=Helpers.getAccountByAddress({$in:c}))?b.info=TAPi18n.__("wallet.newWallet.accountType.import.youreOwner",{account:account.name}):b.info=TAPi18n.__("wallet.newWallet.accountType.import.watchOnly"),e(b),null},function(){a()})}else b.info=TAPi18n.__("wallet.newWallet.accountType.import.notWallet"),e(b)})}})}}).call(this); -(function(){Helpers={},Helpers.getDefaultContractExample=function(e){var t="contract MyContract {\n constructor() public {\n\n }\n}",n;return e?t:"pragma solidity ^"+(n="undefined"!=typeof mist&&mist.solidity&&mist.solidity.version?mist.solidity.version:"0.4.6")+";\n\n"+t},Helpers.rerun={"10s":new ReactiveTimer(10),"1s":new ReactiveTimer(1)},Helpers.sortByBalance=function(e,t){return!t.disabled&&new BigNumber(t.balance,10).gt(new BigNumber(e.balance,10))?1:-1},Helpers.getOwnedAccountFrom=function(e){var t=EthAccounts.find({},{sort:{balance:1}}).fetch();t.sort(Helpers.sortByBalance);var n=_.find(t,function(t){return e.indexOf(t.address.toLowerCase())>=0});return n?n.address:""},Helpers.getLocalStorageSize=function(){var e=0;return localStorage&&_.each(Object.keys(localStorage),function(t){e+=2*localStorage[t].length/1024/1024}),e},Helpers.makeId=function(e,t){return _.isString(t)?e+"_"+t.replace("0x","").substr(0,10):null},Helpers.formatNumberByDecimals=function(e,t){var n="0,0.";for(i=0;i$1 '),-1!==e.type.indexOf("[")||"string"!==e.typeShort&&"uint"!==e.typeShort&&"int"!=e.typeShort&&"address"!=e.typeShort&&"bool"!=e.typeShort&&"bytes"!=e.typeShort?e.template="elements_input_json":e.template="elements_input_"+e.typeShort,e},Helpers.addInputValue=function(e,t,n){return _.map(e,function(e){var a=_.isUndefined(e.value)?"":e.value;if("bytes"===e.typeShort&&""===a&&(a="0x0000000000000000000000000000000000000000"),t.name===e.name&&t.type===e.type&&t.index===e.index){if(-1!==e.type.indexOf("["))try{a=JSON.parse(n.value)}catch(e){a=[]}else a=_.isEmpty(n.value)||"bytes"!==e.typeShort&&"address"!==e.typeShort?"bool"===e.typeShort?!!n.checked:"bytes"===e.typeShort?n.value||"0x0000000000000000000000000000000000000000":n.value||"":/^[0-9a-f]+$/i.test(n.value.replace("0x",""))?"0x"+n.value.replace("0x",""):null;"bytes"===e.typeShort&&"0x0000000000000000000000000000000000000000"===a?e.value="":e.value=a}return a})||[]},Helpers.toSentence=function(e,t){return void 0!==e&&(e=e.replace(/[^a-z0-9_]/gi,""),!0===t?e.replace(/([A-Z]+|[0-9]+)/g," $1").trim():e.replace(/([A-Z]+|[0-9]+)/g," $1").trim().replace(/([\_])/g,'$1'))},Helpers.isOnMainNetwork=function(){return"main"==Session.get("network")};var e=function(e,t){return"0x"+web3.utils.sha3(e,t).replace("0x","")};function t(t){var n="0x0000000000000000000000000000000000000000000000000000000000000000";if(""!=t)for(var a=t.split("."),s=a.length-1;s>=0;s--)n=e(n+e(a[s]).slice(2),{encoding:"hex"});return n.toString()}var n=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"}],a=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"}],s="0x314159265dd8dbb310642f98f50c066173c1259b";Helpers.getENSName=function(e,o){if(e)if("main"===Session.get("network")){var r=t(e.toLowerCase().replace("0x","")+".addr.reverse"),p=new web3.eth.Contract(n,s),i=new web3.eth.Contract(a);p.methods.resolver(r).call(function(e,n){e?o(e,null,null):0==n?o("no resolver address",null,null):(i.options.address=n,i.methods.name(r).call(function(n,a){if(e)o(e,null,null);else if(0==a)o("Found resolver but no name",null,null);else{var s=t(a);p.methods.resolver(s).call(function(e,t){e?o(e,null,null):0==t?o("Name has no resolver",null,null):(i.options.address=t,i.methods.addr(s).call(function(t,n){e?o(e,null,null):0==n?o("No address returned",null,null):o(t,a,n)}))})}}))})}else o("Cannot retrieve ENS addresses unless fully synced on main chain",null,null)}}).call(this); +(function(){Helpers={},Helpers.getDefaultContractExample=function(e){var t="contract MyContract {\n constructor() public {\n\n }\n}",n;return e?t:"pragma solidity ^"+(n="undefined"!=typeof mist&&mist.solidity&&mist.solidity.version?mist.solidity.version:"0.4.6")+";\n\n"+t},Helpers.rerun={"10s":new ReactiveTimer(10),"1s":new ReactiveTimer(1)},Helpers.sortByBalance=function(e,t){return!t.disabled&&new BigNumber(t.balance,10).gt(new BigNumber(e.balance,10))?1:-1},Helpers.getOwnedAccountFrom=function(e){var t=EthAccounts.find({},{sort:{balance:1}}).fetch();t.sort(Helpers.sortByBalance);var n=_.find(t,function(t){return e.indexOf(t.address.toLowerCase())>=0});return n?n.address:""},Helpers.getLocalStorageSize=function(){var e=0;return localStorage&&_.each(Object.keys(localStorage),function(t){e+=2*localStorage[t].length/1024/1024}),e},Helpers.makeId=function(e,t){return _.isString(t)?e+"_"+t.replace("0x","").substr(0,10):null},Helpers.formatNumberByDecimals=function(e,t){var n="0,0.";for(i=0;ie(t)))}}}else s={address:t};return EthAccounts.findOne(s,a)||Wallets.findOne(s,a)||CustomContracts.findOne(s,a)},Helpers.getAccounts=function(t,n){var a=!1===n?{reactive:!1}:{};return _.isString(t.address)&&(t.address={$in:e(t.address)}),EthAccounts.find(t,a).fetch().concat(Wallets.find(t,a).fetch())},Helpers.getAccountNameByAddress=function(e){if(void 0!==e)var t=Helpers.getAccountByAddress(e.toLowerCase());return t?t.name:e},Helpers.moment=function(e){return TAPi18n.getLanguage(),_.isFinite(e)&&moment.unix(e).isValid()?moment.unix(e):moment(e)},Helpers.formatTime=function(e,t){return t instanceof Spacebars.kw&&(t=null),e?(_.isString(t)&&!_.isEmpty(t)&&("iso"===t.toLowerCase()?e=Helpers.moment(e).toISOString():"fromnow"===t.toLowerCase()?(Helpers.rerun["10s"].tick(),e=Helpers.moment(e).fromNow()):e=Helpers.moment(e).format(t)),e):""},Helpers.formatTransactionBalance=function(e,t,n){n instanceof Spacebars.kw&&(n=null);var n,a="0,0.00";if(("usd"===(n=n||EthTools.getUnit())||"eur"===n||"btc"===n)&&t&&t[n]){a+="btc"===n?"[000000]":"[0]";var s=new BigNumber(String(web3.fromWei(e,"ether")),10).times(t[n].price);return EthTools.formatNumber(s,a)+" "+n.toUpperCase()}return EthTools.formatBalance(e,a+"[0000000000000000] UNIT")},Helpers.createTemplateDataFromInput=function(e,t){return(e=_.clone(e)).index=t,e.typeShort=e.type.match(/[a-z]+/i),e.typeShort=e.typeShort[0],e.bits=e.type.replace(e.typeShort,""),e.displayName=e.name.replace(/([A-Z])/g," $1").replace(/([\-\_])/g,' $1 '),-1!==e.type.indexOf("[")||"string"!==e.typeShort&&"uint"!==e.typeShort&&"int"!=e.typeShort&&"address"!=e.typeShort&&"bool"!=e.typeShort&&"bytes"!=e.typeShort?e.template="elements_input_json":e.template="elements_input_"+e.typeShort,e},Helpers.addInputValue=function(e,t,n){return _.map(e,function(e){var a=_.isUndefined(e.value)?"":e.value;if("bytes"===e.typeShort&&""===a&&(a="0x0000000000000000000000000000000000000000"),t.name===e.name&&t.type===e.type&&t.index===e.index){if(-1!==e.type.indexOf("["))try{a=JSON.parse(n.value)}catch(e){a=[]}else a=_.isEmpty(n.value)||"bytes"!==e.typeShort&&"address"!==e.typeShort?"bool"===e.typeShort?!!n.checked:"bytes"===e.typeShort?n.value||"0x0000000000000000000000000000000000000000":n.value||"":/^[0-9a-f]+$/i.test(n.value.replace("0x",""))?"0x"+n.value.replace("0x",""):null;"bytes"===e.typeShort&&"0x0000000000000000000000000000000000000000"===a?e.value="":e.value=a}return a})||[]},Helpers.toSentence=function(e,t){return void 0!==e&&(e=e.replace(/[^a-z0-9_]/gi,""),!0===t?e.replace(/([A-Z]+|[0-9]+)/g," $1").trim():e.replace(/([A-Z]+|[0-9]+)/g," $1").trim().replace(/([\_])/g,'$1'))},Helpers.isOnMainNetwork=function(){return"main"==Session.get("network")};var t=function(e,t){return"0x"+web3.utils.sha3(e,t).replace("0x","")};function n(e){var n="0x0000000000000000000000000000000000000000000000000000000000000000";if(""!=e)for(var a=e.split("."),s=a.length-1;s>=0;s--)n=t(n+t(a[s]).slice(2),{encoding:"hex"});return n.toString()}var a=[{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"resolver",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"owner",outputs:[{name:"",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"label",type:"bytes32"},{name:"owner",type:"address"}],name:"setSubnodeOwner",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"ttl",type:"uint64"}],name:"setTTL",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"ttl",outputs:[{name:"",type:"uint64"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"resolver",type:"address"}],name:"setResolver",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"owner",type:"address"}],name:"setOwner",outputs:[],payable:!1,type:"function"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"label",type:"bytes32"},{indexed:!1,name:"owner",type:"address"}],name:"NewOwner",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"resolver",type:"address"}],name:"NewResolver",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"ttl",type:"uint64"}],name:"NewTTL",type:"event"}],s=[{constant:!0,inputs:[{name:"interfaceID",type:"bytes4"}],name:"supportsInterface",outputs:[{name:"",type:"bool"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"},{name:"contentTypes",type:"uint256"}],name:"ABI",outputs:[{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],name:"setPubkey",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"content",outputs:[{name:"ret",type:"bytes32"}],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"addr",outputs:[{name:"ret",type:"address"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"contentType",type:"uint256"},{name:"data",type:"bytes"}],name:"setABI",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"name",outputs:[{name:"ret",type:"string"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"name",type:"string"}],name:"setName",outputs:[],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"hash",type:"bytes32"}],name:"setContent",outputs:[],payable:!1,type:"function"},{constant:!0,inputs:[{name:"node",type:"bytes32"}],name:"pubkey",outputs:[{name:"x",type:"bytes32"},{name:"y",type:"bytes32"}],payable:!1,type:"function"},{constant:!1,inputs:[{name:"node",type:"bytes32"},{name:"addr",type:"address"}],name:"setAddr",outputs:[],payable:!1,type:"function"},{inputs:[{name:"ensAddr",type:"address"}],payable:!1,type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"a",type:"address"}],name:"AddrChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"hash",type:"bytes32"}],name:"ContentChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"name",type:"string"}],name:"NameChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!0,name:"contentType",type:"uint256"}],name:"ABIChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,name:"node",type:"bytes32"},{indexed:!1,name:"x",type:"bytes32"},{indexed:!1,name:"y",type:"bytes32"}],name:"PubkeyChanged",type:"event"}],o="0x314159265dd8dbb310642f98f50c066173c1259b";Helpers.getENSName=function(e,t){if(e)if("main"===Session.get("network")){var r=n(e.toLowerCase().replace("0x","")+".addr.reverse"),i=new web3.eth.Contract(a,o),p=new web3.eth.Contract(s);i.methods.resolver(r).call(function(e,a){e?t(e,null,null):0==a?t("no resolver address",null,null):(p.options.address=a,p.methods.name(r).call(function(a,s){if(e)t(e,null,null);else if(0==s)t("Found resolver but no name",null,null);else{var o=n(s);i.methods.resolver(o).call(function(e,n){e?t(e,null,null):0==n?t("Name has no resolver",null,null):(p.options.address=n,p.methods.addr(o).call(function(n,a){e?t(e,null,null):0==a?t("No address returned",null,null):t(n,s,a)}))})}}))})}else t("Cannot retrieve ENS addresses unless fully synced on main chain",null,null)}}).call(this); (function(){Template.registerHelper("debug",function(e){console.log(e)}),Template.registerHelper("isMist",function(){return void 0===window.mistMode&&void 0!==window.mist}),Template.registerHelper("isWalletMode",function(){return"wallet"===window.mistMode||void 0===window.mist}),Template.registerHelper("isBrowserMode",function(){return void 0===window.mist}),Template.registerHelper("isEtherUnit",function(){var e=EthTools.getUnit();return!("usd"===e||"eur"===e||"btc"===e||"gbp"===e||"brl"===e)}),Template.registerHelper("isVulnerable",function(e){var t=_.isString(e)?Helpers.getAccountByAddress(e):this;if(t){if(_.find(t.vulnerabilities||[],function(e){return e}))return t;var r=_.map(Wallets.find({vulnerabilities:{$exists:!0}}).fetch(),function(e){return!!_.find(e.vulnerabilities||[],function(e){return e})&&e}),n=_.find(r,function(e){return _.contains(e.owners,t.address)});return!!n&&(t.vulnerabilities=n.vulnerabilities,t)}}),Template.registerHelper("unit",function(){return EthTools.getUnit()}),Template.registerHelper("latestBlock",function(){return EthBlocks.latest}),Template.registerHelper("selectAccounts",function(e){var t=EthAccounts.find({balance:{$ne:"0"}},{sort:{balance:1}}).fetch();t=t.map(function(e){return e.address=e.address.toLowerCase(),e});var r=_.flatten(t.map(function(e){return[e.address,web3.utils.toChecksumAddress(e.address)]}));return!0!==e&&(t=_.union(Wallets.find({owners:{$in:r},address:{$exists:!0}},{sort:{name:1}}).fetch(),t)),t}),Template.registerHelper("isWatchOnly",Helpers.isWatchOnly),Template.registerHelper("walletIcon",function(){var e="";return e=_.isUndefined(this.owners)?'':Helpers.isWatchOnly(this._id)?'':'',new Spacebars.SafeString(e)}),Template.registerHelper("accountNameOrAddress",function(e){return(account=Helpers.getAccountByAddress(e))?account.name:e}),Template.registerHelper("formatNumberByDecimals",Helpers.formatNumberByDecimals),Template.registerHelper("formatTime",Helpers.formatTime),Template.registerHelper("formatTransactionBalance",Helpers.formatTransactionBalance),Template.registerHelper("toChecksumAddress",function(e){return _.isString(e)?web3.utils.toChecksumAddress(e):""}),Template.registerHelper("toSentence",Helpers.toSentence),Template.registerHelper("isMainNetwork",function(){return"main"===Session.get("network")})}).call(this); @@ -371,7 +371,7 @@ for(var c in a)q.call(a,c)&&b.push(c);return b};a.prototype.get=function(a){retu (function(){Template.elements_tokenBox.helpers({formattedTotalBalance:function(e){var t=_.map(Wallets.find().fetch().concat(EthAccounts.find().fetch()),function(e){if(!e.disabled)return e._id}),n=new BigNumber(0);return _.each(this.balances,function(e,a){t.indexOf(a)>=0&&(n=n.plus(new BigNumber(e,10)))}),Helpers.formatNumberByDecimals(n,this.decimals)},geoPattern:function(){var e;return GeoPattern.generate(this.address,{color:"#CCC6C6"}).toDataUrl()}}),Template.elements_tokenBox.events({"click .delete-token":function(e){var t=this;e.preventDefault(),e.stopImmediatePropagation(),EthElements.Modal.question({text:new Spacebars.SafeString(TAPi18n.__("wallet.tokens.deleteToken",{token:t.name})),ok:function(){Tokens.remove(t._id)},cancel:!0})}})}).call(this); -(function(){var e=ethereumConfig.requiredConfirmations,t=10;Template.elements_transactions_table.onCreated(function(){this._properties={cursor:{}},TemplateVar.set("limit",this.data.limit||10)}),Template.elements_transactions_table.helpers({items:function(){var e=Template.instance(),t=[],n=TemplateVar.get("search"),r=TemplateVar.get("limit"),s=window[this.collection]||Transactions,i=this.ids?{_id:{$in:this.ids}}:{};if(n){var a=new RegExp("^.*"+n.replace(/ +/g,".*")+".*$","i");return e._properties.cursor=s.find(i,{sort:{timestamp:-1,blockNumber:-1}}),t=e._properties.cursor.fetch(),t=(t=_.filter(t,function(e){return a.test(e.from)?e:a.test(e.to)?e:a.test(EthTools.formatBalance(e.value,"0,0.00[000000] unit"))?e:!!a.test(moment.unix(e.timestamp).format("LLLL"))&&e})).slice(0,40)}return e._properties.cursor=s.find(i,{sort:{timestamp:-1,blockNumber:-1},limit:r}),e._properties.cursor.fetch()},hasMore:function(){var e=Template.instance();return e._properties.cursor.limit=null,!TemplateVar.get("search")&&e._properties.cursor.count()>TemplateVar.get("limit")}}),Template.elements_transactions_table.events({"click button.show-more":function(e,t){var n=TemplateVar.get("limit");TemplateVar.set("limit",n+(t.data.limit||10))},"keyup input.filter-transactions":_.debounce(function(e,t){27===e.keyCode&&(e.currentTarget.value=""),TemplateVar.set(t,"search",e.currentTarget.value)},200)}),Template.elements_transactions_row.helpers({incomingTx:function(e){var e;return!!((e=EthAccounts.findOne({_id:e})||Wallets.findOne({_id:e}))&&this.from!==e.address||!e&&(EthAccounts.findOne({address:this.to})||Wallets.findOne({address:this.to})))},transactionType:function(){var e=Helpers.getAccountByAddress(this.to),t=Helpers.getAccountByAddress(this.from),n=Helpers.getAccountByAddress(this.initiator),r=this.data;return t&&(t=''+t.name+""),n=n?''+n.name+"":this.initiator,"pendingConfirmation"===this.type?new Spacebars.SafeString(TAPi18n.__("wallet.transactions.types.pendingConfirmations",{initiator:n,from:t})):this.outOfGas?TAPi18n.__("wallet.transactions.types.outOfGas"):this.tokenId&&Tokens.findOne(this.tokenId)?TAPi18n.__("wallet.transactions.types.tokenTransfer",{token:Tokens.findOne(this.tokenId).name}):r&&e?TAPi18n.__("wallet.transactions.types.executeContract"):e&&t?TAPi18n.__("wallet.transactions.types.betweenWallets"):e&&!t?TAPi18n.__("wallet.transactions.types.received"):this.to?TAPi18n.__("wallet.transactions.types.sent"):TAPi18n.__("wallet.transactions.types.createdContract.title")},fromNowTime:function(){var e;return Helpers.rerun["10s"].tick(),moment().diff(moment.unix(this.timestamp),"hours")<23?" "+moment.unix(this.timestamp).fromNow():""},totalConfirmations:e,unConfirmed:function(){if(!this.blockNumber||!EthBlocks.latest.number)return{confirmations:0,percent:0};var t,n=EthBlocks.latest.number+1-this.blockNumber;return e>=n&&n>=0&&{confirmations:n,percent:n/e*100}},ownerConfirmationCount:function(){var e=Helpers.getAccountByAddress(this.from);if(e&&this.confirmedOwners)return this.confirmedOwners.length+"/"+e.requiredSignatures},owners:function(){var e=Helpers.getAccountByAddress(this.from);return e?e.owners:[]},ownerIsConfirmed:function(){var e=String(this);return _.contains(Template.parentData(1).confirmedOwners,e)},approved:function(){if(this.confirmedOwners)return Helpers.getAccountByAddress({$in:this.confirmedOwners})},notApproved:function(){return!Helpers.getAccountByAddress({$in:this.confirmedOwners||[]})},multipleOwnersApproved:function(e){var t=Helpers.getAccountByAddress(this.from);return Helpers.getAccounts({address:{$in:_.difference(t.owners,this.confirmedOwners)}})},tokenValue:function(){var e=Tokens.findOne(this.tokenId);return e?Helpers.formatNumberByDecimals(this.value,e.decimals)+" "+e.symbol:this.value}}),Template.elements_transactions_row.events({"click tr:not(.pending)":function(e){var t=$(e.target);t.is("button")||t.is("a")||EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:this._id}},{class:"transaction-info"})},"click button.approve, click button.revoke":function(e){var t=this,n=Helpers.getAccountByAddress(t.from),r=_.pluck(Helpers.getAccounts({address:{$in:n.owners}}),"address");if(n){var s=$(e.currentTarget).hasClass("approve")?"confirm":"revoke",i=function(e){var r=contracts["ct_"+n._id][s],i=function(n,r){n?GlobalNotification.error({content:n.message,duration:8}):(console.log(s+" confirmation tx hash: "+r),PendingConfirmations.update(t._id,{$set:{sending:e}}))};if(wallet=Wallets.findOne({address:e})){var a=r.getData(t.operation);contracts["ct_"+wallet._id].execute(n.address,0,a,{from:wallet.owners[0],gas:2e5},i)}else r.sendTransaction(t.operation,{from:e,gas:2e5},i)};1===r.length?i(r[0]):r.length>1&&EthElements.Modal.question({template:"views_modals_selectAccount",data:{accounts:"confirm"===s?_.difference(r,this.confirmedOwners):this.confirmedOwners,callback:i},cancel:!0})}}})}).call(this); +(function(){var e=ethereumConfig.requiredConfirmations,t=10;Template.elements_transactions_table.onCreated(function(){this._properties={cursor:{}},TemplateVar.set("limit",this.data.limit||10)}),Template.elements_transactions_table.helpers({items:function(){var e=Template.instance(),t=[],n=TemplateVar.get("search"),r=TemplateVar.get("limit"),s=window[this.collection]||Transactions,i=this.ids?{_id:{$in:this.ids}}:{};if(n){var a=new RegExp("^.*"+n.replace(/ +/g,".*")+".*$","i");return e._properties.cursor=s.find(i,{sort:{timestamp:-1,blockNumber:-1}}),t=e._properties.cursor.fetch(),t=(t=_.filter(t,function(e){return a.test(e.from)?e:a.test(e.to)?e:a.test(EthTools.formatBalance(e.value,"0,0.00[000000] unit"))?e:!!a.test(moment.unix(e.timestamp).format("LLLL"))&&e})).slice(0,40)}return e._properties.cursor=s.find(i,{sort:{timestamp:-1,blockNumber:-1},limit:r}),e._properties.cursor.fetch()},hasMore:function(){var e=Template.instance();return e._properties.cursor.limit=null,!TemplateVar.get("search")&&e._properties.cursor.count()>TemplateVar.get("limit")}}),Template.elements_transactions_table.events({"click button.show-more":function(e,t){var n=TemplateVar.get("limit");TemplateVar.set("limit",n+(t.data.limit||10))},"keyup input.filter-transactions":_.debounce(function(e,t){27===e.keyCode&&(e.currentTarget.value=""),TemplateVar.set(t,"search",e.currentTarget.value)},200)}),Template.elements_transactions_row.helpers({incomingTx:function(e){var e;return!!((e=EthAccounts.findOne({_id:e})||Wallets.findOne({_id:e}))&&this.from!==e.address||!e&&(EthAccounts.findOne({address:this.to})||Wallets.findOne({address:this.to})))},transactionType:function(){var e=Helpers.getAccountByAddress(this.to),t=Helpers.getAccountByAddress(this.from),n=this.initiator?Helpers.getAccountByAddress(this.initiator):null,r=this.data;return t&&(t=''+t.name+""),n=n?''+n.name+"":this.initiator,"pendingConfirmation"===this.type?new Spacebars.SafeString(TAPi18n.__("wallet.transactions.types.pendingConfirmations",{initiator:n,from:t})):this.outOfGas?TAPi18n.__("wallet.transactions.types.outOfGas"):this.tokenId&&Tokens.findOne(this.tokenId)?TAPi18n.__("wallet.transactions.types.tokenTransfer",{token:Tokens.findOne(this.tokenId).name}):r&&e?TAPi18n.__("wallet.transactions.types.executeContract"):e&&t?TAPi18n.__("wallet.transactions.types.betweenWallets"):e&&!t?TAPi18n.__("wallet.transactions.types.received"):this.to?TAPi18n.__("wallet.transactions.types.sent"):TAPi18n.__("wallet.transactions.types.createdContract.title")},fromNowTime:function(){var e;return Helpers.rerun["10s"].tick(),moment().diff(moment.unix(this.timestamp),"hours")<23?" "+moment.unix(this.timestamp).fromNow():""},totalConfirmations:e,unConfirmed:function(){if(!this.blockNumber||!EthBlocks.latest.number)return{confirmations:0,percent:0};var t,n=EthBlocks.latest.number+1-this.blockNumber;return e>=n&&n>=0&&{confirmations:n,percent:n/e*100}},ownerConfirmationCount:function(){var e=Helpers.getAccountByAddress(this.from);if(e&&this.confirmedOwners)return this.confirmedOwners.length+"/"+e.requiredSignatures},owners:function(){var e=Helpers.getAccountByAddress(this.from);return e?e.owners:[]},ownerIsConfirmed:function(){var e=String(this);return _.contains(Template.parentData(1).confirmedOwners,e)},approved:function(){if(this.confirmedOwners)return Helpers.getAccountByAddress({$in:this.confirmedOwners})},notApproved:function(){return!Helpers.getAccountByAddress({$in:this.confirmedOwners||[]})},multipleOwnersApproved:function(e){var t=Helpers.getAccountByAddress(this.from);return Helpers.getAccounts({address:{$in:_.difference(t.owners,this.confirmedOwners)}})},tokenValue:function(){var e=Tokens.findOne(this.tokenId);return e?Helpers.formatNumberByDecimals(this.value,e.decimals)+" "+e.symbol:this.value}}),Template.elements_transactions_row.events({"click tr:not(.pending)":function(e){var t=$(e.target);t.is("button")||t.is("a")||EthElements.Modal.show({template:"views_modals_transactionInfo",data:{_id:this._id}},{class:"transaction-info"})},"click button.approve, click button.revoke":function(e){var t=this,n=Helpers.getAccountByAddress(t.from),r=_.pluck(Helpers.getAccounts({address:{$in:n.owners}}),"address");if(n){var s=$(e.currentTarget).hasClass("approve")?"confirm":"revoke",i=function(e){var r=contracts["ct_"+n._id][s],i=function(n,r){n?GlobalNotification.error({content:n.message,duration:8}):(console.log(s+" confirmation tx hash: "+r),PendingConfirmations.update(t._id,{$set:{sending:e}}))};if(wallet=Wallets.findOne({address:e})){var a=r.getData(t.operation);contracts["ct_"+wallet._id].execute(n.address,0,a,{from:wallet.owners[0],gas:2e5},i)}else r.sendTransaction(t.operation,{from:e,gas:2e5},i)};1===r.length?i(r[0]):r.length>1&&EthElements.Modal.question({template:"views_modals_selectAccount",data:{accounts:"confirm"===s?_.difference(r,this.confirmedOwners):this.confirmedOwners,callback:i},cancel:!0})}}})}).call(this); (function(){Template.elements_vulnerabilities_txorigin.helpers({upgradeParams:function(){var i="walletId="+this._id+"&name="+this.name;return this.dailyLimit&&(i+="&dailyLimit="+this.dailyLimit),this.requiredSignatures&&(i+="&requiredSignatures="+this.requiredSignatures),this.owners&&(i+="&ownersNum="+this.owners.length,i+="&owners="+this.owners.join(",")),i},walletAddress:function(){var i=this,e=_.map(Wallets.find({vulnerabilities:{$exists:!0}}).fetch(),function(i){return!!_.find(i.vulnerabilities||[],function(i){return i})&&i}),t=_.find(e,function(e){return _.contains(e.owners,i.address)});return t?t.address:""}})}).call(this); @@ -385,7 +385,7 @@ for(var c in a)q.call(a,c)&&b.push(c);return b};a.prototype.get=function(a){retu (function(){Template.views_dashboard.helpers({wallets:function(){var n=Wallets.find({$or:[{disabled:{$exists:!1}},{disabled:!1}]},{sort:{creationBlock:1}}).fetch();return n.sort(Helpers.sortByBalance),n},accounts:function(){var n=EthAccounts.find({name:{$exists:!0}},{sort:{name:1}}).fetch();return n.sort(Helpers.sortByBalance),n},hasAccounts:function(){return EthAccounts.find().count()>0},hasMinimumBalance:function(){var n=!1;return _.each(_.pluck(EthAccounts.find({}).fetch(),"balance"),function(t){new BigNumber(t,"10").gt(1e15)&&(n=!0)}),n},allTransactions:function(){return Transactions.find({},{sort:{timestamp:-1}}).count()},pendingConfirmations:function(){return _.pluck(PendingConfirmations.find({operation:{$exists:!0},confirmedOwners:{$ne:[]}}).fetch(),"_id")}}),Template.views_dashboard.events({"click .create.account":function(n){n.preventDefault(),mist.requestAccount(function(n,t){n||(_.isArray(t)||(t=[t]),t.forEach(function(n){n=n.toLowerCase(),EthAccounts.upsert({address:n},{$set:{address:n,new:!0}})}))})}})}).call(this); -(function(){var e=5e7,t=function(e,t,a){if(account=Helpers.getAccountByAddress(e),account&&account.requiredSignatures>1&&!_.isUndefined(account.dailyLimit)&&account.dailyLimit!==ethereumConfig.dailyLimitDefault&&0!==Number(t)){var n=new BigNumber(account.dailyLimit||"0",10).minus(new BigNumber(account.dailyLimitSpent||"0",10));n.lt(new BigNumber(t,10))?TemplateVar.set("dailyLimitText",new Spacebars.SafeString(TAPi18n.__("wallet.send.texts.overDailyLimit",{limit:EthTools.formatBalance(n.toString(10)),total:EthTools.formatBalance(account.dailyLimit),count:account.requiredSignatures-1}))):TemplateVar.set("dailyLimitText",new Spacebars.SafeString(TAPi18n.__("wallet.send.texts.underDailyLimit",{limit:EthTools.formatBalance(n.toString(10)),total:EthTools.formatBalance(account.dailyLimit)})))}else TemplateVar.set("dailyLimitText",!1)},a=function(){TemplateVar.getFrom(".compile-contract","byteTextareaShown");var e=TemplateVar.get("selectedToken");if(e&&"ether"!==e){var t=TemplateVar.getFrom("div.dapp-address-input input.to","value"),a=TemplateVar.get("amount")||"0",n=Tokens.findOne({address:e}),r=TokenContract,o;return r.options.address=e,r.methods.transfer(t,a).encodeABI()}return TemplateVar.getFrom(".compile-contract","txData")},n=function(e,t){var a=this;console.log("Estimated gas: ",t,e),!e&&t&&(TemplateVar.set(this,"estimatedGas",t),5e7===t?TemplateVar.set(this,"codeNotExecutable",!0):TemplateVar.set(this,"codeNotExecutable",!1))},r=function(e){return-1!==e.indexOf("setTxStatusRejected")?TAPi18n.__("wallet.send.error.rejectedInMetamask"):e};Template.views_send.onCreated(function(){var e=this;TemplateVar.set("amount","0"),TemplateVar.set("estimatedGas",3e5),TemplateVar.set("sendAll",!1),"deployContract"===FlowRouter.getRouteName()?(TemplateVar.set("selectedAction","deploy-contract"),TemplateVar.set("selectedToken","ether")):(TemplateVar.set("selectedAction","send-funds"),TemplateVar.set("selectedToken",FlowRouter.getParam("token")||"ether")),Helpers.checkChain(function(e){e&&EthAccounts.find().count()>0&&checkForOriginalWallet()}),e.autorun(function(a){var n=TemplateVar.getFrom(".dapp-select-account.send-from","value"),r=TemplateVar.get("amount")||"0";a.firstRun||t(n,r,e)}),e.autorun(function(t){var a=EthTools.getUnit();t.firstRun||"ether"!==TemplateVar.get("selectedToken")||TemplateVar.set("amount",EthTools.toWei(e.find('input[name="amount"]').value.replace(",","."),a))})}),Template.views_send.onRendered(function(){var e=this,t,r;FlowRouter.getParam("address")?(this.find('input[name="to"]').value=FlowRouter.getParam("address"),this.$('input[name="to"]').trigger("input")):this.data||this.$('input[name="to"]').focus(),FlowRouter.getParam("from")&&TemplateVar.setTo('select[name="dapp-select-account"].send-from',"value",FlowRouter.getParam("from")),e.autorun(function(e){"send"===FlowRouter.getRouteName()&&(TemplateVar.set("selectedAction","send"),TemplateVar.setTo(".dapp-data-textarea","value",""))}),e.autorun(function(e){address=TemplateVar.getFrom(".dapp-select-account.send-from","value"),e.firstRun?r=address:(r!==address&&TemplateVar.set("selectedToken","ether"),r=address)}),e.autorun(function(t){var r=TemplateVar.getFrom(".dapp-select-account.send-from","value"),o=TemplateVar.getFrom(".dapp-address-input .to","value"),s=TemplateVar.get("amount")||"0",l=a(),i=TemplateVar.get("selectedToken");"ether"===i?EthAccounts.findOne({address:r},{reactive:!1})?web3.eth.estimateGas({from:r,to:o,value:s,data:l,gas:5e7},n.bind(e)):(wallet=Wallets.findOne({address:r},{reactive:!1}))&&contracts["ct_"+wallet._id]&&contracts["ct_"+wallet._id].methods.execute(o||"",s||"",l||"0x00").estimateGas({from:wallet.owners[0],gas:5e7},n.bind(e)):(TokenContract.options.address=i,TokenContract.methods.transfer(o,s).estimateGas({from:r,gas:5e7},n.bind(e)))})}),Template.views_send.helpers({selectedAccount:function(){return Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"))},selectedToken:function(){return Tokens.findOne({address:TemplateVar.get("selectedToken")})},tokenSelectedAttr:function(e){return TemplateVar.get("selectedToken")===e?{checked:!0}:{}},tokens:function(){if("send-funds"===TemplateVar.get("selectedAction"))return Tokens.find({},{sort:{name:1}})},hasTokens:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),t={};if(e)return t["balances."+e._id]={$exists:!0,$ne:"0"},"send-funds"===TemplateVar.get("selectedAction")&&!!Tokens.findOne(t,{field:{_id:1}})},showOnlyByteTextarea:function(){return"deploy-contract"!==TemplateVar.get("selectedAction")},total:function(e){var t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),a=TemplateVar.get("amount");if(!_.isFinite(a))return"0";var n=TemplateVar.getFrom(".dapp-select-gas-price","gasInWei")||"0";return a="ether"===TemplateVar.get("selectedToken")?t&&t.owners?a:new BigNumber(a,10).plus(new BigNumber(n,10)):new BigNumber(n,10)},tokenTotal:function(){var e=TemplateVar.get("amount"),t=Tokens.findOne({address:TemplateVar.get("selectedToken")});return _.isFinite(e)&&t?Helpers.formatNumberByDecimals(e,t.decimals):"0"},sendAllAmount:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),t=0;if("ether"===TemplateVar.get("selectedToken")){var a=TemplateVar.getFrom(".dapp-select-gas-price","gasInWei")||"0";t=e.owners?e.balance:web3.utils.BN.max(new web3.utils.BN(0),new web3.utils.BN(e.balance).sub(new web3.utils.BN(a))).toString(10)}else{var n=Tokens.findOne({address:TemplateVar.get("selectedToken")});t=n&&n.balances&&n.balances[e._id]?n.balances[e._id]:"0"}return TemplateVar.set("amount",t),t},tokenDecimals:function(){var e=Tokens.findOne({address:TemplateVar.get("selectedToken")});return e?e.decimals:0},timeText:function(){return TAPi18n.__("wallet.send.texts.timeTexts."+((Number(TemplateVar.getFrom(".dapp-select-gas-price","feeMultiplicator"))+5)/2).toFixed(0))},sendExplanation:function(){var e=TemplateVar.get("amount")||"0",t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),a=Tokens.findOne({address:TemplateVar.get("selectedToken")});if(a&&t)return Spacebars.SafeString(TAPi18n.__("wallet.send.texts.sendToken",{amount:Helpers.formatNumberByDecimals(e,a.decimals),name:a.name,symbol:a.symbol}))},formattedCoinBalance:function(e){var t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"));return!!(this.balances&&Number(this.balances[t._id])>0)&&Helpers.formatNumberByDecimals(this.balances[t._id],this.decimals)+" "+this.symbol},selectedAccountIsWalletContract:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"));return!!e&&!!e.owners},clearAmountFromChars:function(e){return(e=~e.indexOf(".")?e.replace(/\,/g,""):e).replace(/ /g,"")}}),Template.views_send.events({"change input.send-all":function(e){TemplateVar.set("sendAll",$(e.currentTarget)[0].checked),TemplateVar.set("amount",0)},"click .token-ether":function(e,t){TemplateVar.set("selectedToken","ether"),t.$('input[name="amount"]').trigger("change")},"click .select-token input":function(e,t){var a=e.currentTarget.value;TemplateVar.set("selectedToken",a),"ether"===a&&TemplateVar.setTo(".dapp-data-textarea","value",""),t.$('input[name="amount"]').trigger("change")},'keyup input[name="amount"], change input[name="amount"], input input[name="amount"]':function(e,a){if("ether"===TemplateVar.get("selectedToken")){var n=EthTools.toWei(e.currentTarget.value.replace(",","."));TemplateVar.set("amount",n||"0"),t(a.find('select[name="dapp-select-account"].send-from').value,n,a)}else{var r=Tokens.findOne({address:TemplateVar.get("selectedToken")}),o=e.currentTarget.value||"0";o=new BigNumber(o,10).times(Math.pow(10,r.decimals||0)).floor().toString(10),TemplateVar.set("amount",o)}},"submit form":function(e,t){var n=TemplateVar.get("amount")||"0",o=TemplateVar.get("selectedToken"),s=TemplateVar.getFrom(".dapp-address-input .to","value"),l=TemplateVar.getFrom(".dapp-select-gas-price","gasPrice"),i=TemplateVar.get("estimatedGas"),c=Helpers.getAccountByAddress(t.find('select[name="dapp-select-account"].send-from').value),d=TemplateVar.get("selectedAction"),m=a(),u=TemplateVar.getFrom(".compile-contract","contract"),p=TemplateVar.get("sendAll");if(c&&!TemplateVar.get("sending")){if(5e7!==i&&0!==i||(i=22e3),p&&(c.owners||"ether"!==o)&&(p=!1),c.owners&&(c.owners=c.owners.map(function(e){return e.toLowerCase()})),console.log("Providing gas: ",i,p?"":" + 100000"),"deploy-contract"===TemplateVar.get("selectedAction")&&!m)return GlobalNotification.warning({content:"i18n:wallet.contracts.error.noDataProvided",duration:2});if("0"===c.balance&&(!c.owners||"ether"===o))return GlobalNotification.warning({content:"i18n:wallet.send.error.emptyWallet",duration:2});if(!web3.utils.isAddress(s)&&!m)return GlobalNotification.warning({content:"i18n:wallet.send.error.noReceiver",duration:2});if("ether"===o){if((_.isEmpty(n)||"0"===n||!_.isFinite(n))&&!m)return GlobalNotification.warning({content:"i18n:wallet.send.error.noAmount",duration:2});if(new BigNumber(n,10).gt(new BigNumber(c.balance,10)))return GlobalNotification.warning({content:"i18n:wallet.send.error.notEnoughFunds",duration:2})}else{if(!s)return GlobalNotification.warning({content:"i18n:wallet.send.error.noReceiver",duration:2});s=o,n=0;var g,T=Tokens.findOne({address:o}).balances[c._id]||"0";if(new BigNumber(n,10).gt(new BigNumber(T,10)))return GlobalNotification.warning({content:"i18n:wallet.send.error.notEnoughFunds",duration:2})}var f=function(e){TemplateVar.set(t,"sending",!0),e=e||Number($(".send-transaction-info input.gas").val()),console.log("Finally choosen gas",e),contracts["ct_"+c._id]?contracts["ct_"+c._id].methods.execute(s||"",n||"",m||"0x00").send({from:Helpers.getOwnedAccountFrom(c.owners),gasPrice:l,gas:e},function(a,o){if(TemplateVar.set(t,"sending",!1),a)return console.log("Error from contract sendTransaction: ",a,o),void GlobalNotification.error({content:r(a.message),duration:8});console.log("SEND from contract",n),m=!s&&u?{contract:u,data:m}:m,addTransactionAfterSend(o,n,c.address,s,l,e,m),localStorage.setItem("contractSource",Helpers.getDefaultContractExample()),localStorage.setItem("compiledContracts",null),localStorage.setItem("selectedContract",null),FlowRouter.go("dashboard")}).on("receipt",function(e){console.log("Transaction receipt: ",e)}):(console.log("Gas Price: "+l),console.log("Amount:",n),web3.eth.sendTransaction({from:c.address,to:s,data:m,value:n,gasPrice:l,gas:e},function(a,o){if(TemplateVar.set(t,"sending",!1),a)return console.log("Error from simple sendTransaction: ",a,o),void GlobalNotification.error({content:r(a.message),duration:8});console.log("SEND simple"),m=!s&&u?{contract:u,data:m}:m,addTransactionAfterSend(o,n,c.address,s,l,e,m),localStorage.setItem("contractSource",Helpers.getDefaultContractExample()),localStorage.setItem("compiledContracts",null),localStorage.setItem("selectedContract",null),FlowRouter.go("dashboard")}).on("receipt",function(e){console.log("Transaction receipt: ",e)}))};"undefined"==typeof mist?(console.log("estimatedGas: "+i),EthElements.Modal.question({template:"views_modals_sendTransactionInfo",data:{from:c.address,to:s,amount:n,gasPrice:l,estimatedGas:i,estimatedGasPlusAddition:p?i:i+1e5,data:m},ok:f,cancel:!0},{class:"send-transaction-info"})):f(p?i:i+1e5)}}})}).call(this); +(function(){var e=5e7,t=function(e,t,a){if(account=Helpers.getAccountByAddress(e),account&&account.requiredSignatures>1&&!_.isUndefined(account.dailyLimit)&&account.dailyLimit!==ethereumConfig.dailyLimitDefault&&0!==Number(t)){var n=new BigNumber(account.dailyLimit||"0",10).minus(new BigNumber(account.dailyLimitSpent||"0",10));n.lt(new BigNumber(t,10))?TemplateVar.set("dailyLimitText",new Spacebars.SafeString(TAPi18n.__("wallet.send.texts.overDailyLimit",{limit:EthTools.formatBalance(n.toString(10)),total:EthTools.formatBalance(account.dailyLimit),count:account.requiredSignatures-1}))):TemplateVar.set("dailyLimitText",new Spacebars.SafeString(TAPi18n.__("wallet.send.texts.underDailyLimit",{limit:EthTools.formatBalance(n.toString(10)),total:EthTools.formatBalance(account.dailyLimit)})))}else TemplateVar.set("dailyLimitText",!1)},a=function(){TemplateVar.getFrom(".compile-contract","byteTextareaShown");var e=TemplateVar.get("selectedToken");if(e&&"ether"!==e){var t=TemplateVar.getFrom("div.dapp-address-input input.to","value"),a=TemplateVar.get("amount")||"0",n=Tokens.findOne({address:e}),r=TokenContract,o;return r.options.address=e,r.methods.transfer(t,a).encodeABI()}return TemplateVar.getFrom(".compile-contract","txData")},n=function(e,t){var a=this;console.log("Estimated gas: ",t,e),!e&&t&&(TemplateVar.set(this,"estimatedGas",t),5e7===t?TemplateVar.set(this,"codeNotExecutable",!0):TemplateVar.set(this,"codeNotExecutable",!1))},r=function(e){return-1!==e.indexOf("setTxStatusRejected")?TAPi18n.__("wallet.send.error.rejectedInMetamask"):e},o=function(){return TemplateVar.getFrom('select[name="dapp-select-account"].send-from',"value")};Template.views_send.onCreated(function(){var e=this;TemplateVar.set("amount","0"),TemplateVar.set("estimatedGas",3e5),TemplateVar.set("sendAll",!1),"deployContract"===FlowRouter.getRouteName()?(TemplateVar.set("selectedAction","deploy-contract"),TemplateVar.set("selectedToken","ether")):(TemplateVar.set("selectedAction","send-funds"),TemplateVar.set("selectedToken",FlowRouter.getParam("token")||"ether")),Helpers.checkChain(function(e){e&&EthAccounts.find().count()>0&&checkForOriginalWallet()}),e.autorun(function(a){var n=TemplateVar.getFrom(".dapp-select-account.send-from","value"),r=TemplateVar.get("amount")||"0";a.firstRun||t(n,r,e)}),e.autorun(function(t){var a=EthTools.getUnit();t.firstRun||"ether"!==TemplateVar.get("selectedToken")||TemplateVar.set("amount",EthTools.toWei(e.find('input[name="amount"]').value.replace(",","."),a))})}),Template.views_send.onRendered(function(){var e=this,t,r;FlowRouter.getParam("address")?(this.find('input[name="to"]').value=FlowRouter.getParam("address"),this.$('input[name="to"]').trigger("input")):this.data||this.$('input[name="to"]').focus(),FlowRouter.getParam("from")&&TemplateVar.setTo('select[name="dapp-select-account"].send-from',"value",FlowRouter.getParam("from")),e.autorun(function(e){"send"===FlowRouter.getRouteName()&&(TemplateVar.set("selectedAction","send"),TemplateVar.setTo(".dapp-data-textarea","value",""))}),e.autorun(function(e){address=TemplateVar.getFrom(".dapp-select-account.send-from","value"),e.firstRun?r=address:(r!==address&&TemplateVar.set("selectedToken","ether"),r=address)}),e.autorun(function(t){var r=TemplateVar.getFrom(".dapp-select-account.send-from","value"),o=TemplateVar.getFrom(".dapp-address-input .to","value"),s=TemplateVar.get("amount")||"0",l=a(),i=TemplateVar.get("selectedToken");"ether"===i?EthAccounts.findOne({address:r},{reactive:!1})?web3.eth.estimateGas({from:r,to:o,value:s,data:l,gas:5e7},n.bind(e)):(wallet=Wallets.findOne({address:r},{reactive:!1}))&&contracts["ct_"+wallet._id]&&contracts["ct_"+wallet._id].methods.execute(o||"",s||"",l||"0x00").estimateGas({from:wallet.owners[0],gas:5e7},n.bind(e)):(TokenContract.options.address=i,TokenContract.methods.transfer(o,s).estimateGas({from:r,gas:5e7},n.bind(e)))})}),Template.views_send.helpers({selectedAccount:function(){return Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"))},selectedToken:function(){return Tokens.findOne({address:TemplateVar.get("selectedToken")})},tokenSelectedAttr:function(e){return TemplateVar.get("selectedToken")===e?{checked:!0}:{}},tokens:function(){if("send-funds"===TemplateVar.get("selectedAction"))return Tokens.find({},{sort:{name:1}})},hasTokens:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),t={};if(e)return t["balances."+e._id]={$exists:!0,$ne:"0"},"send-funds"===TemplateVar.get("selectedAction")&&!!Tokens.findOne(t,{field:{_id:1}})},showOnlyByteTextarea:function(){return"deploy-contract"!==TemplateVar.get("selectedAction")},total:function(e){var t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),a=TemplateVar.get("amount");if(!_.isFinite(a))return"0";var n=TemplateVar.getFrom(".dapp-select-gas-price","gasInWei")||"0";return a="ether"===TemplateVar.get("selectedToken")?t&&t.owners?a:new BigNumber(a,10).plus(new BigNumber(n,10)):new BigNumber(n,10)},tokenTotal:function(){var e=TemplateVar.get("amount"),t=Tokens.findOne({address:TemplateVar.get("selectedToken")});return _.isFinite(e)&&t?Helpers.formatNumberByDecimals(e,t.decimals):"0"},sendAllAmount:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),t=0;if("ether"===TemplateVar.get("selectedToken")){var a=TemplateVar.getFrom(".dapp-select-gas-price","gasInWei")||"0";t=e.owners?e.balance:web3.utils.BN.max(new web3.utils.BN(0),new web3.utils.BN(e.balance).sub(new web3.utils.BN(a))).toString(10)}else{var n=Tokens.findOne({address:TemplateVar.get("selectedToken")});t=n&&n.balances&&n.balances[e._id]?n.balances[e._id]:"0"}return TemplateVar.set("amount",t),t},tokenDecimals:function(){var e=Tokens.findOne({address:TemplateVar.get("selectedToken")});return e?e.decimals:0},timeText:function(){return TAPi18n.__("wallet.send.texts.timeTexts."+((Number(TemplateVar.getFrom(".dapp-select-gas-price","feeMultiplicator"))+5)/2).toFixed(0))},sendExplanation:function(){var e=TemplateVar.get("amount")||"0",t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value")),a=Tokens.findOne({address:TemplateVar.get("selectedToken")});if(a&&t)return Spacebars.SafeString(TAPi18n.__("wallet.send.texts.sendToken",{amount:Helpers.formatNumberByDecimals(e,a.decimals),name:a.name,symbol:a.symbol}))},formattedCoinBalance:function(e){var t=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"));return!!(this.balances&&Number(this.balances[t._id])>0)&&Helpers.formatNumberByDecimals(this.balances[t._id],this.decimals)+" "+this.symbol},selectedAccountIsWalletContract:function(){var e=Helpers.getAccountByAddress(TemplateVar.getFrom(".dapp-select-account.send-from","value"));return!!e&&!!e.owners},clearAmountFromChars:function(e){return(e=~e.indexOf(".")?e.replace(/\,/g,""):e).replace(/ /g,"")}}),Template.views_send.events({"change input.send-all":function(e){TemplateVar.set("sendAll",$(e.currentTarget)[0].checked),TemplateVar.set("amount",0)},"click .token-ether":function(e,t){TemplateVar.set("selectedToken","ether"),t.$('input[name="amount"]').trigger("change")},"click .select-token input":function(e,t){var a=e.currentTarget.value;TemplateVar.set("selectedToken",a),"ether"===a&&TemplateVar.setTo(".dapp-data-textarea","value",""),t.$('input[name="amount"]').trigger("change")},'keyup input[name="amount"], change input[name="amount"], input input[name="amount"]':function(e,a){if("ether"===TemplateVar.get("selectedToken")){var n=EthTools.toWei(e.currentTarget.value.replace(",","."));TemplateVar.set("amount",n||"0"),t(a.find('select[name="dapp-select-account"].send-from').value,n,a)}else{var r=Tokens.findOne({address:TemplateVar.get("selectedToken")}),o=e.currentTarget.value||"0";o=new BigNumber(o,10).times(Math.pow(10,r.decimals||0)).floor().toString(10),TemplateVar.set("amount",o)}},"submit form":function(e,t){var n=TemplateVar.get("amount")||"0",s=TemplateVar.get("selectedToken"),l=TemplateVar.getFrom(".dapp-address-input .to","value"),i=TemplateVar.getFrom(".dapp-select-gas-price","gasPrice"),c=TemplateVar.get("estimatedGas"),d=o(),m=Helpers.getAccountByAddress(d),u=TemplateVar.get("selectedAction"),p=a(),g=TemplateVar.getFrom(".compile-contract","contract"),T=TemplateVar.get("sendAll");if(m&&!TemplateVar.get("sending")){if(5e7!==c&&0!==c||(c=22e3),T&&(m.owners||"ether"!==s)&&(T=!1),m.owners&&(m.owners=m.owners.map(function(e){return e.toLowerCase()})),console.log("Providing gas: ",c,T?"":" + 100000"),"deploy-contract"===TemplateVar.get("selectedAction")&&!p)return GlobalNotification.warning({content:"i18n:wallet.contracts.error.noDataProvided",duration:2});if("0"===m.balance&&(!m.owners||"ether"===s))return GlobalNotification.warning({content:"i18n:wallet.send.error.emptyWallet",duration:2});if(!web3.utils.isAddress(l)&&!p)return GlobalNotification.warning({content:"i18n:wallet.send.error.noReceiver",duration:2});if("ether"===s){if((_.isEmpty(n)||"0"===n||!_.isFinite(n))&&!p)return GlobalNotification.warning({content:"i18n:wallet.send.error.noAmount",duration:2});if(new BigNumber(n,10).gt(new BigNumber(m.balance,10)))return GlobalNotification.warning({content:"i18n:wallet.send.error.notEnoughFunds",duration:2})}else{if(!l)return GlobalNotification.warning({content:"i18n:wallet.send.error.noReceiver",duration:2});l=s,n=0;var f,V=Tokens.findOne({address:s}).balances[m._id]||"0";if(new BigNumber(n,10).gt(new BigNumber(V,10)))return GlobalNotification.warning({content:"i18n:wallet.send.error.notEnoughFunds",duration:2})}var w=function(e){TemplateVar.set(t,"sending",!0),e=e||Number($(".send-transaction-info input.gas").val()),console.log("Finally choosen gas",e),contracts["ct_"+m._id]?contracts["ct_"+m._id].methods.execute(l||"",n||"",p||"0x00").send({from:Helpers.getOwnedAccountFrom(m.owners),gasPrice:i,gas:e},function(a,o){if(TemplateVar.set(t,"sending",!1),a)return console.log("Error from contract sendTransaction: ",a,o),void GlobalNotification.error({content:r(a.message),duration:8});console.log("SEND from contract",n),p=!l&&g?{contract:g,data:p}:p,addTransactionAfterSend(o,n,m.address,l,i,e,p),localStorage.setItem("contractSource",Helpers.getDefaultContractExample()),localStorage.setItem("compiledContracts",null),localStorage.setItem("selectedContract",null),FlowRouter.go("dashboard")}).on("receipt",function(e){console.log("Transaction receipt: ",e)}):(console.log("Gas Price: "+i),console.log("Amount:",n),web3.eth.sendTransaction({from:m.address,to:l,data:p,value:n,gasPrice:i,gas:e},function(a,o){if(TemplateVar.set(t,"sending",!1),a)return console.log("Error from simple sendTransaction: ",a,o),void GlobalNotification.error({content:r(a.message),duration:8});console.log("SEND simple"),p=!l&&g?{contract:g,data:p}:p,addTransactionAfterSend(o,n,m.address,l,i,e,p),localStorage.setItem("contractSource",Helpers.getDefaultContractExample()),localStorage.setItem("compiledContracts",null),localStorage.setItem("selectedContract",null),FlowRouter.go("dashboard")}).on("receipt",function(e){console.log("Transaction receipt: ",e)}))};"undefined"==typeof mist?(console.log("estimatedGas: "+c),EthElements.Modal.question({template:"views_modals_sendTransactionInfo",data:{from:m.address,to:l,amount:n,gasPrice:i,estimatedGas:c,estimatedGasPlusAddition:T?c:c+1e5,data:p},ok:w,cancel:!0},{class:"send-transaction-info"})):w(T?c:c+1e5)}}})}).call(this); (function(){Meteor.startup(function(){if(Cookie.get("TAPi18next"))TAPi18n.setLanguage(Cookie.get("TAPi18next"));else{var e=navigator.language||navigator.userLanguage,a=TAPi18n.getLanguages();_.isObject(a)&&a[e]?TAPi18n.setLanguage(e):_.isObject(a)&&a[e.substr(0,2)]?TAPi18n.setLanguage(e.substr(0,2)):TAPi18n.setLanguage("en")}Tracker.autorun(function(){if(_.isString(TAPi18n.getLanguage())){var e=TAPi18n.getLanguage().substr(0,2);moment.locale(e);try{numeral.language(e)}catch(e){console.warn("numeral.js couldn't set number formating: ",e.message)}EthTools.setLocale(e)}})})}).call(this); diff --git a/build/c343094781f62cf18159e309d76082c04627c34b.stats.json b/build/8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.stats.json similarity index 99% rename from build/c343094781f62cf18159e309d76082c04627c34b.stats.json rename to build/8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.stats.json index 506cc1646..02f4306a4 100644 --- a/build/c343094781f62cf18159e309d76082c04627c34b.stats.json +++ b/build/8f16113a04929a5e54ac1c6fbe1e0f272eae43bb.stats.json @@ -3,8 +3,8 @@ "name": "standard-minifier-js", "version": "2.3.2" }, - "totalMinifiedBytes": 2930734, - "totalMinifiedGzipBytes": 743564, + "totalMinifiedBytes": 2931004, + "totalMinifiedGzipBytes": 743670, "minifiedBytesByPackage": { "packages/meteor.js": 8962, "packages/standard-minifiers.js": 38, @@ -1081,12 +1081,12 @@ "app/client/lib/ethereum/observeEvents.js": 348, "app/client/lib/ethereum/observePendingConfirmations.js": 1191, "app/client/lib/ethereum/observeTokens.js": 2264, - "app/client/lib/ethereum/observeTransactions.js": 6792, + "app/client/lib/ethereum/observeTransactions.js": 6801, "app/client/lib/ethereum/observeWallets.js": 114176, "app/client/lib/ethereum/tokenInterface.js": 1200, "app/client/lib/ethereum/walletConnector.js": 1895, "app/client/lib/ethereum/walletInterface.js": 29207, - "app/client/lib/helpers/helperFunctions.js": 9502, + "app/client/lib/helpers/helperFunctions.js": 9699, "app/client/lib/helpers/templateHelpers.js": 2441, "app/client/lib/thirdparty/ace.js": 338148, "app/client/lib/thirdparty/mode-java.js": 26353, @@ -1114,14 +1114,14 @@ "app/client/templates/elements/executeContract.js": 5057, "app/client/templates/elements/selectableUnit.js": 1113, "app/client/templates/elements/tokenBox.js": 763, - "app/client/templates/elements/transactionTable.js": 4983, + "app/client/templates/elements/transactionTable.js": 5003, "app/client/templates/elements/vulnerabilities.js": 637, "app/client/templates/layout/header.js": 1722, "app/client/templates/views/account.js": 5418, "app/client/templates/views/account_create.js": 5319, "app/client/templates/views/contracts.js": 5174, "app/client/templates/views/dashboard.js": 1044, - "app/client/templates/views/send.js": 11461, + "app/client/templates/views/send.js": 11505, "app/client/index.js": 591, "app/client/mist.js": 1278, "app/client/routes.js": 1978, diff --git a/build/index.html b/build/index.html index 5a29c1561..cb515a6b7 100644 --- a/build/index.html +++ b/build/index.html @@ -3,7 +3,7 @@ - + Ethereum Wallet