mixin_bot 0.7.11 → 0.7.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mixin_bot/cli/utils.rb +1 -7
- data/lib/mixin_bot/utils.rb +11 -1
- data/lib/mixin_bot/version.rb +1 -1
- 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: 13c4f9ce40bbee325eed32c0a8a3c928911e3f3f2fc1acf3481b8a483d768e0d
|
4
|
+
data.tar.gz: 916d23e4ddc9bcc9f7eea588b9b00cd46a099cbc5d7ed955f74ec45077c41f00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5283924b083f585b4a49486f39ecf668db803b3a3f975293bd421d5edbf92c370decaa113fc3893f2c79eaffc9f78c45aa2257d93ec4b1ee0eabcd5163c1cada
|
7
|
+
data.tar.gz: 72208f22e2b8a9a26814ca2a4bc2f260e461cc25f9231746ede4fbd638519242b8fada5604e325b467acd16be05eb88809053300067d7f54d0b56cd140033b46
|
data/lib/mixin_bot/cli/utils.rb
CHANGED
@@ -11,13 +11,7 @@ module MixinBot
|
|
11
11
|
|
12
12
|
desc 'unique UUIDS', 'generate unique UUID for two or more UUIDs'
|
13
13
|
def unique(*uuids)
|
14
|
-
uuids
|
15
|
-
r = uuids.first
|
16
|
-
uuids.each_with_index do |uuid, i|
|
17
|
-
r = MixinBot::Utils.unique_uuid(r, uuid) if i.positive?
|
18
|
-
end
|
19
|
-
|
20
|
-
log r
|
14
|
+
log MixinBot::Utils.unique_uuid *uuids
|
21
15
|
end
|
22
16
|
|
23
17
|
desc 'generatetrace HASH', 'generate trace ID from Tx hash'
|
data/lib/mixin_bot/utils.rb
CHANGED
@@ -17,7 +17,7 @@ module MixinBot
|
|
17
17
|
NFT_MASK = 0x00
|
18
18
|
NULL_UUID = '00000000-0000-0000-0000-000000000000'
|
19
19
|
|
20
|
-
def
|
20
|
+
def generate_unique_uuid(uuid_1, uuid_2)
|
21
21
|
md5 = Digest::MD5.new
|
22
22
|
md5 << [uuid_1, uuid_2].min
|
23
23
|
md5 << [uuid_1, uuid_2].max
|
@@ -37,6 +37,16 @@ module MixinBot
|
|
37
37
|
)
|
38
38
|
end
|
39
39
|
|
40
|
+
def unique_uuid(*uuids)
|
41
|
+
uuids.sort
|
42
|
+
r = uuids.first
|
43
|
+
uuids.each_with_index do |uuid, i|
|
44
|
+
r = MixinBot::Utils.generate_unique_uuid(r, uuid) if i.positive?
|
45
|
+
end
|
46
|
+
|
47
|
+
r
|
48
|
+
end
|
49
|
+
|
40
50
|
def generate_trace_from_hash(hash, output_index = 0)
|
41
51
|
md5 = Digest::MD5.new
|
42
52
|
md5 << hash
|
data/lib/mixin_bot/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixin_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- an-lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-03-
|
11
|
+
date: 2022-03-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|