huginn_callisto_network_agent 0.1.96 → 0.1.97
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 +4 -4
- data/lib/huginn_callisto_network_agent/callisto_network_agent.rb +16 -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: '094eb175bd3cdbd99546be567c8136bdeb46006d86174e79fcead892a987107a'
|
4
|
+
data.tar.gz: e88df69eaa4dea24d55ae9046bfb864fdf414ddfe2cbb59c80b15492352e71b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bc5ed90ca622794f11c6b1d280b2a9009fcd9f154cd0ff6ed17a9930a0c91c0b7d17a2c21bd56c2280c06af2f3a0512a03145126da62f5646f5b412fd464b98
|
7
|
+
data.tar.gz: 325fdbc313d175943468bd52b0b840a5d15349fbfee5ab623c0a2198ebd49c9657e634c0f6c2e04834cd1e89cc2b017cbb603ddbca4c356356b5128ac17ec707
|
@@ -289,7 +289,9 @@ module Agents
|
|
289
289
|
{
|
290
290
|
"from" => "#{interpolated['wallet']}",
|
291
291
|
"data" => "0xc9d27afe#{to_hex(id.to_i)}#{to_hex(bool_to_int(interpolated['vote']))}",
|
292
|
-
"to" => "0x810059e1406dedafd1bdca4e0137cba306c0ce36"
|
292
|
+
"to" => "0x810059e1406dedafd1bdca4e0137cba306c0ce36",
|
293
|
+
"gas" => "0x30d40",
|
294
|
+
"gasPrice" => "#{eth_gasPrice(internal)}"
|
293
295
|
}
|
294
296
|
]
|
295
297
|
})
|
@@ -366,15 +368,10 @@ module Agents
|
|
366
368
|
end
|
367
369
|
|
368
370
|
def dao_claim(id)
|
369
|
-
# function_id = '0x379607f5'
|
370
|
-
# formatted_value = id.to_s(16).rjust(64, '0')
|
371
|
-
# data = "#{function_id}#{formatted_value}"
|
372
371
|
if interpolated['debug'] == 'true'
|
373
372
|
log "unlocking the wallet"
|
374
373
|
end
|
375
374
|
response = JSON.parse(unlock_wallet())
|
376
|
-
# log "response -> #{response}"
|
377
|
-
# log "response result -> #{response['result']}"
|
378
375
|
if response['result'] == true
|
379
376
|
if interpolated['debug'] == 'true'
|
380
377
|
log "the wallet is unlocked"
|
@@ -390,7 +387,9 @@ module Agents
|
|
390
387
|
{
|
391
388
|
"from" => "#{interpolated['wallet']}",
|
392
389
|
"data" => "0x379607f5#{to_hex(id)}",
|
393
|
-
"to" => "0x810059e1406dedafd1bdca4e0137cba306c0ce36"
|
390
|
+
"to" => "0x810059e1406dedafd1bdca4e0137cba306c0ce36",
|
391
|
+
"gas" => "0x30d40",
|
392
|
+
"gasPrice" => "#{eth_gasPrice(internal)}"
|
394
393
|
}
|
395
394
|
]
|
396
395
|
})
|
@@ -567,8 +566,6 @@ module Agents
|
|
567
566
|
contract = "0x7777265DC7FD2a15A7f2E8d8Ad87b3DAec677777"
|
568
567
|
power_of_10 = 18
|
569
568
|
final_value = interpolated['value'].to_i * 10**power_of_10
|
570
|
-
# log "0x83f818b4000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000001"
|
571
|
-
# log "0x83f818b4#{to_hex(max_gain(contract).to_i)}#{to_hex(interpolated['round'].to_i)}"
|
572
569
|
if interpolated['debug'] == 'true'
|
573
570
|
log "unlocking the wallet"
|
574
571
|
end
|
@@ -591,10 +588,10 @@ module Agents
|
|
591
588
|
"from" => "#{interpolated['wallet']}",
|
592
589
|
"value" => "0x#{final_value.to_s(16)}",
|
593
590
|
"data" => "0x83f818b4#{to_hex(max_gain(contract).to_i)}#{to_hex(interpolated['round'].to_i)}",
|
591
|
+
"gas" => "0x30d40",
|
594
592
|
"gasPrice" => "#{eth_gasPrice(internal)}"
|
595
593
|
}
|
596
594
|
],
|
597
|
-
# "gas" => "0x186a0",
|
598
595
|
"id" => 1
|
599
596
|
})
|
600
597
|
|
@@ -917,6 +914,7 @@ module Agents
|
|
917
914
|
"from" => "#{interpolated['wallet']}",
|
918
915
|
"to" => "#{interpolated['wallet_dest']}",
|
919
916
|
"value" => "0x#{final_value.to_s(16)}",
|
917
|
+
"gas" => "0x30d40",
|
920
918
|
"gasPrice" => "#{eth_gasPrice(internal)}"
|
921
919
|
}
|
922
920
|
],
|
@@ -965,6 +963,7 @@ module Agents
|
|
965
963
|
"to" => "0x08A7c8be47773546DC5E173d67B0c38AfFfa4b84",
|
966
964
|
"data" => "0x5d8c85ef#{to_hex(interpolated['round'].to_i)}",
|
967
965
|
"value" => "0x#{final_value.to_s(16)}",
|
966
|
+
"gas" => "0x30d40",
|
968
967
|
"gasPrice" => "#{eth_gasPrice(internal)}"
|
969
968
|
}
|
970
969
|
],
|
@@ -1012,6 +1011,7 @@ module Agents
|
|
1012
1011
|
"from" => "#{interpolated['wallet']}",
|
1013
1012
|
"to" => "0x08A7c8be47773546DC5E173d67B0c38AfFfa4b84",
|
1014
1013
|
"data" => "0xcd948855",
|
1014
|
+
"gas" => "0x30d40",
|
1015
1015
|
"gasPrice" => "#{eth_gasPrice(internal)}"
|
1016
1016
|
}
|
1017
1017
|
],
|
@@ -1722,7 +1722,13 @@ 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
|
+
#
|
1725
1729
|
return output['result']
|
1730
|
+
# return formatted_gas_price
|
1731
|
+
|
1726
1732
|
|
1727
1733
|
end
|
1728
1734
|
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.97
|
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-11-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|