etht 0.1.7 → 0.1.8
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/etht/bigquery.rb +6 -6
- data/lib/etht/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: 251284e1797817117272d9df42dc49b7a13deae5107445ca0488bd953d445b0f
|
4
|
+
data.tar.gz: 3f63d4fd81f939242e9cb5cd0543f26c515a1621c65a8704995fceaccfbfadc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88873cd75be80f1b78cb760a4e643a394a16ff5fb01ee0328273e5684e19944ba7c5f344f3fd63488e009a0c2d79976bd7d0994b994062b9cf63f1c6c990f4bf
|
7
|
+
data.tar.gz: b3991969370592a9ecfc8e969f7b4205b475aae29aca5029e1c005217416e1380a1a5bed8cc5c69e4efd5612332791b8eb3376a311e3d02bba6e891810a2320a
|
data/Gemfile.lock
CHANGED
data/lib/etht/bigquery.rb
CHANGED
@@ -56,19 +56,19 @@ module Etht
|
|
56
56
|
def etht_ins
|
57
57
|
"insert #{BD}.etht(blocknumber,timestamp,txhash,nonce,blockhash,transactionindex,axfrom,axto,value,gas," \
|
58
58
|
'gasprice,iserror,txreceipt_status,input,contractaddress,cumulativegasused,gasused,confirmations,dias' \
|
59
|
-
") VALUES
|
59
|
+
") VALUES#{transacoes.norml.map { |e| etht_val1(e) }.join(',')}"
|
60
60
|
end
|
61
61
|
|
62
62
|
# @return [String] comando insert SQL formatado ethk (trx token)
|
63
63
|
def ethk_ins
|
64
64
|
"insert #{BD}.ethk(blocknumber,timestamp,txhash,nonce,blockhash,axfrom,contractaddress,axto,value,tokenname," \
|
65
65
|
'tokensymbol,tokendecimal,transactionindex,gas,gasprice,gasused,cumulativegasused,input,confirmations,dias' \
|
66
|
-
") VALUES
|
66
|
+
") VALUES#{transacoes.token.map { |e| ethk_val1(e) }.join(',')}"
|
67
67
|
end
|
68
68
|
|
69
69
|
# @return [String] valores formatados etht (trx normais parte1)
|
70
70
|
def etht_val1(hes)
|
71
|
-
"#{Integer(hes['blockNumber'])}," \
|
71
|
+
"(#{Integer(hes['blockNumber'])}," \
|
72
72
|
"#{Integer(hes['timeStamp'])}," \
|
73
73
|
"'#{hes['hash']}'," \
|
74
74
|
"#{Integer(hes['nonce'])}," \
|
@@ -94,12 +94,12 @@ module Etht
|
|
94
94
|
def etht_val3(hes)
|
95
95
|
"#{hes['contractAddress'].length.zero? ? 'null' : "'#{hes['contractAddress']}'"}," \
|
96
96
|
"0,cast('#{hes['gasUsed']}' as numeric),0," \
|
97
|
-
"#{Integer(ops[:h][hes['blockNumber']] || 0)}"
|
97
|
+
"#{Integer(ops[:h][hes['blockNumber']] || 0)})"
|
98
98
|
end
|
99
99
|
|
100
100
|
# @return [String] valores formatados ethk (trx token parte1)
|
101
101
|
def ethk_val1(hes)
|
102
|
-
"#{Integer(hes['blockNumber'])}," \
|
102
|
+
"(#{Integer(hes['blockNumber'])}," \
|
103
103
|
"#{Integer(hes['timeStamp'])}," \
|
104
104
|
"'#{hes['hash']}'," \
|
105
105
|
"#{Integer(hes['nonce'])}," \
|
@@ -126,7 +126,7 @@ module Etht
|
|
126
126
|
"cast('#{hes['gasPrice']}' as numeric)," \
|
127
127
|
"cast('#{hes['gasUsed']}' as numeric),0," \
|
128
128
|
"#{hes['input'].length.zero? ? 'null' : "'#{hes['input']}'"},0," \
|
129
|
-
"#{Integer(ops[:h][hes['blockNumber']] || 0)}"
|
129
|
+
"#{Integer(ops[:h][hes['blockNumber']] || 0)})"
|
130
130
|
end
|
131
131
|
|
132
132
|
# cria job bigquery & verifica execucao
|
data/lib/etht/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etht
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
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: 2020-08-
|
11
|
+
date: 2020-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|