Skip to content

Commit

Permalink
Merge pull request #15 from rsksmart/feat/get-storage-at
Browse files Browse the repository at this point in the history
Feat/get storage at
  • Loading branch information
Sergio authored Mar 13, 2023
2 parents 5a5ce6c + 78fcfe9 commit 33d186b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
Empty file modified dist/index.js
100644 → 100755
Empty file.
8 changes: 8 additions & 0 deletions dist/modules/eth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;


Expand Down
8 changes: 8 additions & 0 deletions src/modules/eth.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] }
}

}
Expand Down

0 comments on commit 33d186b

Please sign in to comment.