web3-core-method
Advanced tools
Comparing version 1.2.6 to 1.2.7-rc.0
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36379
764
59
2
1
+ Addedweb3-core-helpers@1.2.7-rc.0(transitive)
+ Addedweb3-core-promievent@1.2.7-rc.0(transitive)
+ Addedweb3-core-subscriptions@1.2.7-rc.0(transitive)
+ Addedweb3-eth-iban@1.2.7-rc.0(transitive)
+ Addedweb3-utils@1.2.7-rc.0(transitive)
- Removedany-promise@1.3.0(transitive)
- Removedweb3-core-helpers@1.2.6(transitive)
- Removedweb3-core-promievent@1.2.6(transitive)
- Removedweb3-core-subscriptions@1.2.6(transitive)
- Removedweb3-eth-iban@1.2.6(transitive)
- Removedweb3-utils@1.2.6(transitive)
Updatedweb3-core-helpers@1.2.7-rc.0
Updatedweb3-utils@1.2.7-rc.0