web3-eth 0.2.8 → 0.2.9
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/lib/web3/eth/transaction.rb +12 -1
- data/lib/web3/eth/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e09adeb9e9ed5711392de809484bec3ceb4a2444
|
|
4
|
+
data.tar.gz: '039122f8295b2523971411c1f82420cbe289a8e6'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4632079a918256abe89ee062d65209ab2946632e2a03ba0e1954ff625aa87e22315a40775866667c3a4ad93e9f56b94a6ea77d047e8bdeea9dfb263f93a61153
|
|
7
|
+
data.tar.gz: 1d40aef9c47ebac539c3cd2b7e2960480337e3218b1b87c8cc1757efdb1c3f486135e9d495b2df12a7c9477d4208a7875bd2c392f321f3ff34e531a82515fdfb
|
data/lib/web3/eth/transaction.rb
CHANGED
|
@@ -27,7 +27,7 @@ module Web3
|
|
|
27
27
|
# look http://solidity.readthedocs.io/en/latest/metadata.html for details
|
|
28
28
|
def call_input_data
|
|
29
29
|
if creates && input
|
|
30
|
-
input
|
|
30
|
+
fetch_constructor_data input
|
|
31
31
|
elsif input && input.length>10
|
|
32
32
|
input[10..input.length]
|
|
33
33
|
else
|
|
@@ -55,6 +55,17 @@ module Web3
|
|
|
55
55
|
wei_to_ether from_hex gasPrice
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
private
|
|
59
|
+
|
|
60
|
+
CONSTRUCTOR_SEQ = /a165627a7a72305820\w{64}0029(\w*)$/
|
|
61
|
+
def fetch_constructor_data input
|
|
62
|
+
data = input
|
|
63
|
+
while d = data[CONSTRUCTOR_SEQ,1]
|
|
64
|
+
data = d
|
|
65
|
+
end
|
|
66
|
+
data
|
|
67
|
+
end
|
|
68
|
+
|
|
58
69
|
end
|
|
59
70
|
end
|
|
60
71
|
end
|
data/lib/web3/eth/version.rb
CHANGED