From 5248baee6301f943fdfb4156b6054e173f9d1099 Mon Sep 17 00:00:00 2001 From: Thomas Jay Rush Date: Mon, 5 Feb 2024 18:34:43 -0500 Subject: [PATCH] Adds test cases to ethslurp --- .../testRunner/testCases/tools/ethslurp.csv | 9 + .../ethslurp/api_tests/ethslurp_apps_es.txt | 110 ++++++ .../ethslurp/api_tests/ethslurp_apps_key.txt | 6 + .../api_tests/ethslurp_apps_key_type.txt | 6 + .../api_tests/ethslurp_bad_source.txt | 6 + .../ethslurp/api_tests/ethslurp_count_key.txt | 6 + .../api_tests/ethslurp_count_not_key.txt | 6 + .../api_tests/ethslurp_not_apps_es.txt | 315 ++++++++++++++++++ .../api_tests/ethslurp_not_apps_key.txt | 6 + test/gold/tools/ethslurp/ethslurp_apps_es.txt | 107 ++++++ .../gold/tools/ethslurp/ethslurp_apps_key.txt | 40 +++ .../tools/ethslurp/ethslurp_apps_key_type.txt | 40 +++ .../tools/ethslurp/ethslurp_bad_source.txt | 39 +++ .../tools/ethslurp/ethslurp_count_key.txt | 41 +++ .../tools/ethslurp/ethslurp_count_not_key.txt | 41 +++ .../tools/ethslurp/ethslurp_not_apps_es.txt | 311 +++++++++++++++++ .../tools/ethslurp/ethslurp_not_apps_key.txt | 39 +++ 17 files changed, 1128 insertions(+) create mode 100644 test/gold/tools/ethslurp/api_tests/ethslurp_apps_es.txt create mode 100644 test/gold/tools/ethslurp/api_tests/ethslurp_apps_key.txt create mode 100644 test/gold/tools/ethslurp/api_tests/ethslurp_apps_key_type.txt create mode 100644 test/gold/tools/ethslurp/api_tests/ethslurp_bad_source.txt create mode 100644 test/gold/tools/ethslurp/api_tests/ethslurp_count_key.txt create mode 100644 test/gold/tools/ethslurp/api_tests/ethslurp_count_not_key.txt create mode 100644 test/gold/tools/ethslurp/api_tests/ethslurp_not_apps_es.txt create mode 100644 test/gold/tools/ethslurp/api_tests/ethslurp_not_apps_key.txt create mode 100644 test/gold/tools/ethslurp/ethslurp_apps_es.txt create mode 100644 test/gold/tools/ethslurp/ethslurp_apps_key.txt create mode 100644 test/gold/tools/ethslurp/ethslurp_apps_key_type.txt create mode 100644 test/gold/tools/ethslurp/ethslurp_bad_source.txt create mode 100644 test/gold/tools/ethslurp/ethslurp_count_key.txt create mode 100644 test/gold/tools/ethslurp/ethslurp_count_not_key.txt create mode 100644 test/gold/tools/ethslurp/ethslurp_not_apps_es.txt create mode 100644 test/gold/tools/ethslurp/ethslurp_not_apps_key.txt diff --git a/src/dev_tools/testRunner/testCases/tools/ethslurp.csv b/src/dev_tools/testRunner/testCases/tools/ethslurp.csv index f4f0931b10..c650d7a62e 100644 --- a/src/dev_tools/testRunner/testCases/tools/ethslurp.csv +++ b/src/dev_tools/testRunner/testCases/tools/ethslurp.csv @@ -28,6 +28,15 @@ on ,both ,slow ,slurp ,tools/ethslurp ,type_miner_csv ,n ,addrs = on ,both ,slow ,slurp ,tools/ethslurp ,appearances ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & types = token & blocks = 0-1500000 & appearances & fmt = json on ,both ,slow ,slurp ,tools/ethslurp ,appearances_csv ,n ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & types = token & blocks = 0-1500000 & appearances & fmt = csv +on ,both ,slow ,slurp ,tools/ethslurp ,bad_source ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & blocks = 0-1500000 & source = bad & fmt = json +on ,both ,slow ,slurp ,tools/ethslurp ,not_apps_es ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & blocks = 0-1500000 & source = etherscan & fmt = json +on ,both ,slow ,slurp ,tools/ethslurp ,not_apps_key ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & blocks = 0-1500000 & source = key & fmt = json +on ,both ,slow ,slurp ,tools/ethslurp ,apps_es ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & blocks = 0-1500000 & appearances & source = etherscan & fmt = json +on ,both ,slow ,slurp ,tools/ethslurp ,apps_key_type ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & blocks = 0-1500000 & types = ext & appearances & source = key & fmt = json +on ,both ,slow ,slurp ,tools/ethslurp ,apps_key ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & blocks = 0-1500000 & appearances & source = key & fmt = json +on ,both ,slow ,slurp ,tools/ethslurp ,count_not_key ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & blocks = 0-1500000 & appearances & source = etherscan & count & fmt = json +on ,both ,slow ,slurp ,tools/ethslurp ,count_key ,y ,addrs = 0x9519afbc60719a83c470ceec41e32d3e4b8b262e & blocks = 0-1500000 & appearances & source = key & count & fmt = json + on ,both ,medi ,slurp ,tools/ethslurp ,ens_test ,y ,addrs = wolfofethereum.eth & types = int & blocks = 12524380-13675400 & fmt = json on ,both ,medi ,slurp ,tools/ethslurp ,block_range ,y ,addrs = 0x63c8c29af409bd31ec7ddeea58ff14f21e8980b0 & blocks = 4186279-4186301 & fmt = json diff --git a/test/gold/tools/ethslurp/api_tests/ethslurp_apps_es.txt b/test/gold/tools/ethslurp/api_tests/ethslurp_apps_es.txt new file mode 100644 index 0000000000..495408486c --- /dev/null +++ b/test/gold/tools/ethslurp/api_tests/ethslurp_apps_es.txt @@ -0,0 +1,110 @@ +slurp?addrs=0x9519afbc60719a83c470ceec41e32d3e4b8b262e&blocks=0-1500000&appearances&source=etherscan&fmt=json +{ + "data": [ + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1383378, + "transactionIndex": 7 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1385649, + "transactionIndex": 1 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1386522, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1386735, + "transactionIndex": 2 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1395423, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1410065, + "transactionIndex": 2 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1410101, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1421461, + "transactionIndex": 1 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1429678, + "transactionIndex": 1 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1430958, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1431182, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1433348, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1434017, + "transactionIndex": 1 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1434025, + "transactionIndex": 6 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1440785, + "transactionIndex": 2 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1470405, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1488784, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1491735, + "transactionIndex": 6 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1491745, + "transactionIndex": 5 + } + ], + "meta": { + "client": "0xdeadbeef", + "finalized": "0xdeadbeef", + "staging": "0xdeadbeef", + "ripe": "0xdeadbeef", + "unripe": "0xdeadbeef", + "chainId": 1, + "networkId": 1, + "chain": "mainnet" + } +} diff --git a/test/gold/tools/ethslurp/api_tests/ethslurp_apps_key.txt b/test/gold/tools/ethslurp/api_tests/ethslurp_apps_key.txt new file mode 100644 index 0000000000..ccc84bbd54 --- /dev/null +++ b/test/gold/tools/ethslurp/api_tests/ethslurp_apps_key.txt @@ -0,0 +1,6 @@ +slurp?addrs=0x9519afbc60719a83c470ceec41e32d3e4b8b262e&blocks=0-1500000&appearances&source=key&fmt=json +{ + "errors": [ + "The --source=key option is only available with a valid api key." + ] +} diff --git a/test/gold/tools/ethslurp/api_tests/ethslurp_apps_key_type.txt b/test/gold/tools/ethslurp/api_tests/ethslurp_apps_key_type.txt new file mode 100644 index 0000000000..1c8a873328 --- /dev/null +++ b/test/gold/tools/ethslurp/api_tests/ethslurp_apps_key_type.txt @@ -0,0 +1,6 @@ +slurp?addrs=0x9519afbc60719a83c470ceec41e32d3e4b8b262e&blocks=0-1500000&types=ext&appearances&source=key&fmt=json +{ + "errors": [ + "The --source=key option is only available with a valid api key." + ] +} diff --git a/test/gold/tools/ethslurp/api_tests/ethslurp_bad_source.txt b/test/gold/tools/ethslurp/api_tests/ethslurp_bad_source.txt new file mode 100644 index 0000000000..dce2289aa4 --- /dev/null +++ b/test/gold/tools/ethslurp/api_tests/ethslurp_bad_source.txt @@ -0,0 +1,6 @@ +slurp?addrs=0x9519afbc60719a83c470ceec41e32d3e4b8b262e&blocks=0-1500000&source=bad&fmt=json +{ + "errors": [ + "The --source option (bad) must be one of [ etherscan | key ]" + ] +} diff --git a/test/gold/tools/ethslurp/api_tests/ethslurp_count_key.txt b/test/gold/tools/ethslurp/api_tests/ethslurp_count_key.txt new file mode 100644 index 0000000000..b01074b4ad --- /dev/null +++ b/test/gold/tools/ethslurp/api_tests/ethslurp_count_key.txt @@ -0,0 +1,6 @@ +slurp?addrs=0x9519afbc60719a83c470ceec41e32d3e4b8b262e&blocks=0-1500000&appearances&source=key&count&fmt=json +{ + "errors": [ + "The --source=key option is only available with a valid api key." + ] +} diff --git a/test/gold/tools/ethslurp/api_tests/ethslurp_count_not_key.txt b/test/gold/tools/ethslurp/api_tests/ethslurp_count_not_key.txt new file mode 100644 index 0000000000..516eb4ba7f --- /dev/null +++ b/test/gold/tools/ethslurp/api_tests/ethslurp_count_not_key.txt @@ -0,0 +1,6 @@ +slurp?addrs=0x9519afbc60719a83c470ceec41e32d3e4b8b262e&blocks=0-1500000&appearances&source=etherscan&count&fmt=json +{ + "errors": [ + "The --count option is only available with --source=key." + ] +} diff --git a/test/gold/tools/ethslurp/api_tests/ethslurp_not_apps_es.txt b/test/gold/tools/ethslurp/api_tests/ethslurp_not_apps_es.txt new file mode 100644 index 0000000000..1a42ebeff5 --- /dev/null +++ b/test/gold/tools/ethslurp/api_tests/ethslurp_not_apps_es.txt @@ -0,0 +1,315 @@ +slurp?addrs=0x9519afbc60719a83c470ceec41e32d3e4b8b262e&blocks=0-1500000&source=etherscan&fmt=json +{ + "data": [ + { + "blockHash": "0x07edd8238823f71fd0c3ba093305dcb91f7da5ca3ae264bc0aa419c59e49092c", + "blockNumber": 1383378, + "date": "2016-04-22 13:08:11 UTC", + "from": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2", + "gas": 150000, + "gasCost": 531520000000000, + "gasPrice": 20000000000, + "gasUsed": 26576, + "hash": "0xe4f0e97d9d4cb6002493b7b88d35dbe24f6cbc9ebee4b17c45b2d48bbfb37c83", + "input": "0x3173742073616c65206f66203530302e303020657468657220746f2047726561742048696c6c20617420382e3033353920646f6c6c6172732070657220657468657220746f74616c3a2024343031372e3935", + "timestamp": 1461330491, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 7, + "value": "499995000000000000000" + }, + { + "blockHash": "0xc3b2c4f3c48d0e4cd14239dca04b8228129eb1a941753c98ff3197c98f536b89", + "blockNumber": 1385649, + "date": "2016-04-22 21:56:23 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 123788, + "gasCost": 475760000000000, + "gasPrice": 20000000000, + "gasUsed": 23788, + "hash": "0x800b5bbab50f820954f2b83e8600dce3d1853947a1b3ba0f68204417748f17ab", + "input": "0x53656e64696e67203520657468657220746f2072656769732e6e75206c696768742077616c6c65742e", + "timestamp": 1461362183, + "to": "0xbdace480953fc8260184bd625389ea20bbd0da9f", + "transactionIndex": 1, + "value": "4994524240000000000" + }, + { + "blockHash": "0x2a77353fbc49f11c10974a225403ed007e00e1c84ded88c9a799e93ed99c8166", + "blockNumber": 1386522, + "date": "2016-04-23 01:30:51 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 123834, + "gasCost": 476680000000000, + "gasPrice": 20000000000, + "gasUsed": 23834, + "hash": "0xb064fc2eaa4a6eeb46533a5026090ffdd45faa929193baf815fb2e03c38d436b", + "input": "0xc822d7f00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000f54686f6d6173204a617920527573680000000000000000000000000000000000", + "timestamp": 1461375051, + "to": "0x2b61cd90b5591604b3d969ca9eb944d59be6f5a7", + "transactionIndex": 0, + "value": "0" + }, + { + "blockHash": "0xa790161aa9f8928921a4fa912572e9c2c47a9c777fef7b77c3bdfcaab072d1bd", + "blockNumber": 1386735, + "date": "2016-04-23 02:19:15 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 124306, + "gasCost": 486120000000000, + "gasPrice": 20000000000, + "gasUsed": 24306, + "hash": "0xc2e1fc9071f0a793dedfa7775efe71e6ca30be965da1ead7a24c0df7377917fe", + "input": "0x7bcd7fad0000000000000000000000000000000000000000000000000000000000000001", + "timestamp": 1461377955, + "to": "0x0d9be86e2bc27a00044f11e07397ac2c072e1c42", + "transactionIndex": 2, + "value": "0" + }, + { + "blockHash": "0xec31fe71299b2c1166ead2dbf0f71fca8e8754812243f69097dbefa5cc842b9c", + "blockNumber": 1395423, + "date": "2016-04-24 12:59:43 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 121000, + "gasCost": 508200000000000, + "gasPrice": 24200000000, + "gasUsed": 21000, + "hash": "0x72b94c59a37c66938bae972dcb39afff04719abc9c8d9901e4dc69f4eef8bb39", + "timestamp": 1461502783, + "to": "0x3577b12e880a8d8e3e731af2296827f228747b37", + "transactionIndex": 0, + "value": "610000000000000000" + }, + { + "blockHash": "0x6d6da17e4e378486a1a9a826be052d2fcf1908560f1a2841aa9e5bc9bfb69920", + "blockNumber": 1410065, + "date": "2016-04-26 23:14:09 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 178274, + "gasCost": 1565480000000000, + "gasPrice": 20000000000, + "gasUsed": 78274, + "hash": "0x328ffabad95e59209cdf010e334dac34fba9d5486dce660ea47736c6a6d500ee", + "input": "0x54686f6d6173204a6179205275736820627579696e6720686973206669727374207265616c2044414f20746f6b656e2e", + "timestamp": 1461712449, + "to": "0xd838f9c9792bf8398e1f5fbfbd3b43c5a86445aa", + "transactionIndex": 2, + "value": "1000000000000000" + }, + { + "blockHash": "0x717999b6141078ae71b08820ce11b32de9f85cb72b75864575c2b5cbc71e5cf9", + "blockNumber": 1410101, + "date": "2016-04-26 23:27:38 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 149770, + "gasCost": 995400000000000, + "gasPrice": 20000000000, + "gasUsed": 49770, + "hash": "0xdf4519c767c0056ed91926fd5e7a0df12eb7d9a5e688a1726052be8ec5ea5f20", + "input": "0x5365636f6e64207075726368617365206f6e2074686520746573742044414f206f6620392066696e6e65792e204669727374206f6e6520776173206f6e652066696e6e65792e", + "timestamp": 1461713258, + "to": "0xd838f9c9792bf8398e1f5fbfbd3b43c5a86445aa", + "transactionIndex": 0, + "value": "9000000000000000" + }, + { + "blockHash": "0xc6e054313a41ab1d0eab8e165f53bbbef4c9810bf0e90c887787d964e0e07333", + "blockNumber": 1421461, + "date": "2016-04-28 20:47:39 UTC", + "from": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2", + "gas": 150000, + "gasCost": 498880000000000, + "gasPrice": 20000000000, + "gasUsed": 24944, + "hash": "0x2ba4bfc81597452a07f557803d59fa24382b87d126d1ddf2ca74e5e5985bd69c", + "input": "0x5468697320697320746865207365636f6e642073616c65206f6620657468657220283434332e31303139332920746f2047726561742048696c6c", + "timestamp": 1461876459, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 1, + "value": "443096930000000000000" + }, + { + "blockHash": "0xb5028bae01edb7a3ef670d047da6b3443b821bcbd131689e86df9156f4d21bb9", + "blockNumber": 1429678, + "date": "2016-04-30 05:27:17 UTC", + "from": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2", + "gas": 150000, + "gasCost": 501600000000000, + "gasPrice": 20000000000, + "gasUsed": 25080, + "hash": "0x74d747489cfa4114eabcf8824f729abf7fa213b2da3e64ee1dadc1d550798123", + "input": "0x5468697264207472616e7366657220746f2047726561742048696c6c2057616c6c657420746f20746f70206f66662061742031303030206574686572", + "timestamp": 1461994037, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 1, + "value": "62527100000000000000" + }, + { + "blockHash": "0x6410dec9372083c8bd16e3248e08a96f75a2eadc9a1de9cd2d773fa8d32d4e13", + "blockNumber": 1430958, + "date": "2016-04-30 10:21:09 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 178748, + "gasCost": 2536473080000000, + "gasPrice": 32210000000, + "gasUsed": 78748, + "hash": "0x835bbd5bb596497d0c46756900d589a3921c7cab0675b1e5926c15b39651b040", + "input": "0x4669727374207075726368617365206f662044414f20746f6b656e732062792047726561742048696c6c20436f72706f726174696f6e", + "timestamp": 1462011669, + "to": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", + "transactionIndex": 0, + "value": "10000000000000000000" + }, + { + "blockHash": "0x3d5b7d4dcea2f9af453cc36595779585a6ef5d33f0987808291633ccb5dc56dc", + "blockNumber": 1431182, + "date": "2016-04-30 11:12:31 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 147928, + "gasCost": 1543760880000000, + "gasPrice": 32210000000, + "gasUsed": 47928, + "hash": "0xa9ac76306e2c8f3e5c665e77e5ab02f13eecc2f140a66e8839f24590a5bf19e5", + "input": "0x5365636f6e642070757263686173652062792047726561742048696c6c20436f72706f726174696f6e", + "timestamp": 1462014751, + "to": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", + "transactionIndex": 0, + "value": "90000000000000000000" + }, + { + "blockHash": "0x9f9f484b2e5b07ed77843c253c58081a5b31fbfc3864e02e47d7e779bc4eacb3", + "blockNumber": 1433348, + "date": "2016-04-30 19:51:06 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 122360, + "gasCost": 447200000000000, + "gasPrice": 20000000000, + "gasUsed": 22360, + "hash": "0x76d843004deb8d4e4228be68e09b4af82f3b3db429d29ba46522c4b4ba1e4307", + "input": "0x546f20506574657220646f612d626f7420677579", + "timestamp": 1462045866, + "to": "0x1a416af553faca53b4be48dcfb6e749c9737455d", + "transactionIndex": 0, + "value": "2000000000000000000" + }, + { + "blockHash": "0x1ad1c0e1356bc27377575b8930d16b5b8135fa9bc20ba49880565f8826849239", + "blockNumber": 1434017, + "date": "2016-04-30 22:32:04 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 121000, + "gasCost": 420000000000000, + "gasPrice": 20000000000, + "gasUsed": 21000, + "hash": "0x2788170259837f042de7b7242aee839fd9b82725e4ed976d5ffa3936f27f70e4", + "timestamp": 1462055524, + "to": "0xfd23407a31f54413e32043adb7b1ee61a6e04027", + "transactionIndex": 1, + "value": "1000000000000000000" + }, + { + "blockHash": "0xfbb1bb4ce8c6f6ef752507b68185d68bf3ee175afb52baaa9ba1b2bc80a21fed", + "blockNumber": 1434025, + "date": "2016-04-30 22:34:18 UTC", + "from": "0xfd23407a31f54413e32043adb7b1ee61a6e04027", + "gas": 21000, + "gasCost": 420000000000000, + "gasPrice": 20000000000, + "gasUsed": 21000, + "hash": "0xe67eb8f730dc979c5ac987b5a47c774ce90dab355f6e6f753a45ff3fd023ae9b", + "timestamp": 1462055658, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 6, + "value": "998859360000000000" + }, + { + "blockHash": "0xfde12c34591fd3b39b4dcc26dbbb75f7e8d9f28ac169b4806ef9c1d954685777", + "blockNumber": 1440785, + "date": "2016-05-02 01:57:29 UTC", + "from": "0xcb1547417575261c4d84cab3e989acfd9f9ee35c", + "gas": 121748, + "gasCost": 434960000000000, + "gasPrice": 20000000000, + "gasUsed": 21748, + "hash": "0x5f7a50bd447297ca9f61bb005c8266b5a06e1a322c5f83bd452e4da074687b57", + "input": "0x746f7070696e67206f6666", + "timestamp": 1462154249, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 2, + "value": "2006089953959990000" + }, + { + "blockHash": "0x0a4526b34991959ab53d4b17b12c92c47c8be854c98e4605709893f1b969cb80", + "blockNumber": 1470405, + "date": "2016-05-06 23:33:21 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 123401, + "gasCost": 753746210000000, + "gasPrice": 32210000000, + "gasUsed": 23401, + "hash": "0x68319e0f6168aeff43a48d62e06e069b991ae9c1da1889143b9bbea92576c1e0", + "input": "0xc822d7f00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b54686f6d61732052757368000000000000000000000000000000000000000000", + "timestamp": 1462577601, + "to": "0x713b73c3994442b533e6a083ec968e40606810ec", + "transactionIndex": 0, + "value": "0" + }, + { + "blockHash": "0x970691ff046731bea80fac3a2c33d103ed6d10a93052b8a501453e0ba97c0c5d", + "blockNumber": 1488784, + "date": "2016-05-10 00:48:51 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 121000, + "gasCost": 1574424800000000, + "gasPrice": 32210000000, + "gasUsed": 48880, + "hash": "0xa0f5e8880387fbad148d1d752d5f5dc7d508e6a2082ed96079105ffba724ecb5", + "input": "0x5365636f6e64207075726368617365206f662044414f20746f6b656e732062792047726561742048696c6c202831303020657468657229", + "timestamp": 1462841331, + "to": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", + "transactionIndex": 0, + "value": "100000000000000000000" + }, + { + "blockHash": "0xd42b74dc9ea4ed2d0582fe1c7af0bed6d2fbfef2aee8f65deb63b24f9a802722", + "blockNumber": 1491735, + "date": "2016-05-10 12:41:16 UTC", + "from": "0xcb1547417575261c4d84cab3e989acfd9f9ee35c", + "gas": 121000, + "gasCost": 420000000000000, + "gasPrice": 20000000000, + "gasUsed": 21000, + "hash": "0x153df0fdb6e2ee3d8d2b1a5acf1a83daae1ddbda26b1dda369d800000318f7a8", + "timestamp": 1462884076, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 6, + "value": "50000000000000000000" + }, + { + "blockHash": "0xe9056a0346d595e8f2a1de57bfaa819159be36c6dacf801df2f05b9708813f13", + "blockNumber": 1491745, + "date": "2016-05-10 12:43:43 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 147996, + "gasCost": 959920000000000, + "gasPrice": 20000000000, + "gasUsed": 47996, + "hash": "0x880f42ae74d1a0123daac608f3367c95c7abed3fcb5a880c47a6d8542bdcd2b2", + "input": "0x546869726420616e642066696e616c2044414f2070757263686173652062792047726561742048696c6c", + "timestamp": 1462884223, + "to": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", + "transactionIndex": 5, + "value": "800000000000000000000" + } + ], + "meta": { + "client": "0xdeadbeef", + "finalized": "0xdeadbeef", + "staging": "0xdeadbeef", + "ripe": "0xdeadbeef", + "unripe": "0xdeadbeef", + "chainId": 1, + "networkId": 1, + "chain": "mainnet" + } +} diff --git a/test/gold/tools/ethslurp/api_tests/ethslurp_not_apps_key.txt b/test/gold/tools/ethslurp/api_tests/ethslurp_not_apps_key.txt new file mode 100644 index 0000000000..3784cbed16 --- /dev/null +++ b/test/gold/tools/ethslurp/api_tests/ethslurp_not_apps_key.txt @@ -0,0 +1,6 @@ +slurp?addrs=0x9519afbc60719a83c470ceec41e32d3e4b8b262e&blocks=0-1500000&source=key&fmt=json +{ + "errors": [ + "The --source=key option is only available with --appearances." + ] +} diff --git a/test/gold/tools/ethslurp/ethslurp_apps_es.txt b/test/gold/tools/ethslurp/ethslurp_apps_es.txt new file mode 100644 index 0000000000..c2ccf3662a --- /dev/null +++ b/test/gold/tools/ethslurp/ethslurp_apps_es.txt @@ -0,0 +1,107 @@ +chifra slurp 0x9519afbc60719a83c470ceec41e32d3e4b8b262e 0-1500000 --appearances --source etherscan --fmt json +TEST[DATE|TIME] Addrs: [0x9519afbc60719a83c470ceec41e32d3e4b8b262e] +TEST[DATE|TIME] Blocks: [0-1500000] +TEST[DATE|TIME] Types: [ext] +TEST[DATE|TIME] Appearances: true +TEST[DATE|TIME] Source: etherscan +TEST[DATE|TIME] Caps: cache,decache,raw,ether +TEST[DATE|TIME] Format: json +{ + "data": [ + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1383378, + "transactionIndex": 7 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1385649, + "transactionIndex": 1 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1386522, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1386735, + "transactionIndex": 2 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1395423, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1410065, + "transactionIndex": 2 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1410101, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1421461, + "transactionIndex": 1 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1429678, + "transactionIndex": 1 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1430958, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1431182, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1433348, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1434017, + "transactionIndex": 1 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1434025, + "transactionIndex": 6 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1440785, + "transactionIndex": 2 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1470405, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1488784, + "transactionIndex": 0 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1491735, + "transactionIndex": 6 + }, + { + "address": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "blockNumber": 1491745, + "transactionIndex": 5 + } + ] +} diff --git a/test/gold/tools/ethslurp/ethslurp_apps_key.txt b/test/gold/tools/ethslurp/ethslurp_apps_key.txt new file mode 100644 index 0000000000..d7a154c7f8 --- /dev/null +++ b/test/gold/tools/ethslurp/ethslurp_apps_key.txt @@ -0,0 +1,40 @@ +chifra slurp 0x9519afbc60719a83c470ceec41e32d3e4b8b262e 0-1500000 --appearances --source key --fmt json +TEST[DATE|TIME] Addrs: [0x9519afbc60719a83c470ceec41e32d3e4b8b262e] +TEST[DATE|TIME] Blocks: [0-1500000] +TEST[DATE|TIME] Types: [ext] +TEST[DATE|TIME] Appearances: true +TEST[DATE|TIME] Source: key +TEST[DATE|TIME] Caps: cache,decache,raw,ether +TEST[DATE|TIME] Format: json +Error: The --source=key option is only available with a valid api key. +Usage: + chifra slurp [flags]
[address...] [block...] + +Arguments: + addrs - one or more addresses to slurp from Etherscan (required) + blocks - an optional range of blocks to slurp + +Flags: + -t, --types strings which types of transactions to request + One or more of [ ext | int | token | nfts | 1155 | miner | uncles | withdrawals | all ] + -p, --appearances show only the blocknumber.tx_id appearances of the exported transactions + -a, --articulate articulate the retrieved data if ABIs can be found + -S, --source string the API url to use as the source of the data + One of [ etherscan | key ] + -U, --count only available for --appearances mode when --source==key, return only the number of records + -P, --per_page uint the number of records to request on each page (default 5000) + -s, --sleep float seconds to sleep between requests (default 0.25) + -H, --ether specify value in ether + -w, --raw report JSON data from the source with minimal processing + -o, --cache force the results of the query into the cache + -D, --decache removes related items from the cache + -x, --fmt string export format, one of [none|json*|txt|csv] + -v, --verbose enable verbose output + -h, --help display this help screen + +Notes: + - An address must be either an ENS name or start with '0x' and be forty-two characters long. + - Portions of this software are Powered by Etherscan.io APIs. + - The withdrawals option is only available on certain chains. It is ignored otherwise. + - If the value of --source is key, --types is ignored and only appearances are returned. + diff --git a/test/gold/tools/ethslurp/ethslurp_apps_key_type.txt b/test/gold/tools/ethslurp/ethslurp_apps_key_type.txt new file mode 100644 index 0000000000..e8addd6b0d --- /dev/null +++ b/test/gold/tools/ethslurp/ethslurp_apps_key_type.txt @@ -0,0 +1,40 @@ +chifra slurp 0x9519afbc60719a83c470ceec41e32d3e4b8b262e 0-1500000 --types ext --appearances --source key --fmt json +TEST[DATE|TIME] Addrs: [0x9519afbc60719a83c470ceec41e32d3e4b8b262e] +TEST[DATE|TIME] Blocks: [0-1500000] +TEST[DATE|TIME] Types: [ext] +TEST[DATE|TIME] Appearances: true +TEST[DATE|TIME] Source: key +TEST[DATE|TIME] Caps: cache,decache,raw,ether +TEST[DATE|TIME] Format: json +Error: The --source=key option is only available with a valid api key. +Usage: + chifra slurp [flags]
[address...] [block...] + +Arguments: + addrs - one or more addresses to slurp from Etherscan (required) + blocks - an optional range of blocks to slurp + +Flags: + -t, --types strings which types of transactions to request + One or more of [ ext | int | token | nfts | 1155 | miner | uncles | withdrawals | all ] + -p, --appearances show only the blocknumber.tx_id appearances of the exported transactions + -a, --articulate articulate the retrieved data if ABIs can be found + -S, --source string the API url to use as the source of the data + One of [ etherscan | key ] + -U, --count only available for --appearances mode when --source==key, return only the number of records + -P, --per_page uint the number of records to request on each page (default 5000) + -s, --sleep float seconds to sleep between requests (default 0.25) + -H, --ether specify value in ether + -w, --raw report JSON data from the source with minimal processing + -o, --cache force the results of the query into the cache + -D, --decache removes related items from the cache + -x, --fmt string export format, one of [none|json*|txt|csv] + -v, --verbose enable verbose output + -h, --help display this help screen + +Notes: + - An address must be either an ENS name or start with '0x' and be forty-two characters long. + - Portions of this software are Powered by Etherscan.io APIs. + - The withdrawals option is only available on certain chains. It is ignored otherwise. + - If the value of --source is key, --types is ignored and only appearances are returned. + diff --git a/test/gold/tools/ethslurp/ethslurp_bad_source.txt b/test/gold/tools/ethslurp/ethslurp_bad_source.txt new file mode 100644 index 0000000000..380aac6d88 --- /dev/null +++ b/test/gold/tools/ethslurp/ethslurp_bad_source.txt @@ -0,0 +1,39 @@ +chifra slurp 0x9519afbc60719a83c470ceec41e32d3e4b8b262e 0-1500000 --source bad --fmt json +TEST[DATE|TIME] Addrs: [0x9519afbc60719a83c470ceec41e32d3e4b8b262e] +TEST[DATE|TIME] Blocks: [0-1500000] +TEST[DATE|TIME] Types: [ext] +TEST[DATE|TIME] Source: bad +TEST[DATE|TIME] Caps: cache,decache,raw,ether +TEST[DATE|TIME] Format: json +Error: The --source option (bad) must be one of [ etherscan | key ] +Usage: + chifra slurp [flags]
[address...] [block...] + +Arguments: + addrs - one or more addresses to slurp from Etherscan (required) + blocks - an optional range of blocks to slurp + +Flags: + -t, --types strings which types of transactions to request + One or more of [ ext | int | token | nfts | 1155 | miner | uncles | withdrawals | all ] + -p, --appearances show only the blocknumber.tx_id appearances of the exported transactions + -a, --articulate articulate the retrieved data if ABIs can be found + -S, --source string the API url to use as the source of the data + One of [ etherscan | key ] + -U, --count only available for --appearances mode when --source==key, return only the number of records + -P, --per_page uint the number of records to request on each page (default 5000) + -s, --sleep float seconds to sleep between requests (default 0.25) + -H, --ether specify value in ether + -w, --raw report JSON data from the source with minimal processing + -o, --cache force the results of the query into the cache + -D, --decache removes related items from the cache + -x, --fmt string export format, one of [none|json*|txt|csv] + -v, --verbose enable verbose output + -h, --help display this help screen + +Notes: + - An address must be either an ENS name or start with '0x' and be forty-two characters long. + - Portions of this software are Powered by Etherscan.io APIs. + - The withdrawals option is only available on certain chains. It is ignored otherwise. + - If the value of --source is key, --types is ignored and only appearances are returned. + diff --git a/test/gold/tools/ethslurp/ethslurp_count_key.txt b/test/gold/tools/ethslurp/ethslurp_count_key.txt new file mode 100644 index 0000000000..c073fecaaf --- /dev/null +++ b/test/gold/tools/ethslurp/ethslurp_count_key.txt @@ -0,0 +1,41 @@ +chifra slurp 0x9519afbc60719a83c470ceec41e32d3e4b8b262e 0-1500000 --appearances --source key --count --fmt json +TEST[DATE|TIME] Addrs: [0x9519afbc60719a83c470ceec41e32d3e4b8b262e] +TEST[DATE|TIME] Blocks: [0-1500000] +TEST[DATE|TIME] Types: [ext] +TEST[DATE|TIME] Appearances: true +TEST[DATE|TIME] Source: key +TEST[DATE|TIME] Count: true +TEST[DATE|TIME] Caps: cache,decache,raw,ether +TEST[DATE|TIME] Format: json +Error: The --source=key option is only available with a valid api key. +Usage: + chifra slurp [flags]
[address...] [block...] + +Arguments: + addrs - one or more addresses to slurp from Etherscan (required) + blocks - an optional range of blocks to slurp + +Flags: + -t, --types strings which types of transactions to request + One or more of [ ext | int | token | nfts | 1155 | miner | uncles | withdrawals | all ] + -p, --appearances show only the blocknumber.tx_id appearances of the exported transactions + -a, --articulate articulate the retrieved data if ABIs can be found + -S, --source string the API url to use as the source of the data + One of [ etherscan | key ] + -U, --count only available for --appearances mode when --source==key, return only the number of records + -P, --per_page uint the number of records to request on each page (default 5000) + -s, --sleep float seconds to sleep between requests (default 0.25) + -H, --ether specify value in ether + -w, --raw report JSON data from the source with minimal processing + -o, --cache force the results of the query into the cache + -D, --decache removes related items from the cache + -x, --fmt string export format, one of [none|json*|txt|csv] + -v, --verbose enable verbose output + -h, --help display this help screen + +Notes: + - An address must be either an ENS name or start with '0x' and be forty-two characters long. + - Portions of this software are Powered by Etherscan.io APIs. + - The withdrawals option is only available on certain chains. It is ignored otherwise. + - If the value of --source is key, --types is ignored and only appearances are returned. + diff --git a/test/gold/tools/ethslurp/ethslurp_count_not_key.txt b/test/gold/tools/ethslurp/ethslurp_count_not_key.txt new file mode 100644 index 0000000000..69baa1d287 --- /dev/null +++ b/test/gold/tools/ethslurp/ethslurp_count_not_key.txt @@ -0,0 +1,41 @@ +chifra slurp 0x9519afbc60719a83c470ceec41e32d3e4b8b262e 0-1500000 --appearances --source etherscan --count --fmt json +TEST[DATE|TIME] Addrs: [0x9519afbc60719a83c470ceec41e32d3e4b8b262e] +TEST[DATE|TIME] Blocks: [0-1500000] +TEST[DATE|TIME] Types: [ext] +TEST[DATE|TIME] Appearances: true +TEST[DATE|TIME] Source: etherscan +TEST[DATE|TIME] Count: true +TEST[DATE|TIME] Caps: cache,decache,raw,ether +TEST[DATE|TIME] Format: json +Error: The --count option is only available with --source=key. +Usage: + chifra slurp [flags]
[address...] [block...] + +Arguments: + addrs - one or more addresses to slurp from Etherscan (required) + blocks - an optional range of blocks to slurp + +Flags: + -t, --types strings which types of transactions to request + One or more of [ ext | int | token | nfts | 1155 | miner | uncles | withdrawals | all ] + -p, --appearances show only the blocknumber.tx_id appearances of the exported transactions + -a, --articulate articulate the retrieved data if ABIs can be found + -S, --source string the API url to use as the source of the data + One of [ etherscan | key ] + -U, --count only available for --appearances mode when --source==key, return only the number of records + -P, --per_page uint the number of records to request on each page (default 5000) + -s, --sleep float seconds to sleep between requests (default 0.25) + -H, --ether specify value in ether + -w, --raw report JSON data from the source with minimal processing + -o, --cache force the results of the query into the cache + -D, --decache removes related items from the cache + -x, --fmt string export format, one of [none|json*|txt|csv] + -v, --verbose enable verbose output + -h, --help display this help screen + +Notes: + - An address must be either an ENS name or start with '0x' and be forty-two characters long. + - Portions of this software are Powered by Etherscan.io APIs. + - The withdrawals option is only available on certain chains. It is ignored otherwise. + - If the value of --source is key, --types is ignored and only appearances are returned. + diff --git a/test/gold/tools/ethslurp/ethslurp_not_apps_es.txt b/test/gold/tools/ethslurp/ethslurp_not_apps_es.txt new file mode 100644 index 0000000000..c9fe4a188b --- /dev/null +++ b/test/gold/tools/ethslurp/ethslurp_not_apps_es.txt @@ -0,0 +1,311 @@ +chifra slurp 0x9519afbc60719a83c470ceec41e32d3e4b8b262e 0-1500000 --source etherscan --fmt json +TEST[DATE|TIME] Addrs: [0x9519afbc60719a83c470ceec41e32d3e4b8b262e] +TEST[DATE|TIME] Blocks: [0-1500000] +TEST[DATE|TIME] Types: [ext] +TEST[DATE|TIME] Source: etherscan +TEST[DATE|TIME] Caps: cache,decache,raw,ether +TEST[DATE|TIME] Format: json +{ + "data": [ + { + "blockHash": "0x07edd8238823f71fd0c3ba093305dcb91f7da5ca3ae264bc0aa419c59e49092c", + "blockNumber": 1383378, + "date": "2016-04-22 13:08:11 UTC", + "from": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2", + "gas": 150000, + "gasCost": 531520000000000, + "gasPrice": 20000000000, + "gasUsed": 26576, + "hash": "0xe4f0e97d9d4cb6002493b7b88d35dbe24f6cbc9ebee4b17c45b2d48bbfb37c83", + "input": "0x3173742073616c65206f66203530302e303020657468657220746f2047726561742048696c6c20617420382e3033353920646f6c6c6172732070657220657468657220746f74616c3a2024343031372e3935", + "timestamp": 1461330491, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 7, + "value": "499995000000000000000" + }, + { + "blockHash": "0xc3b2c4f3c48d0e4cd14239dca04b8228129eb1a941753c98ff3197c98f536b89", + "blockNumber": 1385649, + "date": "2016-04-22 21:56:23 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 123788, + "gasCost": 475760000000000, + "gasPrice": 20000000000, + "gasUsed": 23788, + "hash": "0x800b5bbab50f820954f2b83e8600dce3d1853947a1b3ba0f68204417748f17ab", + "input": "0x53656e64696e67203520657468657220746f2072656769732e6e75206c696768742077616c6c65742e", + "timestamp": 1461362183, + "to": "0xbdace480953fc8260184bd625389ea20bbd0da9f", + "transactionIndex": 1, + "value": "4994524240000000000" + }, + { + "blockHash": "0x2a77353fbc49f11c10974a225403ed007e00e1c84ded88c9a799e93ed99c8166", + "blockNumber": 1386522, + "date": "2016-04-23 01:30:51 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 123834, + "gasCost": 476680000000000, + "gasPrice": 20000000000, + "gasUsed": 23834, + "hash": "0xb064fc2eaa4a6eeb46533a5026090ffdd45faa929193baf815fb2e03c38d436b", + "input": "0xc822d7f00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000f54686f6d6173204a617920527573680000000000000000000000000000000000", + "timestamp": 1461375051, + "to": "0x2b61cd90b5591604b3d969ca9eb944d59be6f5a7", + "transactionIndex": 0, + "value": "0" + }, + { + "blockHash": "0xa790161aa9f8928921a4fa912572e9c2c47a9c777fef7b77c3bdfcaab072d1bd", + "blockNumber": 1386735, + "date": "2016-04-23 02:19:15 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 124306, + "gasCost": 486120000000000, + "gasPrice": 20000000000, + "gasUsed": 24306, + "hash": "0xc2e1fc9071f0a793dedfa7775efe71e6ca30be965da1ead7a24c0df7377917fe", + "input": "0x7bcd7fad0000000000000000000000000000000000000000000000000000000000000001", + "timestamp": 1461377955, + "to": "0x0d9be86e2bc27a00044f11e07397ac2c072e1c42", + "transactionIndex": 2, + "value": "0" + }, + { + "blockHash": "0xec31fe71299b2c1166ead2dbf0f71fca8e8754812243f69097dbefa5cc842b9c", + "blockNumber": 1395423, + "date": "2016-04-24 12:59:43 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 121000, + "gasCost": 508200000000000, + "gasPrice": 24200000000, + "gasUsed": 21000, + "hash": "0x72b94c59a37c66938bae972dcb39afff04719abc9c8d9901e4dc69f4eef8bb39", + "timestamp": 1461502783, + "to": "0x3577b12e880a8d8e3e731af2296827f228747b37", + "transactionIndex": 0, + "value": "610000000000000000" + }, + { + "blockHash": "0x6d6da17e4e378486a1a9a826be052d2fcf1908560f1a2841aa9e5bc9bfb69920", + "blockNumber": 1410065, + "date": "2016-04-26 23:14:09 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 178274, + "gasCost": 1565480000000000, + "gasPrice": 20000000000, + "gasUsed": 78274, + "hash": "0x328ffabad95e59209cdf010e334dac34fba9d5486dce660ea47736c6a6d500ee", + "input": "0x54686f6d6173204a6179205275736820627579696e6720686973206669727374207265616c2044414f20746f6b656e2e", + "timestamp": 1461712449, + "to": "0xd838f9c9792bf8398e1f5fbfbd3b43c5a86445aa", + "transactionIndex": 2, + "value": "1000000000000000" + }, + { + "blockHash": "0x717999b6141078ae71b08820ce11b32de9f85cb72b75864575c2b5cbc71e5cf9", + "blockNumber": 1410101, + "date": "2016-04-26 23:27:38 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 149770, + "gasCost": 995400000000000, + "gasPrice": 20000000000, + "gasUsed": 49770, + "hash": "0xdf4519c767c0056ed91926fd5e7a0df12eb7d9a5e688a1726052be8ec5ea5f20", + "input": "0x5365636f6e64207075726368617365206f6e2074686520746573742044414f206f6620392066696e6e65792e204669727374206f6e6520776173206f6e652066696e6e65792e", + "timestamp": 1461713258, + "to": "0xd838f9c9792bf8398e1f5fbfbd3b43c5a86445aa", + "transactionIndex": 0, + "value": "9000000000000000" + }, + { + "blockHash": "0xc6e054313a41ab1d0eab8e165f53bbbef4c9810bf0e90c887787d964e0e07333", + "blockNumber": 1421461, + "date": "2016-04-28 20:47:39 UTC", + "from": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2", + "gas": 150000, + "gasCost": 498880000000000, + "gasPrice": 20000000000, + "gasUsed": 24944, + "hash": "0x2ba4bfc81597452a07f557803d59fa24382b87d126d1ddf2ca74e5e5985bd69c", + "input": "0x5468697320697320746865207365636f6e642073616c65206f6620657468657220283434332e31303139332920746f2047726561742048696c6c", + "timestamp": 1461876459, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 1, + "value": "443096930000000000000" + }, + { + "blockHash": "0xb5028bae01edb7a3ef670d047da6b3443b821bcbd131689e86df9156f4d21bb9", + "blockNumber": 1429678, + "date": "2016-04-30 05:27:17 UTC", + "from": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2", + "gas": 150000, + "gasCost": 501600000000000, + "gasPrice": 20000000000, + "gasUsed": 25080, + "hash": "0x74d747489cfa4114eabcf8824f729abf7fa213b2da3e64ee1dadc1d550798123", + "input": "0x5468697264207472616e7366657220746f2047726561742048696c6c2057616c6c657420746f20746f70206f66662061742031303030206574686572", + "timestamp": 1461994037, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 1, + "value": "62527100000000000000" + }, + { + "blockHash": "0x6410dec9372083c8bd16e3248e08a96f75a2eadc9a1de9cd2d773fa8d32d4e13", + "blockNumber": 1430958, + "date": "2016-04-30 10:21:09 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 178748, + "gasCost": 2536473080000000, + "gasPrice": 32210000000, + "gasUsed": 78748, + "hash": "0x835bbd5bb596497d0c46756900d589a3921c7cab0675b1e5926c15b39651b040", + "input": "0x4669727374207075726368617365206f662044414f20746f6b656e732062792047726561742048696c6c20436f72706f726174696f6e", + "timestamp": 1462011669, + "to": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", + "transactionIndex": 0, + "value": "10000000000000000000" + }, + { + "blockHash": "0x3d5b7d4dcea2f9af453cc36595779585a6ef5d33f0987808291633ccb5dc56dc", + "blockNumber": 1431182, + "date": "2016-04-30 11:12:31 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 147928, + "gasCost": 1543760880000000, + "gasPrice": 32210000000, + "gasUsed": 47928, + "hash": "0xa9ac76306e2c8f3e5c665e77e5ab02f13eecc2f140a66e8839f24590a5bf19e5", + "input": "0x5365636f6e642070757263686173652062792047726561742048696c6c20436f72706f726174696f6e", + "timestamp": 1462014751, + "to": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", + "transactionIndex": 0, + "value": "90000000000000000000" + }, + { + "blockHash": "0x9f9f484b2e5b07ed77843c253c58081a5b31fbfc3864e02e47d7e779bc4eacb3", + "blockNumber": 1433348, + "date": "2016-04-30 19:51:06 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 122360, + "gasCost": 447200000000000, + "gasPrice": 20000000000, + "gasUsed": 22360, + "hash": "0x76d843004deb8d4e4228be68e09b4af82f3b3db429d29ba46522c4b4ba1e4307", + "input": "0x546f20506574657220646f612d626f7420677579", + "timestamp": 1462045866, + "to": "0x1a416af553faca53b4be48dcfb6e749c9737455d", + "transactionIndex": 0, + "value": "2000000000000000000" + }, + { + "blockHash": "0x1ad1c0e1356bc27377575b8930d16b5b8135fa9bc20ba49880565f8826849239", + "blockNumber": 1434017, + "date": "2016-04-30 22:32:04 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 121000, + "gasCost": 420000000000000, + "gasPrice": 20000000000, + "gasUsed": 21000, + "hash": "0x2788170259837f042de7b7242aee839fd9b82725e4ed976d5ffa3936f27f70e4", + "timestamp": 1462055524, + "to": "0xfd23407a31f54413e32043adb7b1ee61a6e04027", + "transactionIndex": 1, + "value": "1000000000000000000" + }, + { + "blockHash": "0xfbb1bb4ce8c6f6ef752507b68185d68bf3ee175afb52baaa9ba1b2bc80a21fed", + "blockNumber": 1434025, + "date": "2016-04-30 22:34:18 UTC", + "from": "0xfd23407a31f54413e32043adb7b1ee61a6e04027", + "gas": 21000, + "gasCost": 420000000000000, + "gasPrice": 20000000000, + "gasUsed": 21000, + "hash": "0xe67eb8f730dc979c5ac987b5a47c774ce90dab355f6e6f753a45ff3fd023ae9b", + "timestamp": 1462055658, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 6, + "value": "998859360000000000" + }, + { + "blockHash": "0xfde12c34591fd3b39b4dcc26dbbb75f7e8d9f28ac169b4806ef9c1d954685777", + "blockNumber": 1440785, + "date": "2016-05-02 01:57:29 UTC", + "from": "0xcb1547417575261c4d84cab3e989acfd9f9ee35c", + "gas": 121748, + "gasCost": 434960000000000, + "gasPrice": 20000000000, + "gasUsed": 21748, + "hash": "0x5f7a50bd447297ca9f61bb005c8266b5a06e1a322c5f83bd452e4da074687b57", + "input": "0x746f7070696e67206f6666", + "timestamp": 1462154249, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 2, + "value": "2006089953959990000" + }, + { + "blockHash": "0x0a4526b34991959ab53d4b17b12c92c47c8be854c98e4605709893f1b969cb80", + "blockNumber": 1470405, + "date": "2016-05-06 23:33:21 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 123401, + "gasCost": 753746210000000, + "gasPrice": 32210000000, + "gasUsed": 23401, + "hash": "0x68319e0f6168aeff43a48d62e06e069b991ae9c1da1889143b9bbea92576c1e0", + "input": "0xc822d7f00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000b54686f6d61732052757368000000000000000000000000000000000000000000", + "timestamp": 1462577601, + "to": "0x713b73c3994442b533e6a083ec968e40606810ec", + "transactionIndex": 0, + "value": "0" + }, + { + "blockHash": "0x970691ff046731bea80fac3a2c33d103ed6d10a93052b8a501453e0ba97c0c5d", + "blockNumber": 1488784, + "date": "2016-05-10 00:48:51 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 121000, + "gasCost": 1574424800000000, + "gasPrice": 32210000000, + "gasUsed": 48880, + "hash": "0xa0f5e8880387fbad148d1d752d5f5dc7d508e6a2082ed96079105ffba724ecb5", + "input": "0x5365636f6e64207075726368617365206f662044414f20746f6b656e732062792047726561742048696c6c202831303020657468657229", + "timestamp": 1462841331, + "to": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", + "transactionIndex": 0, + "value": "100000000000000000000" + }, + { + "blockHash": "0xd42b74dc9ea4ed2d0582fe1c7af0bed6d2fbfef2aee8f65deb63b24f9a802722", + "blockNumber": 1491735, + "date": "2016-05-10 12:41:16 UTC", + "from": "0xcb1547417575261c4d84cab3e989acfd9f9ee35c", + "gas": 121000, + "gasCost": 420000000000000, + "gasPrice": 20000000000, + "gasUsed": 21000, + "hash": "0x153df0fdb6e2ee3d8d2b1a5acf1a83daae1ddbda26b1dda369d800000318f7a8", + "timestamp": 1462884076, + "to": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "transactionIndex": 6, + "value": "50000000000000000000" + }, + { + "blockHash": "0xe9056a0346d595e8f2a1de57bfaa819159be36c6dacf801df2f05b9708813f13", + "blockNumber": 1491745, + "date": "2016-05-10 12:43:43 UTC", + "from": "0x9519afbc60719a83c470ceec41e32d3e4b8b262e", + "gas": 147996, + "gasCost": 959920000000000, + "gasPrice": 20000000000, + "gasUsed": 47996, + "hash": "0x880f42ae74d1a0123daac608f3367c95c7abed3fcb5a880c47a6d8542bdcd2b2", + "input": "0x546869726420616e642066696e616c2044414f2070757263686173652062792047726561742048696c6c", + "timestamp": 1462884223, + "to": "0xbb9bc244d798123fde783fcc1c72d3bb8c189413", + "transactionIndex": 5, + "value": "800000000000000000000" + } + ] +} diff --git a/test/gold/tools/ethslurp/ethslurp_not_apps_key.txt b/test/gold/tools/ethslurp/ethslurp_not_apps_key.txt new file mode 100644 index 0000000000..160792bada --- /dev/null +++ b/test/gold/tools/ethslurp/ethslurp_not_apps_key.txt @@ -0,0 +1,39 @@ +chifra slurp 0x9519afbc60719a83c470ceec41e32d3e4b8b262e 0-1500000 --source key --fmt json +TEST[DATE|TIME] Addrs: [0x9519afbc60719a83c470ceec41e32d3e4b8b262e] +TEST[DATE|TIME] Blocks: [0-1500000] +TEST[DATE|TIME] Types: [ext] +TEST[DATE|TIME] Source: key +TEST[DATE|TIME] Caps: cache,decache,raw,ether +TEST[DATE|TIME] Format: json +Error: The --source=key option is only available with --appearances. +Usage: + chifra slurp [flags]
[address...] [block...] + +Arguments: + addrs - one or more addresses to slurp from Etherscan (required) + blocks - an optional range of blocks to slurp + +Flags: + -t, --types strings which types of transactions to request + One or more of [ ext | int | token | nfts | 1155 | miner | uncles | withdrawals | all ] + -p, --appearances show only the blocknumber.tx_id appearances of the exported transactions + -a, --articulate articulate the retrieved data if ABIs can be found + -S, --source string the API url to use as the source of the data + One of [ etherscan | key ] + -U, --count only available for --appearances mode when --source==key, return only the number of records + -P, --per_page uint the number of records to request on each page (default 5000) + -s, --sleep float seconds to sleep between requests (default 0.25) + -H, --ether specify value in ether + -w, --raw report JSON data from the source with minimal processing + -o, --cache force the results of the query into the cache + -D, --decache removes related items from the cache + -x, --fmt string export format, one of [none|json*|txt|csv] + -v, --verbose enable verbose output + -h, --help display this help screen + +Notes: + - An address must be either an ENS name or start with '0x' and be forty-two characters long. + - Portions of this software are Powered by Etherscan.io APIs. + - The withdrawals option is only available on certain chains. It is ignored otherwise. + - If the value of --source is key, --types is ignored and only appearances are returned. +