web3-eth 0.2.34 → 0.2.39
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06b6a7ca74b920b4c3523a8596af68e62e1e6cce616e3f09d474a1eaf937582f
|
4
|
+
data.tar.gz: 03a8870df0f983a7580da1bbd83d533569162746b28dac455c19cd6abad637ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25cd057ffc4466c880f8f37e243edb5cd05715deb9197b4672f92a1a7a0b01cd7e5a71c9fd129d799ae4b53c836934574d25b36345fb9b5bdfef10806726e645
|
7
|
+
data.tar.gz: 93cd8fccb6a8159c1eefa7a73a98512d51695505c14ddf52727fcf766d258be43c8fd9b44c33492fa6a56dc03f0f1f49bc98ba446a607d7ea5682c9fbd2da68d
|
@@ -16,7 +16,10 @@ module Web3::Eth::Debug
|
|
16
16
|
end
|
17
17
|
|
18
18
|
def traceBlockByNumber number, tracer = 'callTracer', convert_to_object = true
|
19
|
-
|
19
|
+
timeout = @web3_rpc.connect_options[:read_timeout] || 120
|
20
|
+
raw = @web3_rpc.request("#{PREFIX}#{__method__}", [hex(number), {tracer: tracer,
|
21
|
+
timeout: "#{timeout}s"}])
|
22
|
+
raise raw.first['error'] if (raw.first && raw.first['error'])
|
20
23
|
convert_to_object ? raw.map{|r| TransactionCallTrace.new(r['result'])} : raw
|
21
24
|
end
|
22
25
|
|
@@ -4,11 +4,12 @@ module Web3::Eth::Debug
|
|
4
4
|
|
5
5
|
include Web3::Eth::Utility
|
6
6
|
|
7
|
-
attr_reader :raw_data, :calls, :traceAddress
|
8
|
-
def initialize raw, traceAddress = []
|
7
|
+
attr_reader :raw_data, :calls, :traceAddress, :parent
|
8
|
+
def initialize raw, traceAddress = [], parent = nil
|
9
9
|
@raw_data = raw
|
10
10
|
@traceAddress = traceAddress
|
11
|
-
@
|
11
|
+
@parent = parent
|
12
|
+
@calls = raw['calls'] ? raw['calls'].each_with_index.map{|c,i| TransactionCallTrace.new c, (traceAddress + [i]), self } : []
|
12
13
|
end
|
13
14
|
|
14
15
|
# CALL STATICCALL DELEGATECALL CREATE SELFDESTRUCT
|
@@ -19,10 +20,14 @@ module Web3::Eth::Debug
|
|
19
20
|
def action
|
20
21
|
{
|
21
22
|
'callType' => type.downcase,
|
22
|
-
'address' => raw_data['to']
|
23
|
+
'address' => ( suicide? ? parent.smart_contract : raw_data['to'])
|
23
24
|
}
|
24
25
|
end
|
25
26
|
|
27
|
+
def smart_contract
|
28
|
+
['STATICCALL','CALL'].include?(type) ? to : from
|
29
|
+
end
|
30
|
+
|
26
31
|
def creates
|
27
32
|
(type=='CREATE' || type=='CREATE2') ? to : nil
|
28
33
|
end
|
data/lib/web3/eth/rpc.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.39
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- studnev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rlp
|