cns 0.5.9 → 0.6.0

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: 374fe58e3d0340472364544853063dc3c353581c911f9576df0606ad687ec6bb
4
- data.tar.gz: 6ebae187a6ed45b4dc785135a587ca0ca3807fbff7ec59068f2b2c7213009cde
3
+ metadata.gz: 560dab16530bbcb5c17b1a0818eb6d709741c8c2ef9a46c0db7fe26408b99c76
4
+ data.tar.gz: c756d10aa56e094b0011be04564df3e46cd13e6a632a1c9f3f541c230a5f0397
5
5
  SHA512:
6
- metadata.gz: 90152a2f356e67dcd4827cd781f8f269a4dcadac41ae06085bf88cc061142f4aed07a2dfeeccf783960e011baf29ffe420b240a7541e74e57a6797600767e0da
7
- data.tar.gz: 62eb674cb6febb1d313d7bd7c0f5c1ef64a2879ba4631f971dac28baa83d63490e7f8bc021bcf3923916e4f816d38e4d37f8e54baa93bd2097cb85ff3c9f67f5
6
+ metadata.gz: e6f7f0b5b041d410fb91f5b69fbcf945cda1d39b213d92990df15847644425dd5ad71a57dafeda64cd20ddf2c72c328b8f2562c683841e430529b6560a6ced2a
7
+ data.tar.gz: bc3f09e26239e4d72190ea29c8c0f6416656af29b3045d6b25889fcf0b20ac0a6fa7b22a8c9c01d31f43862dc48a27f38ee0d904d7fff29df6ef25432e5656cf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cns (0.5.9)
4
+ cns (0.6.0)
5
5
  curb
6
6
  faraday
7
7
  google-cloud-bigquery
data/lib/cns/bigquery.rb CHANGED
@@ -44,7 +44,7 @@ module Cns
44
44
  # mostra situacao completa entre kraken/etherscan & bigquery
45
45
  def mostra_skrk
46
46
  apius.mostra_resumo
47
- apies.mostra_resumo
47
+ apies.mostra_resumo_simples
48
48
  end
49
49
 
50
50
  # mostra situacao completa entre etherscan & bigquery
data/lib/cns/etherscan.rb CHANGED
@@ -142,7 +142,7 @@ module Cns
142
142
  # elimina transferencia from: (lax) to: (add) - esta transferencia aparece em from: (add) to: (lax)
143
143
  # .delete_if { |odl| add.casecmp?(odl[:to]) && lax.include?(odl[:from].downcase) }
144
144
  # elimina chaves irrelevantes (DL) & adiciona chave indice itx & adiciona identificador da carteira iax
145
- ary.map { |omp| omp.delete_if { |key, _| DL.include?(key) }.merge(itx: String(omp[:hash]), iax: add) }
145
+ ary.map { |omp| omp.delete_if { |key, _| DL.include?(key) }.merge(itx: String(omp[:hash]), iax: add, srx: Integer(omp[:timeStamp])) }
146
146
  end
147
147
 
148
148
  # @param add (see Apibc#norml_es)
@@ -153,14 +153,15 @@ module Cns
153
153
  ary.map { |omp| omp.merge(itx: Integer(omp[:blockNumber]), iax: add) }
154
154
  end
155
155
 
156
+ #dt: Time.at(Integer(htx[:timeStamp])),
156
157
  # @return [Array<Hash>] lista ordenada transacoes normais novas
157
158
  def sortx
158
- novtx.sort { |ant, prx| ant[:itx] <=> prx[:itx] }
159
+ novtx.sort { |ant, prx| ant[:srx] <=> prx[:srx] }
159
160
  end
160
161
 
161
162
  # @return [Array<Hash>] lista ordenada transacoes internas novas
162
163
  def sorix
163
- novix.sort { |ant, prx| ant[:itx] <=> prx[:itx] }
164
+ novix.sort { |ant, prx| ant[:srx] <=> prx[:srx] }
164
165
  end
165
166
 
166
167
  # @return [Array<Hash>] lista ordenada transacoes block novas
@@ -175,12 +176,7 @@ module Cns
175
176
 
176
177
  # @return [Array<Hash>] lista ordenada transacoes token novas
177
178
  def sorkx
178
- novkx.sort { |ant, prx| ant[:itx] <=> prx[:itx] }
179
- end
180
-
181
- # @return [Array<Hash>] lista ordenada transacoes (normais & token) novas
182
- def sorax
183
- (novtx + novkx).sort { |ant, prx| ant[:itx] <=> prx[:itx] }
179
+ novkx.sort { |ant, prx| ant[:srx] <=> prx[:srx] }
184
180
  end
185
181
 
186
182
  # @return [String] texto carteiras & transacoes & ajuste dias
@@ -413,9 +409,8 @@ module Cns
413
409
 
414
410
  # @return [String] texto configuracao ajuste dias das transacoes (normais & token)
415
411
  def mostra_configuracao_ajuste_dias
416
- return unless (novtx.count + novkx.count).positive?
417
-
418
- puts("\nstring ajuste dias\n-h=#{sorax.map { |obj| "#{obj[:blockNumber]}:0" }.join(' ')}")
412
+ puts("\nstring ajuste dias transacoes normais\n-h=#{sortx.map { |obj| "#{obj[:blockNumber]}:0" }.join(' ')}") if novtx.count.positive?
413
+ puts("\nstring ajuste dias transacoes token \n-h=#{sorkx.map { |obj| "#{obj[:blockNumber]}:0" }.join(' ')}") if novkx.count.positive?
419
414
  end
420
415
  end
421
416
  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.5.9'
4
+ VERSION = '0.6.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cns
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.9
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hernâni Rodrigues Vaz
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-02-01 00:00:00.000000000 Z
11
+ date: 2025-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler