Socket
Socket
Sign inDemoInstall

web3-core-method

Package Overview
Dependencies
Maintainers
2
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-core-method - npm Package Compare versions

Comparing version 1.2.6 to 1.2.7-rc.0

18

package.json
{
"name": "web3-core-method",
"version": "1.2.6",
"version": "1.2.7-rc.0",
"description": "Creates the methods on the web3 modules. This is an internal package.",

@@ -12,3 +12,3 @@ "repository": "https://github.com/ethereum/web3.js/tree/1.x/packages/web3-core-method",

"scripts": {
"dtslint": "dtslint types --onlyTestTsNext"
"dtslint": "dtslint types"
},

@@ -18,12 +18,12 @@ "main": "src/index.js",

"underscore": "1.9.1",
"web3-core-helpers": "1.2.6",
"web3-core-promievent": "1.2.6",
"web3-core-subscriptions": "1.2.6",
"web3-utils": "1.2.6"
"web3-core-helpers": "1.2.7-rc.0",
"web3-core-promievent": "1.2.7-rc.0",
"web3-core-subscriptions": "1.2.7-rc.0",
"web3-utils": "1.2.7-rc.0"
},
"devDependencies": {
"definitelytyped-header-parser": "^1.0.1",
"dtslint": "0.4.2"
"definitelytyped-header-parser": "^3.9.0",
"dtslint": "^3.4.1"
},
"gitHead": "c20bcf09b04f773406ce3532e88fd105bb04e244"
"gitHead": "598e53163890660670c46d84bb6a6cbee4693e41"
}
# web3-core-method
This is a sub package of [web3.js][repo]
[![NPM Package][npm-image]][npm-url] [![Dependency Status][deps-image]][deps-url] [![Dev Dependency Status][deps-dev-image]][deps-dev-url]
The Method package used within most [web3.js][repo] packages.
This is a sub-package of [web3.js][repo].
This method package is used within most [web3.js][repo] packages.
Please read the [documentation][docs] for more.

@@ -46,5 +49,11 @@

All the typescript typings are placed in the types folder.
All the TypeScript typings are placed in the `types` folder.
[docs]: http://web3js.readthedocs.io/en/1.0/
[repo]: https://github.com/ethereum/web3.js
[npm-image]: https://img.shields.io/npm/v/web3-core-method.svg
[npm-url]: https://npmjs.org/package/web3-core-method
[deps-image]: https://david-dm.org/ethereum/web3.js/1.x/status.svg?path=packages/web3-core-method
[deps-url]: https://david-dm.org/ethereum/web3.js/1.x?path=packages/web3-core-method
[deps-dev-image]: https://david-dm.org/ethereum/web3.js/1.x/dev-status.svg?path=packages/web3-core-method
[deps-dev-url]: https://david-dm.org/ethereum/web3.js/1.x?type=dev&path=packages/web3-core-method

@@ -238,2 +238,9 @@ /*

}),
new Method({
name: 'getTransactionByHash',
call: 'eth_getTransactionByHash',
params: 1,
inputFormatter: [null],
outputFormatter: formatters.outputTransactionFormatter
}),
new Subscriptions({

@@ -425,6 +432,25 @@ name: 'subscribe',

if (method.handleRevert && method.call === 'eth_sendTransaction') {
if ( method.handleRevert &&
(method.call === 'eth_sendTransaction' || method.call === 'eth_sendRawTransaction'))
{
var txReplayOptions = payload.params[0];
// If send was raw, fetch the transaction and reconstitute the
// original params so they can be replayed with `eth_call`
if (method.call === 'eth_sendRawTransaction'){
var txToReplay = await _ethereumCall.getTransactionByHash(receipt.transactionHash);
txReplayOptions = formatters.inputTransactionFormatter({
data: txToReplay.input,
to: txToReplay.to,
from: txToReplay.from,
gas: txToReplay.gas,
gasPrice: txToReplay.gasPrice,
value: txToReplay.value
})
}
// Get revert reason string with eth_call
revertMessage = await method.getRevertReason(
payload.params[0],
txReplayOptions,
receipt.blockNumber

@@ -431,0 +457,0 @@ );

@@ -20,2 +20,4 @@ /*

// Minimum TypeScript Version: 3.0
import {JsonRpcPayload} from 'web3-core-helpers';

@@ -22,0 +24,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