web3-eth 0.2.26 → 0.2.27

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: 04a20054ee7f26405967eea29b674421d1410c24
4
- data.tar.gz: f688374b7bb0bf2330e3f8df931be6d7e8128019
3
+ metadata.gz: e84fa6a6aba57237c6ec6b853d1ce5d5b8051f5a
4
+ data.tar.gz: 00727f7273363aab9457dc8102e82ccf9fd5bec3
5
5
  SHA512:
6
- metadata.gz: 15185e88ce2678b85dd5bb9952ffab924c1091fa3b25ca5a38bbb80fe00922bdde09fe86db009cccff7a79ac3f965261efc332eb1b511cb53dca9d932be354d8
7
- data.tar.gz: 616d13356ce97c25aac1777e6b3c04230c92fe79ef42d6ab7ec48e222660f699e9899f5f4cbf9e7936be4992321d43577f8ab8b2a98c443032491aec9c5f0943
6
+ metadata.gz: 3dff366d20131be002bf222322f3c95a7c1ab73022a12eedd85f57d375101e73299a98e54ad66b2083692b528c9687e5a424efdca18951cbe94662aac317e1f9
7
+ data.tar.gz: 9a9df26c93ecc3bbb1699773d370c619194fd3a6febd72ba01babcbe78e0b79d74f3acbbaf4930f3f70560c46fcf10db95179081bacb181123f3037e8f0b430c
@@ -35,10 +35,10 @@ module Web3
35
35
  @abi = abi
36
36
  @name = abi['name']
37
37
  @constant = !!abi['constant']
38
- @input_types = abi['inputs'].map{|a| parse_component_type a }
38
+ @input_types = abi['inputs'] ? abi['inputs'].map{|a| parse_component_type a } : []
39
39
  @output_types = abi['outputs'].map{|a| parse_component_type a } if abi['outputs']
40
40
  @signature = Abi::Utils.function_signature @name, @input_types
41
- @signature_hash = Abi::Utils.signature_hash @signature, (abi['type']=='event' ? 64 : 8)
41
+ @signature_hash = Abi::Utils.signature_hash @signature, (abi['type'].try(:downcase)=='event' ? 64 : 8)
42
42
  end
43
43
 
44
44
  def parse_component_type argument
@@ -204,7 +204,7 @@ module Web3
204
204
 
205
205
  abi.each{|a|
206
206
 
207
- case a['type']
207
+ case a['type'].try(:downcase)
208
208
  when 'function'
209
209
  method = ContractMethod.new(a)
210
210
  @functions[method.name] = method
@@ -16,6 +16,7 @@ module Web3
16
16
  end
17
17
 
18
18
  def remove_0x_head(s)
19
+ return s if !s || s.length<2
19
20
  s[0,2] == '0x' ? s[2..-1] : s
20
21
  end
21
22
 
@@ -1,5 +1,5 @@
1
1
  module Web3
2
2
  module Eth
3
- VERSION = "0.2.26"
3
+ VERSION = "0.2.27"
4
4
  end
5
5
  end
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.26
4
+ version: 0.2.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - studnev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-07-03 00:00:00.000000000 Z
11
+ date: 2019-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rlp