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 +4 -4
- data/lib/web3/eth/contract.rb +3 -3
- data/lib/web3/eth/utility.rb +1 -0
- data/lib/web3/eth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e84fa6a6aba57237c6ec6b853d1ce5d5b8051f5a
|
4
|
+
data.tar.gz: 00727f7273363aab9457dc8102e82ccf9fd5bec3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dff366d20131be002bf222322f3c95a7c1ab73022a12eedd85f57d375101e73299a98e54ad66b2083692b528c9687e5a424efdca18951cbe94662aac317e1f9
|
7
|
+
data.tar.gz: 9a9df26c93ecc3bbb1699773d370c619194fd3a6febd72ba01babcbe78e0b79d74f3acbbaf4930f3f70560c46fcf10db95179081bacb181123f3037e8f0b430c
|
data/lib/web3/eth/contract.rb
CHANGED
@@ -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
|
data/lib/web3/eth/utility.rb
CHANGED
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.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-
|
11
|
+
date: 2019-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rlp
|