require=function t(e,n,r){function o(a,u){if(!n[a]){if(!e[a]){var f="function"==typeof require&&require;if(!u&&f)return f(a,!0);if(i)return i(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 o(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ad;d++)m.push(c(n.slice(0,f))),n=n.slice(f);r.push(m)}else o.prefixedType("string")(u.outputs[e].type)?(l=l.slice(f),r.push(c(n.slice(0,f))),n=n.slice(f)):(r.push(c(n.slice(0,f))),n=n.slice(f))}),r},b=function(t){var e=t.indexOf("(");return-1!==e?t.substr(0,e):t},_=function(t){var e=t.indexOf("(");return-1!==e?t.substr(e+1,t.length-1-(e+1)):""},w=function(t){var e={};return t.forEach(function(n){var r=b(n.name),o=_(n.name),i=function(){var e=Array.prototype.slice.call(arguments);return d(t,n.name,e)};void 0===e[r]&&(e[r]=i),e[r][o]=i}),e},N=function(t){var e={};return t.forEach(function(n){var r=b(n.name),o=_(n.name),i=function(e){return y(t,n.name,e)};void 0===e[r]&&(e[r]=i),e[r][o]=i}),e},O=function(t){return n.sha3(n.fromAscii(t)).slice(0,2+2*u)};e.exports={inputParser:w,outputParser:N,methodSignature:O,methodDisplayName:b,methodTypeName:_,getMethodWithName:s,filterFunctions:c,filterEvents:l}},{"./formatters":5,"./types":9,"./utils":10,"./web3":11}],2:[function(t,e){var n=t("./web3"),r=t("./abi"),o=t("./event"),i=function(t){t.call=function(e){return t._isTransact=!1,t._options=e,t},t.transact=function(e){return t._isTransact=!0,t._options=e,t},t._options={},["gas","gasPrice","value","from"].forEach(function(e){t[e]=function(n){return t._options[e]=n,t}})},a=function(t,e,o){var i=r.inputParser(e),a=r.outputParser(e);r.filterFunctions(e).forEach(function(u){var f=r.methodDisplayName(u.name),s=r.methodTypeName(u.name),c=function(){var c=Array.prototype.slice.call(arguments),l=r.methodSignature(u.name),p=i[f][s].apply(null,c),h=t._options||{};h.to=o,h.data=l+p;var m=t._isTransact===!0||t._isTransact!==!1&&!u.constant,d=h.collapse!==!1;if(t._options={},t._isTransact=null,m)return n._currentContractAbi=e,n._currentContractAddress=o,n._currentContractMethodName=u.name,n._currentContractMethodParams=c,void n.eth.transact(h);var g=n.eth.call(h),v=a[f][s](g);return d&&(1===v.length?v=v[0]:0===v.length&&(v=null)),v};void 0===t[f]&&(t[f]=c),t[f][s]=c})},u=function(t,e,n){t.address=n,Object.defineProperty(t,"topic",{get:function(){return r.filterEvents(e).map(function(t){return r.methodSignature(t.name)})}})},f=function(t,e,i){r.filterEvents(e).forEach(function(e){var a=function(){var t=Array.prototype.slice.call(arguments),a=r.methodSignature(e.name),u=o(i,a,e),f=u.apply(null,t);return n.eth.watch(f)};a._isEvent=!0,a.address=i,Object.defineProperty(a,"topic",{get:function(){return[r.methodSignature(e.name)]}});var u=r.methodDisplayName(e.name),f=r.methodTypeName(e.name);void 0===t[u]&&(t[u]=a),t[u][f]=a})},s=function(t,e){e.forEach(function(t){if(-1===t.name.indexOf("(")){var e=t.name,n=t.inputs.map(function(t){return t.type}).join();t.name=e+"("+n+")"}});var n={};return i(n),a(n,e,t),u(n,e,t),f(n,e,t),n};e.exports=s},{"./abi":1,"./event":3,"./web3":11}],3:[function(t,e){var n=(t("./abi"),t("./utils"),function(t,e){return function(n,r){var o=r||{};return o.address=t,o.topic=[],o.topic.push(e),o}});e.exports=n},{"./abi":1,"./utils":10}],4:[function(t,e){var n=t("./web3"),r=function(t,e,r){return t._isEvent?t(e):("string"!=typeof t&&(t.topics&&console.warn('"topics" is deprecated, use "topic" instead'),t={to:t.to,topic:t.topic,earliest:t.earliest,latest:t.latest,max:t.max,skip:t.skip,address:t.address}),this.impl=r,this.callbacks=[],this.id=r.newFilter(t),void n.provider.startPolling({call:r.changed,args:[this.id]},this.id,this.trigger.bind(this)))};r.prototype.arrived=function(t){this.changed(t)},r.prototype.changed=function(t){this.callbacks.push(t)},r.prototype.trigger=function(t){for(var e=0;en;n+=2){var o=parseInt(t.substr(n,2),16);if(0===o)break;e+=String.fromCharCode(o)}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 t=t.length>2?t.substring(2):"0",new BigNumber(t,16).toString(10)},fromDecimal:function(t){return"0x"+new BigNumber(t).toString(16)},toEth:function(t){for(var e="string"==typeof t?0===t.indexOf("0x")?parseInt(t.substr(2),16):parseInt(t):t,r=0,o=n;e>3e3&&r