huginn_callisto_network_agent 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddf73844731bf49acb35b590bd5fc598ba67df6c4db546d568f3b9269f9c8760
4
- data.tar.gz: f8163830f26b16c7708f460730ec769894e3c0ffb1c4d3516cac77a29cc5e87a
3
+ metadata.gz: d058f981b8a16d044cfa1d71946599cb529b9d9b428b69a87daf240a8e6e10b3
4
+ data.tar.gz: 1edd0b7377275a447051465ce42a65b61aa0720475dd708f73f0f431bcfbdd9b
5
5
  SHA512:
6
- metadata.gz: 8dca5bdb5fb8f7bf1e7abd0aec593d8ea2ff08109ccdc80049cb495ace905ed53f12698747fce034d6bdac2a831c8d9cc44edeaf45a0f566923fd3543d02a57e
7
- data.tar.gz: 8550c96cb4af5d1990e500fffa0558c1576f8df51645074481573fd5dc28fb1e19ba71666076c9598f66f189d24c98b1a8119f4a9273142c504ae01461451986
6
+ metadata.gz: a28c965d12b063197abb1415e2641999d8c630667cf1245cf5cd8ddc8a15b440f4ccb8453e2ee5e587d0f02274f7cdd03ae20aa48b3eee5092c230cd82dbb567
7
+ data.tar.gz: 9f09fbd78f53aa29c85c0a8d96f123c461a2fe2f745f7776041c6a6e330653af194ca1976e740d5484dbfc5655296a87ab5dd467ff8f40883c251b0262eabfa1
@@ -143,8 +143,8 @@ module Agents
143
143
  private
144
144
 
145
145
  def to_hex(value, length = 64, with_0x = false)
146
- log value
147
- log value.class
146
+ # log value
147
+ # log value.class
148
148
  hex = value.to_s(16)
149
149
  hex = hex.rjust(length, '0')
150
150
  hex = hex.sub(/^0x/, '') unless with_0x
@@ -154,9 +154,8 @@ module Agents
154
154
 
155
155
  def log_curl_output(code,body)
156
156
 
157
- log "request status : #{code}"
158
-
159
157
  if interpolated['debug'] == 'true'
158
+ log "request status : #{code}"
160
159
  log "body"
161
160
  log body
162
161
  end
@@ -205,8 +204,8 @@ module Agents
205
204
  end
206
205
 
207
206
  def percentage(number, total)
208
- log number
209
- log total
207
+ # log number
208
+ # log total
210
209
  (number/total.to_f*100).round(2)
211
210
  end
212
211
 
@@ -251,12 +250,12 @@ module Agents
251
250
  top_tx = most_common_from(tx_list)
252
251
  top_count = tx_list.count { |hash| hash['from'] == top_tx }
253
252
  miners_count = tx_list.select { |hash| all_miners.include?(hash['from']) }
254
- log "miners_count #{miners_count.count}"
253
+ # log "miners_count #{miners_count.count}"
255
254
  shitty_count = tx_list.select { |hash| shitty_wallets.include?(hash['from']) }
256
- log "shitty_count #{shitty_count.count}"
255
+ # log "shitty_count #{shitty_count.count}"
257
256
  active = tx_list.map { |p| p['from'] }.uniq.count
258
- log "top_count : #{top_count}"
259
- log "total : #{tx_list.count}"
257
+ # log "top_count : #{top_count}"
258
+ # log "total : #{tx_list.count}"
260
259
  create_event :payload => { 'total_tx' => "#{tx_list.count}", 'total_active' => "#{active}", 'burnt_clo' => "#{burnt_ether}", 'top_wallet': {'address' => "#{top_tx}", 'percentage' => "#{percentage(top_count.to_i,tx_list.count.to_i)}"}, 'shitty': {'address': 'shitty', 'shitty_percentage' => "#{percentage(shitty_count.count,tx_list.count.to_i)}"}, 'miners': {'address': "miners", 'percentage' => "#{percentage(miners_count.count,tx_list.count.to_i)}"}}
261
260
 
262
261
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: huginn_callisto_network_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Germain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-03 00:00:00.000000000 Z
11
+ date: 2023-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler