Closed 0xp3gasus closed 2 years ago
Fixes #179 #89
curl --location --request POST 'http://localhost:80/btc/testnet/rpc' \ --header 'Content-Type: application/json' \ --data-raw '{ "id": 1653152319, "method": "getTransaction", "params": { "txHash": "f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba" }, "jsonrpc": "2.0" }'
{ "id": 1653152316, "jsonrpc": "2.0", "result": { "transaction": { "txId": "f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba", "txHash": "f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba", "blockNumber": "1", "timestamp": "1296688928", "fee": "0", "inputs": [ { "amount": "5000000000", "address": null } ], "outputs": [ { "amount": "5000000000", "address": null } ], "data": { "txid": "f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba", "hash": "f0315ffc38709d70ad5647e22048358dd3745f3ce3874223c80a7c92fab0c8ba", "version": 1, "size": 109, "vsize": 109, "weight": 436, "locktime": 0, "vin": [ { "coinbase": "0420e7494d017f062f503253482f", "sequence": 4294967295 } ], "vout": [ { "value": 50.0, "n": 0, "scriptPubKey": { "asm": "021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51 OP_CHECKSIG", "hex": "21021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51ac", "type": "pubkey" } } ], "hex": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff0e0420e7494d017f062f503253482fffffffff0100f2052a010000002321021aeaf2f8638a129a3156fbe7e5ef635226b0bafd495ff03afe2c843d7e3a4b51ac00000000", "blockhash": "00000000b873e79784647a6c82962c70d228557d24a747ea4d1b8bbe878e1206", "confirmations": 99255, "time": 1296688928, "blocktime": 1296688928 } } } }
curl --location --request POST 'http://localhost:80/eth/testnet/rpc' \ --header 'Content-Type: application/json' \ --data-raw '{ "id": 1653152652, "method": "getTransaction", "params": { "txHash" : "0x2c8d2f152466d64c1e2a94aade0f9d22d3914941a156696684661a2090e23899" }, "jsonrpc": "2.0" }'
{ "id": 1653152648, "jsonrpc": "2.0", "result": { "transaction": { "txHash": "0x2c8d2f152466d64c1e2a94aade0f9d22d3914941a156696684661a2090e23899", "fee": "30000000000000000", "blockHash": "0x673ba30bda4c49480b13c11439f1c64c4dc50fce24d4ae63877e3b44a3b6dfbe", "blockNumber": "16001", "timestamp": "1479775246", "data": { "blockHash": "0x673ba30bda4c49480b13c11439f1c64c4dc50fce24d4ae63877e3b44a3b6dfbe", "blockNumber": "0x3e81", "from": "0xe578fd2b179714bf8f8adca1570e2eaadff2888a", "gas": "0x16e360", "gasPrice": "0x4a817c800", "hash": "0x2c8d2f152466d64c1e2a94aade0f9d22d3914941a156696684661a2090e23899", "input": "0x085270e424371774ff5a6c89f847728cdf124b863b296558b57c12ebc14062699a0c699300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000003c0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c84772656720486f776172642c4d6178204f726c616e646f2c4a75616e204f72656c6c616e6120566572612c416e67656c6120476f6f646d616e2c427275636520457665726574742c41647269656e6e652052686f6465732c41646d696e2c436861726c657320436c696e746f6e2c5368616e6e6f6e204d634c65616e2c497276696e67204265726c696e2c486974636861696e2c4d616e6167656d656e742c54657272656e63652053776565742c41726f6e204d69746368656c6c2c306f626c7861723670556768000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000002de3d4151f1104447bc16a2b2a943da20ade593a0000000000000000000000003aecb68f02b4883af989e55e95de26361960f375000000000000000000000000ecd6024b31ef6055cc9bcc013d8a2c3c48724c91000000000000000000000000874a39fe3203f1323fbf6cc465dea0f3384fdcbd000000000000000000000000ee6daa94a1a7ab65c6c531d14f515bcb4cb8aea1000000000000000000000000cdee952f479bbf725c903ba729e5e97691c374020000000000000000000000004ab6293d26f4801369d90c9f7b55e346061362be000000000000000000000000e6d5bcc16c0ae5e127d79dc3be09548b55cffcb2000000000000000000000000f8e0dbb09a259240e8a38125cb440bfca357ceb800000000000000000000000089c8d16d7ec1f52e7eec0356d367d7db315f287f00000000000000000000000052fca6fd86c10754017fcd2a51a4781a65ea8cf30000000000000000000000008e72e37a604f4d4c9a06caabe8ca82d63a6e4d5d000000000000000000000000844372f302d462ae90fdee211b8e949b592ed5f9000000000000000000000000c0b01a664ff9102f85d96ba8173821ff800e41570000000000000000000000002901e7af275748ea60f3543f7db057dc541b882b000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000668a00000000000000000000000000000000000000000000000000000000000205170000000000000000000000000000000000000000000000000000000000012ad40000000000000000000000000000000000000000000000000000000000007c060000000000000000000000000000000000000000000000000000000000002d6900000000000000000000000000000000000000000000000000000000000029040000000000000000000000000000000000000000000000000000000000008b74000000000000000000000000000000000000000000000000000000000001a25c000000000000000000000000000000000000000000000000000000000006175f000000000000000000000000000000000000000000000000000000000000177000000000000000000000000000000000000000000000000000000000000075300000000000000000000000000000000000000000000000000000000000001f4000000000000000000000000000000000000000000000000000000000000013880000000000000000000000000000000000000000000000000000000000004e2000000000000000000000000000000000000000000000000000000000000186a0", "nonce": "0x3", "to": "0x7b80e98bf5d9a97dd5812ddb034e21f8ecf671c5", "transactionIndex": "0x0", "value": "0x0", "type": "0x0", "v": "0x29", "r": "0xe55776ba653f5daa00f0c03379e512b61fe15630dbe1e4ce0ca080fd4092e473", "s": "0x46a7492ae4699fbc04f78a934ad861d9f67ea6907b0c40fe731d2d97f4356775" }, "inputs": [ { "address": "0xe578fd2b179714bf8f8adca1570e2eaadff2888a", "amount": "0" } ], "outputs": [ { "address": "0x7b80e98bf5d9a97dd5812ddb034e21f8ecf671c5", "amount": "0" } ] } } }
Test Configuration:
sw_vers
uname -sr
uname -m
Docs PR related # Other PR related #
Description
Fixes #179 #89
Dependencies (if any)
Type of change
How Has This Been Tested?
Test Configuration:
sw_vers
): macOS 12.3.1uname -sr
): Darwin 21.4.0uname -m
): x86_64Related PR or Docs PR
Docs PR related # Other PR related #
Good practices to consider