require=function t(e,n,r){function i(a,u){if(!n[a]){if(!e[a]){var f="function"==typeof require&&require;if(!u&&f)return f(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;ad;d++)p.push(o(n.slice(0,c))),n=n.slice(c);a.push(p)}else u("string")(f.outputs[e].type)?(h=h.slice(c),a.push(o(n.slice(0,c))),n=n.slice(c)):(a.push(o(n.slice(0,c))),n=n.slice(c))}),a}},F=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},D=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)):""},I=function(t){var e={};return t.forEach(function(n){var r=F(n.name),i=D(n.name),o=function(){var e=Array.prototype.slice.call(arguments);return v(t,n.name,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},M=function(t){var e={};return t.forEach(function(n){var r=F(n.name),i=D(n.name),o=function(e){return E(t,n.name,e)};void 0===e[r]&&(e[r]=o),e[r][i]=o}),e},T=function(t,e){return n.sha3(n.fromAscii(e))};e.exports={inputParser:I,outputParser:M,methodSignature:T,methodDisplayName:F,methodTypeName:D}},{"./web3":6}],2:[function(t,e){var n=t("./web3"),r=t("./abi"),i=4,o=function(t,e){var o=r.inputParser(e),a=r.outputParser(e),u={};return e.forEach(function(f){var s=r.methodDisplayName(f.name),c=r.methodTypeName(f.name),l=function(){var u=Array.prototype.slice.call(arguments),l=o[s][c].apply(null,u),h=function(t){return a[s][c](t)};return{call:function(o){return o=o||{},o.to=t,r.methodSignature(e,f.name).then(function(t){return o.data=t.slice(0,2+2*i)+l,n.eth.call(o).then(h)})},transact:function(o){return o=o||{},o.to=t,r.methodSignature(e,f.name).then(function(r){return o.data=r.slice(0,2+2*i)+l,n._currentContractAbi=e,n._currentContractAddress=t,n.eth.transact(o).then(h)})}}};void 0===u[s]&&(u[s]=l),u[s][c]=l}),u};e.exports=o},{"./abi":1,"./web3":6}],3:[function(t,e){var n=t("./web3"),r=function(t,e){this.impl=e,this.callbacks=[];var r=this;this.promise=e.newFilter(t),this.promise.then(function(t){r.id=t,n.on(e.changed,t,r.trigger.bind(r)),n.provider.startPolling({call:e.changed,args:[t]},t)})};r.prototype.arrived=function(t){this.changed(t)},r.prototype.changed=function(t){var e=this;this.promise.then(function(){e.callbacks.push(t)})},r.prototype.trigger=function(t){for(var e=0;en;n+=2){var i=parseInt(t.substr(n,2),16);if(0===i)break;e+=String.fromCharCode(i)}return e},fromAscii:function(t,e){e=void 0===e?0:e;for(var n=this.toHex(t);n.length<2*e;)n+="00";return"0x"+n},toDecimal:function(t){return h(t.substring(2))},fromDecimal:function(t){return"0x"+p(t)},toEth:function(t){for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,n=0,r=["wei","Kwei","Mwei","Gwei","szabo","finney","ether","grand","Mether","Gether","Tether","Pether","Eether","Zether","Yether","Nether","Dether","Vether","Uether"];e>3e3&&n