huginn_callisto_network_agent 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/huginn_callisto_network_agent/callisto_network_agent.rb +11 -10
- 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: '085a7202a961f7cad9965604286016829fe0d266ac84e8c4297daf41fe8c021b'
|
4
|
+
data.tar.gz: cfb452fa30d9dff62669ca943d7dadaad25a44facf8da8fd79e3a0046e039b15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcffe08f573b667e286b12d8324f9b00a8a4626dfaf34d74a63458a08381a179105012d813d428f94fb567ea312c06f99e39e6add53d64f0e31844aa8afa9afb
|
7
|
+
data.tar.gz: 3b6d91e9e02c03681fd7e76476dfd960423868ac33195ae46703cee48c0ee747c8481f785f79c43d3c646f263ae50b3fa1b7b9305f0df893a4da186767e85809
|
@@ -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
|
@@ -343,6 +342,8 @@ module Agents
|
|
343
342
|
transaction['call_type'] = 'update'
|
344
343
|
when "0x40c10f19"
|
345
344
|
transaction['call_type'] = 'mint'
|
345
|
+
when "0x78be0ad4"
|
346
|
+
transaction['call_type'] = 'withdraw_stake'
|
346
347
|
else
|
347
348
|
transaction['call_type'] = 'unknown'
|
348
349
|
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.
|
4
|
+
version: 0.1.5
|
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-
|
11
|
+
date: 2023-10-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|