2015-03-24 11:16:21 +01:00
|
|
|
var testMethod = require('./helpers/test.method.js');
|
|
|
|
|
|
|
|
var method = 'getTransaction';
|
|
|
|
|
|
|
|
var txResult = {
|
|
|
|
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
|
2015-04-20 19:52:43 +02:00
|
|
|
"nonce":"0x5",
|
2015-03-24 11:16:21 +01:00
|
|
|
"blockHash": "0x6fd9e2a26ab",
|
|
|
|
"blockNumber": "0x15df",
|
|
|
|
"transactionIndex": "0x1",
|
|
|
|
"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1",
|
|
|
|
"to":"0x85h43d8a49eeb85d32cf465507dd71d507100c1",
|
|
|
|
"value":"0x7f110",
|
|
|
|
"gas": "0x7f110",
|
|
|
|
"gasPrice":"0x09184e72a000",
|
|
|
|
"input":"0x603880600c6000396000f30060"
|
|
|
|
};
|
|
|
|
var formattedTxResult = {
|
|
|
|
"hash":"0xc6ef2fc5426d6ad6fd9e2a26abeab0aa2411b7ab17f30a99d3cb96aed1d1055b",
|
2015-04-20 19:52:43 +02:00
|
|
|
"nonce":5,
|
2015-03-24 11:16:21 +01:00
|
|
|
"blockHash": "0x6fd9e2a26ab",
|
|
|
|
"blockNumber": 5599,
|
|
|
|
"transactionIndex": 1,
|
2017-01-26 10:24:14 +01:00
|
|
|
"from":"0x407D73d8a49eeb85D32Cf465507dd71d507100c1", // checksum address
|
|
|
|
"to":"0x85h43d8a49EEB85D32CF465507dD71D507100C1", // checksum address
|
|
|
|
"value": '520464',
|
2015-03-24 11:16:21 +01:00
|
|
|
"gas": 520464,
|
2017-01-26 10:24:14 +01:00
|
|
|
"gasPrice": '10000000000000',
|
2015-03-24 11:16:21 +01:00
|
|
|
"input":"0x603880600c6000396000f30060"
|
|
|
|
};
|
|
|
|
|
|
|
|
var tests = [{
|
2017-01-26 10:24:14 +01:00
|
|
|
args: ['0x407D73d8a49eeb85D32Cf465507dd71d507100c1'], // checksum address
|
|
|
|
formattedArgs: ['0x407d73d8a49eeb85d32cf465507dd71d507100c1'],
|
2015-03-24 11:16:21 +01:00
|
|
|
result: txResult,
|
|
|
|
formattedResult: formattedTxResult,
|
|
|
|
call: 'eth_'+ method + 'ByHash'
|
|
|
|
}];
|
|
|
|
|
2015-03-24 11:44:33 +01:00
|
|
|
testMethod.runTests('eth', method, tests);
|
2015-03-24 11:16:21 +01:00
|
|
|
|