Socket
Socket
Sign inDemoInstall

web3-eth-contract

Package Overview
Dependencies
Maintainers
1
Versions
452
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-eth-contract - npm Package Compare versions

Comparing version 1.0.0-beta.21 to 1.0.0-beta.22

16

package.json
{
"name": "web3-eth-contract",
"namespace": "ethereum",
"version": "1.0.0-beta.21",
"version": "1.0.0-beta.22",
"description": "Web3 module to interact with Ethereum smart contracts.",

@@ -11,10 +11,10 @@ "repository": "https://github.com/ethereum/web3.js/tree/master/packages/web3-eth-contract",

"underscore": "1.8.3",
"web3-core": "^1.0.0-beta.21",
"web3-core-helpers": "^1.0.0-beta.21",
"web3-core-method": "^1.0.0-beta.21",
"web3-core-promievent": "^1.0.0-beta.21",
"web3-core-subscriptions": "^1.0.0-beta.21",
"web3-eth-abi": "^1.0.0-beta.21",
"web3-utils": "^1.0.0-beta.21"
"web3-core": "^1.0.0-beta.22",
"web3-core-helpers": "^1.0.0-beta.22",
"web3-core-method": "^1.0.0-beta.22",
"web3-core-promievent": "^1.0.0-beta.22",
"web3-core-subscriptions": "^1.0.0-beta.22",
"web3-eth-abi": "^1.0.0-beta.22",
"web3-utils": "^1.0.0-beta.22"
}
}

@@ -73,33 +73,4 @@ /*

// add custom send Methods
var _ethereumCall = [
new Method({
name: 'estimateGas',
call: 'eth_estimateGas',
params: 1,
inputFormatter: [formatters.inputCallFormatter],
outputFormatter: utils.hexToNumber
}),
new Method({
name: 'call',
call: 'eth_call',
params: 2,
inputFormatter: [formatters.inputCallFormatter, formatters.inputDefaultBlockNumberFormatter]
}),
new Method({
name: 'sendTransaction',
call: 'eth_sendTransaction',
params: 1,
inputFormatter: [formatters.inputTransactionFormatter]
})
];
// attach methods to this._ethereumCall
this._ethereumCall = {};
_.each(_ethereumCall, function (method) {
method.attachToObject(_this._ethereumCall);
method.setRequestManager(_this._requestManager, Contract._ethAccounts); // second param means is eth.accounts (necessary for wallet signing)
});
// create the options object

@@ -210,7 +181,2 @@ this.options = {};

// update defaultBlock
_ethereumCall.forEach(function(method) {
method.defaultAccount = defaultAccount;
});
return val;

@@ -227,7 +193,2 @@ },

// update defaultBlock
_ethereumCall.forEach(function(method) {
method.defaultBlock = defaultBlock;
});
return val;

@@ -815,4 +776,16 @@ },

return this._parent._ethereumCall.estimateGas(args.options, args.callback);
var estimateGas = (new Method({
name: 'estimateGas',
call: 'eth_estimateGas',
params: 1,
inputFormatter: [formatters.inputCallFormatter],
outputFormatter: utils.hexToNumber,
requestManager: _this._parent._requestManager,
accounts: Contract._ethAccounts, // is eth.accounts (necessary for wallet signing)
defaultAccount: _this._parent.defaultAccount,
defaultBlock: _this._parent.defaultBlock
})).createFunction();
return estimateGas(args.options, args.callback);
case 'call':

@@ -822,8 +795,18 @@

// add output formatter for decoding
this._parent._ethereumCall.call.method.outputFormatter = function (result) {
return _this._parent._decodeMethodReturn(_this._method.outputs, result);
};
var call = (new Method({
name: 'call',
call: 'eth_call',
params: 2,
inputFormatter: [formatters.inputCallFormatter, formatters.inputDefaultBlockNumberFormatter],
// add output formatter for decoding
outputFormatter: function (result) {
return _this._parent._decodeMethodReturn(_this._method.outputs, result);
},
requestManager: _this._parent._requestManager,
accounts: Contract._ethAccounts, // is eth.accounts (necessary for wallet signing)
defaultAccount: _this._parent.defaultAccount,
defaultBlock: _this._parent.defaultBlock
})).createFunction();
return this._parent._ethereumCall.call(args.options, args.defaultBlock, args.callback);
return call(args.options, args.defaultBlock, args.callback);

@@ -878,4 +861,16 @@ case 'send':

return this._parent._ethereumCall.sendTransaction.apply(extraFormatters, [args.options, args.callback]);
var sendTransaction = (new Method({
name: 'sendTransaction',
call: 'eth_sendTransaction',
params: 1,
inputFormatter: [formatters.inputTransactionFormatter],
requestManager: _this._parent._requestManager,
accounts: Contract._ethAccounts, // is eth.accounts (necessary for wallet signing)
defaultAccount: _this._parent.defaultAccount,
defaultBlock: _this._parent.defaultBlock,
extraFormatters: extraFormatters
})).createFunction();
return sendTransaction(args.options, args.callback);
}

@@ -882,0 +877,0 @@

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