web3-eth 0.2.17 → 0.2.18

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
  SHA1:
3
- metadata.gz: 4758d5a4540a14b447eb213e16092e860146af3f
4
- data.tar.gz: 3a1ac8621164a3c9b89e87c70453bb2025d20222
3
+ metadata.gz: ef2e2a4702c8bbc8d90fe1420188eaa0a91d41a9
4
+ data.tar.gz: b113e14d94b57914247e99db25e4ebeafb5bccd3
5
5
  SHA512:
6
- metadata.gz: ae81f830cab286398b126134345614421417b3ac279fed512403344f431192251faaacef0a85fc0bd3a89f4f5c2b48deb8ed095a9febef2744bca7ec9c79bb1f
7
- data.tar.gz: 1102a1c92255349f489f4568b609df283e6e77ed97a866f23524cd6fd76ad3bed641304219a732f0634ec2d9472880bb28609fb8b49005bfeda59814fb69f8c3
6
+ metadata.gz: 9db6bba7b6326de1c8ae7df3a50301335add974c23374dabe235a9bb3533f5bb5e75216bb5106a8949889ceccb53889aff293785a4a3bd979401d2baa664c527
7
+ data.tar.gz: 61bc07b2e203491d283eec3ba3286ef62ec058230b50be08296a90b29bf742d04da0c8c815dbbf8b22742592b3a8426d8de287d9760dd49c3d707bb25a573bb1
data/README.md CHANGED
@@ -211,7 +211,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
211
211
 
212
212
  ## Contributing
213
213
 
214
- Bug reports and pull requests are welcome on GitHub at https://github.com/izetex/web3-eth. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
214
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Bloxy-info/web3-eth. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
215
215
 
216
216
 
217
217
  ## License
@@ -249,7 +249,7 @@ module Web3::Eth::Abi
249
249
 
250
250
  def decode_type(type, arg)
251
251
  if type.kind_of?(Tuple)
252
- decode_abi(type.types, arg)
252
+ arg ? decode_abi(type.types, arg) : []
253
253
  elsif %w(string bytes).include?(type.base) && type.sub.empty?
254
254
  l = Utils.big_endian_to_int arg[0,32]
255
255
  data = arg[32..-1]
@@ -52,8 +52,8 @@ module Web3
52
52
  def parse_event_args log
53
53
 
54
54
  log_data = remove_0x_head log.raw_data['data']
55
- indexed_types = abi['inputs'].select{|a| a['indexed']}.collect{|a| a['type']}
56
- not_indexed_types = abi['inputs'].select{|a| !a['indexed']}.collect{|a| a['type']}
55
+ indexed_types = abi['inputs'].select{|a| a['indexed']}.collect{|a| parse_component_type a }
56
+ not_indexed_types = abi['inputs'].select{|a| !a['indexed']}.collect{|a| parse_component_type a }
57
57
 
58
58
  indexed_args = log.indexed_args
59
59
 
@@ -73,7 +73,7 @@ module Web3
73
73
  }
74
74
 
75
75
  elsif !indexed_args.empty? || !log_data.empty?
76
- all_types = abi['inputs'].collect{|a| a['type']}
76
+ all_types = abi['inputs'].collect{|a| parse_component_type a }
77
77
  [all_types[0...indexed_args.size], indexed_args].transpose.collect{|arg|
78
78
  decode_typed_data( arg.first, [arg.second].pack('H*') )
79
79
  } + decode_abi(all_types[indexed_args.size..-1], [log_data].pack('H*') )
@@ -1,5 +1,5 @@
1
1
  module Web3
2
2
  module Eth
3
- VERSION = "0.2.17"
3
+ VERSION = "0.2.18"
4
4
  end
5
5
  end
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{Web3 client to connect to Ethereum node by RPC.}
13
13
  spec.description = %q{Calling RPC methods of Ethereum node with Ruby.}
14
- spec.homepage = "https://github.com/izetex/web3-eth"
14
+ spec.homepage = "https://github.com/Bloxy-info/web3-eth"
15
15
  spec.license = "MIT"
16
16
 
17
17
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web3-eth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.17
4
+ version: 0.2.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - studnev
@@ -115,7 +115,7 @@ files:
115
115
  - lib/web3/eth/utility.rb
116
116
  - lib/web3/eth/version.rb
117
117
  - web3-eth.gemspec
118
- homepage: https://github.com/izetex/web3-eth
118
+ homepage: https://github.com/Bloxy-info/web3-eth
119
119
  licenses:
120
120
  - MIT
121
121
  metadata: {}