cns 0.3.9 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/cns/etherscan.rb +6 -6
- data/lib/cns/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 334a8591863fae951394257a0438ee74c93dffcef41a6325bc52af78558db5b7
|
4
|
+
data.tar.gz: 273a4345c1496657d551f401482218d28a827321b42012b175b5fe7228ee0e82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97c85c1c5a964348c13ddc21bbf2c9019b7188cf7e58c486410169957799a9ee6227e1830290fa7e09c4b264edc8e7a1c13ad92caa5c52344f57ef1d17212e63
|
7
|
+
data.tar.gz: e2957ba0cdd37b4c3a6c34296f7a011a10b3e0face33faab6b1884faaab8748d1bbec91d9a5c51fee9b3c8f76e4589565f31dcb447d05e781aeca95f40aa1905
|
data/Gemfile.lock
CHANGED
data/lib/cns/etherscan.rb
CHANGED
@@ -187,7 +187,7 @@ module Cns
|
|
187
187
|
def mostra_resumo
|
188
188
|
return unless dados.count.positive?
|
189
189
|
|
190
|
-
puts("\nid address
|
190
|
+
puts("\nid address etherscan tn ti tb tk tw bigquery tn ti tb tk tw")
|
191
191
|
dados.each { |obj| puts(formata_carteira(obj)) }
|
192
192
|
mostra_transacao_norml
|
193
193
|
mostra_transacao_inter
|
@@ -201,9 +201,9 @@ module Cns
|
|
201
201
|
# @return [String] texto formatado duma carteira
|
202
202
|
def formata_carteira(hjn)
|
203
203
|
format(
|
204
|
-
'%<s1>-6.6s %<s2>-
|
204
|
+
'%<s1>-6.6s %<s2>-10.10s ',
|
205
205
|
s1: hjn[:id],
|
206
|
-
s2: formata_enderec1(hjn[:ax],
|
206
|
+
s2: formata_enderec1(hjn[:ax], 10)
|
207
207
|
) + formata_valores(hjn)
|
208
208
|
end
|
209
209
|
|
@@ -211,7 +211,7 @@ module Cns
|
|
211
211
|
# @return [String] texto formatado valores duma carteira
|
212
212
|
def formata_valores(hjn)
|
213
213
|
format(
|
214
|
-
'%<v1>
|
214
|
+
'%<v1>11.4f %<n1>3i %<n2>2i %<n3>2i %<n4>2i %<w1>3i %<v2>11.4f %<n5>3i %<n6>2i %<n7>2i %<n8>2i %<w2>3i %<ok>-3s',
|
215
215
|
v1: hjn[:es],
|
216
216
|
n1: hjn[:et].count,
|
217
217
|
n2: hjn[:ei].count,
|
@@ -231,7 +231,7 @@ module Cns
|
|
231
231
|
# @param (see formata_carteira)
|
232
232
|
# @return [Boolean] carteira tem transacoes novas(sim=NOK, nao=OK)?
|
233
233
|
def ok?(hjn)
|
234
|
-
hjn[:bs].round(
|
234
|
+
hjn[:bs].round(4) == hjn[:es].round(4) && hjn[:bt].count == hjn[:et].count && hjn[:bi].count == hjn[:ei].count && hjn[:bp].count == hjn[:ep].count && hjn[:bk].count == hjn[:ek].count && hjn[:bw].count == hjn[:ew].count
|
235
235
|
end
|
236
236
|
|
237
237
|
# @example ether address inicio..fim
|
@@ -243,7 +243,7 @@ module Cns
|
|
243
243
|
return 'erro' if max < 7
|
244
244
|
|
245
245
|
max -= 2
|
246
|
-
ini = Integer(max / 2) +
|
246
|
+
ini = Integer(max / 2) + 4
|
247
247
|
inf = max % 2
|
248
248
|
"#{add[0, ini - 3]}..#{add[-inf - ini - 3..]}"
|
249
249
|
end
|
data/lib/cns/version.rb
CHANGED
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.
|
4
|
+
version: 0.4.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: 2023-07-
|
11
|
+
date: 2023-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|