web3-eth 0.2.17 → 0.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/web3/eth/abi/abi_coder.rb +1 -1
- data/lib/web3/eth/contract.rb +3 -3
- data/lib/web3/eth/version.rb +1 -1
- data/web3-eth.gemspec +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: ef2e2a4702c8bbc8d90fe1420188eaa0a91d41a9
|
4
|
+
data.tar.gz: b113e14d94b57914247e99db25e4ebeafb5bccd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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/
|
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]
|
data/lib/web3/eth/contract.rb
CHANGED
@@ -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
|
56
|
-
not_indexed_types = abi['inputs'].select{|a| !a['indexed']}.collect{|a| a
|
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
|
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*') )
|
data/lib/web3/eth/version.rb
CHANGED
data/web3-eth.gemspec
CHANGED
@@ -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/
|
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.
|
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/
|
118
|
+
homepage: https://github.com/Bloxy-info/web3-eth
|
119
119
|
licenses:
|
120
120
|
- MIT
|
121
121
|
metadata: {}
|