erc20 0.2.0 → 0.2.1
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/Gemfile +12 -12
- data/Gemfile.lock +81 -71
- data/Rakefile +1 -0
- data/bin/erc20 +6 -3
- data/erc20.gemspec +2 -2
- data/hardhat/package.json +1 -1
- data/lib/erc20/erc20.rb +1 -1
- data/lib/erc20/fake_wallet.rb +1 -1
- data/lib/erc20/wallet.rb +3 -3
- metadata +3 -28
- data/.0pdd.yml +0 -5
- data/.gitattributes +0 -7
- data/.github/workflows/actionlint.yml +0 -25
- data/.github/workflows/codecov.yml +0 -27
- data/.github/workflows/copyrights.yml +0 -19
- data/.github/workflows/hadolint.yml +0 -16
- data/.github/workflows/markdown-lint.yml +0 -23
- data/.github/workflows/pdd.yml +0 -19
- data/.github/workflows/rake.yml +0 -38
- data/.github/workflows/reuse.yml +0 -19
- data/.github/workflows/shellcheck.yml +0 -19
- data/.github/workflows/typos.yml +0 -19
- data/.github/workflows/xcop.yml +0 -19
- data/.github/workflows/yamllint.yml +0 -21
- data/.gitignore +0 -10
- data/.gitleaksignore +0 -2
- data/.pdd +0 -7
- data/.rubocop.yml +0 -49
- data/.rultor.yml +0 -26
- data/.yamllint.yml +0 -12
- data/renovate.json +0 -6
- data/test/erc20/test_fake_wallet.rb +0 -118
- data/test/erc20/test_wallet.rb +0 -343
- data/test/erc20/test_wallet_live.rb +0 -126
- data/test/test__helper.rb +0 -206
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 43359f4b933cb54b433cc7479b5b3e1a3fc76f0ae927a89a8b4c3719579810fe
|
|
4
|
+
data.tar.gz: f93d84a17c65475e59704c984b0fb272b6f8e94f7c1c5f3012f53b8fbe250642
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '03119d9cb7d868e8df6efe5d55d0ce6421db6399776da6c0c0f03d22de41a1dca6e4f318c3db69b0fe9f01c7a886ea37a48d6c4f0da2a4d5ade8c7b23e16d5dc'
|
|
7
|
+
data.tar.gz: b87819d174d7e905d59482d6f8fe426b1cfa54cf8c10c887717c15b1dbd5ad15cff3d5805a45e53dc3fab3470ac379e85c4e9c192b998df74209668b47bf7220
|
data/Gemfile
CHANGED
|
@@ -6,26 +6,26 @@
|
|
|
6
6
|
source 'https://rubygems.org'
|
|
7
7
|
gemspec
|
|
8
8
|
|
|
9
|
-
gem 'backtrace', '
|
|
9
|
+
gem 'backtrace', '~>0.4', require: false
|
|
10
10
|
gem 'concurrent-ruby', '~>1.2', require: false
|
|
11
11
|
gem 'cucumber', '~>9.2', require: false
|
|
12
|
-
gem 'donce', '
|
|
13
|
-
gem 'faraday', '
|
|
14
|
-
gem 'loog', '
|
|
12
|
+
gem 'donce', '~>0.2', require: false
|
|
13
|
+
gem 'faraday', '~>2.14', require: false
|
|
14
|
+
gem 'loog', '~>0.6', require: false
|
|
15
15
|
gem 'minitest', '~>5.25', require: false
|
|
16
16
|
gem 'minitest-reporters', '~>1.7', require: false
|
|
17
17
|
gem 'minitest-retry', '~>0.2', require: false
|
|
18
|
-
gem 'qbash', '
|
|
18
|
+
gem 'qbash', '~>0.4', require: false
|
|
19
19
|
gem 'rake', '~>13.2', require: false
|
|
20
|
-
gem 'random-port', '
|
|
20
|
+
gem 'random-port', '~>0.7', require: false
|
|
21
|
+
gem 'rdoc', '~>6.17', require: false
|
|
21
22
|
gem 'rubocop', '~>1.75', require: false
|
|
22
|
-
gem 'rubocop-minitest', '
|
|
23
|
-
gem 'rubocop-performance', '
|
|
24
|
-
gem 'rubocop-rake', '
|
|
25
|
-
gem 'rubocop-rspec', '>0', require: false
|
|
23
|
+
gem 'rubocop-minitest', '~>0.38', require: false
|
|
24
|
+
gem 'rubocop-performance', '~>1.25', require: false
|
|
25
|
+
gem 'rubocop-rake', '~>0.7', require: false
|
|
26
26
|
gem 'simplecov', '~>0.22', require: false
|
|
27
|
-
gem 'simplecov-cobertura', '~>
|
|
27
|
+
gem 'simplecov-cobertura', '~>3.1', require: false
|
|
28
28
|
gem 'threads', '~>0.4', require: false
|
|
29
|
-
gem 'typhoeus', '
|
|
29
|
+
gem 'typhoeus', '~>1.4', require: false
|
|
30
30
|
gem 'webmock', '~>3.23', require: false
|
|
31
31
|
gem 'yard', '~>0.9', require: false
|
data/Gemfile.lock
CHANGED
|
@@ -12,16 +12,16 @@ PATH
|
|
|
12
12
|
GEM
|
|
13
13
|
remote: https://rubygems.org/
|
|
14
14
|
specs:
|
|
15
|
-
addressable (2.8.
|
|
16
|
-
public_suffix (>= 2.0.2, <
|
|
15
|
+
addressable (2.8.8)
|
|
16
|
+
public_suffix (>= 2.0.2, < 8.0)
|
|
17
17
|
ansi (1.5.0)
|
|
18
18
|
ast (2.4.3)
|
|
19
|
-
backtrace (0.4.
|
|
20
|
-
base64 (0.
|
|
21
|
-
bigdecimal (
|
|
19
|
+
backtrace (0.4.1)
|
|
20
|
+
base64 (0.3.0)
|
|
21
|
+
bigdecimal (4.0.1)
|
|
22
22
|
builder (3.3.0)
|
|
23
|
-
concurrent-ruby (1.3.
|
|
24
|
-
crack (1.0.
|
|
23
|
+
concurrent-ruby (1.3.6)
|
|
24
|
+
crack (1.0.1)
|
|
25
25
|
bigdecimal
|
|
26
26
|
rexml
|
|
27
27
|
cucumber (9.2.1)
|
|
@@ -45,39 +45,41 @@ GEM
|
|
|
45
45
|
bigdecimal
|
|
46
46
|
cucumber-gherkin (27.0.0)
|
|
47
47
|
cucumber-messages (>= 19.1.4, < 23)
|
|
48
|
-
cucumber-html-formatter (21.
|
|
48
|
+
cucumber-html-formatter (21.15.1)
|
|
49
49
|
cucumber-messages (> 19, < 28)
|
|
50
50
|
cucumber-messages (22.0.0)
|
|
51
51
|
cucumber-tag-expressions (6.1.2)
|
|
52
|
+
date (3.5.1)
|
|
52
53
|
diff-lcs (1.6.2)
|
|
53
54
|
docile (1.4.1)
|
|
54
55
|
donce (0.2.4)
|
|
55
56
|
backtrace (~> 0.3)
|
|
56
57
|
os (~> 1.1)
|
|
57
58
|
qbash (~> 0.3)
|
|
58
|
-
elapsed (0.0
|
|
59
|
-
loog (
|
|
60
|
-
tago (
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
elapsed (0.2.0)
|
|
60
|
+
loog (~> 0.6)
|
|
61
|
+
tago (~> 0.1)
|
|
62
|
+
erb (6.0.1)
|
|
63
|
+
eth (0.5.13)
|
|
63
64
|
forwardable (~> 1.3)
|
|
64
65
|
keccak (~> 1.3)
|
|
65
66
|
konstructor (~> 1.0)
|
|
66
67
|
openssl (>= 2.2, < 4.0)
|
|
67
68
|
rbsecp256k1 (~> 6.0)
|
|
68
69
|
scrypt (~> 3.0)
|
|
69
|
-
ethon (0.
|
|
70
|
+
ethon (0.18.0)
|
|
70
71
|
ffi (>= 1.15.0)
|
|
72
|
+
logger
|
|
71
73
|
eventmachine (1.2.7)
|
|
72
|
-
faraday (2.
|
|
74
|
+
faraday (2.14.0)
|
|
73
75
|
faraday-net_http (>= 2.0, < 3.5)
|
|
74
76
|
json
|
|
75
77
|
logger
|
|
76
|
-
faraday-net_http (3.4.
|
|
77
|
-
net-http (
|
|
78
|
-
faye-websocket (0.
|
|
78
|
+
faraday-net_http (3.4.2)
|
|
79
|
+
net-http (~> 0.5)
|
|
80
|
+
faye-websocket (0.12.0)
|
|
79
81
|
eventmachine (>= 0.12.0)
|
|
80
|
-
websocket-driver (>= 0.
|
|
82
|
+
websocket-driver (>= 0.8.0)
|
|
81
83
|
ffi (1.17.2-arm64-darwin)
|
|
82
84
|
ffi (1.17.2-x64-mingw-ucrt)
|
|
83
85
|
ffi (1.17.2-x86_64-darwin)
|
|
@@ -86,8 +88,8 @@ GEM
|
|
|
86
88
|
ffi (>= 1.15.5)
|
|
87
89
|
rake
|
|
88
90
|
forwardable (1.3.3)
|
|
89
|
-
hashdiff (1.1
|
|
90
|
-
json (2.
|
|
91
|
+
hashdiff (1.2.1)
|
|
92
|
+
json (2.18.0)
|
|
91
93
|
jsonrpc-client (0.1.4)
|
|
92
94
|
faraday
|
|
93
95
|
multi_json (>= 1.1.0)
|
|
@@ -98,9 +100,10 @@ GEM
|
|
|
98
100
|
logger (1.7.0)
|
|
99
101
|
loog (0.6.1)
|
|
100
102
|
logger (~> 1.0)
|
|
103
|
+
memoist3 (1.0.0)
|
|
101
104
|
mini_mime (1.1.5)
|
|
102
105
|
mini_portile2 (2.8.9)
|
|
103
|
-
minitest (5.
|
|
106
|
+
minitest (5.27.0)
|
|
104
107
|
minitest-reporters (1.7.1)
|
|
105
108
|
ansi
|
|
106
109
|
builder
|
|
@@ -108,36 +111,43 @@ GEM
|
|
|
108
111
|
ruby-progressbar
|
|
109
112
|
minitest-retry (0.2.5)
|
|
110
113
|
minitest (>= 5.0)
|
|
111
|
-
multi_json (1.
|
|
114
|
+
multi_json (1.18.0)
|
|
112
115
|
multi_test (1.1.0)
|
|
113
|
-
net-http (0.
|
|
114
|
-
uri
|
|
115
|
-
openssl (3.3.
|
|
116
|
+
net-http (0.9.1)
|
|
117
|
+
uri (>= 0.11.1)
|
|
118
|
+
openssl (3.3.2)
|
|
116
119
|
os (1.1.4)
|
|
117
120
|
parallel (1.27.0)
|
|
118
|
-
parser (3.3.
|
|
121
|
+
parser (3.3.10.0)
|
|
119
122
|
ast (~> 2.4.1)
|
|
120
123
|
racc
|
|
121
|
-
pkg-config (1.6.
|
|
122
|
-
prism (1.
|
|
123
|
-
|
|
124
|
-
|
|
124
|
+
pkg-config (1.6.5)
|
|
125
|
+
prism (1.6.0)
|
|
126
|
+
psych (5.3.1)
|
|
127
|
+
date
|
|
128
|
+
stringio
|
|
129
|
+
public_suffix (7.0.0)
|
|
130
|
+
qbash (0.4.8)
|
|
125
131
|
backtrace (> 0)
|
|
126
132
|
elapsed (> 0)
|
|
127
133
|
loog (> 0)
|
|
128
134
|
tago (> 0)
|
|
129
135
|
racc (1.8.1)
|
|
130
136
|
rainbow (3.1.1)
|
|
131
|
-
rake (13.
|
|
132
|
-
random-port (0.7.
|
|
133
|
-
tago (
|
|
137
|
+
rake (13.3.1)
|
|
138
|
+
random-port (0.7.6)
|
|
139
|
+
tago (~> 0.0)
|
|
134
140
|
rbsecp256k1 (6.0.0)
|
|
135
141
|
mini_portile2 (~> 2.8)
|
|
136
142
|
pkg-config (~> 1.5)
|
|
137
143
|
rubyzip (~> 2.3)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
144
|
+
rdoc (6.17.0)
|
|
145
|
+
erb
|
|
146
|
+
psych (>= 4.0.0)
|
|
147
|
+
tsort
|
|
148
|
+
regexp_parser (2.11.3)
|
|
149
|
+
rexml (3.4.4)
|
|
150
|
+
rubocop (1.82.0)
|
|
141
151
|
json (~> 2.3)
|
|
142
152
|
language_server-protocol (~> 3.17.0.2)
|
|
143
153
|
lint_roller (~> 1.1.0)
|
|
@@ -145,62 +155,62 @@ GEM
|
|
|
145
155
|
parser (>= 3.3.0.2)
|
|
146
156
|
rainbow (>= 2.2.2, < 4.0)
|
|
147
157
|
regexp_parser (>= 2.9.3, < 3.0)
|
|
148
|
-
rubocop-ast (>= 1.
|
|
158
|
+
rubocop-ast (>= 1.48.0, < 2.0)
|
|
149
159
|
ruby-progressbar (~> 1.7)
|
|
150
160
|
unicode-display_width (>= 2.4.0, < 4.0)
|
|
151
|
-
rubocop-ast (1.
|
|
161
|
+
rubocop-ast (1.48.0)
|
|
152
162
|
parser (>= 3.3.7.2)
|
|
153
163
|
prism (~> 1.4)
|
|
154
|
-
rubocop-minitest (0.38.
|
|
164
|
+
rubocop-minitest (0.38.2)
|
|
155
165
|
lint_roller (~> 1.1)
|
|
156
166
|
rubocop (>= 1.75.0, < 2.0)
|
|
157
167
|
rubocop-ast (>= 1.38.0, < 2.0)
|
|
158
|
-
rubocop-performance (1.
|
|
168
|
+
rubocop-performance (1.26.1)
|
|
159
169
|
lint_roller (~> 1.1)
|
|
160
170
|
rubocop (>= 1.75.0, < 2.0)
|
|
161
|
-
rubocop-ast (>= 1.
|
|
171
|
+
rubocop-ast (>= 1.47.1, < 2.0)
|
|
162
172
|
rubocop-rake (0.7.1)
|
|
163
173
|
lint_roller (~> 1.1)
|
|
164
174
|
rubocop (>= 1.72.1)
|
|
165
|
-
rubocop-rspec (3.6.0)
|
|
166
|
-
lint_roller (~> 1.1)
|
|
167
|
-
rubocop (~> 1.72, >= 1.72.1)
|
|
168
175
|
ruby-progressbar (1.13.0)
|
|
169
176
|
rubyzip (2.4.1)
|
|
170
|
-
scrypt (3.0
|
|
177
|
+
scrypt (3.1.0)
|
|
171
178
|
ffi-compiler (>= 1.0, < 2.0)
|
|
172
|
-
rake (
|
|
179
|
+
rake (~> 13)
|
|
173
180
|
simplecov (0.22.0)
|
|
174
181
|
docile (~> 1.1)
|
|
175
182
|
simplecov-html (~> 0.11)
|
|
176
183
|
simplecov_json_formatter (~> 0.1)
|
|
177
|
-
simplecov-cobertura (
|
|
184
|
+
simplecov-cobertura (3.1.0)
|
|
178
185
|
rexml
|
|
179
186
|
simplecov (~> 0.19)
|
|
180
|
-
simplecov-html (0.13.
|
|
187
|
+
simplecov-html (0.13.2)
|
|
181
188
|
simplecov_json_formatter (0.1.4)
|
|
182
189
|
slop (4.10.1)
|
|
183
|
-
|
|
190
|
+
stringio (3.2.0)
|
|
191
|
+
sys-uname (1.4.1)
|
|
184
192
|
ffi (~> 1.1)
|
|
185
|
-
|
|
186
|
-
|
|
193
|
+
memoist3 (~> 1.0.0)
|
|
194
|
+
tago (0.6.0)
|
|
195
|
+
threads (0.5.0)
|
|
187
196
|
backtrace (~> 0)
|
|
188
197
|
concurrent-ruby (~> 1.0)
|
|
198
|
+
tsort (0.2.0)
|
|
189
199
|
typhoeus (1.4.1)
|
|
190
200
|
ethon (>= 0.9.0)
|
|
191
|
-
unicode-display_width (3.
|
|
192
|
-
unicode-emoji (~> 4.
|
|
193
|
-
unicode-emoji (4.0
|
|
194
|
-
uri (1.
|
|
195
|
-
webmock (3.
|
|
201
|
+
unicode-display_width (3.2.0)
|
|
202
|
+
unicode-emoji (~> 4.1)
|
|
203
|
+
unicode-emoji (4.1.0)
|
|
204
|
+
uri (1.1.1)
|
|
205
|
+
webmock (3.26.1)
|
|
196
206
|
addressable (>= 2.8.0)
|
|
197
207
|
crack (>= 0.3.2)
|
|
198
208
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
199
|
-
websocket-driver (0.
|
|
209
|
+
websocket-driver (0.8.0)
|
|
200
210
|
base64
|
|
201
211
|
websocket-extensions (>= 0.1.0)
|
|
202
212
|
websocket-extensions (0.1.5)
|
|
203
|
-
yard (0.9.
|
|
213
|
+
yard (0.9.38)
|
|
204
214
|
|
|
205
215
|
PLATFORMS
|
|
206
216
|
arm64-darwin-22
|
|
@@ -212,28 +222,28 @@ PLATFORMS
|
|
|
212
222
|
x86_64-linux
|
|
213
223
|
|
|
214
224
|
DEPENDENCIES
|
|
215
|
-
backtrace (
|
|
225
|
+
backtrace (~> 0.4)
|
|
216
226
|
concurrent-ruby (~> 1.2)
|
|
217
227
|
cucumber (~> 9.2)
|
|
218
|
-
donce (
|
|
228
|
+
donce (~> 0.2)
|
|
219
229
|
erc20!
|
|
220
|
-
faraday (
|
|
221
|
-
loog (
|
|
230
|
+
faraday (~> 2.14)
|
|
231
|
+
loog (~> 0.6)
|
|
222
232
|
minitest (~> 5.25)
|
|
223
233
|
minitest-reporters (~> 1.7)
|
|
224
234
|
minitest-retry (~> 0.2)
|
|
225
|
-
qbash (
|
|
235
|
+
qbash (~> 0.4)
|
|
226
236
|
rake (~> 13.2)
|
|
227
|
-
random-port (
|
|
237
|
+
random-port (~> 0.7)
|
|
238
|
+
rdoc (~> 6.17)
|
|
228
239
|
rubocop (~> 1.75)
|
|
229
|
-
rubocop-minitest (
|
|
230
|
-
rubocop-performance (
|
|
231
|
-
rubocop-rake (
|
|
232
|
-
rubocop-rspec (> 0)
|
|
240
|
+
rubocop-minitest (~> 0.38)
|
|
241
|
+
rubocop-performance (~> 1.25)
|
|
242
|
+
rubocop-rake (~> 0.7)
|
|
233
243
|
simplecov (~> 0.22)
|
|
234
|
-
simplecov-cobertura (~>
|
|
244
|
+
simplecov-cobertura (~> 3.1)
|
|
235
245
|
threads (~> 0.4)
|
|
236
|
-
typhoeus (
|
|
246
|
+
typhoeus (~> 1.4)
|
|
237
247
|
webmock (~> 3.23)
|
|
238
248
|
yard (~> 0.9)
|
|
239
249
|
|
data/Rakefile
CHANGED
data/bin/erc20
CHANGED
|
@@ -116,10 +116,13 @@ Options are:"
|
|
|
116
116
|
raise 'Address is required' if address.nil?
|
|
117
117
|
log.debug("Sending ERC20 tokens to #{address}")
|
|
118
118
|
amount = opts.arguments[3]
|
|
119
|
-
raise 'Amount argument is required' if amount.nil?
|
|
119
|
+
raise 'Amount argument is required (for example, "19.9usdt")' if amount.nil?
|
|
120
120
|
raise 'Amount is not valid' unless /^[0-9]+(usdt)?$/.match?(amount)
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
if /^[0-9]+$/.match?(amount)
|
|
122
|
+
amount = amount.to_i
|
|
123
|
+
elsif /^[0-9]usdt+$/.match?(amount)
|
|
124
|
+
amount = (amount.gsub(/usdt^/, '').to_f * 1_000_000).to_i
|
|
125
|
+
end
|
|
123
126
|
log.debug("Sending #{amount} ERC20 tokens")
|
|
124
127
|
puts wallet.pay(priv.private_hex, address, amount)
|
|
125
128
|
when 'eth_pay'
|
data/erc20.gemspec
CHANGED
|
@@ -20,8 +20,8 @@ Gem::Specification.new do |s|
|
|
|
20
20
|
'Ethereum node to provide JSON RPC and Websockets API.'
|
|
21
21
|
s.authors = ['Yegor Bugayenko']
|
|
22
22
|
s.email = 'yegor256@gmail.com'
|
|
23
|
-
s.homepage = '
|
|
24
|
-
s.files = `git ls-files`.split($RS)
|
|
23
|
+
s.homepage = 'https://github.com/yegor256/erc20.rb'
|
|
24
|
+
s.files = `git ls-files | grep -v -E '^(test/|\\.|renovate)'`.split($RS)
|
|
25
25
|
s.rdoc_options = ['--charset=UTF-8']
|
|
26
26
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
27
27
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
data/hardhat/package.json
CHANGED
data/lib/erc20/erc20.rb
CHANGED
data/lib/erc20/fake_wallet.rb
CHANGED
|
@@ -71,7 +71,7 @@ class ERC20::FakeWallet
|
|
|
71
71
|
|
|
72
72
|
# Get ERC20 amount (in tokens) that was sent in the given transaction.
|
|
73
73
|
#
|
|
74
|
-
# @param [String]
|
|
74
|
+
# @param [String] _txn Hex of transaction
|
|
75
75
|
# @return [Integer] Balance, in ERC20 tokens
|
|
76
76
|
def sum_of(_txn)
|
|
77
77
|
42_000_000
|
data/lib/erc20/wallet.rb
CHANGED
|
@@ -130,7 +130,7 @@ class ERC20::Wallet
|
|
|
130
130
|
# An address in Ethereum may have many balances. One of them is the main
|
|
131
131
|
# balance in ETH crypto. This balance is checked by this method.
|
|
132
132
|
#
|
|
133
|
-
# @param [String]
|
|
133
|
+
# @param [String] address Public key, in hex, starting from '0x'
|
|
134
134
|
# @return [Integer] Balance, in ETH
|
|
135
135
|
def eth_balance(address)
|
|
136
136
|
raise 'Address can\'t be nil' unless address
|
|
@@ -358,7 +358,7 @@ class ERC20::Wallet
|
|
|
358
358
|
u = url(http: false)
|
|
359
359
|
log_it(:debug, "Connecting ##{subscription_id} to #{u.hostname}:#{u.port}...")
|
|
360
360
|
contract = @contract
|
|
361
|
-
log_url = "ws#{
|
|
361
|
+
log_url = "ws#{'s' if @ssl}://#{u.hostname}:#{u.port}"
|
|
362
362
|
ws = Faye::WebSocket::Client.new(u.to_s, [], proxy: @proxy ? { origin: @proxy } : {}, ping: 60)
|
|
363
363
|
timer = nil
|
|
364
364
|
ws.on(:open) do
|
|
@@ -471,7 +471,7 @@ class ERC20::Wallet
|
|
|
471
471
|
end
|
|
472
472
|
|
|
473
473
|
def url(http: true)
|
|
474
|
-
URI.parse("#{http ? 'http' : 'ws'}#{
|
|
474
|
+
URI.parse("#{http ? 'http' : 'ws'}#{'s' if @ssl}://#{@host}:#{@port}#{http ? @http_path : @ws_path}")
|
|
475
475
|
end
|
|
476
476
|
|
|
477
477
|
def jsonrpc
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: erc20
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yegor Bugayenko
|
|
@@ -105,26 +105,6 @@ extra_rdoc_files:
|
|
|
105
105
|
- LICENSE.txt
|
|
106
106
|
- README.md
|
|
107
107
|
files:
|
|
108
|
-
- ".0pdd.yml"
|
|
109
|
-
- ".gitattributes"
|
|
110
|
-
- ".github/workflows/actionlint.yml"
|
|
111
|
-
- ".github/workflows/codecov.yml"
|
|
112
|
-
- ".github/workflows/copyrights.yml"
|
|
113
|
-
- ".github/workflows/hadolint.yml"
|
|
114
|
-
- ".github/workflows/markdown-lint.yml"
|
|
115
|
-
- ".github/workflows/pdd.yml"
|
|
116
|
-
- ".github/workflows/rake.yml"
|
|
117
|
-
- ".github/workflows/reuse.yml"
|
|
118
|
-
- ".github/workflows/shellcheck.yml"
|
|
119
|
-
- ".github/workflows/typos.yml"
|
|
120
|
-
- ".github/workflows/xcop.yml"
|
|
121
|
-
- ".github/workflows/yamllint.yml"
|
|
122
|
-
- ".gitignore"
|
|
123
|
-
- ".gitleaksignore"
|
|
124
|
-
- ".pdd"
|
|
125
|
-
- ".rubocop.yml"
|
|
126
|
-
- ".rultor.yml"
|
|
127
|
-
- ".yamllint.yml"
|
|
128
108
|
- Gemfile
|
|
129
109
|
- Gemfile.lock
|
|
130
110
|
- LICENSE.txt
|
|
@@ -148,12 +128,7 @@ files:
|
|
|
148
128
|
- lib/erc20/erc20.rb
|
|
149
129
|
- lib/erc20/fake_wallet.rb
|
|
150
130
|
- lib/erc20/wallet.rb
|
|
151
|
-
|
|
152
|
-
- test/erc20/test_fake_wallet.rb
|
|
153
|
-
- test/erc20/test_wallet.rb
|
|
154
|
-
- test/erc20/test_wallet_live.rb
|
|
155
|
-
- test/test__helper.rb
|
|
156
|
-
homepage: http://github.com/yegor256/erc20.rb
|
|
131
|
+
homepage: https://github.com/yegor256/erc20.rb
|
|
157
132
|
licenses:
|
|
158
133
|
- MIT
|
|
159
134
|
metadata:
|
|
@@ -173,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
173
148
|
- !ruby/object:Gem::Version
|
|
174
149
|
version: '0'
|
|
175
150
|
requirements: []
|
|
176
|
-
rubygems_version: 3.6.
|
|
151
|
+
rubygems_version: 3.6.9
|
|
177
152
|
specification_version: 4
|
|
178
153
|
summary: Sending and receiving ERC20 tokens in Ethereum network
|
|
179
154
|
test_files: []
|
data/.0pdd.yml
DELETED
data/.gitattributes
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: actionlint
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
actionlint:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- name: Download actionlint
|
|
20
|
-
id: get_actionlint
|
|
21
|
-
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
|
22
|
-
shell: bash
|
|
23
|
-
- name: Check workflow files
|
|
24
|
-
run: ${{ steps.get_actionlint.outputs.executable }} -color
|
|
25
|
-
shell: bash
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: codecov
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
jobs:
|
|
11
|
-
codecov:
|
|
12
|
-
timeout-minutes: 15
|
|
13
|
-
runs-on: ubuntu-24.04
|
|
14
|
-
steps:
|
|
15
|
-
- uses: actions/checkout@v4
|
|
16
|
-
- uses: ruby/setup-ruby@v1
|
|
17
|
-
with:
|
|
18
|
-
ruby-version: 3.3
|
|
19
|
-
bundler-cache: true
|
|
20
|
-
- run: bundle config set --global path "$(pwd)/vendor/bundle"
|
|
21
|
-
- run: bundle install --no-color
|
|
22
|
-
- run: bundle exec rake
|
|
23
|
-
- uses: codecov/codecov-action@v5
|
|
24
|
-
with:
|
|
25
|
-
token: ${{ secrets.CODECOV_TOKEN }}
|
|
26
|
-
files: coverage/.resultset.json
|
|
27
|
-
fail_ci_if_error: true
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: copyrights
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
copyrights:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: yegor256/copyrights-action@0.0.8
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
name: hadolint
|
|
5
|
-
'on':
|
|
6
|
-
push:
|
|
7
|
-
pull_request:
|
|
8
|
-
jobs:
|
|
9
|
-
hadolint:
|
|
10
|
-
timeout-minutes: 15
|
|
11
|
-
runs-on: ubuntu-24.04
|
|
12
|
-
steps:
|
|
13
|
-
- uses: actions/checkout@v4
|
|
14
|
-
- uses: hadolint/hadolint-action@v3.1.0
|
|
15
|
-
with:
|
|
16
|
-
dockerfile: hardhat/Dockerfile
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: markdown-lint
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
paths-ignore: ['paper/**', 'sandbox/**']
|
|
14
|
-
concurrency:
|
|
15
|
-
group: markdown-lint-${{ github.ref }}
|
|
16
|
-
cancel-in-progress: true
|
|
17
|
-
jobs:
|
|
18
|
-
markdown-lint:
|
|
19
|
-
timeout-minutes: 15
|
|
20
|
-
runs-on: ubuntu-24.04
|
|
21
|
-
steps:
|
|
22
|
-
- uses: actions/checkout@v4
|
|
23
|
-
- uses: articulate/actions-markdownlint@v1
|
data/.github/workflows/pdd.yml
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# SPDX-FileCopyrightText: Copyright (c) 2025 Yegor Bugayenko
|
|
2
|
-
# SPDX-License-Identifier: MIT
|
|
3
|
-
---
|
|
4
|
-
# yamllint disable rule:line-length
|
|
5
|
-
name: pdd
|
|
6
|
-
'on':
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- master
|
|
10
|
-
pull_request:
|
|
11
|
-
branches:
|
|
12
|
-
- master
|
|
13
|
-
jobs:
|
|
14
|
-
pdd:
|
|
15
|
-
timeout-minutes: 15
|
|
16
|
-
runs-on: ubuntu-24.04
|
|
17
|
-
steps:
|
|
18
|
-
- uses: actions/checkout@v4
|
|
19
|
-
- uses: volodya-lombrozo/pdd-action@master
|