huginn_callisto_network_agent 0.1.97 → 0.1.99

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: '094eb175bd3cdbd99546be567c8136bdeb46006d86174e79fcead892a987107a'
4
- data.tar.gz: e88df69eaa4dea24d55ae9046bfb864fdf414ddfe2cbb59c80b15492352e71b3
3
+ metadata.gz: 7675a53c5f5dfae79b78ad1ab8007ddb5a3a5427e4767263ae1b398069bf6601
4
+ data.tar.gz: b760819b63aa64608d818b4a6196ab0d0d19ea585fa58aa862b02eefa39f26e2
5
5
  SHA512:
6
- metadata.gz: 3bc5ed90ca622794f11c6b1d280b2a9009fcd9f154cd0ff6ed17a9930a0c91c0b7d17a2c21bd56c2280c06af2f3a0512a03145126da62f5646f5b412fd464b98
7
- data.tar.gz: 325fdbc313d175943468bd52b0b840a5d15349fbfee5ab623c0a2198ebd49c9657e634c0f6c2e04834cd1e89cc2b017cbb603ddbca4c356356b5128ac17ec707
6
+ metadata.gz: 101f789a83fdf453f8d023a4908105a5656b3a2cd2ab2db4bb35c7e067d927595a47064d5df9e39743fa969dbdc73efd49a029682e4d2ae6d90c89bebc79bc50
7
+ data.tar.gz: 55a50425610085c003274d22f103ff3e719677726a8d398c548eaff998707f86e1fea0367e136d0f0af3aa7ce465977ec9550d450c20c3b4d409acfd56d4e40c
@@ -268,7 +268,7 @@ module Agents
268
268
  end
269
269
  end
270
270
 
271
- def dao_vote_id(id,internal=false)
271
+ def dao_vote_id(id,internal=true)
272
272
 
273
273
  if interpolated['debug'] == 'true'
274
274
  log "unlocking the wallet"
@@ -306,12 +306,9 @@ module Agents
306
306
 
307
307
  payload = JSON.parse(response.body)
308
308
 
309
- if internal == false
309
+ if interpolated['emit_events'] == 'true'
310
310
  create_event payload: payload
311
- else
312
- return payload['result']
313
311
  end
314
- else
315
312
  end
316
313
 
317
314
  end
@@ -368,6 +365,7 @@ module Agents
368
365
  end
369
366
 
370
367
  def dao_claim(id)
368
+ internal = "true"
371
369
  if interpolated['debug'] == 'true'
372
370
  log "unlocking the wallet"
373
371
  end
@@ -562,7 +560,7 @@ module Agents
562
560
 
563
561
  def callosha_slots()
564
562
 
565
- internal = true
563
+ internal = "true"
566
564
  contract = "0x7777265DC7FD2a15A7f2E8d8Ad87b3DAec677777"
567
565
  power_of_10 = 18
568
566
  final_value = interpolated['value'].to_i * 10**power_of_10
@@ -938,7 +936,7 @@ module Agents
938
936
  end
939
937
 
940
938
  def start_cs_clo()
941
- internal = true
939
+ internal = "true"
942
940
  if interpolated['debug'] == 'true'
943
941
  log "unlocking the wallet"
944
942
  end
@@ -1681,7 +1679,7 @@ module Agents
1681
1679
  end
1682
1680
  end
1683
1681
 
1684
- def eth_gasPrice(internal=false)
1682
+ def eth_gasPrice(internal="false")
1685
1683
 
1686
1684
  uri = URI.parse("#{interpolated['rpc_server']}")
1687
1685
  request = Net::HTTP::Post.new(uri)
@@ -1705,16 +1703,18 @@ module Agents
1705
1703
 
1706
1704
  payload = JSON.parse(response.body)
1707
1705
 
1708
- if internal == false
1706
+ if internal == "false"
1709
1707
  if interpolated['changes_only'] == 'true'
1710
- if payload.to_s != memory['eth_gasPrice']
1711
- memory['eth_gasPrice'] = payload.to_s
1708
+ if payload != memory['eth_gasPrice']
1709
+ memory['eth_gasPrice'] = payload
1712
1710
  payload['result'] = payload['result'].to_i(16)
1713
1711
  create_event payload: payload
1712
+ else
1713
+ log "no diff"
1714
1714
  end
1715
1715
  else
1716
- if payload.to_s != memory['eth_gasPrice']
1717
- memory['eth_gasPrice'] = payload.to_s
1716
+ if payload != memory['eth_gasPrice']
1717
+ memory['eth_gasPrice'] = payload
1718
1718
  end
1719
1719
  payload['result'] = payload['result'].to_i(16)
1720
1720
  create_event payload: payload
@@ -1722,13 +1722,7 @@ module Agents
1722
1722
  else
1723
1723
  output = JSON.parse(response.body)
1724
1724
 
1725
- # gas_price = output['result'].to_i(16)
1726
- # gas_price += 1000000000000
1727
- # formatted_gas_price = "0x" + gas_price.to_s(16)
1728
- #
1729
1725
  return output['result']
1730
- # return formatted_gas_price
1731
-
1732
1726
 
1733
1727
  end
1734
1728
  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.97
4
+ version: 0.1.99
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-05 00:00:00.000000000 Z
11
+ date: 2024-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler