Browse Source

Fixes for getCode.

cl-refactor
Gav Wood 10 years ago
parent
commit
2121dd1e27
  1. 4
      libjsqrc/ethereumjs/dist/ethereum.js
  2. 2
      libjsqrc/ethereumjs/lib/web3/eth.js
  3. 2
      libjsqrc/ethereumjs/test/eth.methods.js

4
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' },

2
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' },

2
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');

Loading…
Cancel
Save