2015-03-24 10:16:21 +00:00
|
|
|
var chai = require('chai');
|
2015-10-07 02:32:32 +00:00
|
|
|
var Web3 = require('../index');
|
|
|
|
var web3 = new Web3();
|
2015-03-24 10:16:21 +00:00
|
|
|
var testMethod = require('./helpers/test.method.js');
|
|
|
|
|
|
|
|
var method = 'getCode';
|
|
|
|
|
|
|
|
|
|
|
|
var tests = [{
|
|
|
|
args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855'],
|
|
|
|
formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', web3.eth.defaultBlock],
|
|
|
|
result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
|
|
formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
|
|
call: 'eth_'+ method
|
|
|
|
},{
|
|
|
|
args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 2],
|
|
|
|
formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0x2'],
|
|
|
|
result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
|
|
formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
|
|
call: 'eth_'+ method
|
|
|
|
}];
|
|
|
|
|
2015-03-24 10:44:33 +00:00
|
|
|
testMethod.runTests('eth', method, tests);
|
2015-03-24 10:16:21 +00:00
|
|
|
|