cns 0.8.5 → 0.8.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f7ae1ef8366ed9cf561233f61e42435ab6d5b7202c64936310d057f99689138
4
- data.tar.gz: 29610ef7729632d29c3d97aeccc1732cac387265de5536327734d5f4af54a265
3
+ metadata.gz: f4fb8ef5137e35f64fabed9a151d6547d12f21487e602c91404ba5eedcd88a34
4
+ data.tar.gz: 037a388cdcd7652fa803d76131ba1e7076b2a0983c74f835484005791c3a1fc3
5
5
  SHA512:
6
- metadata.gz: 5c28857d6b4fe429e9f8f9eb6ddfdca805343c6f5347b40624a6ea03a687bd9b90d4c257c1d7434629d404df6914f9dfa6c62883babb843cc74842643cd7d39e
7
- data.tar.gz: b3a334a6580af627911d51037bad7065af7129239fd2ccbaf45750cba7f8c7a57b48ab28f4605a00ac9b5bbadb304a9f80e6af1519ad7d0c677d6acafb153bc3
6
+ metadata.gz: bd36261022378f795e64bc814434879b9f99cd7f7c3ff974a719aa0aed0d40bc16a341fcd11038f49c0e1056ea298acb21bca79644dcff7251eb27d69b4b6118
7
+ data.tar.gz: b6c078fcfb4e878f6058b785051ba702d8e49afc150767f7a99412d4d9202890e98cd3f3f3896afd11d80d2dc083e94fb220e1ff7a25fd261c8a1c781884abf2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cns (0.8.5)
4
+ cns (0.8.6)
5
5
  curb
6
6
  faraday
7
7
  google-cloud-bigquery
data/lib/cns/bigquery.rb CHANGED
@@ -8,9 +8,9 @@ module Cns
8
8
  BD = 'hernanirvaz.coins'
9
9
  FO = File.expand_path("~/#{File.basename($PROGRAM_NAME)}.log")
10
10
  TB = {
11
- i: %w[blocknumber timestamp txhash axfrom axto iax value contractaddress input type gas gasused traceid iserror errcode],
12
- p: %w[blocknumber timestamp blockreward iax],
13
- w: %w[withdrawalindex validatorindex address amount blocknumber timestamp],
11
+ i: %w[blocknumber timestamp txhash axfrom axto iax value contractaddress input type gas gasused traceid iserror errcode dias],
12
+ p: %w[blocknumber timestamp blockreward iax dias],
13
+ w: %w[withdrawalindex validatorindex address amount blocknumber timestamp dias],
14
14
  t: %w[blocknumber timestamp txhash nonce blockhash transactionindex axfrom axto iax value gas gasprice gasused iserror txreceipt_status input contractaddress dias],
15
15
  k: %w[blocknumber timestamp txhash nonce blockhash transactionindex axfrom axto iax value tokenname tokensymbol tokendecimal gas gasprice gasused input contractaddress dias],
16
16
  neost: %w[gseq aseq bnum time contract action acfrom acto iax amount moeda memo dias],
@@ -236,19 +236,19 @@ module Cns
236
236
  end
237
237
 
238
238
  # SQL value formatting methods with improved safety
239
- def quote(value)
239
+ def fqt(value)
240
240
  return 'null' if value.nil? || value.empty?
241
241
 
242
242
  "'#{value}'"
243
243
  end
244
244
 
245
- def numeric(value)
245
+ def fnm(value)
246
246
  return 'null' if value.nil?
247
247
 
248
248
  "CAST('#{value}' AS NUMERIC)"
249
249
  end
250
250
 
251
- def integer(value)
251
+ def fin(value)
252
252
  return '0' if value.nil?
253
253
 
254
254
  Integer(value).to_s
@@ -256,11 +256,11 @@ module Cns
256
256
  'null'
257
257
  end
258
258
 
259
- def ptime(sec)
259
+ def ftm(sec)
260
260
  "PARSE_DATETIME('%s', '#{String(sec.round)}')"
261
261
  end
262
262
 
263
- def ptimestamp(value)
263
+ def fts(value)
264
264
  "DATETIME(TIMESTAMP('#{value}'))"
265
265
  end
266
266
 
@@ -268,24 +268,24 @@ module Cns
268
268
  # @return [String] valores formatados netht (norml parte1)
269
269
  def netht_val(htx)
270
270
  "(#{[
271
- integer(htx[:blockNumber]),
272
- integer(htx[:timeStamp]),
273
- quote(htx[:hash]),
274
- integer(htx[:nonce]),
275
- quote(htx[:blockHash]),
276
- integer(htx[:transactionIndex]),
277
- quote(htx[:from]),
278
- quote(htx[:to]),
279
- quote(htx[:iax]),
280
- numeric(htx[:value]),
281
- numeric(htx[:gas]),
282
- numeric(htx[:gasPrice]),
283
- numeric(htx[:gasUsed]),
284
- integer(htx[:isError]),
285
- integer(htx[:txreceipt_status]),
286
- quote(htx[:input]),
287
- quote(htx[:contractAddress]),
288
- integer(ops.dig(:h, htx[:blockNumber]))
271
+ fin(htx[:blockNumber]),
272
+ fin(htx[:timeStamp]),
273
+ fqt(htx[:hash]),
274
+ fin(htx[:nonce]),
275
+ fqt(htx[:blockHash]),
276
+ fin(htx[:transactionIndex]),
277
+ fqt(htx[:from]),
278
+ fqt(htx[:to]),
279
+ fqt(htx[:iax]),
280
+ fnm(htx[:value]),
281
+ fnm(htx[:gas]),
282
+ fnm(htx[:gasPrice]),
283
+ fnm(htx[:gasUsed]),
284
+ fin(htx[:isError]),
285
+ fin(htx[:txreceipt_status]),
286
+ fqt(htx[:input]),
287
+ fqt(htx[:contractAddress]),
288
+ fin(ops.dig(:h, htx[:hash]))
289
289
  ].join(',')})"
290
290
  end
291
291
 
@@ -293,40 +293,42 @@ module Cns
293
293
  # @return [String] valores formatados nethi (internas parte1)
294
294
  def nethi_val(htx)
295
295
  "(#{[
296
- integer(htx[:blockNumber]),
297
- integer(htx[:timeStamp]),
298
- quote(htx[:hash]),
299
- quote(htx[:from]),
300
- quote(htx[:to]),
301
- quote(htx[:iax]),
302
- numeric(htx[:value]),
303
- quote(htx[:contractAddress]),
304
- quote(htx[:input]),
305
- quote(htx[:type]),
306
- numeric(htx[:gas]),
307
- numeric(htx[:gasUsed]),
308
- quote(htx[:traceId]),
309
- integer(htx[:isError]),
310
- integer(htx[:errCode])
296
+ fin(htx[:blockNumber]),
297
+ fin(htx[:timeStamp]),
298
+ fqt(htx[:hash]),
299
+ fqt(htx[:from]),
300
+ fqt(htx[:to]),
301
+ fqt(htx[:iax]),
302
+ fnm(htx[:value]),
303
+ fqt(htx[:contractAddress]),
304
+ fqt(htx[:input]),
305
+ fqt(htx[:type]),
306
+ fnm(htx[:gas]),
307
+ fnm(htx[:gasUsed]),
308
+ fqt(htx[:traceId]),
309
+ fin(htx[:isError]),
310
+ fin(htx[:errCode]),
311
+ fin(ops.dig(:h, htx[:hash]))
311
312
  ].join(',')})"
312
313
  end
313
314
 
314
315
  # @param [Hash] htx transacao block etherscan
315
316
  # @return [String] valores formatados nethi (block parte1)
316
317
  def nethp_val(htx)
317
- "(#{[integer(htx[:blockNumber]), integer(htx[:timeStamp]), numeric(htx[:blockReward]), quote(htx[:iax])].join(',')})"
318
+ "(#{[fin(htx[:blockNumber]), fin(htx[:timeStamp]), fnm(htx[:blockReward]), fqt(htx[:iax]), fin(ops.dig(:h, htx[:blockNumber]))].join(',')})"
318
319
  end
319
320
 
320
321
  # @param [Hash] htx transacao withdrawals etherscan
321
322
  # @return [String] valores formatados nethi (withdrawals parte1)
322
323
  def nethw_val(htx)
323
324
  "(#{[
324
- integer(htx[:withdrawalIndex]),
325
- integer(htx[:validatorIndex]),
326
- quote(htx[:address]),
327
- numeric(htx[:amount]),
328
- integer(htx[:blockNumber]),
329
- integer(htx[:timestamp])
325
+ fin(htx[:withdrawalIndex]),
326
+ fin(htx[:validatorIndex]),
327
+ fqt(htx[:address]),
328
+ fnm(htx[:amount]),
329
+ fin(htx[:blockNumber]),
330
+ fin(htx[:timestamp]),
331
+ fin(ops.dig(:h, htx[:withdrawalIndex]))
330
332
  ].join(',')})"
331
333
  end
332
334
 
@@ -334,25 +336,25 @@ module Cns
334
336
  # @return [String] valores formatados nethk (token parte1)
335
337
  def nethk_val(htx)
336
338
  "(#{[
337
- integer(htx[:blockNumber]),
338
- integer(htx[:timeStamp]),
339
- quote(htx[:hash]),
340
- integer(htx[:nonce]),
341
- quote(htx[:blockHash]),
342
- integer(htx[:transactionIndex]),
343
- quote(htx[:from]),
344
- quote(htx[:to]),
345
- quote(htx[:iax]),
346
- numeric(htx[:value]),
347
- quote(htx[:tokenName]),
348
- quote(htx[:tokenSymbol]),
349
- integer(htx[:tokenDecimal]),
350
- numeric(htx[:gas]),
351
- numeric(htx[:gasPrice]),
352
- numeric(htx[:gasUsed]),
353
- quote(htx[:input]),
354
- quote(htx[:contractAddress]),
355
- integer(ops.dig(:h, htx[:blockNumber]))
339
+ fin(htx[:blockNumber]),
340
+ fin(htx[:timeStamp]),
341
+ fqt(htx[:hash]),
342
+ fin(htx[:nonce]),
343
+ fqt(htx[:blockHash]),
344
+ fin(htx[:transactionIndex]),
345
+ fqt(htx[:from]),
346
+ fqt(htx[:to]),
347
+ fqt(htx[:iax]),
348
+ fnm(htx[:value]),
349
+ fqt(htx[:tokenName]),
350
+ fqt(htx[:tokenSymbol]),
351
+ fin(htx[:tokenDecimal]),
352
+ fnm(htx[:gas]),
353
+ fnm(htx[:gasPrice]),
354
+ fnm(htx[:gasUsed]),
355
+ fqt(htx[:input]),
356
+ fqt(htx[:contractAddress]),
357
+ fin(ops.dig(:h, htx[:hash]))
356
358
  ].join(',')})"
357
359
  end
358
360
 
@@ -365,19 +367,19 @@ module Cns
365
367
  qtd = dat[:quantity].to_s
366
368
  str = dat[:memo].inspect
367
369
  "(#{[
368
- integer(htx[:global_action_seq]),
369
- integer(htx[:account_action_seq]),
370
- integer(htx[:block_num]),
371
- ptimestamp(htx[:block_time]),
372
- quote(act[:account]),
373
- quote(act[:name]),
374
- quote(dat[:from]),
375
- quote(dat[:to]),
376
- quote(htx[:iax]),
370
+ fin(htx[:global_action_seq]),
371
+ fin(htx[:account_action_seq]),
372
+ fin(htx[:block_num]),
373
+ fts(htx[:block_time]),
374
+ fqt(act[:account]),
375
+ fqt(act[:name]),
376
+ fqt(dat[:from]),
377
+ fqt(dat[:to]),
378
+ fqt(htx[:iax]),
377
379
  qtd.to_d,
378
- quote(qtd[/[[:upper:]]+/]),
379
- quote(str),
380
- integer(ops.dig(:h, htx[:itx]))
380
+ fqt(qtd[/[[:upper:]]+/]),
381
+ fqt(str),
382
+ fin(ops.dig(:h, htx[:itx]))
381
383
  ].join(',')})"
382
384
  end
383
385
 
@@ -385,14 +387,14 @@ module Cns
385
387
  # @return [String] valores formatados det (trades parte1)
386
388
  def cdet_val(htx)
387
389
  "(#{[
388
- quote(htx[:trade_id]),
389
- ptimestamp(htx[:successfully_finished_at]),
390
- quote(htx[:type]),
391
- quote(htx[:trading_partner_information][:username]),
392
- numeric(htx[:type] == 'buy' ? htx[:amount_currency_to_trade_after_fee] : "-#{htx[:amount_currency_to_trade]}"),
393
- numeric(htx[:volume_currency_to_pay_after_fee]),
394
- ptimestamp(htx[:trade_marked_as_paid_at]),
395
- integer(ops.dig(:h, htx[:trade_id]))
390
+ fqt(htx[:trade_id]),
391
+ fts(htx[:successfully_finished_at]),
392
+ fqt(htx[:type]),
393
+ fqt(htx[:trading_partner_information][:username]),
394
+ fnm(htx[:type] == 'buy' ? htx[:amount_currency_to_trade_after_fee] : "-#{htx[:amount_currency_to_trade]}"),
395
+ fnm(htx[:volume_currency_to_pay_after_fee]),
396
+ fts(htx[:trade_marked_as_paid_at]),
397
+ fin(ops.dig(:h, htx[:trade_id]))
396
398
  ].join(',')})"
397
399
  end
398
400
 
@@ -402,13 +404,13 @@ module Cns
402
404
  tip = htx[:tp]
403
405
  qtd = htx[:qt]
404
406
  "(#{[
405
- integer(htx[:txid]),
406
- ptimestamp(htx[:time].iso8601),
407
- quote(tip),
408
- quote(htx[:add]),
409
- quote(htx[:moe]),
410
- numeric(tip == 'withdrawal' ? "-#{qtd}" : qtd),
411
- numeric(htx[:fee])
407
+ fin(htx[:txid]),
408
+ fts(htx[:time].iso8601),
409
+ fqt(tip),
410
+ fqt(htx[:add]),
411
+ fqt(htx[:moe]),
412
+ fnm(tip == 'withdrawal' ? "-#{qtd}" : qtd),
413
+ fnm(htx[:fee])
412
414
  ].join(',')})"
413
415
  end
414
416
 
@@ -417,20 +419,20 @@ module Cns
417
419
  # @return [String] valores formatados ust (trades parte1)
418
420
  def cust_val(idx, htx)
419
421
  "(#{[
420
- quote(idx),
421
- quote(htx[:ordertxid]),
422
- quote(htx[:pair]),
423
- ptime(htx[:time]),
424
- quote(htx[:type]),
425
- quote(htx[:ordertype]),
426
- numeric(htx[:price]),
427
- numeric(htx[:cost]),
428
- numeric(htx[:fee]),
429
- numeric(htx[:vol]),
430
- numeric(htx[:margin]),
431
- quote(htx[:misc]),
432
- quote(apius.novcusl.select { |_, obj| obj[:refid] == idx.to_s }.keys.join(',')),
433
- integer(ops.dig(:h, idx))
422
+ fqt(idx),
423
+ fqt(htx[:ordertxid]),
424
+ fqt(htx[:pair]),
425
+ ftm(htx[:time]),
426
+ fqt(htx[:type]),
427
+ fqt(htx[:ordertype]),
428
+ fnm(htx[:price]),
429
+ fnm(htx[:cost]),
430
+ fnm(htx[:fee]),
431
+ fnm(htx[:vol]),
432
+ fnm(htx[:margin]),
433
+ fqt(htx[:misc]),
434
+ fqt(apius.novcusl.select { |_, obj| obj[:refid] == idx.to_s }.keys.join(',')),
435
+ fin(ops.dig(:h, idx))
434
436
  ].join(',')})"
435
437
  end
436
438
 
@@ -438,7 +440,7 @@ module Cns
438
440
  # @param [Hash] hlx ledger kraken
439
441
  # @return [String] valores formatados usl (ledger)
440
442
  def cusl_val(idx, hlx)
441
- "(#{[quote(idx), quote(hlx[:refid]), ptime(hlx[:time]), quote(hlx[:type]), quote(hlx[:aclass]), quote(hlx[:asset]), numeric(hlx[:amount]), numeric(hlx[:fee])].join(',')})"
443
+ "(#{[fqt(idx), fqt(hlx[:refid]), ftm(hlx[:time]), fqt(hlx[:type]), fqt(hlx[:aclass]), fqt(hlx[:asset]), fnm(hlx[:amount]), fnm(hlx[:fee])].join(',')})"
442
444
  end
443
445
  end
444
446
  end
data/lib/cns/etherscan.rb CHANGED
@@ -193,11 +193,11 @@ module Cns
193
193
 
194
194
  puts("\nid address etherscan bigquery")
195
195
  dados.each { |obj| puts(formata_carteira_simples(obj)) }
196
- mostra_transacao_norml
197
- mostra_transacao_inter
198
- mostra_transacao_block
199
- mostra_transacao_token
200
- mostra_transacao_withw
196
+ mostra_tx_norml
197
+ mostra_tx_inter
198
+ mostra_tx_block
199
+ mostra_tx_token
200
+ mostra_tx_withw
201
201
  mostra_configuracao_ajuste_dias
202
202
  end
203
203
 
@@ -207,11 +207,11 @@ module Cns
207
207
 
208
208
  puts("\nid address etherscan tn ti tb tk tw bigquery tn ti tb tk tw")
209
209
  dados.each { |obj| puts(formata_carteira(obj)) }
210
- mostra_transacao_norml
211
- mostra_transacao_inter
212
- mostra_transacao_block
213
- mostra_transacao_token
214
- mostra_transacao_withw
210
+ mostra_tx_norml
211
+ mostra_tx_inter
212
+ mostra_tx_block
213
+ mostra_tx_token
214
+ mostra_tx_withw
215
215
  mostra_configuracao_ajuste_dias
216
216
  end
217
217
 
@@ -297,27 +297,42 @@ module Cns
297
297
  inf = max % 2
298
298
  hid = bqd[:wb].select { |obj| obj[:ax] == add }.first
299
299
  ndd = hid ? "#{hid[:id]}-#{add}" : add
300
- "#{ndd[0, ini - 3]}..#{ndd[-inf - ini - 3..]}"
300
+ "#{ndd[0, ini]}..#{ndd[-inf - ini..]}"
301
301
  end
302
302
 
303
303
  # @example (see Apibc#norml_es)
304
304
  # @param [Hash] htx transacao normal etherscan
305
305
  # @return [String] texto formatado transacao normal etherscan
306
- def formata_transacao_norml(htx)
306
+ def formata_tx_ti(htx)
307
307
  format(
308
- '%<bn>9i %<fr>-20.20s %<to>-20.20s %<dt>10.10s %<vl>17.6f',
309
- bn: htx[:blockNumber],
310
- fr: formata_enderec2(htx[:from], 20),
311
- to: formata_enderec2(htx[:to], 20),
308
+ '%<hx>-29.29s %<fr>-15.15s %<to>-15.15s %<dt>10.10s %<vl>7.3f',
309
+ hx: formata_enderec1(htx[:hash], 29),
310
+ fr: formata_enderec2(htx[:from], 15),
311
+ to: formata_enderec2(htx[:to], 15),
312
312
  dt: Time.at(Integer(htx[:timeStamp])),
313
313
  vl: (htx[:value].to_d / (10**18)).round(10)
314
314
  )
315
315
  end
316
316
 
317
+ # @example (see Apibc#token_es)
318
+ # @param [Hash] hkx transacao token etherscan
319
+ # @return [String] texto formatado transacao token etherscan
320
+ def formata_tx_token(hkx)
321
+ format(
322
+ '%<hx>-23.23s %<fr>-15.15s %<to>-15.15s %<dt>10.10s %<vl>7.3f %<sy>-5.5s',
323
+ hx: formata_enderec1(hkx[:hash], 23),
324
+ fr: formata_enderec2(hkx[:from], 15),
325
+ to: formata_enderec2(hkx[:to], 15),
326
+ dt: Time.at(Integer(hkx[:timeStamp])),
327
+ vl: (hkx[:value].to_d / (10**18)).round(10),
328
+ sy: hkx[:tokenSymbol]
329
+ )
330
+ end
331
+
317
332
  # @example (see Apibc#block_es)
318
333
  # @param [Hash] htx transacao block etherscan
319
334
  # @return [String] texto formatado transacao block etherscan
320
- def formata_transacao_block(htx)
335
+ def formata_tx_block(htx)
321
336
  format(
322
337
  '%<bn>9i %<fr>-41.41s %<dt>10.10s %<vl>17.6f',
323
338
  bn: htx[:blockNumber],
@@ -327,78 +342,66 @@ module Cns
327
342
  )
328
343
  end
329
344
 
330
- # @example (see Apibc#token_es)
331
- # @param [Hash] hkx transacao token etherscan
332
- # @return [String] texto formatado transacao token etherscan
333
- def formata_transacao_token(hkx)
334
- format(
335
- '%<bn>9i %<fr>-20.20s %<to>-20.20s %<dt>10.10s %<vl>11.3f %<sy>-5.5s',
336
- bn: hkx[:blockNumber],
337
- fr: formata_enderec2(hkx[:from], 20),
338
- to: formata_enderec2(hkx[:to], 20),
339
- dt: Time.at(Integer(hkx[:timeStamp])),
340
- vl: (hkx[:value].to_d / (10**18)).round(10),
341
- sy: hkx[:tokenSymbol]
342
- )
343
- end
344
-
345
345
  # @example (see Apibc#block_es)
346
346
  # @param [Hash] htx transacao withdrawals etherscan
347
347
  # @return [String] texto formatado transacao withdrawals etherscan
348
- def formata_transacao_withw(htx)
348
+ def formata_tx_withw(htx)
349
349
  format(
350
- '%<vi>9i %<bn>10i %<dt>10.10s %<vl>10.6f',
351
- vi: htx[:validatorIndex],
350
+ '%<bn>10i %<vi>9i %<dt>10.10s %<vl>10.6f',
352
351
  bn: htx[:withdrawalIndex],
352
+ vi: htx[:validatorIndex],
353
353
  dt: Time.at(Integer(htx[:timestamp])),
354
354
  vl: (htx[:amount].to_d / (10**9)).round(10)
355
355
  )
356
356
  end
357
357
 
358
358
  # @return [String] texto transacoes normais
359
- def mostra_transacao_norml
359
+ def mostra_tx_norml
360
360
  return unless ops[:v] && novnetht.count.positive?
361
361
 
362
- puts("\ntx normal from to data valor")
363
- sortx.each { |obj| puts(formata_transacao_norml(obj)) }
362
+ puts("\ntx normal from to data valor")
363
+ sortx.each { |obj| puts(formata_tx_ti(obj)) }
364
364
  end
365
365
 
366
366
  # @return [String] texto transacoes internas
367
- def mostra_transacao_inter
367
+ def mostra_tx_inter
368
368
  return unless ops[:v] && novnethi.count.positive?
369
369
 
370
- puts("\ntx intern from to data valor")
371
- sorix.each { |obj| puts(formata_transacao_norml(obj)) }
370
+ puts("\ntx intern from to data valor")
371
+ sorix.each { |obj| puts(formata_tx_ti(obj)) }
372
372
  end
373
373
 
374
374
  # @return [String] texto transacoes block
375
- def mostra_transacao_block
375
+ def mostra_tx_block
376
376
  return unless ops[:v] && novnethp.count.positive?
377
377
 
378
378
  puts("\ntx block address data valor")
379
- sorpx.each { |obj| puts(formata_transacao_block(obj)) }
379
+ sorpx.each { |obj| puts(formata_tx_block(obj)) }
380
380
  end
381
381
 
382
382
  # @return [String] texto transacoes token
383
- def mostra_transacao_token
383
+ def mostra_tx_token
384
384
  return unless ops[:v] && novnethk.count.positive?
385
385
 
386
- puts("\ntx token from to data valor")
387
- sorkx.each { |obj| puts(formata_transacao_token(obj)) }
386
+ puts("\ntx token from to data valor moeda")
387
+ sorkx.each { |obj| puts(formata_tx_token(obj)) }
388
388
  end
389
389
 
390
390
  # @return [String] texto transacoes withdrawals
391
- def mostra_transacao_withw
391
+ def mostra_tx_withw
392
392
  return unless ops[:v] && novnethw.count.positive?
393
393
 
394
- puts("\nvalidator withdrawal data valor")
395
- sorwx.each { |obj| puts(formata_transacao_withw(obj)) }
394
+ puts("\nwithdrawal validator data valor")
395
+ sorwx.each { |obj| puts(formata_tx_withw(obj)) }
396
396
  end
397
397
 
398
398
  # @return [String] texto configuracao ajuste dias das transacoes (normais & token)
399
399
  def mostra_configuracao_ajuste_dias
400
- puts("\nstring ajuste dias transacoes normais\n-h=#{sortx.map { |obj| "#{obj[:blockNumber]}:0" }.join(' ')}") if novnetht.count.positive?
401
- puts("\nstring ajuste dias transacoes token \n-h=#{sorkx.map { |obj| "#{obj[:blockNumber]}:0" }.join(' ')}") if novnethk.count.positive?
400
+ puts("\najuste dias transacoes normais \n-h=#{sortx.map { |obj| "#{obj[:hash]}:0" }.join(' ')}") if novnetht.count.positive?
401
+ puts("\najuste dias transacoes internas \n-h=#{sorix.map { |obj| "#{obj[:hash]}:0" }.join(' ')}") if novnethi.count.positive?
402
+ puts("\najuste dias transacoes block \n-h=#{sorpx.map { |obj| "#{obj[:blockNumber]}:0" }.join(' ')}") if novnethp.count.positive?
403
+ puts("\najuste dias transacoes withdrawals\n-h=#{sorwx.map { |obj| "#{obj[:withdrawalIndex]}:0" }.join(' ')}") if novnethw.count.positive?
404
+ puts("\najuste dias transacoes token \n-h=#{sorkx.map { |obj| "#{obj[:hash]}:0" }.join(' ')}") if novnethk.count.positive?
402
405
  end
403
406
  end
404
407
  end
data/lib/cns/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cns
4
- VERSION = '0.8.5'
4
+ VERSION = '0.8.6'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hernâni Rodrigues Vaz