diff --git a/apps/ecash-herald/config.js b/apps/ecash-herald/config.js --- a/apps/ecash-herald/config.js +++ b/apps/ecash-herald/config.js @@ -24,12 +24,152 @@ }, knownMiners: [ { - coinbaseScript: '566961425443', + coinbaseHexFragment: '566961425443', miner: 'ViaBTC', + payoutOutputScript: + '76a914f1c075a01882ae0972f95d3a4177c86c852b7d9188ac', + testBlocks: [ + { + height: 791160, + coinbaseHex: + '0378120c182f5669614254432f4d696e6564206279203236303738362f103b6fa20ff3648a69acc31ed9b4946c00', + parsed: 'ViaBTC, Mined by 260786', + }, + { + height: 791162, + coinbaseHex: + '037a120c1b2f5669614254432f4d696e656420627920616e6d6f6c393934362f10506fba0b63c1be4232055d9432860000', + parsed: 'ViaBTC, Mined by anmol9946', + }, + { + height: 791152, + coinbaseHex: + '0370120c192f5669614254432f4d696e6564206279207374616c6365722f10eb6ea10f92ef957d84c8bb6769e22d00', + parsed: 'ViaBTC, Mined by stalcer', + }, + ], }, { - coinbaseScript: '4d696e696e672d4475746368', + coinbaseHexFragment: '4d696e696e672d4475746368', miner: 'Mining-Dutch', + payoutOutputScript: + '76a914a24e2b67689c3753983d3b408bc7690d31b1b74d88ac', + testBlocks: [ + { + height: 791169, + coinbaseHex: + '0381120c04498b5a6408fabe6d6d2824fdd18ac6fdbf7196476428cc714e3841f1ff289127197ca59466b3ae739a0001000000000000000000115bba02001401112f4d696e696e672d44757463682f2d3231', + parsed: 'Mining-Dutch', + }, + { + height: 791165, + coinbaseHex: + '037d120c04b7895a6408fabe6d6d3552401c3f02d70ca60a4bd927ab08f4bd7412821435244a72d4002d5baf3e52000100000000000000003b4dbeab12001b01112f4d696e696e672d44757463682f2d3231', + parsed: 'Mining-Dutch', + }, + { + height: 790644, + coinbaseHex: + '0374100c0402c4546408fabe6d6dd9cb39f3ab01d745d7cf94bb2da744d5238ce6d91f2b495d697719dacbde4122000100000000000000a3b914314cf2000c01112f4d696e696e672d44757463682f2d3234', + parsed: 'Mining-Dutch', + }, + ], + }, + { + // While Hathor-MM block coinbase scripts do contain "mm", + // this is judged insufficient to uniquely identify + coinbaseHexFragment: null, + miner: 'Hathor-MM', + payoutOutputScript: + '76a914ce8c8cf69a922a607e8e03e27ec014fbc24882e088ac', + testBlocks: [ + { + height: 791154, + coinbaseHex: + '0372120c04ca6f5a640cfabe6d6d0000000000000000000000000000000000000000000000000000000000000000010000000000000017ffe3db2f2981010000000015663561663031393839363731656539633239383034', + parsed: 'Hathor-MM', + }, + { + height: 790242, + coinbaseHex: + '03e20e0c04cdc250640cfabe6d6d00000000000000000000000000000000000000000000000000000000000000000100000000000000780131c9f83700000000000015303637373062323039393135643332643630303333', + parsed: 'Hathor-MM', + }, + { + height: 790837, + coinbaseHex: + '0335110c0408fa56640cfabe6d6d000000000000000000000000000000000000000000000000000000000000000001000000000000005ffff258d57091000000000015653364396135343132373039306165353131333437', + parsed: 'Hathor-MM', + }, + ], + }, + { + coinbaseHexFragment: '5a554c55506f6f4c', + miner: 'Zulu Pool', + payoutOutputScript: + '76a9141b1bbcb888b4440a573427f526cb221f657318cf88ac', + testBlocks: [ + { + height: 785677, + coinbaseHex: + '030dfd0b48617468a881a54b5fbc28b27eb3ed59fc4924a3b991033fee7a78b919170a92d9b7beaf5a554c55506f6f4c2d584543000011d8e9bb1b00', + parsed: 'Zulu Pool', + }, + { + height: 790413, + coinbaseHex: + '038d0f0c48617468606e02e2feb6112decb0dbe728053841e8e16bcd643fc0cb4389e7e1a318bb735a554c55506f6f4c2d58454300002714214b0598', + parsed: 'Zulu Pool', + }, + { + height: 789691, + coinbaseHex: + '03bb0c0c48617468bb1017e3800bb814cc6912cdaa37488fd50a70da9e19b09a7e271bde7417d42d5a554c55506f6f4c2d5845430000171fcc948505', + parsed: 'Zulu Pool', + }, + ], + }, + { + coinbaseHexFragment: '636b706f6f6c', + miner: 'CK Pool', + payoutOutputScript: + '76a914c857e19f313157ead29b6fa0fa9c772a9ec6c06888ac', + testBlocks: [ + { + // ck pool but different address from IceBerg + height: 788631, + parsed: 'CK Pool', + coinbaseHex: + '0397080c04181678a1046498416404bb67ca0d0c3692416477630100000000000a636b706f6f6c', + }, + { + height: 791069, + parsed: 'IceBerg', + coinbaseHex: + '031d120c041821710c04556e5964043c958a2e0c4a794764d2ea1400000000000a636b706f6f6c122f6d696e656420627920496365426572672f', + }, + { + height: 788164, + parsed: 'IceBerg', + coinbaseHex: + '03c4060c04181750ed0429773d6404180b99200c20493a6402911a00000000000a636b706f6f6c122f6d696e656420627920496365426572672f', + }, + ], + }, + { + // Note, the lone zpool block also contains 'mm', could be Hathor related + coinbaseHexFragment: '7a706f6f6c2e6361', + miner: 'zpool', + payoutOutputScript: + '76a91497b4ae75a3bfab8bf10ef17e133efe34a4a13df788ac', + testBlocks: [ + { + height: 790863, + coinbaseHex: + '034f110c04602a5764084200079077422b017a706f6f6c2e636100fabe6d6da821294426652ebd8cff8df5e02ffcbbdc1b1d9e9022832acf4d071e9bfa2d952000000000000000', + parsed: 'zpool', + }, + ], }, ], opReturn: { diff --git a/apps/ecash-herald/src/parse.js b/apps/ecash-herald/src/parse.js --- a/apps/ecash-herald/src/parse.js +++ b/apps/ecash-herald/src/parse.js @@ -10,7 +10,11 @@ prepareStringForTelegramHTML, splitOverflowTgMsg, } = require('./telegram'); -const { formatPrice, returnAddressPreview } = require('./utils'); +const { + formatPrice, + returnAddressPreview, + getOutputScriptFromAddress, +} = require('./utils'); module.exports = { parseBlock: function (chronikBlockResponse) { const { blockInfo, txs } = chronikBlockResponse; @@ -18,8 +22,8 @@ const { height, numTxs } = blockInfo; // Parse coinbase string - const coinbaseScript = txs[0].inputs[0].inputScript; - const miner = module.exports.getMinerFromCoinbase(coinbaseScript); + const coinbaseTx = txs[0]; + const miner = module.exports.getMinerFromCoinbaseTx(coinbaseTx); // Start with i=1 to skip Coinbase tx const parsedTxs = []; @@ -38,14 +42,149 @@ return { hash, height, miner, numTxs, parsedTxs, tokenIds }; }, - getMinerFromCoinbase: function (coinbaseHexString) { + getMinerFromCoinbaseTx: function (coinbaseTx) { + // get coinbase inputScript + const testedCoinbaseScript = coinbaseTx.inputs[0].inputScript; + const knownMiners = config.knownMiners; + let miner = 'unknown'; + + // First, iterate over known miners to find a match by coinbaseScript fragment + let thisCoinbaseFragment; + for (let i = 0; i < knownMiners.length; i += 1) { + const testedMiner = knownMiners[i]; + const { coinbaseHexFragment } = testedMiner; + if (testedCoinbaseScript.includes(coinbaseHexFragment)) { + miner = testedMiner.miner; + thisCoinbaseFragment = coinbaseHexFragment; + // Stop looking + break; + } + } + + if (miner === 'unknown') { + // If you have not found a miner, check by address + const { outputs } = coinbaseTx; + for (let i = 0; i < outputs.length; i += 1) { + const thisOutputScript = outputs[i].outputScript; + // Check outputScript against ifp outputScript + const ifpOutputScript = getOutputScriptFromAddress( + config.ifpAddress, + ); + if (thisOutputScript !== ifpOutputScript) { + /* If this output payment was not sent to the IFP address, + * it was sent to the miner + * Get miner by payout address + */ + miner = + module.exports.getMinerFromOutputScript( + thisOutputScript, + ); + /* In this case, thisCoinbaseFragment is still undefined + * Dev note, you may want to get it for parsing some future miner info + * For now, we have no known miners with "extra" coinbase info but no + * always-repeated coinbase info + */ + + //Stop looking + break; + } + } + } + // Some pool miners have additional info available in the coinbase script + // Parse for this + const MINERS_WITH_PARSABLE_COINBASE = ['ViaBTC', 'CK Pool']; + if (MINERS_WITH_PARSABLE_COINBASE.includes(miner)) { + /* Note: Parsing methods below are customized based on manual review + * of how each miner produces Coinbase strings + */ + switch (miner) { + case 'ViaBTC': { + // Slice the hex string to get what's after ViaBTC + let infoHex = testedCoinbaseScript.slice( + testedCoinbaseScript.indexOf(thisCoinbaseFragment) + + thisCoinbaseFragment.length, + ); + /* For ViaBTC, the interesting info is between '/' characters + * i.e. /Mined by 260786/ + * In ascii, these are encoded with '2f' + */ + // Remove the first preceding '/' + infoHex = infoHex.slice( + infoHex.indexOf('2f') + '2f'.length, + ); + // Remove the last preceding '/' + infoHex = infoHex.slice(0, infoHex.indexOf('2f')); + // Convert to ascii + const infoAscii = Buffer.from(infoHex, 'hex').toString( + 'ascii', + ); + // Return your improved 'miner' info + // ViaBTC, Mined by 260786 + if (infoAscii.length === 0) { + // If you did not find anything interesting, just return the miner + return miner; + } + return `${miner}, ${infoAscii}`; + } + case 'CK Pool': { + /* For CK Pool, the interesting info is between '/' characters + * CK Pool seems to be a solo miner identified as "IceBerg" + * However, some blocks do not have this identifier + * i.e. /Mined by IceBerg/ + * In ascii, these are encoded with '2f' + */ + // Slice the hex string to get what's after 'CK Pool' + let infoHex = testedCoinbaseScript.slice( + testedCoinbaseScript.indexOf(thisCoinbaseFragment) + + thisCoinbaseFragment.length, + ); + /* For 'CK Pool', the interesting info is between '/' characters + * i.e. /Mined by 260786/ + * In ascii, these are encoded with '2f' + */ + // Remove the first preceding '/' + infoHex = infoHex.slice( + infoHex.indexOf('2f') + '2f'.length, + ); + // Remove the last preceding '/' + infoHex = infoHex.slice(0, infoHex.indexOf('2f')); + // Convert to ascii + const infoAscii = Buffer.from(infoHex, 'hex').toString( + 'ascii', + ); + // Return your improved 'miner' info + // CK Pool, mined by IceBerg + // If this is IceBerg, identify uniquely + if (infoAscii === 'mined by IceBerg') { + return `IceBerg`; + } + if (infoAscii.length === 0) { + // If you did not find anything interesting, just return the miner + return miner; + } + return `${miner}, ${infoAscii}`; + } + } + } else { + // If no good info is available from Coinbase, return the miner + return miner; + } + }, + getMinerFromOutputScript: function (outputScript) { + /* Input params + * outputScript - string, the outputScript at the payout output of a coinbase tx + * + * Output + * A known miner if a match is found + * 'unknown' if no match found * + */ const knownMiners = config.knownMiners; let miner = 'unknown'; // Iterate over known miners to find a match for (let i = 0; i < knownMiners.length; i += 1) { const testedMiner = knownMiners[i]; - const { coinbaseScript } = testedMiner; - if (coinbaseHexString.includes(coinbaseScript)) { + const { payoutOutputScript } = testedMiner; + if (outputScript === payoutOutputScript) { miner = testedMiner.miner; } } diff --git a/apps/ecash-herald/src/utils.js b/apps/ecash-herald/src/utils.js --- a/apps/ecash-herald/src/utils.js +++ b/apps/ecash-herald/src/utils.js @@ -6,6 +6,7 @@ const axios = require('axios'); const config = require('../config'); const BigNumber = require('bignumber.js'); +const cashaddr = require('ecashaddrjs'); module.exports = { returnAddressPreview: function (cashAddress, sliceSize = 3) { @@ -204,4 +205,23 @@ ); }); }, + getOutputScriptFromAddress: function (address) { + /* + * Input params + * address - a valid p2pkh or p2sh cash address + * + * Output + * returns outputScript (string) - the outputScript for the given address + * returns false if input is invalid or of unsupported type + */ + const { type, hash } = cashaddr.decode(address, true); + if (type === 'p2pkh') { + return `76a914${hash}88ac`; + } + if (type === 'p2sh') { + return `a914${hash}87`; + } + // If type is unsupported, return false + return false; + }, }; diff --git a/apps/ecash-herald/test/mocks/blocks.js b/apps/ecash-herald/test/mocks/blocks.js --- a/apps/ecash-herald/test/mocks/blocks.js +++ b/apps/ecash-herald/test/mocks/blocks.js @@ -77,29 +77,29 @@ }, "coingeckoResponse": { "bitcoin": { - "usd": 29452.48207906 + "usd": 27640.75137067 }, "ecash": { - "usd": 0.00002843 + "usd": 0.000028 }, "ethereum": { - "usd": 1992.05966869 + "usd": 1848.15210006 } }, "coingeckoPrices": [ { "fiat": "usd", - "price": 0.00002843, + "price": 0.000028, "ticker": "XEC" }, { "fiat": "usd", - "price": 29452.48207906, + "price": 27640.75137067, "ticker": "BTC" }, { "fiat": "usd", - "price": 1992.05966869, + "price": 1848.15210006, "ticker": "ETH" } ], @@ -108,7 +108,7 @@ "value": [] }, "blockSummaryTgMsgs": [ - "0 | 1 tx | unknown\n1 XEC = $0.00002843\n1 BTC = $29,452\n1 ETH = $1,992" + "0 | 1 tx | unknown\n1 XEC = $0.000028\n1 BTC = $27,641\n1 ETH = $1,848" ], "blockSummaryTgMsgsApiFailure": [ "0 | 1 tx | unknown" @@ -4577,7 +4577,7 @@ "parsedBlock": { "hash": "0000000000000000260ee4c3b4f4ddde127bc0105d685c0ef31775b612627222", "height": 700722, - "miner": "unknown", + "miner": "Zulu Pool", "numTxs": "97", "parsedTxs": [ { @@ -7739,29 +7739,29 @@ }, "coingeckoResponse": { "bitcoin": { - "usd": 29452.48207906 + "usd": 27640.75137067 }, "ecash": { - "usd": 0.00002843 + "usd": 0.000028 }, "ethereum": { - "usd": 1992.05966869 + "usd": 1848.15210006 } }, "coingeckoPrices": [ { "fiat": "usd", - "price": 0.00002843, + "price": 0.000028, "ticker": "XEC" }, { "fiat": "usd", - "price": 29452.48207906, + "price": 27640.75137067, "ticker": "BTC" }, { "fiat": "usd", - "price": 1992.05966869, + "price": 1848.15210006, "ticker": "ETH" } ], @@ -7770,13 +7770,13 @@ "value": [] }, "blockSummaryTgMsgs": [ - "700722 | 97 txs | unknown\n1 XEC = $0.00002843\n1 BTC = $29,452\n1 ETH = $1,992\n\n1 new eToken created:\nLambda Variant Variants (LVV) [doc]\n\nApp txs:\nno app: 1629498127|85\nno app: 1629500089|91\nno app: 1629497915|79\nno app: 1629500647|79\nno app: 1629499023|76\nno app: 1629497534|78\nno app: 1629498535|87\nno app: 1629500798|79\nno app: 1629497457|77\nno app: 1629498288|72\nno app: 1629499274|64\nno app: 1629500162|80\nno app: 1629500720|82\nno app: 1629499774|94\nno app: 1629497610|79\nno app: 1629499360|84\nno app: 1629498460|71\nno app: 1629500318|76\nno app: 1629497132|78\nno app: 1629498060|88\nno app: 1629499897|105\nno app: 1629497763|75\nno app: 1629499571|93\nno app: 1629497054|74\nno app: 1629499185|75\nno app: 1629498375|70\nno app: 1629498610|74\nno app: 1629497293|68", + "700722 | 97 txs | Zulu Pool\n1 XEC = $0.000028\n1 BTC = $27,641\n1 ETH = $1,848\n\n1 new eToken created:\nLambda Variant Variants (LVV) [doc]\n\nApp txs:\nno app: 1629498127|85\nno app: 1629500089|91\nno app: 1629497915|79\nno app: 1629500647|79\nno app: 1629499023|76\nno app: 1629497534|78\nno app: 1629498535|87\nno app: 1629500798|79\nno app: 1629497457|77\nno app: 1629498288|72\nno app: 1629499274|64\nno app: 1629500162|80\nno app: 1629500720|82\nno app: 1629499774|94\nno app: 1629497610|79\nno app: 1629499360|84\nno app: 1629498460|71\nno app: 1629500318|76\nno app: 1629497132|78\nno app: 1629498060|88\nno app: 1629499897|105\nno app: 1629497763|75\nno app: 1629499571|93\nno app: 1629497054|74\nno app: 1629499185|75\nno app: 1629498375|70\nno app: 1629498610|74\nno app: 1629497293|68", "no app: 1629497209|76\nno app: 1629499706|88\nno app: 1629497685|81\nno app: 1629499504|84\nno app: 1629498864|64\nno app: 1629498773|66\nno app: 1629499955|96\nno app: 1629500566|71\nno app: 1629497990|82\nno app: 1629498205|77\nno app: 1629499836|98\nno app: 1629498688|79\nno app: 1629497840|81\nno app: 1629500240|77\nno app: 1629500399|75\nno app: 1629498945|79\nno app: 1629497378|72\nno app: 1629499638|91\nno app: 1629499432|84\nno app: 1629500022|85\nno app: 1629500482|72\nno app: 1629499103|75\n\n45 eCash txs:\nqqv...y7y sent 201,835,617 XEC to qqn...gd2 and 1 others | 1.00 sats per byte\nqrf...ldm sent 6,354 XEC to qr8...kys and 1 others | 1.00 sats per byte\nqq4...xph sent 2,099,979 XEC to qp0...rj6 | 10.69 sats per byte\nqru...y7r sent 240,420 XEC to qz5...7p8 and 1 others | 1.23 sats per byte\nqp5...pck sent 4,261,646 XEC to qqz...cc8 | 1.06 sats per byte\nqrh...47a sent 47,684,497 XEC to qz0...c8j and 1 others | 1.00 sats per byte\nqp9...jlg sent 69,850 XEC to qpu...dtm | 4.18 sats per byte", "qp9...jlg sent 10,000 XEC to qqm...uqa | 4.18 sats per byte\nqr9...3zm sent 425,718,894 XEC to qzx...xg8 and 1 others | 1.00 sats per byte\nqq4...w64 sent 110,320,517 XEC to qqt...q7t and 2 others | 4.10 sats per byte\nqph...72y sent 15,326 XEC to qz2...035 | 2.01 sats per byte\nqrp...rtz sent 1,008,221 XEC to qp2...qa4 and 1 others | 5.02 sats per byte\nqzs...qn7 sent 6,941,377 XEC to qqh...ytf and 1 others | 1.00 sats per byte\nqrz...k3d sent 2,571,837 XEC to qr4...kxh | 150.87 sats per byte\nqz5...7p8 sent 750 XEC to qrf...py0 and 1 others | 1.12 sats per byte\nqzq...mzs sent 717,296 XEC to qzj...e2s and 1 others | 5.00 sats per byte\nqql...h03 sent 89,006,076 XEC to qzj...ksg | 2.13 sats per byte\nqp0...t92 sent 612,181 XEC to qzj...ztx and 1 others | 1.00 sats per byte\nqpm...k9g sent 199,999,998 XEC to qqp...zqu and 1 others | 1.00 sats per byte\nqpa...czv sent 612,208 XEC to qp0...t92 and 1 others | 1.00 sats per byte\nppt...gny sent 88,521,997 XEC to qz3...rj3 and 2 others | 15.28 sats per byte\nqp2...pca sent 294,905 XEC to qp4...0fg and 1 others | 1.00 sats per byte\nqpm...k9g sent 199,999,997 XEC to qpl...eep and 2 others | 1.00 sats per byte\nqp4...yuu sent 289,611,690 XEC to qqh...zy3 and 1 others | 1.00 sats per byte\nqr4...ffa sent 1,975,381 XEC to qr3...w9u and 2 others | 1.00 sats per byte\nqql...y4w sent 30,000,000 XEC to qz8...0fa | 4.16 sats per byte\nqzn...amg sent 3,285,159 XEC to qzt...rag and 1 others | 1.00 sats per byte\nqp9...jlg sent 10,000 XEC to qpv...jap | 4.16 sats per byte\nqp9...jlg sent 45,000 XEC to qry...tf4 | 4.16 sats per byte\nqp9...jlg sent 95,000 XEC to qrt...lp5 | 4.16 sats per byte", "qqn...e9j sent 21,197,785 XEC to qr2...rh9 and 1 others | 4.10 sats per byte\nqpp...p3l sent 1,217,361 XEC to qz3...hef and 1 others | 1.00 sats per byte\nqz5...7p8 sent 150 XEC to qre...t4t and 1 others | 1.17 sats per byte\nqzj...ksg sent 937,282,770 XEC to qz3...rj3 and 4 others | 1.92 sats per byte\nqpm...k9g sent 199,999,998 XEC to qrd...vnm and 1 others | 1.00 sats per byte\npqu...4ws sent 551,094 XEC to qp2...thh and 1 others | 1.05 sats per byte\nqzl...52p sent 159,000,922 XEC to qpt...67y and 1 others | 1.01 sats per byte\nqz5...7p8 sent 750 XEC to qrf...py0 and 1 others | 1.13 sats per byte\nqz5...7p8 sent 2,300 XEC to qrf...py0 | 1.14 sats per byte\nqp9...jlg sent 971,154,369 XEC to qpu...qhj | 4.16 sats per byte\nqq4...qvq sent 5,167,950 XEC to qqu...vun and 1 others | 1.00 sats per byte\nqqn...gnz sent 10,499,318 XEC to qrj...eya and 1 others | 2.21 sats per byte\nqze...e3p sent 504,025 XEC to qzv...geu | 5.00 sats per byte\nqqs...7c5 sent 101,520,270 XEC to pzz...qn8 and 3 others | 1.00 sats per byte\nqpp...m7l sent 23,026 XEC to qqe...fmm | 5.01 sats per byte" ], "blockSummaryTgMsgsApiFailure": [ - "700722 | 97 txs | unknown\n\n1 new eToken created:\nLambda Variant Variants (LVV) [doc]\n\nApp txs:\nno app: 1629498127|85\nno app: 1629500089|91\nno app: 1629497915|79\nno app: 1629500647|79\nno app: 1629499023|76\nno app: 1629497534|78\nno app: 1629498535|87\nno app: 1629500798|79\nno app: 1629497457|77\nno app: 1629498288|72\nno app: 1629499274|64\nno app: 1629500162|80\nno app: 1629500720|82\nno app: 1629499774|94\nno app: 1629497610|79\nno app: 1629499360|84\nno app: 1629498460|71\nno app: 1629500318|76\nno app: 1629497132|78\nno app: 1629498060|88\nno app: 1629499897|105\nno app: 1629497763|75\nno app: 1629499571|93\nno app: 1629497054|74\nno app: 1629499185|75\nno app: 1629498375|70\nno app: 1629498610|74\nno app: 1629497293|68\nno app: 1629497209|76", + "700722 | 97 txs | Zulu Pool\n\n1 new eToken created:\nLambda Variant Variants (LVV) [doc]\n\nApp txs:\nno app: 1629498127|85\nno app: 1629500089|91\nno app: 1629497915|79\nno app: 1629500647|79\nno app: 1629499023|76\nno app: 1629497534|78\nno app: 1629498535|87\nno app: 1629500798|79\nno app: 1629497457|77\nno app: 1629498288|72\nno app: 1629499274|64\nno app: 1629500162|80\nno app: 1629500720|82\nno app: 1629499774|94\nno app: 1629497610|79\nno app: 1629499360|84\nno app: 1629498460|71\nno app: 1629500318|76\nno app: 1629497132|78\nno app: 1629498060|88\nno app: 1629499897|105\nno app: 1629497763|75\nno app: 1629499571|93\nno app: 1629497054|74\nno app: 1629499185|75\nno app: 1629498375|70\nno app: 1629498610|74\nno app: 1629497293|68\nno app: 1629497209|76", "no app: 1629499706|88\nno app: 1629497685|81\nno app: 1629499504|84\nno app: 1629498864|64\nno app: 1629498773|66\nno app: 1629499955|96\nno app: 1629500566|71\nno app: 1629497990|82\nno app: 1629498205|77\nno app: 1629499836|98\nno app: 1629498688|79\nno app: 1629497840|81\nno app: 1629500240|77\nno app: 1629500399|75\nno app: 1629498945|79\nno app: 1629497378|72\nno app: 1629499638|91\nno app: 1629499432|84\nno app: 1629500022|85\nno app: 1629500482|72\nno app: 1629499103|75\n\n45 eCash txs:\nqqv...y7y sent 201,835,617 XEC to qqn...gd2 and 1 others | 1.00 sats per byte\nqrf...ldm sent 6,354 XEC to qr8...kys and 1 others | 1.00 sats per byte\nqq4...xph sent 2,099,979 XEC to qp0...rj6 | 10.69 sats per byte\nqru...y7r sent 240,420 XEC to qz5...7p8 and 1 others | 1.23 sats per byte\nqp5...pck sent 4,261,646 XEC to qqz...cc8 | 1.06 sats per byte\nqrh...47a sent 47,684,497 XEC to qz0...c8j and 1 others | 1.00 sats per byte\nqp9...jlg sent 69,850 XEC to qpu...dtm | 4.18 sats per byte", "qp9...jlg sent 10,000 XEC to qqm...uqa | 4.18 sats per byte\nqr9...3zm sent 425,718,894 XEC to qzx...xg8 and 1 others | 1.00 sats per byte\nqq4...w64 sent 110,320,517 XEC to qqt...q7t and 2 others | 4.10 sats per byte\nqph...72y sent 15,326 XEC to qz2...035 | 2.01 sats per byte\nqrp...rtz sent 1,008,221 XEC to qp2...qa4 and 1 others | 5.02 sats per byte\nqzs...qn7 sent 6,941,377 XEC to qqh...ytf and 1 others | 1.00 sats per byte\nqrz...k3d sent 2,571,837 XEC to qr4...kxh | 150.87 sats per byte\nqz5...7p8 sent 750 XEC to qrf...py0 and 1 others | 1.12 sats per byte\nqzq...mzs sent 717,296 XEC to qzj...e2s and 1 others | 5.00 sats per byte\nqql...h03 sent 89,006,076 XEC to qzj...ksg | 2.13 sats per byte\nqp0...t92 sent 612,181 XEC to qzj...ztx and 1 others | 1.00 sats per byte\nqpm...k9g sent 199,999,998 XEC to qqp...zqu and 1 others | 1.00 sats per byte\nqpa...czv sent 612,208 XEC to qp0...t92 and 1 others | 1.00 sats per byte\nppt...gny sent 88,521,997 XEC to qz3...rj3 and 2 others | 15.28 sats per byte\nqp2...pca sent 294,905 XEC to qp4...0fg and 1 others | 1.00 sats per byte\nqpm...k9g sent 199,999,997 XEC to qpl...eep and 2 others | 1.00 sats per byte\nqp4...yuu sent 289,611,690 XEC to qqh...zy3 and 1 others | 1.00 sats per byte\nqr4...ffa sent 1,975,381 XEC to qr3...w9u and 2 others | 1.00 sats per byte\nqql...y4w sent 30,000,000 XEC to qz8...0fa | 4.16 sats per byte\nqzn...amg sent 3,285,159 XEC to qzt...rag and 1 others | 1.00 sats per byte\nqp9...jlg sent 10,000 XEC to qpv...jap | 4.16 sats per byte\nqp9...jlg sent 45,000 XEC to qry...tf4 | 4.16 sats per byte\nqp9...jlg sent 95,000 XEC to qrt...lp5 | 4.16 sats per byte", "qqn...e9j sent 21,197,785 XEC to qr2...rh9 and 1 others | 4.10 sats per byte\nqpp...p3l sent 1,217,361 XEC to qz3...hef and 1 others | 1.00 sats per byte\nqz5...7p8 sent 150 XEC to qre...t4t and 1 others | 1.17 sats per byte\nqzj...ksg sent 937,282,770 XEC to qz3...rj3 and 4 others | 1.92 sats per byte\nqpm...k9g sent 199,999,998 XEC to qrd...vnm and 1 others | 1.00 sats per byte\npqu...4ws sent 551,094 XEC to qp2...thh and 1 others | 1.05 sats per byte\nqzl...52p sent 159,000,922 XEC to qpt...67y and 1 others | 1.01 sats per byte\nqz5...7p8 sent 750 XEC to qrf...py0 and 1 others | 1.13 sats per byte\nqz5...7p8 sent 2,300 XEC to qrf...py0 | 1.14 sats per byte\nqp9...jlg sent 971,154,369 XEC to qpu...qhj | 4.16 sats per byte\nqq4...qvq sent 5,167,950 XEC to qqu...vun and 1 others | 1.00 sats per byte\nqqn...gnz sent 10,499,318 XEC to qrj...eya and 1 others | 2.21 sats per byte\nqze...e3p sent 504,025 XEC to qzv...geu | 5.00 sats per byte\nqqs...7c5 sent 101,520,270 XEC to pzz...qn8 and 3 others | 1.00 sats per byte\nqpp...m7l sent 23,026 XEC to qqe...fmm | 5.01 sats per byte" @@ -8258,7 +8258,11 @@ "outputs": [ { "value": "844560700", - "outputScript": "76a914aa8e9a37a0f7575b04bd7c6ddfb3611d0b475f1988ac" + "outputScript": "76a914aa8e9a37a0f7575b04bd7c6ddfb3611d0b475f1988ac", + "spentBy": { + "txid": "3c8487253c63da9e23d2c8c6a077aa652883c0ce93481ba52fa3386fd1317923", + "outIdx": 3 + } }, { "value": "1025339067", @@ -11471,7 +11475,7 @@ "parsedBlock": { "hash": "00000000000000001239831f90580c859ec174316e91961cf0e8cde57c0d3acb", "height": 782665, - "miner": "ViaBTC", + "miner": "ViaBTC, Mined by angarsk13", "numTxs": "43", "parsedTxs": [ { @@ -13649,29 +13653,29 @@ }, "coingeckoResponse": { "bitcoin": { - "usd": 29452.48207906 + "usd": 27640.75137067 }, "ecash": { - "usd": 0.00002843 + "usd": 0.000028 }, "ethereum": { - "usd": 1992.05966869 + "usd": 1848.15210006 } }, "coingeckoPrices": [ { "fiat": "usd", - "price": 0.00002843, + "price": 0.000028, "ticker": "XEC" }, { "fiat": "usd", - "price": 29452.48207906, + "price": 27640.75137067, "ticker": "BTC" }, { "fiat": "usd", - "price": 1992.05966869, + "price": 1848.15210006, "ticker": "ETH" } ], @@ -13698,16 +13702,6 @@ "decimals": 2 } ], - [ - "4db25a4b2f0b57415ce25fab6d9cb3ac2bbb444ff493dc16d0615a11ad06c875", - { - "tokenTicker": "LVV", - "tokenName": "Lambda Variant Variants", - "tokenDocumentUrl": "https://cashtabapp.com/", - "tokenDocumentHash": "", - "decimals": 0 - } - ], [ "fb4233e8a568993976ed38a81c2671587c5ad09552dedefa78760deed6ff87aa", { @@ -13718,6 +13712,16 @@ "decimals": 2 } ], + [ + "4db25a4b2f0b57415ce25fab6d9cb3ac2bbb444ff493dc16d0615a11ad06c875", + { + "tokenTicker": "LVV", + "tokenName": "Lambda Variant Variants", + "tokenDocumentUrl": "https://cashtabapp.com/", + "tokenDocumentHash": "", + "decimals": 0 + } + ], [ "b8f2a9e767a0be7b80c7e414ef2534586d4da72efddb39a4e70e501ab73375cc", { @@ -13731,12 +13735,12 @@ ] }, "blockSummaryTgMsgs": [ - "782665 | 43 txs | ViaBTC\n1 XEC = $0.00002843\n1 BTC = $29,452\n1 ETH = $1,992\n\n2 new eTokens created:\nBearNip (BEAR) [doc]\neCash Herald (TRIB) [doc]\n\n27 eToken send txs\nqq6...eq7 sent 0.0036 BUX to qpx...kvj\nqrv...ffd sent 4 tst to qrs...6k9\nqq6...eq7 sent 0.1122 BUX to qpx...kvj\nqq6...eq7 sent 0.0512 BUX to qpx...kvj\nqrv...ffd sent 7 tst to qrs...6k9\nqrv...ffd sent 5 tst to qrs...6k9\nqrv...ffd sent 2 GRP to qq5...fn0\nqq6...eq7 sent 0.0242 BUX to qpx...kvj\nqrv...ffd sent 10 tst to qrs...6k9\nqz2...035 sent 17 LVV to qp8...gg6\nqq6...eq7 sent 6.6381 BUX to qpx...kvj\nqq6...eq7 sent 1.5319 BUX to qpx...kvj and 1 others\nqq6...eq7 sent 0.0227 BUX to qpx...kvj\nqq6...eq7 sent 0.0019 BUX to qpx...kvj", - "qq6...eq7 sent 9.6625 BUX to qpx...kvj\nqz2...035 sent 2 LVV to qp8...gg6\nqq6...eq7 sent 0.0471 BUX to qpx...kvj\nqrv...ffd sent 3 tst to qrs...6k9\nqq6...eq7 sent 1 BUX to qpx...kvj\nqrv...ffd sent 7 tst to qrs...6k9\nqz2...035 sent 11 CTD to qp8...gg6\nqq6...eq7 sent 0.0167 BUX to qpx...kvj\nqrv...ffd sent 1 GRP to qq5...fn0\npp2...mza sent 5.64 BUX to qpx...kvj and 2 others\nqq6...eq7 sent 0.0101 BUX to qpx...kvj\nqpx...kvj sent 6 BUX to qr0...d2u and 1 others\nqq6...eq7 sent 0.8878 BUX to qpx...kvj\n\nApp txs:\nmemo: Reply to memo|�V��iM�j�t[P\u001c\u000e����J\u0018_�z7�\b�k\u0005u\n|From what I'm gathering, it seems that the media went from questioning authority to doing their bidding as a collective NPC hivemind!\nAlias: 12345\n\n11 eCash txs:\nqzx...efz sent 999,998 XEC to qq6...f27 | 1.08 sats per byte\nqqc...c8e sent 18,698,998 XEC to qz4...n9l and 1 others | 1.03 sats per byte", - "qqj...9g4 sent 936 XEC to qpw...x5g | 2.38 sats per byte\nqqh...lpy sent 29,022,106 XEC to qqu...0av and 1 others | 10.05 sats per byte\nqrx...4nm sent 1,000 XEC to qz9...jhz | 1.00 sats per byte\nqpl...4l0 sent 984,178 XEC to qpu...4d7 | 1.44 sats per byte\nqpt...2wg sent 23,656,838 XEC to qz6...74j and 2 others | 10.05 sats per byte\nqq3...x4u sent 807,228 XEC to qrh...pdm | 1.00 sats per byte\nqz9...m57 sent 950 XEC to qqj...9g4 | 2.16 sats per byte\n1 address sent 237.57 XEC to itself\nqpy...6yp sent 2,000 XEC to qqn...678 | 2.02 sats per byte" + "782665 | 43 txs | ViaBTC, Mined by angarsk13\n1 XEC = $0.000028\n1 BTC = $27,641\n1 ETH = $1,848\n\n2 new eTokens created:\nBearNip (BEAR) [doc]\neCash Herald (TRIB) [doc]\n\n27 eToken send txs\nqq6...eq7 sent 0.0036 BUX to qpx...kvj\nqrv...ffd sent 4 tst to qrs...6k9\nqq6...eq7 sent 0.1122 BUX to qpx...kvj\nqq6...eq7 sent 0.0512 BUX to qpx...kvj\nqrv...ffd sent 7 tst to qrs...6k9\nqrv...ffd sent 5 tst to qrs...6k9\nqrv...ffd sent 2 GRP to qq5...fn0\nqq6...eq7 sent 0.0242 BUX to qpx...kvj\nqrv...ffd sent 10 tst to qrs...6k9\nqz2...035 sent 17 LVV to qp8...gg6\nqq6...eq7 sent 6.6381 BUX to qpx...kvj\nqq6...eq7 sent 1.5319 BUX to qpx...kvj and 1 others\nqq6...eq7 sent 0.0227 BUX to qpx...kvj", + "qq6...eq7 sent 0.0019 BUX to qpx...kvj\nqq6...eq7 sent 9.6625 BUX to qpx...kvj\nqz2...035 sent 2 LVV to qp8...gg6\nqq6...eq7 sent 0.0471 BUX to qpx...kvj\nqrv...ffd sent 3 tst to qrs...6k9\nqq6...eq7 sent 1 BUX to qpx...kvj\nqrv...ffd sent 7 tst to qrs...6k9\nqz2...035 sent 11 CTD to qp8...gg6\nqq6...eq7 sent 0.0167 BUX to qpx...kvj\nqrv...ffd sent 1 GRP to qq5...fn0\npp2...mza sent 5.64 BUX to qpx...kvj and 2 others\nqq6...eq7 sent 0.0101 BUX to qpx...kvj\nqpx...kvj sent 6 BUX to qr0...d2u and 1 others\nqq6...eq7 sent 0.8878 BUX to qpx...kvj\n\nApp txs:\nmemo: Reply to memo|�V��iM�j�t[P\u001c\u000e����J\u0018_�z7�\b�k\u0005u\n|From what I'm gathering, it seems that the media went from questioning authority to doing their bidding as a collective NPC hivemind!\nAlias: 12345\n\n11 eCash txs:", + "qzx...efz sent 999,998 XEC to qq6...f27 | 1.08 sats per byte\nqqc...c8e sent 18,698,998 XEC to qz4...n9l and 1 others | 1.03 sats per byte\nqqj...9g4 sent 936 XEC to qpw...x5g | 2.38 sats per byte\nqqh...lpy sent 29,022,106 XEC to qqu...0av and 1 others | 10.05 sats per byte\nqrx...4nm sent 1,000 XEC to qz9...jhz | 1.00 sats per byte\nqpl...4l0 sent 984,178 XEC to qpu...4d7 | 1.44 sats per byte\nqpt...2wg sent 23,656,838 XEC to qz6...74j and 2 others | 10.05 sats per byte\nqq3...x4u sent 807,228 XEC to qrh...pdm | 1.00 sats per byte\nqz9...m57 sent 950 XEC to qqj...9g4 | 2.16 sats per byte\n1 address sent 237.57 XEC to itself\nqpy...6yp sent 2,000 XEC to qqn...678 | 2.02 sats per byte" ], "blockSummaryTgMsgsApiFailure": [ - "782665 | 43 txs | ViaBTC\n\n2 new eTokens created:\nBearNip (BEAR) [doc]\neCash Herald (TRIB) [doc]\n\nApp txs:\nmemo: Reply to memo|�V��iM�j�t[P\u001c\u000e����J\u0018_�z7�\b�k\u0005u\n|From what I'm gathering, it seems that the media went from questioning authority to doing their bidding as a collective NPC hivemind!\nAlias: 12345\n\n38 eCash txs:\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqzx...efz sent 999,998 XEC to qq6...f27 | 1.08 sats per byte\nqqc...c8e sent 18,698,998 XEC to qz4...n9l and 1 others | 1.03 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqqj...9g4 sent 936 XEC to qpw...x5g | 2.38 sats per byte\nqqh...lpy sent 29,022,106 XEC to qqu...0av and 1 others | 10.05 sats per byte\nqrv...ffd sent 5 XEC to qq5...fn0 | 2.36 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqrx...4nm sent 1,000 XEC to qz9...jhz | 1.00 sats per byte\nqz2...035 sent 5 XEC to qp8...gg6 | 2.37 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqpl...4l0 sent 984,178 XEC to qpu...4d7 | 1.44 sats per byte\nqpt...2wg sent 23,656,838 XEC to qz6...74j and 2 others | 10.05 sats per byte", + "782665 | 43 txs | ViaBTC, Mined by angarsk13\n\n2 new eTokens created:\nBearNip (BEAR) [doc]\neCash Herald (TRIB) [doc]\n\nApp txs:\nmemo: Reply to memo|�V��iM�j�t[P\u001c\u000e����J\u0018_�z7�\b�k\u0005u\n|From what I'm gathering, it seems that the media went from questioning authority to doing their bidding as a collective NPC hivemind!\nAlias: 12345\n\n38 eCash txs:\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqzx...efz sent 999,998 XEC to qq6...f27 | 1.08 sats per byte\nqqc...c8e sent 18,698,998 XEC to qz4...n9l and 1 others | 1.03 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqqj...9g4 sent 936 XEC to qpw...x5g | 2.38 sats per byte\nqqh...lpy sent 29,022,106 XEC to qqu...0av and 1 others | 10.05 sats per byte\nqrv...ffd sent 5 XEC to qq5...fn0 | 2.36 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqrx...4nm sent 1,000 XEC to qz9...jhz | 1.00 sats per byte\nqz2...035 sent 5 XEC to qp8...gg6 | 2.37 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqpl...4l0 sent 984,178 XEC to qpu...4d7 | 1.44 sats per byte\nqpt...2wg sent 23,656,838 XEC to qz6...74j and 2 others | 10.05 sats per byte", "qq6...eq7 sent 11 XEC to qpx...kvj and 1 others | 1.47 sats per byte\nqq3...x4u sent 807,228 XEC to qrh...pdm | 1.00 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqz2...035 sent 5 XEC to qp8...gg6 | 2.37 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqz9...m57 sent 950 XEC to qqj...9g4 | 2.16 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\n1 address sent 237.57 XEC to itself\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqrv...ffd sent 5 XEC to qrs...6k9 | 2.37 sats per byte\nqz2...035 sent 5 XEC to qp8...gg6 | 2.36 sats per byte\nqpy...6yp sent 2,000 XEC to qqn...678 | 2.02 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqrv...ffd sent 5 XEC to qq5...fn0 | 2.37 sats per byte\npp2...mza sent 16 XEC to qpx...kvj and 2 others | 1.01 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte\nqpx...kvj sent 32 XEC to qr0...d2u and 1 others | 2.03 sats per byte\nqq6...eq7 sent 5 XEC to qpx...kvj | 2.56 sats per byte" ], "blockName": "multipleGenesis" @@ -14115,7 +14119,7 @@ "parsedBlock": { "hash": "000000000000000003a43161c1d963b1df57f639a4621f56d3dbf69d5a8d0561", "height": 782571, - "miner": "ViaBTC", + "miner": "ViaBTC, Mined by 600414", "numTxs": "5", "parsedTxs": [ { @@ -14309,29 +14313,29 @@ }, "coingeckoResponse": { "bitcoin": { - "usd": 29452.48207906 + "usd": 27640.75137067 }, "ecash": { - "usd": 0.00002843 + "usd": 0.000028 }, "ethereum": { - "usd": 1992.05966869 + "usd": 1848.15210006 } }, "coingeckoPrices": [ { "fiat": "usd", - "price": 0.00002843, + "price": 0.000028, "ticker": "XEC" }, { "fiat": "usd", - "price": 29452.48207906, + "price": 27640.75137067, "ticker": "BTC" }, { "fiat": "usd", - "price": 1992.05966869, + "price": 1848.15210006, "ticker": "ETH" } ], @@ -14361,10 +14365,10 @@ ] }, "blockSummaryTgMsgs": [ - "782571 | 5 txs | ViaBTC\n1 XEC = $0.00002843\n1 BTC = $29,452\n1 ETH = $1,992\n\n2 eToken send txs\n1 address sent 356.6918 BUX to itself\nqqw...6v4 sent 5000000 GRP to qrd...9j0\n\n2 eCash txs:\nqpk...pga sent 1,061,524 XEC to qrt...4v7 | 1.10 sats per byte\n1 address sent 0 XEC to itself" + "782571 | 5 txs | ViaBTC, Mined by 600414\n1 XEC = $0.000028\n1 BTC = $27,641\n1 ETH = $1,848\n\n2 eToken send txs\n1 address sent 356.6918 BUX to itself\nqqw...6v4 sent 5000000 GRP to qrd...9j0\n\n2 eCash txs:\nqpk...pga sent 1,061,524 XEC to qrt...4v7 | 1.10 sats per byte\n1 address sent 0 XEC to itself" ], "blockSummaryTgMsgsApiFailure": [ - "782571 | 5 txs | ViaBTC\n\n4 eCash txs:\n1 address sent 10.92 XEC to itself\nqqw...6v4 sent 5 XEC to qrd...9j0 | 2.37 sats per byte\nqpk...pga sent 1,061,524 XEC to qrt...4v7 | 1.10 sats per byte\n1 address sent 0 XEC to itself" + "782571 | 5 txs | ViaBTC, Mined by 600414\n\n4 eCash txs:\n1 address sent 10.92 XEC to itself\nqqw...6v4 sent 5 XEC to qrd...9j0 | 2.37 sats per byte\nqpk...pga sent 1,061,524 XEC to qrt...4v7 | 1.10 sats per byte\n1 address sent 0 XEC to itself" ], "blockName": "buxTxs" }, @@ -15090,7 +15094,7 @@ "parsedBlock": { "hash": "00000000000000000a528f0c4e4b4f214a72d9b34d84003df6150d5a4bcd0d32", "height": 782657, - "miner": "ViaBTC", + "miner": "ViaBTC, Mined by jonny320", "numTxs": "10", "parsedTxs": [ { @@ -15401,29 +15405,29 @@ }, "coingeckoResponse": { "bitcoin": { - "usd": 29452.48207906 + "usd": 27640.75137067 }, "ecash": { - "usd": 0.00002843 + "usd": 0.000028 }, "ethereum": { - "usd": 1992.05966869 + "usd": 1848.15210006 } }, "coingeckoPrices": [ { "fiat": "usd", - "price": 0.00002843, + "price": 0.000028, "ticker": "XEC" }, { "fiat": "usd", - "price": 29452.48207906, + "price": 27640.75137067, "ticker": "BTC" }, { "fiat": "usd", - "price": 1992.05966869, + "price": 1848.15210006, "ticker": "ETH" } ], @@ -15432,10 +15436,10 @@ "value": [] }, "blockSummaryTgMsgs": [ - "782657 | 10 txs | ViaBTC\n1 XEC = $0.00002843\n1 BTC = $29,452\n1 ETH = $1,992\n\nApp txs:\nunknown app: SWP\u0000|\u0001|\u0001|���]�𷕪��7���؉�v��\u0018�\u001b�֯�\u001d��|SELL|110.00000000000001|\u0000|�Ϩ�O���+�u������Y�(���\u000e<D=�ήX|\u0001|\u0000|2747\nCashtab Msg: Sending a message transaction to test parsing in ecash telegram bot. With an emoji bc why not? 🤔\nunknown app: SWP\u0000|\u0001|\u0001|���]�𷕪��7���؉�v��\u0018�\u001b�֯�\u001d��|SELL\n\n6 eCash txs:\nqzr...tfg sent 4,681,584 XEC to qqt...2qc and 1 others | 1.00 sats per byte\nqp9...jlg sent 2,993,000 XEC to qr5...taj | 4.18 sats per byte\nqpw...ms5 sent 2,843,535 XEC to qpw...f2s and 1 others | 1.91 sats per byte\nqp0...c3a sent 67,528,995 XEC to qph...tg5 and 1 others | 1.00 sats per byte\nqrn...54p sent 10,255 XEC to qqs...tsk and 1 others | 1.00 sats per byte\nqzt...zwy sent 18,832,831 XEC to qrv...rm2 | 1.00 sats per byte" + "782657 | 10 txs | ViaBTC, Mined by jonny320\n1 XEC = $0.000028\n1 BTC = $27,641\n1 ETH = $1,848\n\nApp txs:\nunknown app: SWP\u0000|\u0001|\u0001|���]�𷕪��7���؉�v��\u0018�\u001b�֯�\u001d��|SELL|110.00000000000001|\u0000|�Ϩ�O���+�u������Y�(���\u000e<D=�ήX|\u0001|\u0000|2747\nCashtab Msg: Sending a message transaction to test parsing in ecash telegram bot. With an emoji bc why not? 🤔\nunknown app: SWP\u0000|\u0001|\u0001|���]�𷕪��7���؉�v��\u0018�\u001b�֯�\u001d��|SELL\n\n6 eCash txs:\nqzr...tfg sent 4,681,584 XEC to qqt...2qc and 1 others | 1.00 sats per byte\nqp9...jlg sent 2,993,000 XEC to qr5...taj | 4.18 sats per byte\nqpw...ms5 sent 2,843,535 XEC to qpw...f2s and 1 others | 1.91 sats per byte\nqp0...c3a sent 67,528,995 XEC to qph...tg5 and 1 others | 1.00 sats per byte\nqrn...54p sent 10,255 XEC to qqs...tsk and 1 others | 1.00 sats per byte\nqzt...zwy sent 18,832,831 XEC to qrv...rm2 | 1.00 sats per byte" ], "blockSummaryTgMsgsApiFailure": [ - "782657 | 10 txs | ViaBTC\n\nApp txs:\nunknown app: SWP\u0000|\u0001|\u0001|���]�𷕪��7���؉�v��\u0018�\u001b�֯�\u001d��|SELL|110.00000000000001|\u0000|�Ϩ�O���+�u������Y�(���\u000e<D=�ήX|\u0001|\u0000|2747\nCashtab Msg: Sending a message transaction to test parsing in ecash telegram bot. With an emoji bc why not? 🤔\nunknown app: SWP\u0000|\u0001|\u0001|���]�𷕪��7���؉�v��\u0018�\u001b�֯�\u001d��|SELL\n\n6 eCash txs:\nqzr...tfg sent 4,681,584 XEC to qqt...2qc and 1 others | 1.00 sats per byte\nqp9...jlg sent 2,993,000 XEC to qr5...taj | 4.18 sats per byte\nqpw...ms5 sent 2,843,535 XEC to qpw...f2s and 1 others | 1.91 sats per byte\nqp0...c3a sent 67,528,995 XEC to qph...tg5 and 1 others | 1.00 sats per byte\nqrn...54p sent 10,255 XEC to qqs...tsk and 1 others | 1.00 sats per byte\nqzt...zwy sent 18,832,831 XEC to qrv...rm2 | 1.00 sats per byte" + "782657 | 10 txs | ViaBTC, Mined by jonny320\n\nApp txs:\nunknown app: SWP\u0000|\u0001|\u0001|���]�𷕪��7���؉�v��\u0018�\u001b�֯�\u001d��|SELL|110.00000000000001|\u0000|�Ϩ�O���+�u������Y�(���\u000e<D=�ήX|\u0001|\u0000|2747\nCashtab Msg: Sending a message transaction to test parsing in ecash telegram bot. With an emoji bc why not? 🤔\nunknown app: SWP\u0000|\u0001|\u0001|���]�𷕪��7���؉�v��\u0018�\u001b�֯�\u001d��|SELL\n\n6 eCash txs:\nqzr...tfg sent 4,681,584 XEC to qqt...2qc and 1 others | 1.00 sats per byte\nqp9...jlg sent 2,993,000 XEC to qr5...taj | 4.18 sats per byte\nqpw...ms5 sent 2,843,535 XEC to qpw...f2s and 1 others | 1.91 sats per byte\nqp0...c3a sent 67,528,995 XEC to qph...tg5 and 1 others | 1.00 sats per byte\nqrn...54p sent 10,255 XEC to qqs...tsk and 1 others | 1.00 sats per byte\nqzt...zwy sent 18,832,831 XEC to qrv...rm2 | 1.00 sats per byte" ], "blockName": "cashtabMsg" }, @@ -17679,29 +17683,29 @@ }, "coingeckoResponse": { "bitcoin": { - "usd": 29452.48207906 + "usd": 27640.75137067 }, "ecash": { - "usd": 0.00002843 + "usd": 0.000028 }, "ethereum": { - "usd": 1992.05966869 + "usd": 1848.15210006 } }, "coingeckoPrices": [ { "fiat": "usd", - "price": 0.00002843, + "price": 0.000028, "ticker": "XEC" }, { "fiat": "usd", - "price": 29452.48207906, + "price": 27640.75137067, "ticker": "BTC" }, { "fiat": "usd", - "price": 1992.05966869, + "price": 1848.15210006, "ticker": "ETH" } ], @@ -17731,7 +17735,7 @@ ] }, "blockSummaryTgMsgs": [ - "782785 | 17 txs | Mining-Dutch\n1 XEC = $0.00002843\n1 BTC = $29,452\n1 ETH = $1,992\n\n1 new eToken created:\n<><><> (&&&) [doc]\n\n4 eToken send txs\nqqv...wwc sent 60 eLPS to qp2...dce\nqqg...q4a sent 60 eLPS to qp2...dce\nqqg...v4e sent 0.4703 BUX to qpj...yv6 and 8 others\nqqg...v4e sent 0.4703 BUX to qpj...yv6 and 8 others\n\nApp txs:\nCashtab Msg: Testing a normal message but give it some <i> spice </i> because <b>why not</b>?<a href=\"https://cashtab.com/\">Cashtab link test</a>\nCashtab Msg: <b>Try to hack the format</b> ${true && <i>yes</i>}\n\n9 eCash txs:\nqq3...x4u sent 256,510 XEC to qp3...scq | 1.00 sats per byte\nqzx...vth sent 10,039 XEC to qza...e7g | 5.01 sats per byte\nqp3...f6c sent 20,294 XEC to qza...e7g | 5.01 sats per byte\nqr7...wlz sent 223,965 XEC to qqr...8y8 and 1 others | 1.00 sats per byte\nqp3...scq sent 256,506 XEC to qpu...ez7 | 2.38 sats per byte\nqpw...ms5 sent 849,061 XEC to qz8...y4c and 1 others | 1.90 sats per byte\nqrm...f33 sent 17,099,643 XEC to qrx...y9d and 1 others | 2.44 sats per byte\nqrh...6em sent 3,125,893 XEC to qz8...tu7 and 1 others | 2.01 sats per byte\nqpu...ez7 sent 256,501 XEC to qp0...upp | 2.38 sats per byte" + "782785 | 17 txs | Mining-Dutch\n1 XEC = $0.000028\n1 BTC = $27,641\n1 ETH = $1,848\n\n1 new eToken created:\n<><><> (&&&) [doc]\n\n4 eToken send txs\nqqv...wwc sent 60 eLPS to qp2...dce\nqqg...q4a sent 60 eLPS to qp2...dce\nqqg...v4e sent 0.4703 BUX to qpj...yv6 and 8 others\nqqg...v4e sent 0.4703 BUX to qpj...yv6 and 8 others\n\nApp txs:\nCashtab Msg: Testing a normal message but give it some <i> spice </i> because <b>why not</b>?<a href=\"https://cashtab.com/\">Cashtab link test</a>\nCashtab Msg: <b>Try to hack the format</b> ${true && <i>yes</i>}\n\n9 eCash txs:\nqq3...x4u sent 256,510 XEC to qp3...scq | 1.00 sats per byte\nqzx...vth sent 10,039 XEC to qza...e7g | 5.01 sats per byte\nqp3...f6c sent 20,294 XEC to qza...e7g | 5.01 sats per byte\nqr7...wlz sent 223,965 XEC to qqr...8y8 and 1 others | 1.00 sats per byte\nqp3...scq sent 256,506 XEC to qpu...ez7 | 2.38 sats per byte\nqpw...ms5 sent 849,061 XEC to qz8...y4c and 1 others | 1.90 sats per byte\nqrm...f33 sent 17,099,643 XEC to qrx...y9d and 1 others | 2.44 sats per byte\nqrh...6em sent 3,125,893 XEC to qz8...tu7 and 1 others | 2.01 sats per byte\nqpu...ez7 sent 256,501 XEC to qp0...upp | 2.38 sats per byte" ], "blockSummaryTgMsgsApiFailure": [ "782785 | 17 txs | Mining-Dutch\n\n1 new eToken created:\n<><><> (&&&) [doc]\n\nApp txs:\nCashtab Msg: Testing a normal message but give it some <i> spice </i> because <b>why not</b>?<a href=\"https://cashtab.com/\">Cashtab link test</a>\nCashtab Msg: <b>Try to hack the format</b> ${true && <i>yes</i>}\n\n13 eCash txs:\nqq3...x4u sent 256,510 XEC to qp3...scq | 1.00 sats per byte\nqqv...wwc sent 5 XEC to qp2...dce | 1.07 sats per byte\nqzx...vth sent 10,039 XEC to qza...e7g | 5.01 sats per byte\nqp3...f6c sent 20,294 XEC to qza...e7g | 5.01 sats per byte\nqr7...wlz sent 223,965 XEC to qqr...8y8 and 1 others | 1.00 sats per byte\nqqg...q4a sent 5 XEC to qp2...dce | 1.07 sats per byte\nqp3...scq sent 256,506 XEC to qpu...ez7 | 2.38 sats per byte\nqpw...ms5 sent 849,061 XEC to qz8...y4c and 1 others | 1.90 sats per byte\nqrm...f33 sent 17,099,643 XEC to qrx...y9d and 1 others | 2.44 sats per byte\nqqg...v4e sent 49 XEC to qpj...yv6 and 8 others | 1.20 sats per byte\nqrh...6em sent 3,125,893 XEC to qz8...tu7 and 1 others | 2.01 sats per byte\nqqg...v4e sent 49 XEC to qpj...yv6 and 8 others | 1.20 sats per byte\nqpu...ez7 sent 256,501 XEC to qp0...upp | 2.38 sats per byte" @@ -18391,7 +18395,7 @@ "parsedBlock": { "hash": "00000000000000000609f6bcbbf5169ae25142ad7f119b541adad5789faa28e4", "height": 782774, - "miner": "ViaBTC", + "miner": "ViaBTC, Mined by slavm01", "numTxs": "10", "parsedTxs": [ { @@ -18720,29 +18724,29 @@ }, "coingeckoResponse": { "bitcoin": { - "usd": 29452.48207906 + "usd": 27640.75137067 }, "ecash": { - "usd": 0.00002843 + "usd": 0.000028 }, "ethereum": { - "usd": 1992.05966869 + "usd": 1848.15210006 } }, "coingeckoPrices": [ { "fiat": "usd", - "price": 0.00002843, + "price": 0.000028, "ticker": "XEC" }, { "fiat": "usd", - "price": 29452.48207906, + "price": 27640.75137067, "ticker": "BTC" }, { "fiat": "usd", - "price": 1992.05966869, + "price": 1848.15210006, "ticker": "ETH" } ], @@ -18762,11 +18766,11 @@ ] }, "blockSummaryTgMsgs": [ - "782774 | 10 txs | ViaBTC\n1 XEC = $0.00002843\n1 BTC = $29,452\n1 ETH = $1,992\n\n1 eToken send tx\nqz2...035 sent 2 SRM to qp8...gg6\n\nApp txs:\nCashtab Msg: Why not another one, this time with emojis 🤔\nCashtab Msg: Can't believe already need to test again\nCashtab Msg: Another Cashtab message to the TG bot. Making it longer to see if spacing is a problem. Is spacing a problem? Is parsing a problem? Who can tell. We will only know after this message appears (or doesn't). \n\n5 eCash txs:\nqrw...re7 sent 21 XEC to qza...e7g | 5.00 sats per byte\nqp4...v8x sent 4,568,709 XEC to pqg...tlg and 1 others | 2.02 sats per byte\nqq5...ck4 sent 10,280 XEC to qza...e7g | 5.01 sats per byte\nqzj...u85 sent 29 XEC to qza...e7g | 5.02 sats per byte\nqrk...wcf sent 8,220 XEC to qza...e7g | 5.01 sats per byte" + "782774 | 10 txs | ViaBTC, Mined by slavm01\n1 XEC = $0.000028\n1 BTC = $27,641\n1 ETH = $1,848\n\n1 eToken send tx\nqz2...035 sent 2 SRM to qp8...gg6\n\nApp txs:\nCashtab Msg: Why not another one, this time with emojis 🤔\nCashtab Msg: Can't believe already need to test again\nCashtab Msg: Another Cashtab message to the TG bot. Making it longer to see if spacing is a problem. Is spacing a problem? Is parsing a problem? Who can tell. We will only know after this message appears (or doesn't). \n\n5 eCash txs:\nqrw...re7 sent 21 XEC to qza...e7g | 5.00 sats per byte\nqp4...v8x sent 4,568,709 XEC to pqg...tlg and 1 others | 2.02 sats per byte\nqq5...ck4 sent 10,280 XEC to qza...e7g | 5.01 sats per byte\nqzj...u85 sent 29 XEC to qza...e7g | 5.02 sats per byte\nqrk...wcf sent 8,220 XEC to qza...e7g | 5.01 sats per byte" ], "blockSummaryTgMsgsApiFailure": [ - "782774 | 10 txs | ViaBTC\n\nApp txs:\nCashtab Msg: Why not another one, this time with emojis 🤔\nCashtab Msg: Can't believe already need to test again\nCashtab Msg: Another Cashtab message to the TG bot. Making it longer to see if spacing is a problem. Is spacing a problem? Is parsing a problem? Who can tell. We will only know after this message appears (or doesn't). \n\n6 eCash txs:\nqrw...re7 sent 21 XEC to qza...e7g | 5.00 sats per byte\nqp4...v8x sent 4,568,709 XEC to pqg...tlg and 1 others | 2.02 sats per byte\nqq5...ck4 sent 10,280 XEC to qza...e7g | 5.01 sats per byte\nqzj...u85 sent 29 XEC to qza...e7g | 5.02 sats per byte\nqz2...035 sent 5 XEC to qp8...gg6 | 2.37 sats per byte\nqrk...wcf sent 8,220 XEC to qza...e7g | 5.01 sats per byte" + "782774 | 10 txs | ViaBTC, Mined by slavm01\n\nApp txs:\nCashtab Msg: Why not another one, this time with emojis 🤔\nCashtab Msg: Can't believe already need to test again\nCashtab Msg: Another Cashtab message to the TG bot. Making it longer to see if spacing is a problem. Is spacing a problem? Is parsing a problem? Who can tell. We will only know after this message appears (or doesn't). \n\n6 eCash txs:\nqrw...re7 sent 21 XEC to qza...e7g | 5.00 sats per byte\nqp4...v8x sent 4,568,709 XEC to pqg...tlg and 1 others | 2.02 sats per byte\nqq5...ck4 sent 10,280 XEC to qza...e7g | 5.01 sats per byte\nqzj...u85 sent 29 XEC to qza...e7g | 5.02 sats per byte\nqz2...035 sent 5 XEC to qp8...gg6 | 2.37 sats per byte\nqrk...wcf sent 8,220 XEC to qza...e7g | 5.01 sats per byte" ], "blockName": "cashtabMsgMulti" } ] \ No newline at end of file diff --git a/apps/ecash-herald/test/parseTests.js b/apps/ecash-herald/test/parseTests.js --- a/apps/ecash-herald/test/parseTests.js +++ b/apps/ecash-herald/test/parseTests.js @@ -14,6 +14,8 @@ parseBlock, parseMemoOutputScript, getBlockTgMessage, + getMinerFromOutputScript, + getMinerFromCoinbaseTx, } = require('../src/parse'); describe('parse.js functions', function () { @@ -44,4 +46,37 @@ }); }); }); + it(`getMinerFromOutputScript can parse all miners in config.js`, function () { + const knownMiners = config.knownMiners; + for (let i = 0; i < knownMiners.length; i += 1) { + const { miner, payoutOutputScript } = knownMiners[i]; + assert.strictEqual( + getMinerFromOutputScript(payoutOutputScript), + miner, + ); + } + }); + it(`getMinerFromOutputScript returns 'unknown' if outputScript is not recognized`, function () { + assert.strictEqual( + getMinerFromOutputScript('notRecognized'), + 'unknown', + ); + }); + it('getMinerFromCoinbaseTx parses all miner test blocks', function () { + for (let i = 0; i < config.knownMiners.length; i += 1) { + const { testBlocks, payoutOutputScript } = config.knownMiners[i]; + // Iterate over testBlocks + for (let j = 0; j < testBlocks.length; j += 1) { + // Build mock coinbase txs + const thisCoinbaseTx = { + inputs: [{ inputScript: testBlocks[j].coinbaseHex }], + outputs: [{ outputScript: payoutOutputScript }], + }; + assert.strictEqual( + getMinerFromCoinbaseTx(thisCoinbaseTx), + testBlocks[j].parsed, + ); + } + } + }); }); diff --git a/apps/ecash-herald/test/utilsTests.js b/apps/ecash-herald/test/utilsTests.js --- a/apps/ecash-herald/test/utilsTests.js +++ b/apps/ecash-herald/test/utilsTests.js @@ -14,6 +14,7 @@ formatPrice, jsonReplacer, jsonReviver, + getOutputScriptFromAddress, } = require('../src/utils'); const { addressPreviews } = require('./mocks/templates'); @@ -218,4 +219,19 @@ assert.deepEqual({ map, set }, roundTrip); }); + // getOutputScriptFromAddress + it('getOutputScriptFromAddress returns expected outputScript of a p2pkh address', async function () { + assert.strictEqual( + getOutputScriptFromAddress( + 'ecash:qz2708636snqhsxu8wnlka78h6fdp77ar59jrf5035', + ), + `76a91495e79f51d4260bc0dc3ba7fb77c7be92d0fbdd1d88ac`, + ); + }); + it('getOutputScriptFromAddress returns expected outputScript of the IFP address (p2sh)', async function () { + assert.strictEqual( + getOutputScriptFromAddress(config.ifpAddress), + `a914d37c4c809fe9840e7bfa77b86bd47163f6fb6c6087`, + ); + }); });