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
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
var testMethod = require('./helpers/test.method.js');
|
|
|
|
var method = 'getTransaction';
|
|
|
|
var txResult = {
|
|
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
|
|
"nonce":"0x5",
|
|
"blockHash": "0x6fd9e2a26ab",
|
|
"blockNumber": "0x15df",
|
|
"transactionIndex": "0x1",
|
|
"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
|
|
"to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1",
|
|
"value":"0x7f110",
|
|
"gas": "0x7f110",
|
|
"gasPrice":"0x09184e72a000",
|
|
"input":"0x603880600c6000396000f30060"
|
|
};
|
|
var formattedTxResult = {
|
|
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
|
|
"nonce":5,
|
|
"blockHash": "0x6fd9e2a26ab",
|
|
"blockNumber": 5599,
|
|
"transactionIndex": 1,
|
|
"from":"0x407D73d8a49eeb85D32Cf465507dd71d507100c1", // checksum address
|
|
"to":"0x85h43d8a49EEB85D32CF465507dD71D507100C1", // checksum address
|
|
"value": '520464',
|
|
"gas": 520464,
|
|
"gasPrice": '10000000000000',
|
|
"input":"0x603880600c6000396000f30060"
|
|
};
|
|
|
|
var tests = [{
|
|
args: ['0x407D73d8a49eeb85D32Cf465507dd71d507100c1'], // checksum address
|
|
formattedArgs: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1'],
|
|
result: txResult,
|
|
formattedResult: formattedTxResult,
|
|
call: 'eth_'+ method + 'ByHash'
|
|
}];
|
|
|
|
testMethod.runTests('eth', method, tests);
|
|
|