huginn_callisto_network_agent 0.1.91 → 0.1.92
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 938131a443634c93dc79e45e1bf8b30c4dbc9ed1d68c002ea7d864509219722a
|
4
|
+
data.tar.gz: 3ef5965fb3ab9b43cda7aa83d13275bffce9fad6dd52174c73daac3050b8ef90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d98d24f42046a30b388e5aa78b91f0acd648dd351016376012dc53409629203e4ee9ab6b773de095108a68ff459fba2b12d8e83dd40d98cee144304a02704560
|
7
|
+
data.tar.gz: b0d312f5f5a0c6744eaf19c6145f7ee8be174b3ca4e70dc767ac4244226c06eb9d937d90c9eee714ec126593fe398ef0039058ea1c3b668aabe9246c542a844e
|
@@ -64,7 +64,7 @@ module Agents
|
|
64
64
|
form_configurable :expected_receive_period_in_days, type: :string
|
65
65
|
form_configurable :changes_only, type: :boolean
|
66
66
|
form_configurable :vote, type: :boolean
|
67
|
-
form_configurable :type, type: :array, values: ['get_balance', 'net_peerCount', 'net_version', 'eth_protocolVersion', 'eth_gasPrice', 'eth_getTransactionCount', 'stake_reward_clo', 'get_tokens_balance', 'eth_getBlockByNumber', 'soy_farming_soy_clo_pending_rewards', 'soy_farming_soy_cloe_pending_rewards', 'stake_reward_soy', 'soy_farming_soy_btt_pending_rewards', 'soy_cs_pending_rewards', 'clo_sendtx', 'get_tx_by_address_with_filter', 'start_cs_clo', 'withdraw_cs_clo', 'get_tx_stats', 'callosha_slots', '2bears_check_order_by_id', 'get_abi_json', 'dao_auto_claim', 'dao_check_missing_vote', 'dao_vote_id']
|
67
|
+
form_configurable :type, type: :array, values: ['get_balance', 'net_peerCount', 'net_version', 'eth_protocolVersion', 'eth_gasPrice', 'eth_getTransactionCount', 'stake_reward_clo', 'get_tokens_balance', 'eth_getBlockByNumber', 'soy_farming_soy_clo_pending_rewards', 'soy_farming_soy_cloe_pending_rewards', 'stake_reward_soy', 'soy_farming_soy_btt_pending_rewards', 'soy_cs_pending_rewards', 'clo_sendtx', 'get_tx_by_address_with_filter', 'start_cs_clo', 'withdraw_cs_clo', 'get_tx_stats', 'callosha_slots', '2bears_check_order_by_id', 'get_abi_json', 'dao_auto_claim', 'dao_check_missing_vote', 'dao_vote_id', 'get_cs_stats']
|
68
68
|
form_configurable :wallet, type: :string
|
69
69
|
form_configurable :rpc_server, type: :string
|
70
70
|
form_configurable :wallet_password, type: :string
|
@@ -76,7 +76,7 @@ module Agents
|
|
76
76
|
form_configurable :last_block, type: :string
|
77
77
|
form_configurable :sql_db, type: :string
|
78
78
|
def validate_options
|
79
|
-
errors.add(:base, "type has invalid value: should be 'get_balance' 'net_peerCount' 'net_version' 'eth_protocolVersion' 'eth_gasPrice' 'eth_getTransactionCount' 'stake_reward_clo' 'get_tokens_balance' 'eth_getBlockByNumber' 'soy_farming_soy_clo_pending_rewards' 'soy_farming_soy_cloe_pending_rewards' 'stake_reward_soy' 'soy_farming_soy_btt_pending_rewards' 'soy_cs_pending_rewards' 'clo_sendtx' 'get_tx_by_address_with_filter' 'start_cs_clo' 'withdraw_cs_clo' 'get_tx_stats' 'callosha_slots' '2bears_check_order_by_id' 'get_abi_json' 'dao_auto_claim' 'dao_check_missing_vote' 'dao_vote_id'") if interpolated['type'].present? && !%w(get_balance net_peerCount net_version eth_protocolVersion eth_gasPrice eth_getTransactionCount stake_reward_clo get_tokens_balance eth_getBlockByNumber soy_farming_soy_clo_pending_rewards soy_farming_soy_cloe_pending_rewards stake_reward_soy soy_farming_soy_btt_pending_rewards soy_cs_pending_rewards clo_sendtx get_tx_by_address_with_filter start_cs_clo withdraw_cs_clo get_tx_stats callosha_slots 2bears_check_order_by_id get_abi_json dao_auto_claim dao_check_missing_vote dao_vote_id).include?(interpolated['type'])
|
79
|
+
errors.add(:base, "type has invalid value: should be 'get_balance' 'net_peerCount' 'net_version' 'eth_protocolVersion' 'eth_gasPrice' 'eth_getTransactionCount' 'stake_reward_clo' 'get_tokens_balance' 'eth_getBlockByNumber' 'soy_farming_soy_clo_pending_rewards' 'soy_farming_soy_cloe_pending_rewards' 'stake_reward_soy' 'soy_farming_soy_btt_pending_rewards' 'soy_cs_pending_rewards' 'clo_sendtx' 'get_tx_by_address_with_filter' 'start_cs_clo' 'withdraw_cs_clo' 'get_tx_stats' 'callosha_slots' '2bears_check_order_by_id' 'get_abi_json' 'dao_auto_claim' 'dao_check_missing_vote' 'dao_vote_id' 'get_cs_stats'") if interpolated['type'].present? && !%w(get_balance net_peerCount net_version eth_protocolVersion eth_gasPrice eth_getTransactionCount stake_reward_clo get_tokens_balance eth_getBlockByNumber soy_farming_soy_clo_pending_rewards soy_farming_soy_cloe_pending_rewards stake_reward_soy soy_farming_soy_btt_pending_rewards soy_cs_pending_rewards clo_sendtx get_tx_by_address_with_filter start_cs_clo withdraw_cs_clo get_tx_stats callosha_slots 2bears_check_order_by_id get_abi_json dao_auto_claim dao_check_missing_vote dao_vote_id get_cs_stats).include?(interpolated['type'])
|
80
80
|
|
81
81
|
unless options['wallet_password'].present? || !['clo_sendtx' 'start_cs_clo' 'withdraw_cs_clo' 'dao_auto_claim'].include?(options['type'])
|
82
82
|
errors.add(:base, "wallet_password is a required field")
|
@@ -455,6 +455,15 @@ module Agents
|
|
455
455
|
return JSON.parse(response.body)
|
456
456
|
end
|
457
457
|
|
458
|
+
def get_cs_stats()
|
459
|
+
uri = URI.parse("http://web3wrapper:5000/cs/stats_last_30d")
|
460
|
+
response = Net::HTTP.get_response(uri)
|
461
|
+
|
462
|
+
log_curl_output(response.code,response.body)
|
463
|
+
|
464
|
+
create_event payload: response.body
|
465
|
+
end
|
466
|
+
|
458
467
|
def dao_auto_claim()
|
459
468
|
last_vote_id = dao_get_last_vote_id()
|
460
469
|
user_claim_list = dao_check_claim_list(last_vote_id)
|
@@ -1916,6 +1925,8 @@ module Agents
|
|
1916
1925
|
dao_check_missing_vote()
|
1917
1926
|
when "dao_vote_id"
|
1918
1927
|
dao_vote_id(interpolated['value'],false)
|
1928
|
+
when "get_cs_stats"
|
1929
|
+
get_cs_stats()
|
1919
1930
|
else
|
1920
1931
|
log "Error: type has an invalid value (#{type})"
|
1921
1932
|
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.92
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Germain
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|