eth 0.4.17 → 0.5.0
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/.github/workflows/codeql.yml +11 -5
- data/.github/workflows/docs.yml +26 -0
- data/.github/workflows/spec.yml +41 -0
- data/.gitignore +24 -24
- data/.gitmodules +3 -3
- data/AUTHORS.txt +16 -0
- data/Gemfile +13 -2
- data/LICENSE.txt +202 -22
- data/README.md +154 -84
- data/bin/console +4 -5
- data/bin/setup +4 -2
- data/eth.gemspec +36 -29
- data/lib/eth/abi/constant.rb +63 -0
- data/lib/eth/abi/type.rb +177 -0
- data/lib/eth/abi.rb +390 -0
- data/lib/eth/address.rb +48 -11
- data/lib/eth/chain.rb +148 -0
- data/lib/eth/eip712.rb +184 -0
- data/lib/eth/key/decrypter.rb +118 -88
- data/lib/eth/key/encrypter.rb +176 -99
- data/lib/eth/key.rb +131 -48
- data/lib/eth/signature.rb +160 -0
- data/lib/eth/tx/eip1559.rb +329 -0
- data/lib/eth/tx/eip2930.rb +321 -0
- data/lib/eth/tx/legacy.rb +293 -0
- data/lib/eth/tx.rb +274 -143
- data/lib/eth/unit.rb +49 -0
- data/lib/eth/util.rb +178 -0
- data/lib/eth/version.rb +18 -1
- data/lib/eth.rb +27 -67
- metadata +37 -71
- data/.github/workflows/build.yml +0 -26
- data/lib/eth/gas.rb +0 -9
- data/lib/eth/open_ssl.rb +0 -264
- data/lib/eth/secp256k1.rb +0 -7
- data/lib/eth/sedes.rb +0 -40
- data/lib/eth/utils.rb +0 -129
data/lib/eth/util.rb
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Copyright (c) 2016-2022 The Ruby-Eth Contributors
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
require "digest/keccak"
|
|
16
|
+
require "rlp"
|
|
17
|
+
|
|
18
|
+
# Provides the `Eth` module.
|
|
19
|
+
module Eth
|
|
20
|
+
|
|
21
|
+
# Defines handy tools for the `Eth` gem for convenience.
|
|
22
|
+
module Util
|
|
23
|
+
extend self
|
|
24
|
+
|
|
25
|
+
# Generates an Ethereum address from a given compressed or
|
|
26
|
+
# uncompressed binary or hexadecimal public key string.
|
|
27
|
+
#
|
|
28
|
+
# @param str [String] the public key to be converted.
|
|
29
|
+
# @return [Eth::Address] an Ethereum address.
|
|
30
|
+
def public_key_to_address(str)
|
|
31
|
+
str = hex_to_bin str if is_hex? str
|
|
32
|
+
bytes = keccak256(str[1..-1])[-20..-1]
|
|
33
|
+
Address.new bin_to_prefixed_hex bytes
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Hashes a string with the Keccak-256 algorithm.
|
|
37
|
+
#
|
|
38
|
+
# @param str [String] a string to be hashed.
|
|
39
|
+
# @return [String] a Keccak-256 hash of the given string.
|
|
40
|
+
def keccak256(str)
|
|
41
|
+
Digest::Keccak.new(256).digest str
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Unpacks a binary string to a hexa-decimal string.
|
|
45
|
+
#
|
|
46
|
+
# @param bin [String] a binary string to be unpacked.
|
|
47
|
+
# @return [String] a hexa-decimal string.
|
|
48
|
+
# @raise [TypeError] if value is not a string.
|
|
49
|
+
def bin_to_hex(bin)
|
|
50
|
+
raise TypeError, "Value must be an instance of String" unless bin.instance_of? String
|
|
51
|
+
bin.unpack("H*").first
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Packs a hexa-decimal string into a binary string. Also works with
|
|
55
|
+
# `0x`-prefixed strings.
|
|
56
|
+
#
|
|
57
|
+
# @param hex [String] a hexa-decimal string to be packed.
|
|
58
|
+
# @return [String] a packed binary string.
|
|
59
|
+
# @raise [TypeError] if value is not a string or string is not hex.
|
|
60
|
+
def hex_to_bin(hex)
|
|
61
|
+
raise TypeError, "Value must be an instance of String" unless hex.instance_of? String
|
|
62
|
+
hex = remove_hex_prefix hex
|
|
63
|
+
raise TypeError, "Non-hexadecimal digit found" unless is_hex? hex
|
|
64
|
+
[hex].pack("H*")
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Prefixes a hexa-decimal string with `0x`.
|
|
68
|
+
#
|
|
69
|
+
# @param hex [String] a hex-string to be prefixed.
|
|
70
|
+
# @return [String] a prefixed hex-string.
|
|
71
|
+
def prefix_hex(hex)
|
|
72
|
+
return hex if is_prefixed? hex
|
|
73
|
+
return "0x#{hex}"
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Removes the `0x` prefix of a hexa-decimal string.
|
|
77
|
+
#
|
|
78
|
+
# @param hex [String] a prefixed hex-string.
|
|
79
|
+
# @return [String] an unprefixed hex-string.
|
|
80
|
+
def remove_hex_prefix(hex)
|
|
81
|
+
return hex[2..-1] if is_prefixed? hex
|
|
82
|
+
return hex
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Unpacks a binary string to a prefixed hexa-decimal string.
|
|
86
|
+
#
|
|
87
|
+
# @param bin [String] a binary string to be unpacked.
|
|
88
|
+
# @return [String] a prefixed hexa-decimal string.
|
|
89
|
+
def bin_to_prefixed_hex(bin)
|
|
90
|
+
prefix_hex bin_to_hex bin
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Checks if a string is hex-adecimal.
|
|
94
|
+
#
|
|
95
|
+
# @param str [String] a string to be checked.
|
|
96
|
+
# @return [String] a match if true; nil if not.
|
|
97
|
+
def is_hex?(str)
|
|
98
|
+
return false unless str.is_a? String
|
|
99
|
+
str = remove_hex_prefix str
|
|
100
|
+
str.match /\A[0-9a-fA-F]*\z/
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks if a string is prefixed with `0x`.
|
|
104
|
+
#
|
|
105
|
+
# @param hex [String] a string to be checked.
|
|
106
|
+
# @return [String] a match if true; nil if not.
|
|
107
|
+
def is_prefixed?(hex)
|
|
108
|
+
hex.match /\A0x/
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Serializes an unsigned integer to big endian.
|
|
112
|
+
#
|
|
113
|
+
# @param num [Integer] unsigned integer to be serialized.
|
|
114
|
+
# return [String] serialized big endian integer string.
|
|
115
|
+
# raises [ArgumentError] if unsigned integer is out of bounds.
|
|
116
|
+
def serialize_int_to_big_endian(num)
|
|
117
|
+
num = num.to_i(16) if is_hex? num
|
|
118
|
+
unless num.is_a? Integer and num >= 0 and num <= Abi::UINT_MAX
|
|
119
|
+
raise ArgumentError, "Integer invalid or out of range: #{num}"
|
|
120
|
+
end
|
|
121
|
+
RLP::Sedes.big_endian_int.serialize num
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# Deserializes big endian data string to integer.
|
|
125
|
+
#
|
|
126
|
+
# @param str [String] serialized big endian integer string.
|
|
127
|
+
# @return [Integer] an deserialized unsigned integer.
|
|
128
|
+
def deserialize_big_endian_to_int(str)
|
|
129
|
+
RLP::Sedes.big_endian_int.deserialize str.sub(/\A(\x00)+/, "")
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# Ceil and integer to the next multiple of 32 bytes.
|
|
133
|
+
#
|
|
134
|
+
# @param num [Integer] the number to ciel up.
|
|
135
|
+
# @return [Integer] the ceiled to 32 integer.
|
|
136
|
+
def ceil32(num)
|
|
137
|
+
num % 32 == 0 ? num : (num + 32 - num % 32)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Left-pad a number with a symbol.
|
|
141
|
+
#
|
|
142
|
+
# @param str [String] a serialized string to be padded.
|
|
143
|
+
# @param sym [String] a symbol used for left-padding.
|
|
144
|
+
# @param len [Integer] number of symbols for the final string.
|
|
145
|
+
# @return [String] a left-padded serialized string of wanted size.
|
|
146
|
+
def lpad(str, sym, len)
|
|
147
|
+
return str if str.size >= len
|
|
148
|
+
sym * (len - str.size) + str
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Left-pad a serialized string with zeros.
|
|
152
|
+
#
|
|
153
|
+
# @param str [String] a serialized string to be padded.
|
|
154
|
+
# @param len [Integer] number of symbols for the final string.
|
|
155
|
+
# @return [String] a zero-padded serialized string of wanted size.
|
|
156
|
+
def zpad(str, len)
|
|
157
|
+
lpad str, Abi::BYTE_ZERO, len
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Left-pad a hex number with zeros.
|
|
161
|
+
#
|
|
162
|
+
# @param hex [String] a hex-string to be padded.
|
|
163
|
+
# @param len [Integer] number of symbols for the final string.
|
|
164
|
+
# @return [String] a zero-padded serialized string of wanted size.
|
|
165
|
+
def zpad_hex(hex, len = 32)
|
|
166
|
+
zpad hex_to_bin(hex), len
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Left-pad an unsigned integer with zeros.
|
|
170
|
+
#
|
|
171
|
+
# @param num [Integer] an unsigned integer to be padded.
|
|
172
|
+
# @param len [Integer] number of symbols for the final string.
|
|
173
|
+
# @return [String] a zero-padded serialized string of wanted size.
|
|
174
|
+
def zpad_int(num, len = 32)
|
|
175
|
+
zpad serialize_int_to_big_endian(num), len
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
data/lib/eth/version.rb
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
# Copyright (c) 2016-2022 The Ruby-Eth Contributors
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
# Provides the `Eth` module.
|
|
1
16
|
module Eth
|
|
2
|
-
|
|
17
|
+
|
|
18
|
+
# Defines the version of the `Eth` module.
|
|
19
|
+
VERSION = "0.5.0".freeze
|
|
3
20
|
end
|
data/lib/eth.rb
CHANGED
|
@@ -1,69 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
# Copyright (c) 2016-2022 The Ruby-Eth Contributors
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
# Provides the `Eth` module.
|
|
6
16
|
module Eth
|
|
7
|
-
BYTE_ZERO = "\x00".freeze
|
|
8
|
-
UINT_MAX = 2**256 - 1
|
|
9
|
-
|
|
10
|
-
autoload :Address, 'eth/address'
|
|
11
|
-
autoload :Gas, 'eth/gas'
|
|
12
|
-
autoload :Key, 'eth/key'
|
|
13
|
-
autoload :OpenSsl, 'eth/open_ssl'
|
|
14
|
-
autoload :Secp256k1, 'eth/secp256k1'
|
|
15
|
-
autoload :Sedes, 'eth/sedes'
|
|
16
|
-
autoload :Tx, 'eth/tx'
|
|
17
|
-
autoload :Utils, 'eth/utils'
|
|
18
|
-
|
|
19
|
-
class << self
|
|
20
|
-
def configure
|
|
21
|
-
yield(configuration)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def replayable_chain_id
|
|
25
|
-
27
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def chain_id
|
|
29
|
-
configuration.chain_id
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def v_base
|
|
33
|
-
replayable_chain_id
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def replayable_v?(v)
|
|
37
|
-
[replayable_chain_id, replayable_chain_id + 1].include? v
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
def tx_data_hex?
|
|
41
|
-
!!configuration.tx_data_hex
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def chain_id_from_signature(signature)
|
|
45
|
-
return nil if Eth.replayable_v?(signature[:v])
|
|
46
|
-
|
|
47
|
-
cid = (signature[:v] - 35) / 2
|
|
48
|
-
(cid < 1) ? nil : cid
|
|
49
|
-
end
|
|
50
|
-
|
|
51
|
-
private
|
|
52
|
-
|
|
53
|
-
def configuration
|
|
54
|
-
@configuration ||= Configuration.new
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
class Configuration
|
|
59
|
-
attr_accessor :chain_id, :tx_data_hex
|
|
60
|
-
|
|
61
|
-
def initialize
|
|
62
|
-
self.chain_id = nil
|
|
63
|
-
self.tx_data_hex = true
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
|
|
67
|
-
class ValidationError < StandardError; end
|
|
68
|
-
class InvalidTransaction < ValidationError; end
|
|
69
17
|
end
|
|
18
|
+
|
|
19
|
+
# Loads the `Eth` module classes.
|
|
20
|
+
require "eth/abi"
|
|
21
|
+
require "eth/address"
|
|
22
|
+
require "eth/chain"
|
|
23
|
+
require "eth/eip712"
|
|
24
|
+
require "eth/key"
|
|
25
|
+
require "eth/signature"
|
|
26
|
+
require "eth/tx"
|
|
27
|
+
require "eth/unit"
|
|
28
|
+
require "eth/util"
|
|
29
|
+
require "eth/version"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: eth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steve Ellis
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2022-01-17 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: keccak
|
|
@@ -26,33 +26,33 @@ dependencies:
|
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
27
|
version: '1.3'
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
|
-
name:
|
|
29
|
+
name: konstructor
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
|
32
32
|
- - "~>"
|
|
33
33
|
- !ruby/object:Gem::Version
|
|
34
|
-
version: '1.
|
|
34
|
+
version: '1.0'
|
|
35
35
|
type: :runtime
|
|
36
36
|
prerelease: false
|
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
|
38
38
|
requirements:
|
|
39
39
|
- - "~>"
|
|
40
40
|
- !ruby/object:Gem::Version
|
|
41
|
-
version: '1.
|
|
41
|
+
version: '1.0'
|
|
42
42
|
- !ruby/object:Gem::Dependency
|
|
43
|
-
name:
|
|
43
|
+
name: rbsecp256k1
|
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
|
45
45
|
requirements:
|
|
46
46
|
- - "~>"
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: '
|
|
48
|
+
version: '5.1'
|
|
49
49
|
type: :runtime
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
53
|
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: '
|
|
55
|
+
version: '5.1'
|
|
56
56
|
- !ruby/object:Gem::Dependency
|
|
57
57
|
name: rlp
|
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -68,7 +68,7 @@ dependencies:
|
|
|
68
68
|
- !ruby/object:Gem::Version
|
|
69
69
|
version: '0.7'
|
|
70
70
|
- !ruby/object:Gem::Dependency
|
|
71
|
-
name:
|
|
71
|
+
name: openssl
|
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
|
73
73
|
requirements:
|
|
74
74
|
- - "~>"
|
|
@@ -82,62 +82,20 @@ dependencies:
|
|
|
82
82
|
- !ruby/object:Gem::Version
|
|
83
83
|
version: '3.0'
|
|
84
84
|
- !ruby/object:Gem::Dependency
|
|
85
|
-
name:
|
|
86
|
-
requirement: !ruby/object:Gem::Requirement
|
|
87
|
-
requirements:
|
|
88
|
-
- - "~>"
|
|
89
|
-
- !ruby/object:Gem::Version
|
|
90
|
-
version: '2.2'
|
|
91
|
-
type: :development
|
|
92
|
-
prerelease: false
|
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
94
|
-
requirements:
|
|
95
|
-
- - "~>"
|
|
96
|
-
- !ruby/object:Gem::Version
|
|
97
|
-
version: '2.2'
|
|
98
|
-
- !ruby/object:Gem::Dependency
|
|
99
|
-
name: pry
|
|
100
|
-
requirement: !ruby/object:Gem::Requirement
|
|
101
|
-
requirements:
|
|
102
|
-
- - "~>"
|
|
103
|
-
- !ruby/object:Gem::Version
|
|
104
|
-
version: '0.14'
|
|
105
|
-
type: :development
|
|
106
|
-
prerelease: false
|
|
107
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
108
|
-
requirements:
|
|
109
|
-
- - "~>"
|
|
110
|
-
- !ruby/object:Gem::Version
|
|
111
|
-
version: '0.14'
|
|
112
|
-
- !ruby/object:Gem::Dependency
|
|
113
|
-
name: rake
|
|
114
|
-
requirement: !ruby/object:Gem::Requirement
|
|
115
|
-
requirements:
|
|
116
|
-
- - "~>"
|
|
117
|
-
- !ruby/object:Gem::Version
|
|
118
|
-
version: '13.0'
|
|
119
|
-
type: :development
|
|
120
|
-
prerelease: false
|
|
121
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
122
|
-
requirements:
|
|
123
|
-
- - "~>"
|
|
124
|
-
- !ruby/object:Gem::Version
|
|
125
|
-
version: '13.0'
|
|
126
|
-
- !ruby/object:Gem::Dependency
|
|
127
|
-
name: rspec
|
|
85
|
+
name: scrypt
|
|
128
86
|
requirement: !ruby/object:Gem::Requirement
|
|
129
87
|
requirements:
|
|
130
88
|
- - "~>"
|
|
131
89
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: '3.
|
|
133
|
-
type: :
|
|
90
|
+
version: '3.0'
|
|
91
|
+
type: :runtime
|
|
134
92
|
prerelease: false
|
|
135
93
|
version_requirements: !ruby/object:Gem::Requirement
|
|
136
94
|
requirements:
|
|
137
95
|
- - "~>"
|
|
138
96
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: '3.
|
|
140
|
-
description: Library to
|
|
97
|
+
version: '3.0'
|
|
98
|
+
description: Library to handle Ethereum accounts, messages, and transactions.
|
|
141
99
|
email:
|
|
142
100
|
- email@steveell.is
|
|
143
101
|
- ruby@q9f.cc
|
|
@@ -145,11 +103,13 @@ executables: []
|
|
|
145
103
|
extensions: []
|
|
146
104
|
extra_rdoc_files: []
|
|
147
105
|
files:
|
|
148
|
-
- ".github/workflows/build.yml"
|
|
149
106
|
- ".github/workflows/codeql.yml"
|
|
107
|
+
- ".github/workflows/docs.yml"
|
|
108
|
+
- ".github/workflows/spec.yml"
|
|
150
109
|
- ".gitignore"
|
|
151
110
|
- ".gitmodules"
|
|
152
111
|
- ".rspec"
|
|
112
|
+
- AUTHORS.txt
|
|
153
113
|
- CHANGELOG.md
|
|
154
114
|
- Gemfile
|
|
155
115
|
- LICENSE.txt
|
|
@@ -159,25 +119,31 @@ files:
|
|
|
159
119
|
- bin/setup
|
|
160
120
|
- eth.gemspec
|
|
161
121
|
- lib/eth.rb
|
|
122
|
+
- lib/eth/abi.rb
|
|
123
|
+
- lib/eth/abi/constant.rb
|
|
124
|
+
- lib/eth/abi/type.rb
|
|
162
125
|
- lib/eth/address.rb
|
|
163
|
-
- lib/eth/
|
|
126
|
+
- lib/eth/chain.rb
|
|
127
|
+
- lib/eth/eip712.rb
|
|
164
128
|
- lib/eth/key.rb
|
|
165
129
|
- lib/eth/key/decrypter.rb
|
|
166
130
|
- lib/eth/key/encrypter.rb
|
|
167
|
-
- lib/eth/
|
|
168
|
-
- lib/eth/secp256k1.rb
|
|
169
|
-
- lib/eth/sedes.rb
|
|
131
|
+
- lib/eth/signature.rb
|
|
170
132
|
- lib/eth/tx.rb
|
|
171
|
-
- lib/eth/
|
|
133
|
+
- lib/eth/tx/eip1559.rb
|
|
134
|
+
- lib/eth/tx/eip2930.rb
|
|
135
|
+
- lib/eth/tx/legacy.rb
|
|
136
|
+
- lib/eth/unit.rb
|
|
137
|
+
- lib/eth/util.rb
|
|
172
138
|
- lib/eth/version.rb
|
|
173
|
-
homepage: https://github.com/
|
|
139
|
+
homepage: https://github.com/q9f/eth.rb
|
|
174
140
|
licenses:
|
|
175
|
-
-
|
|
141
|
+
- Apache-2.0
|
|
176
142
|
metadata:
|
|
177
|
-
homepage_uri: https://github.com/
|
|
178
|
-
source_code_uri: https://github.com/
|
|
179
|
-
github_repo: https://github.com/
|
|
180
|
-
bug_tracker_uri: https://github.com/
|
|
143
|
+
homepage_uri: https://github.com/q9f/eth.rb
|
|
144
|
+
source_code_uri: https://github.com/q9f/eth.rb
|
|
145
|
+
github_repo: https://github.com/q9f/eth.rb
|
|
146
|
+
bug_tracker_uri: https://github.com/q9f/eth.rb/issues
|
|
181
147
|
post_install_message:
|
|
182
148
|
rdoc_options: []
|
|
183
149
|
require_paths:
|
|
@@ -186,7 +152,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
186
152
|
requirements:
|
|
187
153
|
- - ">="
|
|
188
154
|
- !ruby/object:Gem::Version
|
|
189
|
-
version: '2.
|
|
155
|
+
version: '2.6'
|
|
190
156
|
- - "<"
|
|
191
157
|
- !ruby/object:Gem::Version
|
|
192
158
|
version: '4.0'
|
|
@@ -196,8 +162,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
196
162
|
- !ruby/object:Gem::Version
|
|
197
163
|
version: '0'
|
|
198
164
|
requirements: []
|
|
199
|
-
rubygems_version: 3.2.
|
|
165
|
+
rubygems_version: 3.2.29
|
|
200
166
|
signing_key:
|
|
201
167
|
specification_version: 4
|
|
202
|
-
summary:
|
|
168
|
+
summary: Ruby Ethereum library.
|
|
203
169
|
test_files: []
|
data/.github/workflows/build.yml
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: Build
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
pull_request:
|
|
6
|
-
branches:
|
|
7
|
-
- develop
|
|
8
|
-
push:
|
|
9
|
-
branches:
|
|
10
|
-
- develop
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
build:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v2
|
|
17
|
-
- uses: ruby/setup-ruby@v1
|
|
18
|
-
with:
|
|
19
|
-
ruby-version: 3.0
|
|
20
|
-
- name: Install Dependencies
|
|
21
|
-
run: |
|
|
22
|
-
git submodule update --init
|
|
23
|
-
bundle install
|
|
24
|
-
- name: Run Tests
|
|
25
|
-
run: |
|
|
26
|
-
rspec
|