mirror of
https://github.com/status-im/web3.js.git
synced 2025-02-23 11:38:12 +00:00
* added sub packages * added lerna monopackage management * check for package is instance * added method, subscription and utils package * moved almost all packages * moved all packages, no umbrella package yet * added extend to packages * made contract pass * made batch tests pass * expose providers * fixed test async * fixed test errors * fixed test event encode decode * fixed test formatter tests * fixed method tests * fixed method utils * fixed some eth methods * fixed some eth methods 2 * bumped version 0.18.3 to republish meteor package * fixed get* tests * fixed subscribe tests * added newBlockHeaders subscription * remove unpublished package from package.json * added sendTransaction test * fixed call test * moved files to done * changed extend * added iban tests * Fixed ALL tests * Fixed lint tests * Fixed contract tests * added method tests * added more method tests to test promiEvents extensively * added confirmation event * improved method confirmation checking
37 lines
1.7 KiB
JavaScript
37 lines
1.7 KiB
JavaScript
var testMethod = require('./helpers/test.method.js');
|
|
var Eth = require('../packages/web3-eth');
|
|
|
|
var eth = new Eth();
|
|
|
|
var method = 'getStorageAt';
|
|
|
|
|
|
var tests = [{
|
|
args: ['0x4E65FDa2159562a496F9f3522f89122A3088497a', 2], // checksum address
|
|
formattedArgs: ['0x4e65fda2159562a496f9f3522f89122a3088497a', '0x2', eth.defaultBlock],
|
|
result: '0x47d33b2',
|
|
formattedResult: '0x47d33b2',
|
|
call: 'eth_'+ method
|
|
},{
|
|
args: ['0x4E65FDa2159562a496F9f3522f89122A3088497a', 2, 0],
|
|
formattedArgs: ['0x4e65fda2159562a496f9f3522f89122a3088497a', '0x2', '0x0'],
|
|
result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
call: 'eth_'+ method
|
|
},{
|
|
args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 0xb, 0x0],
|
|
formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0xb', '0x0'],
|
|
result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
call: 'eth_'+ method
|
|
}, {
|
|
args: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', 0xb, 'latest'],
|
|
formattedArgs: ['0x47d33b27bb249a2dbab4c0612bf9caf4c1950855', '0xb', 'latest'],
|
|
result: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
formattedResult: '0x47d33b27bb249a2dbab4c0612bf9caf4747d33b27bb249a2dbab4c0612bf9cafd33b27bb249a2dbab4c0612bf9caf4c1950855',
|
|
call: 'eth_'+ method
|
|
}];
|
|
|
|
testMethod.runTests('eth', method, tests);
|
|
|