From 2121dd1e27b9d67eac2bdd05271c8c651ebcdfe0 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Sat, 14 Mar 2015 20:01:59 +0100 Subject: [PATCH] Fixes for getCode. --- libjsqrc/ethereumjs/dist/ethereum.js | 4 ++-- libjsqrc/ethereumjs/lib/web3/eth.js | 2 +- libjsqrc/ethereumjs/test/eth.methods.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libjsqrc/ethereumjs/dist/ethereum.js b/libjsqrc/ethereumjs/dist/ethereum.js index 7adfa28ca..4ae476ca5 100644 --- a/libjsqrc/ethereumjs/dist/ethereum.js +++ b/libjsqrc/ethereumjs/dist/ethereum.js @@ -1728,7 +1728,7 @@ var methods = [ outputFormatter: formatters.convertToBigNumber}, { name: 'getStorageAt', call: 'eth_getStorageAt', addDefaultblock: 3, inputFormatter: utils.toHex}, - { name: 'getData', call: 'eth_getData', addDefaultblock: 2}, + { name: 'getCode', call: 'eth_getCode', addDefaultblock: 2}, { name: 'getBlock', call: blockCall, outputFormatter: formatters.outputBlockFormatter, inputFormatter: [utils.toHex, function(param){ return (!param) ? false : true; }]}, @@ -1763,7 +1763,7 @@ var methods = [ { name: 'stateAt', call: 'eth_stateAt', newMethod: 'eth.getStorageAt' }, { name: 'storageAt', call: 'eth_storageAt', newMethod: 'eth.getStorage' }, { name: 'countAt', call: 'eth_countAt', newMethod: 'eth.getTransactionCount' }, - { name: 'codeAt', call: 'eth_codeAt', newMethod: 'eth.getData' }, + { name: 'codeAt', call: 'eth_codeAt', newMethod: 'eth.getCode' }, { name: 'transact', call: 'eth_transact', newMethod: 'eth.sendTransaction' }, { name: 'block', call: blockCall, newMethod: 'eth.getBlock' }, { name: 'transaction', call: transactionFromBlockCall, newMethod: 'eth.getTransaction' }, diff --git a/libjsqrc/ethereumjs/lib/web3/eth.js b/libjsqrc/ethereumjs/lib/web3/eth.js index 4ea5b1886..cfb4280e0 100644 --- a/libjsqrc/ethereumjs/lib/web3/eth.js +++ b/libjsqrc/ethereumjs/lib/web3/eth.js @@ -112,7 +112,7 @@ var methods = [ { name: 'stateAt', call: 'eth_stateAt', newMethod: 'eth.getStorageAt' }, { name: 'storageAt', call: 'eth_storageAt', newMethod: 'eth.getStorage' }, { name: 'countAt', call: 'eth_countAt', newMethod: 'eth.getTransactionCount' }, - { name: 'codeAt', call: 'eth_codeAt', newMethod: 'eth.getData' }, + { name: 'codeAt', call: 'eth_codeAt', newMethod: 'eth.getCode' }, { name: 'transact', call: 'eth_transact', newMethod: 'eth.sendTransaction' }, { name: 'block', call: blockCall, newMethod: 'eth.getBlock' }, { name: 'transaction', call: transactionFromBlockCall, newMethod: 'eth.getTransaction' }, diff --git a/libjsqrc/ethereumjs/test/eth.methods.js b/libjsqrc/ethereumjs/test/eth.methods.js index e1eea1ec4..7fb8d3b24 100644 --- a/libjsqrc/ethereumjs/test/eth.methods.js +++ b/libjsqrc/ethereumjs/test/eth.methods.js @@ -8,7 +8,7 @@ describe('web3', function() { u.methodExists(web3.eth, 'getStorageAt'); u.methodExists(web3.eth, 'getStorage'); u.methodExists(web3.eth, 'getTransactionCount'); - u.methodExists(web3.eth, 'getData'); + u.methodExists(web3.eth, 'getCode'); u.methodExists(web3.eth, 'sendTransaction'); u.methodExists(web3.eth, 'call'); u.methodExists(web3.eth, 'getBlock');