diff --git a/dist/index.js b/dist/index.js old mode 100644 new mode 100755 diff --git a/dist/modules/eth.js b/dist/modules/eth.js index 5670e55..00e9583 100644 --- a/dist/modules/eth.js +++ b/dist/modules/eth.js @@ -78,6 +78,14 @@ var _utils = require("../lib/utils");var _default = chainId() { return { method: 'eth_chainId', formatters: [_utils.toDecimal] }; + }, + + getStorageAt(contract, storageAddr, block = 'latest') { + return { method: 'eth_getStorageAt', params: [contract, storageAddr, block] }; + }, + + getContractCodeAt(contract, block = 'latest') { + return { method: 'eth_getCode', params: [contract, block] }; } };exports.default = _default; diff --git a/src/modules/eth.js b/src/modules/eth.js index 1ccf9e2..2565cca 100644 --- a/src/modules/eth.js +++ b/src/modules/eth.js @@ -78,6 +78,14 @@ export default { chainId () { return { method: 'eth_chainId', formatters: [toDecimal] } + }, + + getStorageAt (contract, storageAddr, block = 'latest') { + return { method: 'eth_getStorageAt', params: [contract, storageAddr, block] } + }, + + getContractCodeAt (contract, block = 'latest') { + return { method: 'eth_getCode', params: [contract, block] } } }