New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eth-contract-class

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eth-contract-class - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

25

lib/generateClass.js

@@ -135,9 +135,28 @@ 'use strict';

return getAccount().then(function (account) {
// we need to create a new PromiEvent here b/c getAccount returns a regular promise
// however on a 'deploy' we want to return a PromiEvent
var defer = new _web3CorePromievent2.default();
var relayEvent = function relayEvent(event) {
return function () {
var _defer$eventEmitter2;
for (var _len5 = arguments.length, params = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
params[_key5] = arguments[_key5];
}
return (_defer$eventEmitter2 = defer.eventEmitter).emit.apply(_defer$eventEmitter2, [event].concat(params));
};
};
getAccount().then(function (account) {
return Object.assign(opts, { from: account });
}).then(function () {
return execute(web3, deploy, opts);
return execute(web3, deploy, opts)
// relay all events to our promiEvent
.on('transactionHash', relayEvent('transactionHash')).on('confirmation', relayEvent('confirmation')).on('receipt', relayEvent('receipt')).on('error', relayEvent('error'));
}).then(function (contract) {
return new C(web3, contract.options.address);
});
}).then(defer.resolve).catch(defer.reject);
return defer.eventEmitter;
};

@@ -144,0 +163,0 @@

2

package.json
{
"name": "eth-contract-class",
"version": "0.0.2",
"version": "0.0.3",
"description": "generate js wrapper class around an ethereum contract",

@@ -5,0 +5,0 @@ "main": "lib/generateClass.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc