huginn_callisto_network_agent 0.1.97 → 0.1.98

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: 9dfee72a9b9f4ded9d0f1ad5d9f597d9b1f280fda9f5ddbbf600f141a2a956c9
4
+ data.tar.gz: 5934a8338dddfe927b2b95df824e660b342e568a9495687c4a10d358a29dac01
5
5
  SHA512:
6
- metadata.gz: 3bc5ed90ca622794f11c6b1d280b2a9009fcd9f154cd0ff6ed17a9930a0c91c0b7d17a2c21bd56c2280c06af2f3a0512a03145126da62f5646f5b412fd464b98
7
- data.tar.gz: 325fdbc313d175943468bd52b0b840a5d15349fbfee5ab623c0a2198ebd49c9657e634c0f6c2e04834cd1e89cc2b017cbb603ddbca4c356356b5128ac17ec707
6
+ metadata.gz: 777f0ed7260037bd8f4f6bf9f2ad2f28da9669b0c4c2be094f4d5f1535fe2c58ca957b6002f0ba1dae04aecc6f76a89c02af8e22a6249dff5c21ba21010eef0f
7
+ data.tar.gz: cb0e22e0d45c88089176b9f877a9e5875b828cab19feda2f53fd628ab8e00b3ba2a5ceb38d724d9c88171aff8be980e205fd21d6fc2926edb1044fb6691e135b
@@ -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
@@ -1681,7 +1678,7 @@ module Agents
1681
1678
  end
1682
1679
  end
1683
1680
 
1684
- def eth_gasPrice(internal=false)
1681
+ def eth_gasPrice(internal="false")
1685
1682
 
1686
1683
  uri = URI.parse("#{interpolated['rpc_server']}")
1687
1684
  request = Net::HTTP::Post.new(uri)
@@ -1705,16 +1702,18 @@ module Agents
1705
1702
 
1706
1703
  payload = JSON.parse(response.body)
1707
1704
 
1708
- if internal == false
1705
+ if internal == "false"
1709
1706
  if interpolated['changes_only'] == 'true'
1710
- if payload.to_s != memory['eth_gasPrice']
1711
- memory['eth_gasPrice'] = payload.to_s
1707
+ if payload != memory['eth_gasPrice']
1708
+ memory['eth_gasPrice'] = payload
1712
1709
  payload['result'] = payload['result'].to_i(16)
1713
1710
  create_event payload: payload
1711
+ else
1712
+ log "no diff"
1714
1713
  end
1715
1714
  else
1716
- if payload.to_s != memory['eth_gasPrice']
1717
- memory['eth_gasPrice'] = payload.to_s
1715
+ if payload != memory['eth_gasPrice']
1716
+ memory['eth_gasPrice'] = payload
1718
1717
  end
1719
1718
  payload['result'] = payload['result'].to_i(16)
1720
1719
  create_event payload: payload
@@ -1722,13 +1721,7 @@ module Agents
1722
1721
  else
1723
1722
  output = JSON.parse(response.body)
1724
1723
 
1725
- # gas_price = output['result'].to_i(16)
1726
- # gas_price += 1000000000000
1727
- # formatted_gas_price = "0x" + gas_price.to_s(16)
1728
- #
1729
1724
  return output['result']
1730
- # return formatted_gas_price
1731
-
1732
1725
 
1733
1726
  end
1734
1727
  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.98
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-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler