diff options
author | Felix Lange <fjl@twurst.com> | 2016-10-17 22:55:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-17 22:55:28 +0800 |
commit | 6952fe3a5caf22ae76b7efb332b0d98ad02398de (patch) | |
tree | 22711d520c60d600790eafe0ed9490ab6f97caf1 /internal/web3ext/web3ext.go | |
parent | b19b7c39ac1074592c0aea1dc2b282d08d9a42b0 (diff) | |
parent | 1a6682c21d812fa2bd068d174d38978664814633 (diff) | |
download | go-tangerine-6952fe3a5caf22ae76b7efb332b0d98ad02398de.tar go-tangerine-6952fe3a5caf22ae76b7efb332b0d98ad02398de.tar.gz go-tangerine-6952fe3a5caf22ae76b7efb332b0d98ad02398de.tar.bz2 go-tangerine-6952fe3a5caf22ae76b7efb332b0d98ad02398de.tar.lz go-tangerine-6952fe3a5caf22ae76b7efb332b0d98ad02398de.tar.xz go-tangerine-6952fe3a5caf22ae76b7efb332b0d98ad02398de.tar.zst go-tangerine-6952fe3a5caf22ae76b7efb332b0d98ad02398de.zip |
Merge pull request #3100 from kobigurk/develop
internal/ethapi, internal/web3ext: adds raw tx retrieval methods
Diffstat (limited to 'internal/web3ext/web3ext.go')
-rw-r--r-- | internal/web3ext/web3ext.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go index 04b13e483..cbbab0ece 100644 --- a/internal/web3ext/web3ext.go +++ b/internal/web3ext/web3ext.go @@ -468,6 +468,19 @@ web3._extend({ call: 'eth_submitTransaction', params: 1, inputFormatter: [web3._extend.formatters.inputTransactionFormatter] + }), + new web3._extend.Method({ + name: 'getRawTransaction', + call: 'eth_getRawTransactionByHash', + params: 1 + }), + new web3._extend.Method({ + name: 'getRawTransactionFromBlock', + call: function(args) { + return (web3._extend.utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getRawTransactionByBlockHashAndIndex' : 'eth_getRawTransactionByBlockNumberAndIndex'; + }, + params: 2, + inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter, web3._extend.utils.toHex] }) ], properties: |