ether-pudding
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -5,8 +5,10 @@ | ||
var _get = function get(_x2, _x3, _x4) { var _again = true; _function: while (_again) { var object = _x2, property = _x3, receiver = _x4; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x2 = parent; _x3 = property; _x4 = receiver; _again = true; desc = parent = undefined; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; | ||
var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })(); | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i]; return arr2; } else { return Array.from(arr); } } | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
@@ -17,3 +19,3 @@ | ||
var factory = function factory(Promise) { | ||
var Pudding = (function () { | ||
var Pudding = function () { | ||
function Pudding(contract) { | ||
@@ -66,4 +68,4 @@ _classCallCheck(this, Pudding); | ||
try { | ||
if (!_iteratorNormalCompletion && _iterator["return"]) { | ||
_iterator["return"](); | ||
if (!_iteratorNormalCompletion && _iterator.return) { | ||
_iterator.return(); | ||
} | ||
@@ -126,3 +128,3 @@ } finally { | ||
contract_class["new"].apply(contract_class, args); | ||
contract_class.new.apply(contract_class, args); | ||
}); | ||
@@ -148,2 +150,3 @@ } | ||
// Backward compatibility. | ||
}, { | ||
@@ -177,4 +180,4 @@ key: "extend", | ||
try { | ||
if (!_iteratorNormalCompletion3 && _iterator3["return"]) { | ||
_iterator3["return"](); | ||
if (!_iteratorNormalCompletion3 && _iterator3.return) { | ||
_iterator3.return(); | ||
} | ||
@@ -193,4 +196,4 @@ } finally { | ||
try { | ||
if (!_iteratorNormalCompletion2 && _iterator2["return"]) { | ||
_iterator2["return"](); | ||
if (!_iteratorNormalCompletion2 && _iterator2.return) { | ||
_iterator2.return(); | ||
} | ||
@@ -206,2 +209,3 @@ } finally { | ||
// Backward compatibility. | ||
}, { | ||
@@ -212,3 +216,3 @@ key: "whisk", | ||
var Contract = (function (_ref) { | ||
var Contract = function (_ref) { | ||
_inherits(Contract, _ref); | ||
@@ -219,7 +223,7 @@ | ||
_get(Object.getPrototypeOf(Contract.prototype), "constructor", this).apply(this, arguments); | ||
return _possibleConstructorReturn(this, Object.getPrototypeOf(Contract).apply(this, arguments)); | ||
} | ||
return Contract; | ||
})(this); | ||
}(this); | ||
@@ -259,4 +263,4 @@ ; | ||
try { | ||
if (!_iteratorNormalCompletion4 && _iterator4["return"]) { | ||
_iterator4["return"](); | ||
if (!_iteratorNormalCompletion4 && _iterator4.return) { | ||
_iterator4.return(); | ||
} | ||
@@ -286,3 +290,3 @@ } finally { | ||
value: function is_object(val) { | ||
return typeof val == "object" && !(val instanceof Array); | ||
return (typeof val === "undefined" ? "undefined" : _typeof(val)) == "object" && !(val instanceof Array); | ||
} | ||
@@ -318,4 +322,4 @@ }, { | ||
try { | ||
if (!_iteratorNormalCompletion6 && _iterator6["return"]) { | ||
_iterator6["return"](); | ||
if (!_iteratorNormalCompletion6 && _iterator6.return) { | ||
_iterator6.return(); | ||
} | ||
@@ -334,4 +338,4 @@ } finally { | ||
try { | ||
if (!_iteratorNormalCompletion5 && _iterator5["return"]) { | ||
_iterator5["return"](); | ||
if (!_iteratorNormalCompletion5 && _iterator5.return) { | ||
_iterator5.return(); | ||
} | ||
@@ -352,3 +356,3 @@ } finally { | ||
return function () { | ||
var _this2 = this; | ||
var _this3 = this; | ||
@@ -375,3 +379,3 @@ var args = Array.prototype.slice.call(arguments); | ||
args.push(tx_params, callback); | ||
fn.apply(_this2.contract, args); | ||
fn.apply(_this3.contract, args); | ||
}); | ||
@@ -476,4 +480,4 @@ }; | ||
try { | ||
if (!_iteratorNormalCompletion7 && _iterator7["return"]) { | ||
_iterator7["return"](); | ||
if (!_iteratorNormalCompletion7 && _iterator7.return) { | ||
_iterator7.return(); | ||
} | ||
@@ -492,3 +496,3 @@ } finally { | ||
return Pudding; | ||
})(); | ||
}(); | ||
@@ -495,0 +499,0 @@ ; // end class |
@@ -1,1 +0,1 @@ | ||
"use strict";function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var _get=function(t,e,r){for(var n=!0;n;){var a=t,o=e,i=r;n=!1,null===a&&(a=Function.prototype);var s=Object.getOwnPropertyDescriptor(a,o);if(void 0!==s){if("value"in s)return s.value;var l=s.get;if(void 0===l)return;return l.call(i)}var u=Object.getPrototypeOf(a);if(null===u)return;t=u,e=o,r=i,n=!0,s=u=void 0}},_createClass=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),factory=function(t){var e=function(){function e(t){if(_classCallCheck(this,e),!this.constructor.abi)throw new Error("Contract ABI not set. Please inherit Pudding and set static .abi variable with contract abi.");if(this.contract=t,this.address=t.address,this.web3||(this.web3=e.web3),!this.web3)throw new Error("Please call Pudding.setWeb3() before using any Pudding class.");var r=!0,n=!1,a=void 0;try{for(var o,i=this.constructor.abi[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value;"function"==s.type&&(1==s.constant?this[s.name]=this.constructor.promisifyFunction(this.contract[s.name]):this[s.name]=this.constructor.synchronizeFunction(this.contract[s.name]),this[s.name].call=this.constructor.promisifyFunction(this.contract[s.name].call),this[s.name].sendTransaction=this.constructor.promisifyFunction(this.contract[s.name].sendTransaction),this[s.name].request=this.contract[s.name].request),"event"==s.type&&(this[s.name]=this.contract[s.name])}}catch(l){n=!0,a=l}finally{try{!r&&i["return"]&&i["return"]()}finally{if(n)throw a}}this.allEvents=this.contract.allEvents}return _createClass(e,null,[{key:"new",value:function(){var r=this,n=Array.prototype.slice.call(arguments);if(!this.binary)throw new Error("Contract binary not set. Please override Pudding and set .binary before calling new()");var a=this;return new t(function(t,o){var i=r.web3.eth.contract(r.abi),s={},l=n[n.length-1];r.is_object(l)&&l instanceof e.BigNumber==0&&(s=n.pop()),s=r.merge(e.class_defaults,r.class_defaults,s),null==s.data&&(s.data=r.binary);var u=function(e,r){return null!=e?void o(e):void(null==e&&null!=r&&null!=r.address&&t(new a(r)))};n.push(s,u),i["new"].apply(i,n)})}},{key:"at",value:function(t){var e=this.web3.eth.contract(this.abi),r=e.at(t);return new this(r)}},{key:"deployed",value:function(){if(!this.address)throw new Error("Contract address not set - deployed() relies on the contract class having a static 'address' value; please set that before using deployed().");return this.at(this.address)}},{key:"extend",value:function(){var t=(Array.prototype.slice.call(arguments),!0),e=!1,r=void 0;try{for(var n,a=arguments[Symbol.iterator]();!(t=(n=a.next()).done);t=!0){var o=n.value,i=!0,s=!1,l=void 0;try{for(var u,c=Object.keys(o)[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var f=u.value,y=o[f];this.prototype[f]=y}}catch(h){s=!0,l=h}finally{try{!i&&c["return"]&&c["return"]()}finally{if(s)throw l}}}}catch(h){e=!0,r=h}finally{try{!t&&a["return"]&&a["return"]()}finally{if(e)throw r}}}},{key:"whisk",value:function(t,e){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=function(t){function e(){_classCallCheck(this,e),_get(Object.getPrototypeOf(e.prototype),"constructor",this).apply(this,arguments)}return _inherits(e,t),e}(this);return n.abi=t,n.binary=e,n.class_defaults=r,n}},{key:"defaults",value:function(t){null==this.class_defaults&&(this.class_defaults={}),null==t&&(t={});var e=!0,r=!1,n=void 0;try{for(var a,o=Object.keys(t)[Symbol.iterator]();!(e=(a=o.next()).done);e=!0){var i=a.value,s=t[i];this.class_defaults[i]=s}}catch(l){r=!0,n=l}finally{try{!e&&o["return"]&&o["return"]()}finally{if(r)throw n}}return this.class_defaults}},{key:"setWeb3",value:function(t){if(this.web3=t,null==this.web3.toBigNumber)throw new Error("Pudding.setWeb3() must be passed an instance of Web3 and not Web3 itself.");this.BigNumber=this.web3.toBigNumber(0).constructor}},{key:"is_object",value:function(t){return"object"==typeof t&&!(t instanceof Array)}},{key:"merge",value:function(){var t={},e=Array.prototype.slice.call(arguments),r=!0,n=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value,l=!0,u=!1,c=void 0;try{for(var f,y=Object.keys(s)[Symbol.iterator]();!(l=(f=y.next()).done);l=!0){var h=f.value,v=s[h];t[h]=v}}catch(d){u=!0,c=d}finally{try{!l&&y["return"]&&y["return"]()}finally{if(u)throw c}}}}catch(d){n=!0,a=d}finally{try{!r&&i["return"]&&i["return"]()}finally{if(n)throw a}}return t}},{key:"promisifyFunction",value:function(r){var n=this;return function(){var a=this,o=Array.prototype.slice.call(arguments),i={},s=o[o.length-1];return n.is_object(s)&&s instanceof e.BigNumber==0&&(i=o.pop()),i=n.merge(e.class_defaults,n.class_defaults,i),new t(function(t,e){var n=function(r,n){null!=r?e(r):t(n)};o.push(i,n),r.apply(a.contract,o)})}}},{key:"synchronizeFunction",value:function(r){var n=this;return function(){var a=Array.prototype.slice.call(arguments),o={},i=a[a.length-1];return n.is_object(i)&&i instanceof e.BigNumber==0&&(o=a.pop()),o=n.merge(e.class_defaults,n.class_defaults,o),new t(function(t,e){var i=function(r,a){var o=null,i=240,s=0;if(null!=r)return void e(r);var o,l=function(){n.web3.eth.getTransaction(a,function(r,n){null==r&&(null!=n.blockHash&&(clearInterval(o),t(a)),s>=i&&(clearInterval(o),e(new Error("Transaction "+a+" wasn't processed in "+s+" attempts!"))),s+=1)})};o=setInterval(l,1e3),l()};a.push(o,i),r.apply(void 0,_toConsumableArray(a))})}}},{key:"load",value:function(t,e){null==e&&(e="undefined"==typeof module?window:global),t instanceof Array||(t=[t]);var r=[],n=!0,a=!1,o=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value,u=l(this);r.push(u.contract_name),e[u.contract_name]=u}}catch(c){a=!0,o=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(a)throw o}}return r}}]),e}();return e.class_defaults={},e.version="1.1.0",e};"undefined"!=typeof module?module.exports=factory(require("bluebird")):window.Pudding=factory(Promise); | ||
"use strict";function _toConsumableArray(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);e<t.length;e++)r[e]=t[e];return r}return Array.from(t)}function _possibleConstructorReturn(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function _classCallCheck(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},_createClass=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,r,n){return r&&t(e.prototype,r),n&&t(e,n),e}}(),factory=function(t){var e=function(){function e(t){if(_classCallCheck(this,e),!this.constructor.abi)throw new Error("Contract ABI not set. Please inherit Pudding and set static .abi variable with contract abi.");if(this.contract=t,this.address=t.address,this.web3||(this.web3=e.web3),!this.web3)throw new Error("Please call Pudding.setWeb3() before using any Pudding class.");var r=!0,n=!1,a=void 0;try{for(var o,i=this.constructor.abi[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value;"function"==s.type&&(1==s.constant?this[s.name]=this.constructor.promisifyFunction(this.contract[s.name]):this[s.name]=this.constructor.synchronizeFunction(this.contract[s.name]),this[s.name].call=this.constructor.promisifyFunction(this.contract[s.name].call),this[s.name].sendTransaction=this.constructor.promisifyFunction(this.contract[s.name].sendTransaction),this[s.name].request=this.contract[s.name].request),"event"==s.type&&(this[s.name]=this.contract[s.name])}}catch(l){n=!0,a=l}finally{try{!r&&i["return"]&&i["return"]()}finally{if(n)throw a}}this.allEvents=this.contract.allEvents}return _createClass(e,null,[{key:"new",value:function(){var r=this,n=Array.prototype.slice.call(arguments);if(!this.binary)throw new Error("Contract binary not set. Please override Pudding and set .binary before calling new()");var a=this;return new t(function(t,o){var i=r.web3.eth.contract(r.abi),s={},l=n[n.length-1];r.is_object(l)&&l instanceof e.BigNumber==0&&(s=n.pop()),s=r.merge(e.class_defaults,r.class_defaults,s),null==s.data&&(s.data=r.binary);var u=function(e,r){return null!=e?void o(e):void(null==e&&null!=r&&null!=r.address&&t(new a(r)))};n.push(s,u),i["new"].apply(i,n)})}},{key:"at",value:function(t){var e=this.web3.eth.contract(this.abi),r=e.at(t);return new this(r)}},{key:"deployed",value:function(){if(!this.address)throw new Error("Contract address not set - deployed() relies on the contract class having a static 'address' value; please set that before using deployed().");return this.at(this.address)}},{key:"extend",value:function(){var t=(Array.prototype.slice.call(arguments),!0),e=!1,r=void 0;try{for(var n,a=arguments[Symbol.iterator]();!(t=(n=a.next()).done);t=!0){var o=n.value,i=!0,s=!1,l=void 0;try{for(var u,c=Object.keys(o)[Symbol.iterator]();!(i=(u=c.next()).done);i=!0){var f=u.value,y=o[f];this.prototype[f]=y}}catch(h){s=!0,l=h}finally{try{!i&&c["return"]&&c["return"]()}finally{if(s)throw l}}}}catch(h){e=!0,r=h}finally{try{!t&&a["return"]&&a["return"]()}finally{if(e)throw r}}}},{key:"whisk",value:function(t,e){var r=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=function(t){function e(){return _classCallCheck(this,e),_possibleConstructorReturn(this,Object.getPrototypeOf(e).apply(this,arguments))}return _inherits(e,t),e}(this);return n.abi=t,n.binary=e,n.class_defaults=r,n}},{key:"defaults",value:function(t){null==this.class_defaults&&(this.class_defaults={}),null==t&&(t={});var e=!0,r=!1,n=void 0;try{for(var a,o=Object.keys(t)[Symbol.iterator]();!(e=(a=o.next()).done);e=!0){var i=a.value,s=t[i];this.class_defaults[i]=s}}catch(l){r=!0,n=l}finally{try{!e&&o["return"]&&o["return"]()}finally{if(r)throw n}}return this.class_defaults}},{key:"setWeb3",value:function(t){if(this.web3=t,null==this.web3.toBigNumber)throw new Error("Pudding.setWeb3() must be passed an instance of Web3 and not Web3 itself.");this.BigNumber=this.web3.toBigNumber(0).constructor}},{key:"is_object",value:function(t){return"object"==("undefined"==typeof t?"undefined":_typeof(t))&&!(t instanceof Array)}},{key:"merge",value:function(){var t={},e=Array.prototype.slice.call(arguments),r=!0,n=!1,a=void 0;try{for(var o,i=e[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var s=o.value,l=!0,u=!1,c=void 0;try{for(var f,y=Object.keys(s)[Symbol.iterator]();!(l=(f=y.next()).done);l=!0){var h=f.value,d=s[h];t[h]=d}}catch(b){u=!0,c=b}finally{try{!l&&y["return"]&&y["return"]()}finally{if(u)throw c}}}}catch(b){n=!0,a=b}finally{try{!r&&i["return"]&&i["return"]()}finally{if(n)throw a}}return t}},{key:"promisifyFunction",value:function(r){var n=this;return function(){var a=this,o=Array.prototype.slice.call(arguments),i={},s=o[o.length-1];return n.is_object(s)&&s instanceof e.BigNumber==0&&(i=o.pop()),i=n.merge(e.class_defaults,n.class_defaults,i),new t(function(t,e){var n=function(r,n){null!=r?e(r):t(n)};o.push(i,n),r.apply(a.contract,o)})}}},{key:"synchronizeFunction",value:function(r){var n=this;return function(){var a=Array.prototype.slice.call(arguments),o={},i=a[a.length-1];return n.is_object(i)&&i instanceof e.BigNumber==0&&(o=a.pop()),o=n.merge(e.class_defaults,n.class_defaults,o),new t(function(t,e){var i=function(r,a){var o=null,i=240,s=0;if(null!=r)return void e(r);var o,l=function(){n.web3.eth.getTransaction(a,function(r,n){null==r&&(null!=n.blockHash&&(clearInterval(o),t(a)),s>=i&&(clearInterval(o),e(new Error("Transaction "+a+" wasn't processed in "+s+" attempts!"))),s+=1)})};o=setInterval(l,1e3),l()};a.push(o,i),r.apply(void 0,_toConsumableArray(a))})}}},{key:"load",value:function(t,e){null==e&&(e="undefined"==typeof module?window:global),t instanceof Array||(t=[t]);var r=[],n=!0,a=!1,o=void 0;try{for(var i,s=t[Symbol.iterator]();!(n=(i=s.next()).done);n=!0){var l=i.value,u=l(this);r.push(u.contract_name),e[u.contract_name]=u}}catch(c){a=!0,o=c}finally{try{!n&&s["return"]&&s["return"]()}finally{if(a)throw o}}return r}}]),e}();return e.class_defaults={},e.version="1.1.0",e};"undefined"!=typeof module?module.exports=factory(require("bluebird")):window.Pudding=factory(Promise); |
"use strict"; | ||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
@@ -14,3 +14,3 @@ | ||
var Example = (function (_Pudding) { | ||
var Example = function (_Pudding) { | ||
_inherits(Example, _Pudding); | ||
@@ -21,7 +21,7 @@ | ||
_get(Object.getPrototypeOf(Example.prototype), "constructor", this).apply(this, arguments); | ||
return _possibleConstructorReturn(this, Object.getPrototypeOf(Example).apply(this, arguments)); | ||
} | ||
return Example; | ||
})(Pudding); | ||
}(Pudding); | ||
@@ -34,10 +34,10 @@ ; | ||
if ("0x27c6b63f499c5b619f867285f22faa611c6856a9" != "") { | ||
Example.address = "0x27c6b63f499c5b619f867285f22faa611c6856a9"; | ||
if ("0xb21dd320c50025e1e69ad0d91e83a19eccf7d9b2" != "") { | ||
Example.address = "0xb21dd320c50025e1e69ad0d91e83a19eccf7d9b2"; | ||
// Backward compatibility; Deprecated. | ||
Example.deployed_address = "0x27c6b63f499c5b619f867285f22faa611c6856a9"; | ||
Example.deployed_address = "0xb21dd320c50025e1e69ad0d91e83a19eccf7d9b2"; | ||
} | ||
Example.generated_with = "1.0.3"; | ||
Example.generated_with = "1.1.0"; | ||
Example.contract_name = "Example"; | ||
@@ -51,3 +51,3 @@ | ||
if (typeof module != "undefined") { | ||
if (typeof module != "undefined" && typeof module.exports != "undefined") { | ||
module.exports = factory; | ||
@@ -54,0 +54,0 @@ } else { |
"use strict"; | ||
var _get = function get(_x, _x2, _x3) { var _again = true; _function: while (_again) { var object = _x, property = _x2, receiver = _x3; desc = parent = getter = undefined; _again = false; if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { _x = parent; _x2 = property; _x3 = receiver; _again = true; continue _function; } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } } }; | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } | ||
@@ -14,3 +14,3 @@ | ||
var TestWithConstructor = (function (_Pudding) { | ||
var TestWithConstructor = function (_Pudding) { | ||
_inherits(TestWithConstructor, _Pudding); | ||
@@ -21,7 +21,7 @@ | ||
_get(Object.getPrototypeOf(TestWithConstructor.prototype), "constructor", this).apply(this, arguments); | ||
return _possibleConstructorReturn(this, Object.getPrototypeOf(TestWithConstructor).apply(this, arguments)); | ||
} | ||
return TestWithConstructor; | ||
})(Pudding); | ||
}(Pudding); | ||
@@ -34,10 +34,10 @@ ; | ||
if ("0x01f0cf2f2e1c319cb6cd7071bb9c67c723d5efdc" != "") { | ||
TestWithConstructor.address = "0x01f0cf2f2e1c319cb6cd7071bb9c67c723d5efdc"; | ||
if ("0x33c42800d2dedc92e5d247006ba7ee5ab4bb40de" != "") { | ||
TestWithConstructor.address = "0x33c42800d2dedc92e5d247006ba7ee5ab4bb40de"; | ||
// Backward compatibility; Deprecated. | ||
TestWithConstructor.deployed_address = "0x01f0cf2f2e1c319cb6cd7071bb9c67c723d5efdc"; | ||
TestWithConstructor.deployed_address = "0x33c42800d2dedc92e5d247006ba7ee5ab4bb40de"; | ||
} | ||
TestWithConstructor.generated_with = "1.0.3"; | ||
TestWithConstructor.generated_with = "1.1.0"; | ||
TestWithConstructor.contract_name = "TestWithConstructor"; | ||
@@ -51,3 +51,3 @@ | ||
if (typeof module != "undefined") { | ||
if (typeof module != "undefined" && typeof module.exports != "undefined") { | ||
module.exports = factory; | ||
@@ -54,0 +54,0 @@ } else { |
var fs = require("fs"); | ||
var path = require("path"); | ||
var rimraf = require("rimraf"); | ||
var babel = require("babel"); | ||
var babel = require("babel-core"); | ||
var es2015 = require("babel-preset-es2015"); | ||
var stagetwo = require("babel-preset-stage-2") | ||
var class_template = fs.readFileSync(path.join(__dirname, "./classtemplate.es6"), {encoding: "utf8"}); | ||
@@ -39,4 +41,15 @@ | ||
return babel.transform(classfile).code; | ||
var code = babel.transform(classfile, { | ||
filename: contract_name + ".sol.js", | ||
compact: false, | ||
presets: [ | ||
es2015, | ||
//react, | ||
stagetwo | ||
], | ||
ast: false, | ||
}).code; | ||
return code; | ||
} | ||
}; |
{ | ||
"name": "ether-pudding", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Pudding - a (more) delightful Ethereum contract abstraction", | ||
@@ -14,10 +14,11 @@ "author": "Tim Coulter", | ||
"dependencies": { | ||
"web3": "*", | ||
"bluebird": "*", | ||
"rimraf": "*", | ||
"node-dir": "*", | ||
"babel": "*", | ||
"babel-core": "*" | ||
"babel-core": "^6.4.5", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-preset-stage-2": "^6.3.13", | ||
"bluebird": "^3.1.1", | ||
"node-dir": "^0.1.11", | ||
"rimraf": "^2.5.0", | ||
"web3": "^0.15.1" | ||
}, | ||
"license": "MIT License. Copyright Consensys LLC, and authors. All rights reserved." | ||
} |
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 6 instances in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
1306
1
0
96716
7
+ Addedbabel-preset-es2015@^6.3.13
+ Addedbabel-preset-stage-2@^6.3.13
+ Addedbabel-helper-bindify-decorators@6.24.1(transitive)
+ Addedbabel-helper-builder-binary-assignment-operator-visitor@6.24.1(transitive)
+ Addedbabel-helper-call-delegate@6.24.1(transitive)
+ Addedbabel-helper-define-map@6.26.0(transitive)
+ Addedbabel-helper-explode-assignable-expression@6.24.1(transitive)
+ Addedbabel-helper-explode-class@6.24.1(transitive)
+ Addedbabel-helper-function-name@6.24.1(transitive)
+ Addedbabel-helper-get-function-arity@6.24.1(transitive)
+ Addedbabel-helper-hoist-variables@6.24.1(transitive)
+ Addedbabel-helper-optimise-call-expression@6.24.1(transitive)
+ Addedbabel-helper-regex@6.26.0(transitive)
+ Addedbabel-helper-remap-async-to-generator@6.24.1(transitive)
+ Addedbabel-helper-replace-supers@6.24.1(transitive)
+ Addedbabel-plugin-check-es2015-constants@6.22.0(transitive)
+ Addedbabel-plugin-syntax-async-functions@6.13.0(transitive)
+ Addedbabel-plugin-syntax-async-generators@6.13.0(transitive)
+ Addedbabel-plugin-syntax-class-properties@6.13.0(transitive)
+ Addedbabel-plugin-syntax-decorators@6.13.0(transitive)
+ Addedbabel-plugin-syntax-dynamic-import@6.18.0(transitive)
+ Addedbabel-plugin-syntax-exponentiation-operator@6.13.0(transitive)
+ Addedbabel-plugin-syntax-object-rest-spread@6.13.0(transitive)
+ Addedbabel-plugin-syntax-trailing-function-commas@6.22.0(transitive)
+ Addedbabel-plugin-transform-async-generator-functions@6.24.1(transitive)
+ Addedbabel-plugin-transform-async-to-generator@6.24.1(transitive)
+ Addedbabel-plugin-transform-class-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-decorators@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-arrow-functions@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-block-scoped-functions@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-block-scoping@6.26.0(transitive)
+ Addedbabel-plugin-transform-es2015-classes@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-computed-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-destructuring@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-duplicate-keys@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-for-of@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-function-name@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-literals@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-modules-amd@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-modules-commonjs@6.26.2(transitive)
+ Addedbabel-plugin-transform-es2015-modules-systemjs@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-modules-umd@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-object-super@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-parameters@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-shorthand-properties@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-spread@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-sticky-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-es2015-template-literals@6.22.0(transitive)
+ Addedbabel-plugin-transform-es2015-typeof-symbol@6.23.0(transitive)
+ Addedbabel-plugin-transform-es2015-unicode-regex@6.24.1(transitive)
+ Addedbabel-plugin-transform-exponentiation-operator@6.24.1(transitive)
+ Addedbabel-plugin-transform-object-rest-spread@6.26.0(transitive)
+ Addedbabel-plugin-transform-regenerator@6.26.0(transitive)
+ Addedbabel-plugin-transform-strict-mode@6.24.1(transitive)
+ Addedbabel-preset-es2015@6.24.1(transitive)
+ Addedbabel-preset-stage-2@6.24.1(transitive)
+ Addedbabel-preset-stage-3@6.24.1(transitive)
+ Addedcrypto-js@3.3.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedjsesc@0.5.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedregenerate@1.4.2(transitive)
+ Addedregenerator-transform@0.10.1(transitive)
+ Addedregexpu-core@2.0.0(transitive)
+ Addedregjsgen@0.2.0(transitive)
+ Addedregjsparser@0.1.5(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedutf8@2.1.2(transitive)
+ Addedweb3@0.15.3(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedxmlhttprequest@1.8.0(transitive)
- Removedbabel@*
- Removed@adraffy/ens-normalize@1.11.0(transitive)
- Removed@ethereumjs/rlp@4.0.15.0.2(transitive)
- Removed@isaacs/cliui@8.0.2(transitive)
- Removed@noble/curves@1.4.2(transitive)
- Removed@noble/hashes@1.4.0(transitive)
- Removed@scure/base@1.1.9(transitive)
- Removed@scure/bip32@1.4.0(transitive)
- Removed@scure/bip39@1.3.0(transitive)
- Removed@types/node@22.13.1(transitive)
- Removed@types/ws@8.5.3(transitive)
- Removedabitype@0.7.1(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedbabel@6.23.0(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedcall-bind@1.0.8(transitive)
- Removedcall-bind-apply-helpers@1.0.1(transitive)
- Removedcall-bound@1.0.3(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcrc-32@1.2.2(transitive)
- Removedcross-fetch@4.1.0(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddunder-proto@1.0.1(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.1.1(transitive)
- Removedethereum-cryptography@2.2.1(transitive)
- Removedeventemitter3@5.0.1(transitive)
- Removedfor-each@0.3.4(transitive)
- Removedforeground-child@3.3.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-intrinsic@1.2.7(transitive)
- Removedget-proto@1.0.1(transitive)
- Removedglob@11.0.1(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-arguments@1.2.0(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedis-generator-function@1.1.0(transitive)
- Removedis-regex@1.2.1(transitive)
- Removedis-typed-array@1.1.15(transitive)
- Removedisexe@2.0.0(transitive)
- Removedisomorphic-ws@5.0.0(transitive)
- Removedjackspeak@4.0.2(transitive)
- Removedlru-cache@11.0.2(transitive)
- Removedmath-intrinsics@1.1.0(transitive)
- Removedminimatch@10.0.1(transitive)
- Removedminipass@7.1.2(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@2.0.0(transitive)
- Removedpossible-typed-array-names@1.1.0(transitive)
- Removedrimraf@6.0.1(transitive)
- Removedsafe-regex-test@1.1.0(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedtypescript@5.7.3(transitive)
- Removedundici-types@6.20.0(transitive)
- Removedutil@0.12.5(transitive)
- Removedweb3@4.16.0(transitive)
- Removedweb3-core@4.7.1(transitive)
- Removedweb3-errors@1.3.1(transitive)
- Removedweb3-eth@4.11.1(transitive)
- Removedweb3-eth-abi@4.4.1(transitive)
- Removedweb3-eth-accounts@4.3.1(transitive)
- Removedweb3-eth-contract@4.7.2(transitive)
- Removedweb3-eth-ens@4.4.0(transitive)
- Removedweb3-eth-iban@4.0.7(transitive)
- Removedweb3-eth-personal@4.1.0(transitive)
- Removedweb3-net@4.1.0(transitive)
- Removedweb3-providers-http@4.2.0(transitive)
- Removedweb3-providers-ipc@4.0.7(transitive)
- Removedweb3-providers-ws@4.0.8(transitive)
- Removedweb3-rpc-methods@1.3.0(transitive)
- Removedweb3-rpc-providers@1.0.0-rc.4(transitive)
- Removedweb3-types@1.10.0(transitive)
- Removedweb3-utils@4.3.3(transitive)
- Removedweb3-validator@2.0.6(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwhich-typed-array@1.1.18(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)
- Removedws@8.18.0(transitive)
- Removedzod@3.24.1(transitive)
Updatedbabel-core@^6.4.5
Updatedbluebird@^3.1.1
Updatednode-dir@^0.1.11
Updatedrimraf@^2.5.0
Updatedweb3@^0.15.1