web3-eth 0.2.47 → 0.2.48
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/web3/eth/abi/abi_coder.rb +13 -4
- data/lib/web3/eth/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: 337174dd38a29930910926ec514a3147aaf5656a5ae602ff80bd9e3d82dea2a1
|
4
|
+
data.tar.gz: 7940b9dd70ca348518e66fef6a7894c5e7877f42b119bc7b76a833e3dcc674ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aa2ef6edae9e986e05232a6e6ddd62d20bce5d0a1db1f5b1f8401c68703fd92ffe1cc1b76d6763dd07ce716082c4a67bd8ac161ddb08cc1f85ba7e9ed2b30ff
|
7
|
+
data.tar.gz: 795dd7071b2254b4bae126f945016ef464f49b7906d85eaeb73c2074a619f444459b082b48313515b95f2bbb9a170ab33d5f7ee865ec4d542851a35deb3f0bcb
|
@@ -290,6 +290,19 @@ module Web3::Eth::Abi
|
|
290
290
|
l = Utils.big_endian_to_int arg[0,32]
|
291
291
|
data = arg[32..-1]
|
292
292
|
data[0, l]
|
293
|
+
elsif !type.dims.empty? && (l = type.dims.last)>0 # static-sized arrays
|
294
|
+
subtype = type.subtype
|
295
|
+
if subtype.dynamic?
|
296
|
+
start_positions = (0...l).map {|i| Utils.big_endian_to_int(arg[32*i, 32]) }
|
297
|
+
start_positions.push arg.size
|
298
|
+
|
299
|
+
outputs = (0...l).map {|i| arg[start_positions[i]...start_positions[i+1]] }
|
300
|
+
|
301
|
+
outputs.map {|out| decode_type(subtype, out) }
|
302
|
+
else
|
303
|
+
(0...l).map {|i| decode_type(subtype, arg[subtype.size*i, subtype.size]) }
|
304
|
+
end
|
305
|
+
|
293
306
|
elsif type.dynamic?
|
294
307
|
l = Utils.big_endian_to_int arg[0,32]
|
295
308
|
raise DecodingError, "Too long length: #{l}" if l>100000
|
@@ -307,11 +320,7 @@ module Web3::Eth::Abi
|
|
307
320
|
else
|
308
321
|
(0...l).map {|i| decode_type(subtype, arg[32 + subtype.size*i, subtype.size]) }
|
309
322
|
end
|
310
|
-
elsif !type.dims.empty? # static-sized arrays
|
311
|
-
l = type.dims.last
|
312
|
-
subtype = type.subtype
|
313
323
|
|
314
|
-
(0...l).map {|i| decode_type(subtype, arg[subtype.size*i, subtype.size]) }
|
315
324
|
else
|
316
325
|
decode_primitive_type type, arg
|
317
326
|
end
|
data/lib/web3/eth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web3-eth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.48
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- studnev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rlp
|