From 6fe0b23fd49aff2a5489e4a397bfbb5f27c2d852 Mon Sep 17 00:00:00 2001 From: q9f <58883403+q9f@users.noreply.github.com> Date: Tue, 17 Dec 2024 13:18:40 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20q9f/eth.?= =?UTF-8?q?rb@d6e51778d2081eae0814b1d7249fd6717e85ea45=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Eth.html | 2 +- Eth/Abi.html | 2 +- Eth/Abi/Decoder.html | 2 +- Eth/Abi/DecodingError.html | 2 +- Eth/Abi/Encoder.html | 2 +- Eth/Abi/EncodingError.html | 2 +- Eth/Abi/Event.html | 2 +- Eth/Abi/Event/LogDescription.html | 2 +- Eth/Abi/Type.html | 2 +- Eth/Abi/Type/ParseError.html | 2 +- Eth/Abi/ValueOutOfBounds.html | 2 +- Eth/Address.html | 2 +- Eth/Address/CheckSumError.html | 2 +- Eth/Api.html | 2 +- Eth/Chain.html | 2 +- Eth/Chain/ReplayProtectionError.html | 2 +- Eth/Client.html | 2 +- Eth/Client/ContractExecutionError.html | 2 +- Eth/Client/Http.html | 2 +- Eth/Client/Ipc.html | 2 +- Eth/Constant.html | 2 +- Eth/Contract.html | 2 +- Eth/Contract/Event.html | 2 +- Eth/Contract/Function.html | 2 +- Eth/Contract/FunctionInput.html | 2 +- Eth/Contract/FunctionOutput.html | 2 +- Eth/Contract/Initializer.html | 2 +- Eth/Eip712.html | 2 +- Eth/Eip712/TypedDataError.html | 2 +- Eth/Ens.html | 2 +- Eth/Ens/CoinType.html | 2 +- Eth/Ens/Resolver.html | 2 +- Eth/Key.html | 2 +- Eth/Key/Decrypter.html | 2 +- Eth/Key/Decrypter/DecrypterError.html | 2 +- Eth/Key/Encrypter.html | 2 +- Eth/Key/Encrypter/EncrypterError.html | 2 +- Eth/Rlp.html | 2 +- Eth/Rlp/Data.html | 2 +- Eth/Rlp/Decoder.html | 2 +- Eth/Rlp/DecodingError.html | 2 +- Eth/Rlp/DeserializationError.html | 2 +- Eth/Rlp/Encoder.html | 2 +- Eth/Rlp/EncodingError.html | 2 +- Eth/Rlp/RlpException.html | 2 +- Eth/Rlp/Sedes.html | 2 +- Eth/Rlp/Sedes/BigEndianInt.html | 2 +- Eth/Rlp/Sedes/Binary.html | 2 +- Eth/Rlp/Sedes/List.html | 2 +- Eth/Rlp/SerializationError.html | 2 +- Eth/Signature.html | 2 +- Eth/Signature/SignatureError.html | 2 +- Eth/Solidity.html | 2 +- Eth/Solidity/CompilerError.html | 2 +- Eth/Tx.html | 2 +- Eth/Tx/DecoderError.html | 2 +- Eth/Tx/Eip1559.html | 2 +- Eth/Tx/Eip2930.html | 2 +- Eth/Tx/Legacy.html | 2 +- Eth/Tx/ParameterError.html | 2 +- Eth/Tx/TransactionTypeError.html | 2 +- Eth/Unit.html | 2 +- Eth/Util.html | 406 +++++++++++++------------ _index.html | 2 +- file.README.html | 2 +- index.html | 2 +- top-level-namespace.html | 2 +- 67 files changed, 271 insertions(+), 267 deletions(-) diff --git a/Eth.html b/Eth.html index 0ede8aef..3f4c1f1b 100644 --- a/Eth.html +++ b/Eth.html @@ -195,7 +195,7 @@

diff --git a/Eth/Abi.html b/Eth/Abi.html index 0645517f..e31b55ac 100644 --- a/Eth/Abi.html +++ b/Eth/Abi.html @@ -936,7 +936,7 @@

diff --git a/Eth/Abi/Decoder.html b/Eth/Abi/Decoder.html index 83cf3017..3c230f6d 100644 --- a/Eth/Abi/Decoder.html +++ b/Eth/Abi/Decoder.html @@ -1116,7 +1116,7 @@

diff --git a/Eth/Abi/DecodingError.html b/Eth/Abi/DecodingError.html index 44c82f23..858b5e80 100644 --- a/Eth/Abi/DecodingError.html +++ b/Eth/Abi/DecodingError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Abi/Encoder.html b/Eth/Abi/Encoder.html index 835b90bd..6c194d7c 100644 --- a/Eth/Abi/Encoder.html +++ b/Eth/Abi/Encoder.html @@ -1044,7 +1044,7 @@

diff --git a/Eth/Abi/EncodingError.html b/Eth/Abi/EncodingError.html index 096fdf31..7c875d41 100644 --- a/Eth/Abi/EncodingError.html +++ b/Eth/Abi/EncodingError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Abi/Event.html b/Eth/Abi/Event.html index b5ec06ae..a7ae0d03 100644 --- a/Eth/Abi/Event.html +++ b/Eth/Abi/Event.html @@ -1490,7 +1490,7 @@

diff --git a/Eth/Abi/Event/LogDescription.html b/Eth/Abi/Event/LogDescription.html index acbf6afe..2828011d 100644 --- a/Eth/Abi/Event/LogDescription.html +++ b/Eth/Abi/Event/LogDescription.html @@ -682,7 +682,7 @@

diff --git a/Eth/Abi/Type.html b/Eth/Abi/Type.html index c4a2b07a..dacb286b 100644 --- a/Eth/Abi/Type.html +++ b/Eth/Abi/Type.html @@ -1470,7 +1470,7 @@

diff --git a/Eth/Abi/Type/ParseError.html b/Eth/Abi/Type/ParseError.html index 475e3657..3ab986f7 100644 --- a/Eth/Abi/Type/ParseError.html +++ b/Eth/Abi/Type/ParseError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Abi/ValueOutOfBounds.html b/Eth/Abi/ValueOutOfBounds.html index 0e2260bf..8dfee276 100644 --- a/Eth/Abi/ValueOutOfBounds.html +++ b/Eth/Abi/ValueOutOfBounds.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Address.html b/Eth/Address.html index 00fc1ff2..3a8fbeb1 100644 --- a/Eth/Address.html +++ b/Eth/Address.html @@ -642,7 +642,7 @@

diff --git a/Eth/Address/CheckSumError.html b/Eth/Address/CheckSumError.html index dc3cb281..674333f0 100644 --- a/Eth/Address/CheckSumError.html +++ b/Eth/Address/CheckSumError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Api.html b/Eth/Api.html index 9a9641df..dbf12ab4 100644 --- a/Eth/Api.html +++ b/Eth/Api.html @@ -325,7 +325,7 @@

diff --git a/Eth/Chain.html b/Eth/Chain.html index 5c2f9805..104c3d9f 100644 --- a/Eth/Chain.html +++ b/Eth/Chain.html @@ -1995,7 +1995,7 @@

diff --git a/Eth/Chain/ReplayProtectionError.html b/Eth/Chain/ReplayProtectionError.html index 87cfa30d..6d283051 100644 --- a/Eth/Chain/ReplayProtectionError.html +++ b/Eth/Chain/ReplayProtectionError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Client.html b/Eth/Client.html index a54cc446..5bbb176f 100644 --- a/Eth/Client.html +++ b/Eth/Client.html @@ -3865,7 +3865,7 @@

diff --git a/Eth/Client/ContractExecutionError.html b/Eth/Client/ContractExecutionError.html index dcd8a686..e0f44b0a 100644 --- a/Eth/Client/ContractExecutionError.html +++ b/Eth/Client/ContractExecutionError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Client/Http.html b/Eth/Client/Http.html index d6faee7c..c577e533 100644 --- a/Eth/Client/Http.html +++ b/Eth/Client/Http.html @@ -756,7 +756,7 @@

diff --git a/Eth/Client/Ipc.html b/Eth/Client/Ipc.html index 2105bfb5..d7d77a5c 100644 --- a/Eth/Client/Ipc.html +++ b/Eth/Client/Ipc.html @@ -433,7 +433,7 @@

diff --git a/Eth/Constant.html b/Eth/Constant.html index f70aa531..8cc07ed1 100644 --- a/Eth/Constant.html +++ b/Eth/Constant.html @@ -373,7 +373,7 @@

diff --git a/Eth/Contract.html b/Eth/Contract.html index a38396cf..4e3794cf 100644 --- a/Eth/Contract.html +++ b/Eth/Contract.html @@ -1891,7 +1891,7 @@

diff --git a/Eth/Contract/Event.html b/Eth/Contract/Event.html index 9028ea9c..7220ed3f 100644 --- a/Eth/Contract/Event.html +++ b/Eth/Contract/Event.html @@ -757,7 +757,7 @@

diff --git a/Eth/Contract/Function.html b/Eth/Contract/Function.html index 03323474..ff062606 100644 --- a/Eth/Contract/Function.html +++ b/Eth/Contract/Function.html @@ -909,7 +909,7 @@

diff --git a/Eth/Contract/FunctionInput.html b/Eth/Contract/FunctionInput.html index 63ae5cb3..48e25d86 100644 --- a/Eth/Contract/FunctionInput.html +++ b/Eth/Contract/FunctionInput.html @@ -519,7 +519,7 @@

diff --git a/Eth/Contract/FunctionOutput.html b/Eth/Contract/FunctionOutput.html index f441f491..7d45140b 100644 --- a/Eth/Contract/FunctionOutput.html +++ b/Eth/Contract/FunctionOutput.html @@ -376,7 +376,7 @@

diff --git a/Eth/Contract/Initializer.html b/Eth/Contract/Initializer.html index 3105cfeb..97039b3c 100644 --- a/Eth/Contract/Initializer.html +++ b/Eth/Contract/Initializer.html @@ -467,7 +467,7 @@

diff --git a/Eth/Eip712.html b/Eth/Eip712.html index af24a3a0..a1d14d91 100644 --- a/Eth/Eip712.html +++ b/Eth/Eip712.html @@ -2296,7 +2296,7 @@

diff --git a/Eth/Eip712/TypedDataError.html b/Eth/Eip712/TypedDataError.html index 66d01a7d..3a720811 100644 --- a/Eth/Eip712/TypedDataError.html +++ b/Eth/Eip712/TypedDataError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Ens.html b/Eth/Ens.html index 8dfca160..bdeb7d77 100644 --- a/Eth/Ens.html +++ b/Eth/Ens.html @@ -157,7 +157,7 @@

diff --git a/Eth/Ens/CoinType.html b/Eth/Ens/CoinType.html index 38d162ea..edfb87a5 100644 --- a/Eth/Ens/CoinType.html +++ b/Eth/Ens/CoinType.html @@ -255,7 +255,7 @@

diff --git a/Eth/Ens/Resolver.html b/Eth/Ens/Resolver.html index e04a2802..7c0924cb 100644 --- a/Eth/Ens/Resolver.html +++ b/Eth/Ens/Resolver.html @@ -1090,7 +1090,7 @@

diff --git a/Eth/Key.html b/Eth/Key.html index fef3fae1..0467ffa6 100644 --- a/Eth/Key.html +++ b/Eth/Key.html @@ -1400,7 +1400,7 @@

diff --git a/Eth/Key/Decrypter.html b/Eth/Key/Decrypter.html index a1017489..05cff867 100644 --- a/Eth/Key/Decrypter.html +++ b/Eth/Key/Decrypter.html @@ -483,7 +483,7 @@

diff --git a/Eth/Key/Decrypter/DecrypterError.html b/Eth/Key/Decrypter/DecrypterError.html index 511b991d..1b0b4382 100644 --- a/Eth/Key/Decrypter/DecrypterError.html +++ b/Eth/Key/Decrypter/DecrypterError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Key/Encrypter.html b/Eth/Key/Encrypter.html index 2ca2fbc6..89b3b40c 100644 --- a/Eth/Key/Encrypter.html +++ b/Eth/Key/Encrypter.html @@ -868,7 +868,7 @@

diff --git a/Eth/Key/Encrypter/EncrypterError.html b/Eth/Key/Encrypter/EncrypterError.html index bb40308a..98bd7a71 100644 --- a/Eth/Key/Encrypter/EncrypterError.html +++ b/Eth/Key/Encrypter/EncrypterError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Rlp.html b/Eth/Rlp.html index 3ece44b7..d9eff0dc 100644 --- a/Eth/Rlp.html +++ b/Eth/Rlp.html @@ -574,7 +574,7 @@

diff --git a/Eth/Rlp/Data.html b/Eth/Rlp/Data.html index b11068ec..a2b4d495 100644 --- a/Eth/Rlp/Data.html +++ b/Eth/Rlp/Data.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Rlp/Decoder.html b/Eth/Rlp/Decoder.html index 3f941c95..d5fdc97b 100644 --- a/Eth/Rlp/Decoder.html +++ b/Eth/Rlp/Decoder.html @@ -422,7 +422,7 @@

diff --git a/Eth/Rlp/DecodingError.html b/Eth/Rlp/DecodingError.html index 9a630196..45ed4b25 100644 --- a/Eth/Rlp/DecodingError.html +++ b/Eth/Rlp/DecodingError.html @@ -129,7 +129,7 @@

Overview

diff --git a/Eth/Rlp/DeserializationError.html b/Eth/Rlp/DeserializationError.html index f9044636..cc6cb76f 100644 --- a/Eth/Rlp/DeserializationError.html +++ b/Eth/Rlp/DeserializationError.html @@ -129,7 +129,7 @@

Overview

diff --git a/Eth/Rlp/Encoder.html b/Eth/Rlp/Encoder.html index edaa751e..ee5377c3 100644 --- a/Eth/Rlp/Encoder.html +++ b/Eth/Rlp/Encoder.html @@ -422,7 +422,7 @@

diff --git a/Eth/Rlp/EncodingError.html b/Eth/Rlp/EncodingError.html index 584edc31..257b89a3 100644 --- a/Eth/Rlp/EncodingError.html +++ b/Eth/Rlp/EncodingError.html @@ -129,7 +129,7 @@

Overview

diff --git a/Eth/Rlp/RlpException.html b/Eth/Rlp/RlpException.html index 530459d1..431f0963 100644 --- a/Eth/Rlp/RlpException.html +++ b/Eth/Rlp/RlpException.html @@ -129,7 +129,7 @@

Direct Known Subclasses

diff --git a/Eth/Rlp/Sedes.html b/Eth/Rlp/Sedes.html index 7dfe10d9..e63328bb 100644 --- a/Eth/Rlp/Sedes.html +++ b/Eth/Rlp/Sedes.html @@ -517,7 +517,7 @@

diff --git a/Eth/Rlp/Sedes/BigEndianInt.html b/Eth/Rlp/Sedes/BigEndianInt.html index 986fb87a..355591b4 100644 --- a/Eth/Rlp/Sedes/BigEndianInt.html +++ b/Eth/Rlp/Sedes/BigEndianInt.html @@ -530,7 +530,7 @@

diff --git a/Eth/Rlp/Sedes/Binary.html b/Eth/Rlp/Sedes/Binary.html index 86787a6c..f17976a6 100644 --- a/Eth/Rlp/Sedes/Binary.html +++ b/Eth/Rlp/Sedes/Binary.html @@ -894,7 +894,7 @@

diff --git a/Eth/Rlp/Sedes/List.html b/Eth/Rlp/Sedes/List.html index 8f46b8e6..e8fbccd7 100644 --- a/Eth/Rlp/Sedes/List.html +++ b/Eth/Rlp/Sedes/List.html @@ -573,7 +573,7 @@

diff --git a/Eth/Rlp/SerializationError.html b/Eth/Rlp/SerializationError.html index d716d936..dd99ba91 100644 --- a/Eth/Rlp/SerializationError.html +++ b/Eth/Rlp/SerializationError.html @@ -129,7 +129,7 @@

Overview

diff --git a/Eth/Signature.html b/Eth/Signature.html index 50311251..1461af20 100644 --- a/Eth/Signature.html +++ b/Eth/Signature.html @@ -2109,7 +2109,7 @@

diff --git a/Eth/Signature/SignatureError.html b/Eth/Signature/SignatureError.html index a954465f..e41266a3 100644 --- a/Eth/Signature/SignatureError.html +++ b/Eth/Signature/SignatureError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Solidity.html b/Eth/Solidity.html index 9492856d..1a097c1b 100644 --- a/Eth/Solidity.html +++ b/Eth/Solidity.html @@ -493,7 +493,7 @@

diff --git a/Eth/Solidity/CompilerError.html b/Eth/Solidity/CompilerError.html index 65c365b9..2bc6c62f 100644 --- a/Eth/Solidity/CompilerError.html +++ b/Eth/Solidity/CompilerError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Tx.html b/Eth/Tx.html index c86ce76b..5f9aec1d 100644 --- a/Eth/Tx.html +++ b/Eth/Tx.html @@ -3853,7 +3853,7 @@

diff --git a/Eth/Tx/DecoderError.html b/Eth/Tx/DecoderError.html index 670446b5..cb53d422 100644 --- a/Eth/Tx/DecoderError.html +++ b/Eth/Tx/DecoderError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Tx/Eip1559.html b/Eth/Tx/Eip1559.html index bf9a1d8b..deb6944e 100644 --- a/Eth/Tx/Eip1559.html +++ b/Eth/Tx/Eip1559.html @@ -2583,7 +2583,7 @@

diff --git a/Eth/Tx/Eip2930.html b/Eth/Tx/Eip2930.html index ca17d30b..45dd4871 100644 --- a/Eth/Tx/Eip2930.html +++ b/Eth/Tx/Eip2930.html @@ -2486,7 +2486,7 @@

diff --git a/Eth/Tx/Legacy.html b/Eth/Tx/Legacy.html index 7fd041da..c6953bd9 100644 --- a/Eth/Tx/Legacy.html +++ b/Eth/Tx/Legacy.html @@ -2326,7 +2326,7 @@

diff --git a/Eth/Tx/ParameterError.html b/Eth/Tx/ParameterError.html index e4c0f718..932a0c84 100644 --- a/Eth/Tx/ParameterError.html +++ b/Eth/Tx/ParameterError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Tx/TransactionTypeError.html b/Eth/Tx/TransactionTypeError.html index f29104ee..1ace7d8f 100644 --- a/Eth/Tx/TransactionTypeError.html +++ b/Eth/Tx/TransactionTypeError.html @@ -125,7 +125,7 @@

Overview

diff --git a/Eth/Unit.html b/Eth/Unit.html index a234f550..22e7ae97 100644 --- a/Eth/Unit.html +++ b/Eth/Unit.html @@ -255,7 +255,7 @@

diff --git a/Eth/Util.html b/Eth/Util.html index dd0e5cfa..b13dc44a 100644 --- a/Eth/Util.html +++ b/Eth/Util.html @@ -1305,12 +1305,12 @@

 
 
-146
-147
-148
+149 +150 +151 -
# File 'lib/eth/util.rb', line 146
+      
# File 'lib/eth/util.rb', line 149
 
 def big_endian_to_int(str)
   str.unpack("H*").first.to_i(16)
@@ -1402,17 +1402,17 @@ 

 
 
-49
-50
 51
-52
+52 +53 +54

-
# File 'lib/eth/util.rb', line 49
+      
# File 'lib/eth/util.rb', line 51
 
 def bin_to_hex(bin)
   raise TypeError, "Value must be an instance of String" unless bin.instance_of? String
-  bin.unpack("H*").first
+  hex = bin.unpack("H*").first
 end
@@ -1483,12 +1483,12 @@

 
 
-89
-90
-91
+92 +93 +94

-
# File 'lib/eth/util.rb', line 89
+      
# File 'lib/eth/util.rb', line 92
 
 def bin_to_prefixed_hex(bin)
   prefix_hex bin_to_hex bin
@@ -1562,12 +1562,12 @@ 

 
 
-170
-171
-172
+173 +174 +175

-
# File 'lib/eth/util.rb', line 170
+      
# File 'lib/eth/util.rb', line 173
 
 def bytes?(str)
   str && str.instance_of?(String) && str.encoding.name == Constant::BINARY_ENCODING
@@ -1641,12 +1641,12 @@ 

 
 
-162
-163
-164
+165 +166 +167

-
# File 'lib/eth/util.rb', line 162
+      
# File 'lib/eth/util.rb', line 165
 
 def bytes_to_str(bin)
   bin.unpack("U*").pack("U*")
@@ -1720,12 +1720,12 @@ 

 
 
-194
-195
-196
+197 +198 +199

-
# File 'lib/eth/util.rb', line 194
+      
# File 'lib/eth/util.rb', line 197
 
 def ceil32(num)
   num % 32 == 0 ? num : (num + 32 - num % 32)
@@ -1799,12 +1799,12 @@ 

 
 
-138
-139
-140
+141 +142 +143

-
# File 'lib/eth/util.rb', line 138
+      
# File 'lib/eth/util.rb', line 141
 
 def deserialize_big_endian_to_int(str)
   Rlp::Sedes.big_endian_int.deserialize str.sub(/\A(\x00)+/, "")
@@ -1878,14 +1878,14 @@ 

 
 
-97
-98
-99
 100
-101
+101 +102 +103 +104

-
# File 'lib/eth/util.rb', line 97
+      
# File 'lib/eth/util.rb', line 100
 
 def hex?(str)
   return false unless str.is_a? String
@@ -1979,21 +1979,23 @@ 

 
 
-60
-61
 62
 63
 64
-65
+65 +66 +67 +68

-
# File 'lib/eth/util.rb', line 60
+      
# File 'lib/eth/util.rb', line 62
 
 def hex_to_bin(hex)
   raise TypeError, "Value must be an instance of String" unless hex.instance_of? String
   hex = remove_hex_prefix hex
   raise TypeError, "Non-hexadecimal digit found" unless hex? hex
-  [hex].pack("H*")
+  hex = "0#{hex}" if hex.size % 2 != 0
+  bin = [hex].pack("H*")
 end
@@ -2064,14 +2066,14 @@

 
 
-128
-129
-130
 131
-132
+132 +133 +134 +135

-
# File 'lib/eth/util.rb', line 128
+      
# File 'lib/eth/util.rb', line 131
 
 def int_to_big_endian(num)
   hex = num.to_s(16) unless hex? num
@@ -2147,12 +2149,12 @@ 

 
 
-40
-41
-42
+42 +43 +44

-
# File 'lib/eth/util.rb', line 40
+      
# File 'lib/eth/util.rb', line 42
 
 def keccak256(str)
   Digest::Keccak.new(256).digest str
@@ -2226,12 +2228,12 @@ 

 
 
-186
-187
-188
+189 +190 +191

-
# File 'lib/eth/util.rb', line 186
+      
# File 'lib/eth/util.rb', line 189
 
 def list?(item)
   !primitive?(item) && item.respond_to?(:each)
@@ -2337,13 +2339,13 @@ 

 
 
-204
-205
-206
-207
+207 +208 +209 +210

-
# File 'lib/eth/util.rb', line 204
+      
# File 'lib/eth/util.rb', line 207
 
 def lpad(str, sym, len)
   return str if str.size >= len
@@ -2418,13 +2420,13 @@ 

 
 
-71
-72
-73
-74
+74 +75 +76 +77

-
# File 'lib/eth/util.rb', line 71
+      
# File 'lib/eth/util.rb', line 74
 
 def prefix_hex(hex)
   return hex if prefixed? hex
@@ -2499,12 +2501,12 @@ 

 
 
-107
-108
-109
+110 +111 +112

-
# File 'lib/eth/util.rb', line 107
+      
# File 'lib/eth/util.rb', line 110
 
 def prefixed?(hex)
   hex.match /\A0x/
@@ -2578,12 +2580,12 @@ 

 
 
-178
-179
-180
+181 +182 +183

-
# File 'lib/eth/util.rb', line 178
+      
# File 'lib/eth/util.rb', line 181
 
 def primitive?(item)
   item.instance_of?(String)
@@ -2657,15 +2659,15 @@ 

 
 
-29
-30
 31
 32
 33
-34
+34 +35 +36

-
# File 'lib/eth/util.rb', line 29
+      
# File 'lib/eth/util.rb', line 31
 
 def public_key_to_address(str)
   str = hex_to_bin str if hex? str
@@ -2742,13 +2744,13 @@ 

 
 
-80
-81
-82
-83
+83 +84 +85 +86

-
# File 'lib/eth/util.rb', line 80
+      
# File 'lib/eth/util.rb', line 83
 
 def remove_hex_prefix(hex)
   return hex[2..-1] if prefixed? hex
@@ -2841,16 +2843,16 @@ 

 
 
-116
-117
-118
 119
 120
 121
-122
+122 +123 +124 +125

-
# File 'lib/eth/util.rb', line 116
+      
# File 'lib/eth/util.rb', line 119
 
 def serialize_int_to_big_endian(num)
   num = num.to_i(16) if hex? num
@@ -2928,12 +2930,12 @@ 

 
 
-154
-155
-156
+157 +158 +159

-
# File 'lib/eth/util.rb', line 154
+      
# File 'lib/eth/util.rb', line 157
 
 def str_to_bytes(str)
   bytes?(str) ? str : str.b
@@ -3023,12 +3025,12 @@ 

 
 
-214
-215
-216
+217 +218 +219

-
# File 'lib/eth/util.rb', line 214
+      
# File 'lib/eth/util.rb', line 217
 
 def zpad(str, len)
   lpad str, Constant::BYTE_ZERO, len
@@ -3120,12 +3122,12 @@ 

 
 
-223
-224
-225
+226 +227 +228

-
# File 'lib/eth/util.rb', line 223
+      
# File 'lib/eth/util.rb', line 226
 
 def zpad_hex(hex, len = 32)
   zpad hex_to_bin(hex), len
@@ -3217,12 +3219,12 @@ 

 
 
-232
-233
-234
+235 +236 +237

-
# File 'lib/eth/util.rb', line 232
+      
# File 'lib/eth/util.rb', line 235
 
 def zpad_int(num, len = 32)
   zpad serialize_int_to_big_endian(num), len
@@ -3302,12 +3304,12 @@ 

 
 
-146
-147
-148
+149 +150 +151

-
# File 'lib/eth/util.rb', line 146
+      
# File 'lib/eth/util.rb', line 149
 
 def big_endian_to_int(str)
   str.unpack("H*").first.to_i(16)
@@ -3399,17 +3401,17 @@ 

 
 
-49
-50
 51
-52
+52 +53 +54

-
# File 'lib/eth/util.rb', line 49
+      
# File 'lib/eth/util.rb', line 51
 
 def bin_to_hex(bin)
   raise TypeError, "Value must be an instance of String" unless bin.instance_of? String
-  bin.unpack("H*").first
+  hex = bin.unpack("H*").first
 end
@@ -3480,12 +3482,12 @@

 
 
-89
-90
-91
+92 +93 +94

-
# File 'lib/eth/util.rb', line 89
+      
# File 'lib/eth/util.rb', line 92
 
 def bin_to_prefixed_hex(bin)
   prefix_hex bin_to_hex bin
@@ -3559,12 +3561,12 @@ 

 
 
-170
-171
-172
+173 +174 +175

-
# File 'lib/eth/util.rb', line 170
+      
# File 'lib/eth/util.rb', line 173
 
 def bytes?(str)
   str && str.instance_of?(String) && str.encoding.name == Constant::BINARY_ENCODING
@@ -3638,12 +3640,12 @@ 

 
 
-162
-163
-164
+165 +166 +167

-
# File 'lib/eth/util.rb', line 162
+      
# File 'lib/eth/util.rb', line 165
 
 def bytes_to_str(bin)
   bin.unpack("U*").pack("U*")
@@ -3717,12 +3719,12 @@ 

 
 
-194
-195
-196
+197 +198 +199

-
# File 'lib/eth/util.rb', line 194
+      
# File 'lib/eth/util.rb', line 197
 
 def ceil32(num)
   num % 32 == 0 ? num : (num + 32 - num % 32)
@@ -3796,12 +3798,12 @@ 

 
 
-138
-139
-140
+141 +142 +143

-
# File 'lib/eth/util.rb', line 138
+      
# File 'lib/eth/util.rb', line 141
 
 def deserialize_big_endian_to_int(str)
   Rlp::Sedes.big_endian_int.deserialize str.sub(/\A(\x00)+/, "")
@@ -3875,14 +3877,14 @@ 

 
 
-97
-98
-99
 100
-101
+101 +102 +103 +104

-
# File 'lib/eth/util.rb', line 97
+      
# File 'lib/eth/util.rb', line 100
 
 def hex?(str)
   return false unless str.is_a? String
@@ -3976,21 +3978,23 @@ 

 
 
-60
-61
 62
 63
 64
-65
+65 +66 +67 +68

-
# File 'lib/eth/util.rb', line 60
+      
# File 'lib/eth/util.rb', line 62
 
 def hex_to_bin(hex)
   raise TypeError, "Value must be an instance of String" unless hex.instance_of? String
   hex = remove_hex_prefix hex
   raise TypeError, "Non-hexadecimal digit found" unless hex? hex
-  [hex].pack("H*")
+  hex = "0#{hex}" if hex.size % 2 != 0
+  bin = [hex].pack("H*")
 end
@@ -4061,14 +4065,14 @@

 
 
-128
-129
-130
 131
-132
+132 +133 +134 +135

-
# File 'lib/eth/util.rb', line 128
+      
# File 'lib/eth/util.rb', line 131
 
 def int_to_big_endian(num)
   hex = num.to_s(16) unless hex? num
@@ -4144,12 +4148,12 @@ 

 
 
-40
-41
-42
+42 +43 +44

-
# File 'lib/eth/util.rb', line 40
+      
# File 'lib/eth/util.rb', line 42
 
 def keccak256(str)
   Digest::Keccak.new(256).digest str
@@ -4223,12 +4227,12 @@ 

 
 
-186
-187
-188
+189 +190 +191

-
# File 'lib/eth/util.rb', line 186
+      
# File 'lib/eth/util.rb', line 189
 
 def list?(item)
   !primitive?(item) && item.respond_to?(:each)
@@ -4334,13 +4338,13 @@ 

 
 
-204
-205
-206
-207
+207 +208 +209 +210

-
# File 'lib/eth/util.rb', line 204
+      
# File 'lib/eth/util.rb', line 207
 
 def lpad(str, sym, len)
   return str if str.size >= len
@@ -4415,13 +4419,13 @@ 

 
 
-71
-72
-73
-74
+74 +75 +76 +77

-
# File 'lib/eth/util.rb', line 71
+      
# File 'lib/eth/util.rb', line 74
 
 def prefix_hex(hex)
   return hex if prefixed? hex
@@ -4496,12 +4500,12 @@ 

 
 
-107
-108
-109
+110 +111 +112

-
# File 'lib/eth/util.rb', line 107
+      
# File 'lib/eth/util.rb', line 110
 
 def prefixed?(hex)
   hex.match /\A0x/
@@ -4575,12 +4579,12 @@ 

 
 
-178
-179
-180
+181 +182 +183

-
# File 'lib/eth/util.rb', line 178
+      
# File 'lib/eth/util.rb', line 181
 
 def primitive?(item)
   item.instance_of?(String)
@@ -4654,15 +4658,15 @@ 

 
 
-29
-30
 31
 32
 33
-34
+34 +35 +36

-
# File 'lib/eth/util.rb', line 29
+      
# File 'lib/eth/util.rb', line 31
 
 def public_key_to_address(str)
   str = hex_to_bin str if hex? str
@@ -4739,13 +4743,13 @@ 

 
 
-80
-81
-82
-83
+83 +84 +85 +86

-
# File 'lib/eth/util.rb', line 80
+      
# File 'lib/eth/util.rb', line 83
 
 def remove_hex_prefix(hex)
   return hex[2..-1] if prefixed? hex
@@ -4838,16 +4842,16 @@ 

 
 
-116
-117
-118
 119
 120
 121
-122
+122 +123 +124 +125

-
# File 'lib/eth/util.rb', line 116
+      
# File 'lib/eth/util.rb', line 119
 
 def serialize_int_to_big_endian(num)
   num = num.to_i(16) if hex? num
@@ -4925,12 +4929,12 @@ 

 
 
-154
-155
-156
+157 +158 +159

-
# File 'lib/eth/util.rb', line 154
+      
# File 'lib/eth/util.rb', line 157
 
 def str_to_bytes(str)
   bytes?(str) ? str : str.b
@@ -5020,12 +5024,12 @@ 

 
 
-214
-215
-216
+217 +218 +219

-
# File 'lib/eth/util.rb', line 214
+      
# File 'lib/eth/util.rb', line 217
 
 def zpad(str, len)
   lpad str, Constant::BYTE_ZERO, len
@@ -5117,12 +5121,12 @@ 

 
 
-223
-224
-225
+226 +227 +228

-
# File 'lib/eth/util.rb', line 223
+      
# File 'lib/eth/util.rb', line 226
 
 def zpad_hex(hex, len = 32)
   zpad hex_to_bin(hex), len
@@ -5214,12 +5218,12 @@ 

 
 
-232
-233
-234
+235 +236 +237

-
# File 'lib/eth/util.rb', line 232
+      
# File 'lib/eth/util.rb', line 235
 
 def zpad_int(num, len = 32)
   zpad serialize_int_to_big_endian(num), len
@@ -5234,7 +5238,7 @@ 

diff --git a/_index.html b/_index.html index 6d4c6290..aa1930a2 100644 --- a/_index.html +++ b/_index.html @@ -657,7 +657,7 @@

Namespace Listing A-Z

diff --git a/file.README.html b/file.README.html index 86845eab..ebe07099 100644 --- a/file.README.html +++ b/file.README.html @@ -131,7 +131,7 @@

License and Credits

diff --git a/index.html b/index.html index 22fc0d93..8a60f32f 100644 --- a/index.html +++ b/index.html @@ -131,7 +131,7 @@

License and Credits

diff --git a/top-level-namespace.html b/top-level-namespace.html index d0883d7e..f57c194c 100644 --- a/top-level-namespace.html +++ b/top-level-namespace.html @@ -100,7 +100,7 @@

Defined Under Namespace