scale.rb 0.2.18 → 0.2.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +4 -1
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/scale/block.rb +6 -6
- data/lib/scale/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d342ac2094dc9dc08a602fb085b78b3ac85840a52b8206068fed6845b092df5
|
4
|
+
data.tar.gz: c514ffecdf9cbb37ea9d3e5c34d9e3a35a764ebd53f53231d0e6c5a28b4d79f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85bb31606e4e8b116531c1e84977680cb0f9c43a743d5ca31f7af634835605b2bbbab7c2ce1979b7ed0a7bd08ea27de14c39da5a91654697b0d04402951361fd
|
7
|
+
data.tar.gz: 237721572a956c6901e2bb388e83b9cdf3f6e79bc391ac67624c6e2494e9f449422822da17f2569290c9b7a80008fb74c585537e65e32a5547234f739f8de114
|
data/Dockerfile
CHANGED
@@ -15,7 +15,10 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
|
|
15
15
|
export RUSTFLAGS='-C target-feature=-crt-static' && \
|
16
16
|
make
|
17
17
|
|
18
|
-
|
18
|
+
ENV RUSTFLAGS='-C target-feature=-crt-static'
|
19
|
+
ENV PATH=/root/.cargo/bin:$PATH
|
20
|
+
|
21
|
+
RUN gem install bundler:2.2.13 && \
|
19
22
|
bundle install && \
|
20
23
|
rake install:local
|
21
24
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/scale/block.rb
CHANGED
@@ -5,8 +5,8 @@ module Scale
|
|
5
5
|
include SingleValue
|
6
6
|
# attr_accessor :address, :signature, :nonce, :era, :extrinsic_hash, :call_index, :params_raw, :params
|
7
7
|
|
8
|
-
def self.generate_hash(
|
9
|
-
|
8
|
+
def self.generate_hash(bytes)
|
9
|
+
Crypto.blake2_256 bytes
|
10
10
|
end
|
11
11
|
|
12
12
|
def self.decode(scale_bytes)
|
@@ -61,10 +61,10 @@ module Scale
|
|
61
61
|
|
62
62
|
if contains_transaction
|
63
63
|
result[:address] = Scale::Types.get("Address").decode(scale_bytes).value
|
64
|
-
result[:signature] =
|
65
|
-
result[:era] =
|
66
|
-
result[:nonce] =
|
67
|
-
result[:tip] =
|
64
|
+
result[:signature] = Scale::Types.get("MultiSignature").decode(scale_bytes).value
|
65
|
+
result[:era] = Scale::Types.get("Era").decode(scale_bytes).value
|
66
|
+
result[:nonce] = Scale::Types.get("Compact").decode(scale_bytes).value
|
67
|
+
result[:tip] = Scale::Types.get("Compact").decode(scale_bytes).value
|
68
68
|
result[:extrinsic_hash] = generate_hash(scale_bytes.bytes)
|
69
69
|
end
|
70
70
|
result[:call_index] = scale_bytes.get_next_bytes(2).bytes_to_hex[2..]
|
data/lib/scale/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scale.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wu Minzhe
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: blake2b_rs
|
@@ -229,7 +229,7 @@ licenses:
|
|
229
229
|
metadata:
|
230
230
|
allowed_push_host: https://rubygems.org
|
231
231
|
homepage_uri: https://github.com/itering/scale.rb
|
232
|
-
post_install_message:
|
232
|
+
post_install_message:
|
233
233
|
rdoc_options: []
|
234
234
|
require_paths:
|
235
235
|
- lib
|
@@ -244,8 +244,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
244
|
- !ruby/object:Gem::Version
|
245
245
|
version: '0'
|
246
246
|
requirements: []
|
247
|
-
rubygems_version: 3.
|
248
|
-
signing_key:
|
247
|
+
rubygems_version: 3.2.3
|
248
|
+
signing_key:
|
249
249
|
specification_version: 4
|
250
250
|
summary: Ruby SCALE Codec Library
|
251
251
|
test_files: []
|