huginn_callisto_network_agent 0.1.69 → 0.1.71

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 88080e05c9cbeea3fb8be50e944aa4cbab3149b9b273712d3314be72f14ceb22
4
- data.tar.gz: 71a21785ea4ac264f31d04db61ba2ab412c43fd0c5cfe126c6f52bae3fde5a8d
3
+ metadata.gz: 6e354ce319d63f636fd542b98a0c56c8fccde7da51588a89015e8d3e3e689dd3
4
+ data.tar.gz: 3c55a835314f2e8af320d363f76c1b1f1bf08fbfab93fdc490aca0f7af81f9d0
5
5
  SHA512:
6
- metadata.gz: d016b336e2e5d94a3ba2ec519305fe6487df4588c85edcde4dadcc96afa0694fa5293a9a6ba984942dfaff7f0a01badb70dfd733d444a9f4c56252d2d088c753
7
- data.tar.gz: ff70f80a0776213d8080ce41982aa38c948ccabd77e8565d8488b7ae146066231f97beaf2c6d0eb0115f7716ec666d38155aa03803324d2c3800019fa0224c9a
6
+ metadata.gz: 29b367ca0a5601f56ef3a3b10d73f689f137dbb66fce53f306cb0390d36edbfd81b37ebb25e68e37fd501f5dcd0a4f4b330605b0363f9e73866e8e859378eb73
7
+ data.tar.gz: fed1126808a2cbdcacba8bc5a3fbc5581ff86bf2d166f8fd7b214795cb85b9cd645ecda9e7de57d846dd0e99f075b3e1fd0e4468b77d0932915af1f04d79c79f
@@ -474,6 +474,8 @@ module Agents
474
474
  transaction['call_type'] = 'depositTokens'
475
475
  when "0x8803dbee"
476
476
  transaction['call_type'] = 'swapTokensForExactTokens'
477
+ when "0x1da7ee0d"
478
+ transaction['call_type'] = 'depositPosition'
477
479
  when "0xa9059cbb"
478
480
  transaction['call_type'] = 'TokenTransfer'
479
481
  transaction['symbol'] = find_symbol(transaction['to'])
@@ -498,7 +500,7 @@ module Agents
498
500
  transaction['call_type'] = 'setSalary'
499
501
  when "0x957138a4"
500
502
  transaction['call_type'] = 'setStop'
501
- when "0xc4d66de8"
503
+ when "0xc4d66de8", "0x1624f6c6"
502
504
  transaction['call_type'] = 'initialize'
503
505
  when "0x96d4f640"
504
506
  transaction['call_type'] = 'createOrder'
@@ -518,9 +520,28 @@ module Agents
518
520
  transaction['call_type'] = 'silentTransfer'
519
521
  when "0x25498c75"
520
522
  transaction['call_type'] = 'addNewTokenClass'
523
+ when "0x11411e08"
524
+ transaction['call_type'] = 'sellToken'
525
+ when "0xa0169f0d"
526
+ transaction['call_type'] = 'createDumperShield'
527
+ when "0x335a9406"
528
+ transaction['call_type'] = 'transfer'
521
529
  else
522
530
  transaction['call_type'] = 'unknown'
523
531
  end
532
+ if transaction['input'] != '0x'
533
+ hex_string = transaction['input'].dup
534
+ hex_string.slice!(0, 2)
535
+ # Convert hexadecimal string to bytes
536
+ bytes_string = [hex_string].pack("H*")
537
+ # Try to convert bytes to UTF-8 and check if it's readable
538
+ decoded_string = bytes_string.force_encoding("utf-8")
539
+ # Check if the conversion is successful without loss of information
540
+ if decoded_string.valid_encoding? && decoded_string.encode("utf-8", invalid: :replace, undef: :replace) == decoded_string
541
+ puts "The string is readable by a human: #{decoded_string}"
542
+ transaction['input_utf8'] = decoded_string
543
+ end
544
+ end
524
545
  create_event payload: transaction
525
546
  end
526
547
  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.69
4
+ version: 0.1.71
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-12-27 00:00:00.000000000 Z
11
+ date: 2024-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler