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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3be061a3163d8bafe09ced129300c915aad76d6aa079510c172c3d75370a4d8f
4
- data.tar.gz: 614f3b7ede7052012d92bc54f2f8e0b648e6b85cc423b61a3080e4ae38bb6e92
3
+ metadata.gz: 251284e1797817117272d9df42dc49b7a13deae5107445ca0488bd953d445b0f
4
+ data.tar.gz: 3f63d4fd81f939242e9cb5cd0543f26c515a1621c65a8704995fceaccfbfadc2
5
5
  SHA512:
6
- metadata.gz: b9e8dff209c46794fbf24f086d04cfffe0fa522fde3adc24dd8e6dd7b401dbf8464c72c898ee84a73d4fe5b12907153164575ac542aae86fcdf5d5681baa3659
7
- data.tar.gz: 2fbfbd13706ee896981dc39deb13a864e066c8f443e97a7fe9b9e92cdd7c07913eab288e0e30a492916df209f165dad35a2b3f219c7694b9fcc9e83f398ef4e0
6
+ metadata.gz: 88873cd75be80f1b78cb760a4e643a394a16ff5fb01ee0328273e5684e19944ba7c5f344f3fd63488e009a0c2d79976bd7d0994b994062b9cf63f1c6c990f4bf
7
+ data.tar.gz: b3991969370592a9ecfc8e969f7b4205b475aae29aca5029e1c005217416e1380a1a5bed8cc5c69e4efd5612332791b8eb3376a311e3d02bba6e891810a2320a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- etht (0.1.7)
4
+ etht (0.1.8)
5
5
  faraday
6
6
  google-cloud-bigquery
7
7
  json
@@ -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(#{transacoes.norml.map { |e| etht_val1(e) }.join(',')})"
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(#{transacoes.token.map { |e| ethk_val1(e) }.join(',')})"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Etht
4
- VERSION = '0.1.7'
4
+ VERSION = '0.1.8'
5
5
  end
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.7
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-22 00:00:00.000000000 Z
11
+ date: 2020-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler