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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c509663910bc3e5dd790fd40e4e0d04ac4f589c44a0253b8b1b353b17687d82
4
- data.tar.gz: 30249e26671d18d7568c58df2926a5aa071a4ca7b25af443315c8a92a65d292f
3
+ metadata.gz: 8d342ac2094dc9dc08a602fb085b78b3ac85840a52b8206068fed6845b092df5
4
+ data.tar.gz: c514ffecdf9cbb37ea9d3e5c34d9e3a35a764ebd53f53231d0e6c5a28b4d79f8
5
5
  SHA512:
6
- metadata.gz: 4ce9f292eeca2be4bc9f2967f9806730bedfd2fc14b4837a6d3cbea2808f62fbadffd31a40e218968ad2bac886338359bb01c164ed9a781186d78f54dbfb7293
7
- data.tar.gz: 590a67087cdd8fe40717a0ec255bf0c824e807eec1f5f476c856b5002280f7680f0534559648e3ec3470a66194fd9fa141a1b1a277bbebc8dea15cc838027c5c
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
- RUN gem install bundler:1.17.3 && \
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- scale.rb (0.2.18)
4
+ scale.rb (0.2.19)
5
5
  base58
6
6
  blake2b_rs (~> 0.1.2)
7
7
  faye-websocket
data/README.md CHANGED
@@ -19,7 +19,7 @@ Because the feature of ruby 2.6 is used, the ruby version is required to be >= 2
19
19
  Add this line to your application's Gemfile:
20
20
 
21
21
  ```ruby
22
- gem 'scale.rb', '0.2.18'
22
+ gem 'scale.rb', '0.2.19'
23
23
  ```
24
24
 
25
25
  And then execute:
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(data)
9
- Blake2b.hex data, Blake2b::Key.none, 32
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] = 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
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
@@ -1,3 +1,3 @@
1
1
  module Scale
2
- VERSION = "0.2.18".freeze
2
+ VERSION = "0.2.19".freeze
3
3
  end
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.18
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-05 00:00:00.000000000 Z
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.1.4
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: []