cns 0.7.0 → 0.7.1
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/bigquery.rb +125 -114
- data/lib/cns/etherscan.rb +0 -18
- 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: 61b5bd4279e22a5bc61efb12f3717d805aaefa15d46b4f98ef45a05c052b701e
|
4
|
+
data.tar.gz: 34984d55f0b46e72097d5a589b0f3d2700dd89fc8877ba0c2e38ad55c553fed8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 524fc4c7bd9170238499712ab47c7f994f350421955e6e85af4ba1695992825f491ed201bcc8c9942df3f9aa9c2eb65ab0b50d8156e932239db1ff59ee57117f
|
7
|
+
data.tar.gz: 836882fa7b8e372b62d3399004bd97993cedd74fd7fe8da423ee95b1493de28053beed1ea9405b4382c537ad6950c079ebd974b048f3130ecd8e1453d2fd23b0
|
data/Gemfile.lock
CHANGED
data/lib/cns/bigquery.rb
CHANGED
@@ -81,29 +81,29 @@ module Cns
|
|
81
81
|
|
82
82
|
private
|
83
83
|
|
84
|
-
# insere transacoes blockchain novas nas tabelas
|
84
|
+
# insere transacoes blockchain novas nas tabelas netht (norml), nethi (internas), nethp (block), nethw (withdrawals), nethk (token)
|
85
85
|
#
|
86
86
|
# @return [String] linhas & tabelas afetadas
|
87
87
|
def processa_eth
|
88
88
|
str = "ETH"
|
89
|
-
str += format(" %<n>i
|
90
|
-
str += format(" %<n>i
|
91
|
-
str += format(" %<n>i
|
92
|
-
str += format(" %<n>i
|
93
|
-
str += format(" %<n>i
|
89
|
+
str += format(" %<n>i netht", n: dml(netht_ins)) if apies.novtx.count > 0
|
90
|
+
str += format(" %<n>i nethi", n: dml(nethi_ins)) if apies.novix.count > 0
|
91
|
+
str += format(" %<n>i nethp", n: dml(nethp_ins)) if apies.novpx.count > 0
|
92
|
+
str += format(" %<n>i nethw", n: dml(nethw_ins)) if apies.novwx.count > 0
|
93
|
+
str += format(" %<n>i nethk", n: dml(nethk_ins)) if apies.novkx.count > 0
|
94
94
|
str
|
95
95
|
end
|
96
96
|
|
97
|
-
# insere transacoes blockchain novas nas tabelas
|
97
|
+
# insere transacoes blockchain novas nas tabelas netht (norml), nethi (internas), nethp (block), nethw (withdrawals), nethk (token)
|
98
98
|
#
|
99
99
|
# @return [String] linhas & tabelas afetadas
|
100
100
|
def processa_ethc
|
101
101
|
str = "ETH"
|
102
|
-
str += format(" %<n>i
|
103
|
-
str += format(" %<n>i
|
104
|
-
str += format(" %<n>i
|
105
|
-
str += format(" %<n>i
|
106
|
-
str += format(" %<n>i
|
102
|
+
str += format(" %<n>i netht", n: dml(netbt_ins)) if apiesc.novtx.count > 0
|
103
|
+
str += format(" %<n>i nethi", n: dml(netbi_ins)) if apiesc.novix.count > 0
|
104
|
+
str += format(" %<n>i nethp", n: dml(netbp_ins)) if apiesc.novpx.count > 0
|
105
|
+
str += format(" %<n>i nethw", n: dml(netbw_ins)) if apiesc.novwx.count > 0
|
106
|
+
str += format(" %<n>i nethk", n: dml(netbk_ins)) if apiesc.novkx.count > 0
|
107
107
|
str
|
108
108
|
end
|
109
109
|
|
@@ -169,12 +169,12 @@ module Cns
|
|
169
169
|
def apies
|
170
170
|
@apies ||= Etherscan.new(
|
171
171
|
{
|
172
|
-
wb: sql("select * from #{BD}.
|
173
|
-
|
174
|
-
|
175
|
-
np: sql("select * from #{BD}.
|
176
|
-
|
177
|
-
|
172
|
+
wb: sql("select * from #{BD}.weth order by 2"),
|
173
|
+
ni: sql("select * from #{BD}.netai"),
|
174
|
+
nk: sql("select * from #{BD}.netak"),
|
175
|
+
np: sql("select * from #{BD}.netap"),
|
176
|
+
nt: sql("select * from #{BD}.netat"),
|
177
|
+
nw: sql("select * from #{BD}.netaw")
|
178
178
|
},
|
179
179
|
ops
|
180
180
|
)
|
@@ -184,12 +184,12 @@ module Cns
|
|
184
184
|
def apiesc
|
185
185
|
@apies ||= Etherscan.new(
|
186
186
|
{
|
187
|
-
wb: sql("select * from #{BD}.
|
188
|
-
|
189
|
-
|
190
|
-
np: sql("select * from #{BD}.
|
191
|
-
|
192
|
-
|
187
|
+
wb: sql("select * from #{BD}.wetc order by 2"),
|
188
|
+
ni: sql("select * from #{BD}.netbi"),
|
189
|
+
nk: sql("select * from #{BD}.netbk"),
|
190
|
+
np: sql("select * from #{BD}.netbp"),
|
191
|
+
nt: sql("select * from #{BD}.netbt"),
|
192
|
+
nw: sql("select * from #{BD}.netbw")
|
193
193
|
},
|
194
194
|
ops
|
195
195
|
)
|
@@ -199,8 +199,8 @@ module Cns
|
|
199
199
|
def apigm
|
200
200
|
@apigm ||= Greymass.new(
|
201
201
|
{
|
202
|
-
wb: sql("select * from #{BD}.
|
203
|
-
nt: sql("select * from #{BD}.
|
202
|
+
wb: sql("select * from #{BD}.weos order by 2"),
|
203
|
+
nt: sql("select * from #{BD}.neosx")
|
204
204
|
},
|
205
205
|
ops
|
206
206
|
)
|
@@ -210,10 +210,9 @@ module Cns
|
|
210
210
|
def apius
|
211
211
|
@apius ||= Kraken.new(
|
212
212
|
{
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
nl: sql("select * from #{BD}.usl order by time,txid")
|
213
|
+
sl: sql("select * from #{BD}.cuss")[0],
|
214
|
+
nt: sql("select * from #{BD}.cust order by time,txid"),
|
215
|
+
nl: sql("select * from #{BD}.cusl order by time,txid")
|
217
216
|
},
|
218
217
|
ops
|
219
218
|
)
|
@@ -223,112 +222,124 @@ module Cns
|
|
223
222
|
def apide
|
224
223
|
@apide ||= Bitcoinde.new(
|
225
224
|
{
|
226
|
-
sl: sql("select * from #{BD}.
|
227
|
-
nt: sql("select * from #{BD}.
|
228
|
-
nl: sql("select * from #{BD}.
|
225
|
+
sl: sql("select * from #{BD}.cdes")[0],
|
226
|
+
nt: sql("select * from #{BD}.cdet order by time,txid"),
|
227
|
+
nl: sql("select * from #{BD}.cdel order by time,txid")
|
229
228
|
},
|
230
229
|
ops
|
231
230
|
)
|
232
231
|
end
|
233
232
|
|
234
|
-
# @return [String] comando insert SQL formatado
|
235
|
-
def
|
236
|
-
"insert #{BD}.
|
237
|
-
'value,gas,gasprice,gasused,iserror,txreceipt_status,input,contractaddress,dias'
|
238
|
-
") VALUES#{apies.novtx.map { |obj| etht_1val(obj) }.join(',')}"
|
233
|
+
# @return [String] comando insert SQL formatado netht (norml)
|
234
|
+
def bnetht_ins
|
235
|
+
"insert #{BD}.netht(blocknumber,timestamp,txhash,nonce,blockhash,transactionindex,axfrom,axto,iax," \
|
236
|
+
'value,gas,gasprice,gasused,iserror,txreceipt_status,input,contractaddress,dias) VALUES'
|
239
237
|
end
|
240
238
|
|
241
|
-
# @return [String] comando insert SQL formatado
|
242
|
-
def
|
243
|
-
"insert #{BD}.
|
244
|
-
'value,contractaddress,input,type,gas,gasused,traceid,iserror,errcode'
|
245
|
-
") VALUES#{apies.novix.map { |obj| ethi_1val(obj) }.join(',')}"
|
239
|
+
# @return [String] comando insert SQL formatado nethi (internas)
|
240
|
+
def bnethi_ins
|
241
|
+
"insert #{BD}.nethi(blocknumber,timestamp,txhash,axfrom,axto,iax," \
|
242
|
+
'value,contractaddress,input,type,gas,gasused,traceid,iserror,errcode) VALUES'
|
246
243
|
end
|
247
244
|
|
248
|
-
# @return [String] comando insert SQL formatado
|
249
|
-
def
|
250
|
-
"insert #{BD}.
|
251
|
-
") VALUES#{apies.novpx.map { |obj| ethp_1val(obj) }.join(',')}"
|
245
|
+
# @return [String] comando insert SQL formatado nethp (block)
|
246
|
+
def bnethp_ins
|
247
|
+
"insert #{BD}.nethp(blocknumber,timestamp,blockreward,iax) VALUES"
|
252
248
|
end
|
253
249
|
|
254
|
-
# @return [String] comando insert SQL formatado
|
255
|
-
def
|
256
|
-
"insert #{BD}.
|
257
|
-
") VALUES#{apies.novwx.map { |obj| ethw_1val(obj) }.join(',')}"
|
250
|
+
# @return [String] comando insert SQL formatado nethw (withdrawals)
|
251
|
+
def bnethw_ins
|
252
|
+
"insert #{BD}.nethw(withdrawalindex,validatorindex,address,amount,blocknumber,timestamp) VALUES"
|
258
253
|
end
|
259
254
|
|
260
|
-
# @return [String] comando insert SQL formatado
|
261
|
-
def
|
262
|
-
"insert #{BD}.
|
263
|
-
'value,tokenname,tokensymbol,tokendecimal,gas,gasprice,gasused,input,contractaddress,dias'
|
264
|
-
") VALUES#{apies.novkx.map { |obj| ethk_1val(obj) }.join(',')}"
|
255
|
+
# @return [String] comando insert SQL formatado nethk (token)
|
256
|
+
def bnethk_ins
|
257
|
+
"insert #{BD}.nethk(blocknumber,timestamp,txhash,nonce,blockhash,transactionindex,axfrom,axto,iax," \
|
258
|
+
'value,tokenname,tokensymbol,tokendecimal,gas,gasprice,gasused,input,contractaddress,dias) VALUES'
|
265
259
|
end
|
266
260
|
|
267
|
-
# @return [String] comando insert SQL formatado
|
268
|
-
def
|
269
|
-
"
|
270
|
-
'value,gas,gasprice,gasused,iserror,txreceipt_status,input,contractaddress,dias' \
|
271
|
-
") VALUES#{apiesc.novtx.map { |obj| etht_1val(obj) }.join(',')}"
|
261
|
+
# @return [String] comando insert SQL formatado netht (norml)
|
262
|
+
def netht_ins
|
263
|
+
"#{bnetht_ins}#{apies.novtx.map { |obj| netht_1val(obj) }.join(',')}"
|
272
264
|
end
|
273
265
|
|
274
|
-
# @return [String] comando insert SQL formatado
|
275
|
-
def
|
276
|
-
"
|
277
|
-
'value,contractaddress,input,type,gas,gasused,traceid,iserror,errcode' \
|
278
|
-
") VALUES#{apiesc.novix.map { |obj| ethi_1val(obj) }.join(',')}"
|
266
|
+
# @return [String] comando insert SQL formatado nethi (internas)
|
267
|
+
def nethi_ins
|
268
|
+
"#{bnethi_ins}#{apies.novix.map { |obj| nethi_1val(obj) }.join(',')}"
|
279
269
|
end
|
280
270
|
|
281
|
-
# @return [String] comando insert SQL formatado
|
282
|
-
def
|
283
|
-
"
|
284
|
-
") VALUES#{apiesc.novpx.map { |obj| ethp_1val(obj) }.join(',')}"
|
271
|
+
# @return [String] comando insert SQL formatado nethp (block)
|
272
|
+
def nethp_ins
|
273
|
+
"#{bnethp_ins}#{apies.novpx.map { |obj| nethp_1val(obj) }.join(',')}"
|
285
274
|
end
|
286
275
|
|
287
|
-
# @return [String] comando insert SQL formatado
|
288
|
-
def
|
289
|
-
"
|
290
|
-
") VALUES#{apiesc.novwx.map { |obj| ethw_1val(obj) }.join(',')}"
|
276
|
+
# @return [String] comando insert SQL formatado nethw (withdrawals)
|
277
|
+
def nethw_ins
|
278
|
+
"#{bnethw_ins}#{apies.novwx.map { |obj| nethw_1val(obj) }.join(',')}"
|
291
279
|
end
|
292
280
|
|
293
|
-
# @return [String] comando insert SQL formatado
|
294
|
-
def
|
295
|
-
"
|
296
|
-
|
297
|
-
|
281
|
+
# @return [String] comando insert SQL formatado nethk (token)
|
282
|
+
def nethk_ins
|
283
|
+
"#{bnethk_ins}#{apies.novkx.map { |obj| nethk_1val(obj) }.join(',')}"
|
284
|
+
end
|
285
|
+
|
286
|
+
# @return [String] comando insert SQL formatado netht (norml)
|
287
|
+
def netbt_ins
|
288
|
+
"#{bnetht_ins}#{apiesc.novtx.map { |obj| netht_1val(obj) }.join(',')}"
|
289
|
+
end
|
290
|
+
|
291
|
+
# @return [String] comando insert SQL formatado nethi (internas)
|
292
|
+
def netbi_ins
|
293
|
+
"#{bnethi_ins}#{apiesc.novix.map { |obj| nethi_1val(obj) }.join(',')}"
|
294
|
+
end
|
295
|
+
|
296
|
+
# @return [String] comando insert SQL formatado nethp (block)
|
297
|
+
def netbp_ins
|
298
|
+
"#{bnethp_ins}#{apiesc.novpx.map { |obj| nethp_1val(obj) }.join(',')}"
|
299
|
+
end
|
300
|
+
|
301
|
+
# @return [String] comando insert SQL formatado nethw (withdrawals)
|
302
|
+
def netbw_ins
|
303
|
+
"#{bnethw_ins}#{apiesc.novwx.map { |obj| nethw_1val(obj) }.join(',')}"
|
304
|
+
end
|
305
|
+
|
306
|
+
# @return [String] comando insert SQL formatado nethk (token)
|
307
|
+
def netbk_ins
|
308
|
+
"#{bnethk_ins}#{apiesc.novkx.map { |obj| nethk_1val(obj) }.join(',')}"
|
298
309
|
end
|
299
310
|
|
300
311
|
# @return [String] comando insert SQL formatado eos
|
301
312
|
def eost_ins
|
302
|
-
"insert #{BD}.
|
313
|
+
"insert #{BD}.neost(gseq,aseq,bnum,time,contract,action,acfrom,acto,iax,amount,moeda,memo,dias" \
|
303
314
|
") VALUES#{apigm.novax.map { |obj| eost_1val(obj) }.join(',')}"
|
304
315
|
end
|
305
316
|
|
306
317
|
# @return [String] comando insert SQL formatado det (trades)
|
307
318
|
def det_ins
|
308
|
-
"insert #{BD}.
|
319
|
+
"insert #{BD}.cdet(txid,time,tp,user,btc,eur,dtc,dias) VALUES#{apide.trades.map { |obj| det_1val(obj) }.join(',')}"
|
309
320
|
end
|
310
321
|
|
311
322
|
# @return [String] comando insert SQL formatado del (ledger)
|
312
323
|
def del_ins
|
313
|
-
"insert #{BD}.
|
324
|
+
"insert #{BD}.cdel(txid,time,tp,add,moe,qt,fee) VALUES#{apide.ledger.map { |obj| del_val(obj) }.join(',')}"
|
314
325
|
end
|
315
326
|
|
316
327
|
# @return [String] comando insert SQL formatado ust (trades)
|
317
328
|
def ust_ins
|
318
|
-
"insert #{BD}.
|
329
|
+
"insert #{BD}.cust(txid,ordertxid,pair,time,type,ordertype,price,cost,fee,vol,margin,misc,ledgers,dias) " \
|
319
330
|
"VALUES#{apius.trades.map { |key, val| ust_1val(key, val) }.join(',')}"
|
320
331
|
end
|
321
332
|
|
322
333
|
# @return [String] comando insert SQL formatado usl (ledger)
|
323
334
|
def usl_ins
|
324
|
-
"insert #{BD}.
|
335
|
+
"insert #{BD}.cusl(txid,refid,time,type,aclass,asset,amount,fee) " \
|
325
336
|
"VALUES#{apius.ledger.map { |key, val| usl_val(key, val) }.join(',')}"
|
326
337
|
end
|
327
338
|
|
328
339
|
# @example (see Apibc#norml_es)
|
329
340
|
# @param [Hash] htx transacao norml etherscan
|
330
|
-
# @return [String] valores formatados
|
331
|
-
def
|
341
|
+
# @return [String] valores formatados netht (norml parte1)
|
342
|
+
def netht_1val(htx)
|
332
343
|
"(#{Integer(htx[:blockNumber])}," \
|
333
344
|
"#{Integer(htx[:timeStamp])}," \
|
334
345
|
"'#{htx[:hash]}'," \
|
@@ -338,12 +349,12 @@ module Cns
|
|
338
349
|
"'#{htx[:from]}'," \
|
339
350
|
"'#{htx[:to]}'," \
|
340
351
|
"'#{htx[:iax]}'," \
|
341
|
-
"#{
|
352
|
+
"#{netht_2val(htx)}"
|
342
353
|
end
|
343
354
|
|
344
|
-
# @param (see
|
345
|
-
# @return [String] valores formatados
|
346
|
-
def
|
355
|
+
# @param (see netht_1val)
|
356
|
+
# @return [String] valores formatados netht (norml parte2)
|
357
|
+
def netht_2val(htx)
|
347
358
|
txr = htx[:txreceipt_status]
|
348
359
|
"cast('#{htx[:value]}' as numeric)," \
|
349
360
|
"cast('#{htx[:gas]}' as numeric)," \
|
@@ -351,12 +362,12 @@ module Cns
|
|
351
362
|
"cast('#{htx[:gasUsed]}' as numeric)," \
|
352
363
|
"#{Integer(htx[:isError])}," \
|
353
364
|
"#{txr.length.zero? ? 'null' : txr}," \
|
354
|
-
"#{
|
365
|
+
"#{netht_3val(htx)}"
|
355
366
|
end
|
356
367
|
|
357
|
-
# @param (see
|
358
|
-
# @return [String] valores formatados
|
359
|
-
def
|
368
|
+
# @param (see netht_1val)
|
369
|
+
# @return [String] valores formatados netht (norml parte3)
|
370
|
+
def netht_3val(htx)
|
360
371
|
cta = htx[:contractAddress]
|
361
372
|
inp = htx[:input]
|
362
373
|
"#{inp.length.zero? ? 'null' : "'#{inp}'"}," \
|
@@ -366,8 +377,8 @@ module Cns
|
|
366
377
|
|
367
378
|
# @example (see Apibc#inter_es)
|
368
379
|
# @param [Hash] htx transacao internas etherscan
|
369
|
-
# @return [String] valores formatados
|
370
|
-
def
|
380
|
+
# @return [String] valores formatados nethi (internas parte1)
|
381
|
+
def nethi_1val(htx)
|
371
382
|
cta = htx[:contractAddress]
|
372
383
|
"(#{Integer(htx[:blockNumber])}," \
|
373
384
|
"#{Integer(htx[:timeStamp])}," \
|
@@ -377,12 +388,12 @@ module Cns
|
|
377
388
|
"'#{htx[:iax]}'," \
|
378
389
|
"cast('#{htx[:value]}' as numeric)," \
|
379
390
|
"#{cta.length.zero? ? 'null' : "'#{cta}'"}," \
|
380
|
-
"#{
|
391
|
+
"#{nethi_2val(htx)}"
|
381
392
|
end
|
382
393
|
|
383
|
-
# @param (see
|
384
|
-
# @return [String] valores formatados
|
385
|
-
def
|
394
|
+
# @param (see nethi_1val)
|
395
|
+
# @return [String] valores formatados nethi (internas parte2)
|
396
|
+
def nethi_2val(htx)
|
386
397
|
inp = htx[:input]
|
387
398
|
tid = htx[:traceId]
|
388
399
|
txr = htx[:errCode]
|
@@ -397,8 +408,8 @@ module Cns
|
|
397
408
|
|
398
409
|
# @example (see Apibc#block_es)
|
399
410
|
# @param [Hash] htx transacao block etherscan
|
400
|
-
# @return [String] valores formatados
|
401
|
-
def
|
411
|
+
# @return [String] valores formatados nethi (block parte1)
|
412
|
+
def nethp_1val(htx)
|
402
413
|
"(#{Integer(htx[:blockNumber])}," \
|
403
414
|
"#{Integer(htx[:timeStamp])}," \
|
404
415
|
"cast('#{htx[:blockReward]}' as numeric)," \
|
@@ -407,8 +418,8 @@ module Cns
|
|
407
418
|
|
408
419
|
# @example (see Apibc#block_es)
|
409
420
|
# @param [Hash] htx transacao withdrawals etherscan
|
410
|
-
# @return [String] valores formatados
|
411
|
-
def
|
421
|
+
# @return [String] valores formatados nethi (withdrawals parte1)
|
422
|
+
def nethw_1val(htx)
|
412
423
|
"(#{Integer(htx[:withdrawalIndex])}," \
|
413
424
|
"#{Integer(htx[:validatorIndex])}," \
|
414
425
|
"'#{htx[:address]}'," \
|
@@ -419,8 +430,8 @@ module Cns
|
|
419
430
|
|
420
431
|
# @example (see Apibc#token_es)
|
421
432
|
# @param [Hash] hkx token event etherscan
|
422
|
-
# @return [String] valores formatados
|
423
|
-
def
|
433
|
+
# @return [String] valores formatados nethk (token parte1)
|
434
|
+
def nethk_1val(hkx)
|
424
435
|
"(#{Integer(hkx[:blockNumber])}," \
|
425
436
|
"#{Integer(hkx[:timeStamp])}," \
|
426
437
|
"'#{hkx[:hash]}'," \
|
@@ -430,12 +441,12 @@ module Cns
|
|
430
441
|
"'#{hkx[:from]}'," \
|
431
442
|
"'#{hkx[:to]}'," \
|
432
443
|
"'#{hkx[:iax]}'," \
|
433
|
-
"#{
|
444
|
+
"#{nethk_2val(hkx)}"
|
434
445
|
end
|
435
446
|
|
436
|
-
# @param (see
|
437
|
-
# @return [String] valores formatados
|
438
|
-
def
|
447
|
+
# @param (see nethk_1val)
|
448
|
+
# @return [String] valores formatados nethk (token parte2)
|
449
|
+
def nethk_2val(hkx)
|
439
450
|
"cast('#{hkx[:value]}' as numeric)," \
|
440
451
|
"'#{hkx[:tokenName]}'," \
|
441
452
|
"'#{hkx[:tokenSymbol]}'," \
|
@@ -443,12 +454,12 @@ module Cns
|
|
443
454
|
"cast('#{hkx[:gas]}' as numeric)," \
|
444
455
|
"cast('#{hkx[:gasPrice]}' as numeric)," \
|
445
456
|
"cast('#{hkx[:gasUsed]}' as numeric)," \
|
446
|
-
"#{
|
457
|
+
"#{nethk_3val(hkx)}"
|
447
458
|
end
|
448
459
|
|
449
|
-
# @param (see
|
450
|
-
# @return [String] valores formatados
|
451
|
-
def
|
460
|
+
# @param (see nethk_1val)
|
461
|
+
# @return [String] valores formatados nethk (token parte3)
|
462
|
+
def nethk_3val(hkx)
|
452
463
|
cta = hkx[:contractAddress]
|
453
464
|
inp = hkx[:input]
|
454
465
|
"#{inp.length.zero? ? 'null' : "'#{inp}'"}," \
|
data/lib/cns/etherscan.rb
CHANGED
@@ -259,24 +259,6 @@ module Cns
|
|
259
259
|
)
|
260
260
|
end
|
261
261
|
|
262
|
-
# @param (see formata_carteira)
|
263
|
-
# @example set hjn
|
264
|
-
# {
|
265
|
-
# id: wbq[:id],
|
266
|
-
# ax: xbq = wbq[:ax],
|
267
|
-
# bs: wbq[:sl], INPORTANTE saldo bigquery
|
268
|
-
# bt: bqd[:nt].select { |ont| ont[:axfrom].casecmp?(xbq) },
|
269
|
-
# bi: bqd[:ni].select { |oni| oni[:iax].casecmp?(xbq) },
|
270
|
-
# bp: bqd[:np].select { |onp| onp[:iax].casecmp?(xbq) },
|
271
|
-
# bw: bqd[:nw].select { |onw| onw[:iax].casecmp?(xbq) },
|
272
|
-
# bk: bqd[:nk].select { |onk| onk[:iax].casecmp?(xbq) },
|
273
|
-
# es: hbc[:sl], INPORTANTE saldo etherscan
|
274
|
-
# et: hbc[:tx],
|
275
|
-
# ei: hbc[:ix],
|
276
|
-
# ep: hbc[:px],
|
277
|
-
# ew: hbc[:wx],
|
278
|
-
# ek: hbc[:kx]
|
279
|
-
# }
|
280
262
|
# @return [Boolean] carteira tem transacoes novas(sim=NOK, nao=OK)?
|
281
263
|
def ok?(hjn)
|
282
264
|
hjn[:es].round(4) == hjn[:bs].round(4) && hjn[:bi].count == hjn[:ei].count && hjn[:bp].count == hjn[:ep].count && hjn[:bw].count == hjn[:ew].count
|
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.7.
|
4
|
+
version: 0.7.1
|
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-
|
11
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|