etherscan 0.1.3 → 0.2.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.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. metadata +15 -272
  3. data/.gitignore +0 -13
  4. data/Gemfile +0 -5
  5. data/README.md +0 -17
  6. data/Rakefile +0 -10
  7. data/etherscan.gemspec +0 -35
  8. data/lib/etherscan/api.rb +0 -225
  9. data/lib/etherscan/call.rb +0 -102
  10. data/lib/etherscan.rb +0 -11
  11. data/spec/api/account/balance_spec.rb +0 -15
  12. data/spec/api/account/balancemulti_spec.rb +0 -21
  13. data/spec/api/account/getminedblocks_spec.rb +0 -24
  14. data/spec/api/account/txlist_internal_spec.rb +0 -28
  15. data/spec/api/account/txlist_spec.rb +0 -27
  16. data/spec/api/block_getblockreward_spec.rb +0 -13
  17. data/spec/api/contract_spec.rb +0 -13
  18. data/spec/api/transaction_getstatus_spec.rb +0 -13
  19. data/spec/etehrscanio_call_api_key_spec.rb +0 -14
  20. data/spec/etherscan_call_params_spec.rb +0 -94
  21. data/spec/etherscanio_call_spec.rb +0 -31
  22. data/spec/etherscanio_spec.rb +0 -12
  23. data/spec/fixtures/account/balance.json +0 -1
  24. data/spec/fixtures/account/balance_multiple.json +0 -1
  25. data/spec/fixtures/account/getminedblocks.json +0 -1
  26. data/spec/fixtures/account/txlist.json +0 -1
  27. data/spec/fixtures/account/txlist_internal.json +0 -1
  28. data/spec/fixtures/block_getblockreward.json +0 -1
  29. data/spec/fixtures/contract_getabi.json +0 -1
  30. data/spec/fixtures/proxy/eth_blocknumber.json +0 -1
  31. data/spec/fixtures/proxy/eth_call.json +0 -1
  32. data/spec/fixtures/proxy/eth_estimategas.json +0 -1
  33. data/spec/fixtures/proxy/eth_gasprice.json +0 -1
  34. data/spec/fixtures/proxy/eth_getblockbynumber.json +0 -1
  35. data/spec/fixtures/proxy/eth_getblocktransactioncountbynumber.json +0 -1
  36. data/spec/fixtures/proxy/eth_getcode.json +0 -1
  37. data/spec/fixtures/proxy/eth_getstorageat.json +0 -1
  38. data/spec/fixtures/proxy/eth_gettransactionbyhash.json +0 -1
  39. data/spec/fixtures/proxy/eth_gettransactionbynumberandindex.json +0 -1
  40. data/spec/fixtures/proxy/eth_gettransactioncount.json +0 -1
  41. data/spec/fixtures/proxy/eth_gettransactionreceipt.json +0 -1
  42. data/spec/fixtures/proxy/eth_getunclebyblockbynumberandindex.json +0 -1
  43. data/spec/fixtures/proxy/eth_sendrawtransaction.json +0 -1
  44. data/spec/fixtures/stats/ethprice.json +0 -1
  45. data/spec/fixtures/stats/ethsupply.json +0 -1
  46. data/spec/fixtures/stats/tokensupply.json +0 -1
  47. data/spec/fixtures/token/tokensupply.json +0 -1
  48. data/spec/fixtures/transaction_getstatus.json +0 -1
  49. data/spec/spec_helper.rb +0 -80
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e86ffc93a7128a0c0dfcba07466fefc8be94c88a
4
- data.tar.gz: 55d96a5e6523a33ea3f5c63a825d5d5922fe9f56
2
+ SHA256:
3
+ metadata.gz: a9b8f56872aa48330bd4345ab8ba4460b3e8d1651cc1bd1a5789ed0926129d2e
4
+ data.tar.gz: b86478806a4f8d6f3002fd5c94269641df13ac7a6d5a5abed4f17b7358aebc44
5
5
  SHA512:
6
- metadata.gz: e5017b85d096a81df738577fed5cc7f57bb7ce1306a6aa807bfd1ebfa2551e8e72103efd881ed544d9c66d1f8ba96aa04e164e6f3e0d2835e2dbe407007923aa
7
- data.tar.gz: 746fb5d59b18b53238a5fc20b53e13470d7dbf5bdb2a79a30bdea8a5d8a922a950cdb839e9e782aa0c4baaa84475616d98399be3565b233d7d5e8113a7fd0348
6
+ metadata.gz: 27dee16d9f81a6d66446db01ceae02380c24d7ff63f47e5cb8151a0728aa6ba72a8c424fa6b9a891cfa8663bb761bf6dedb9f864533238504d7117a0fddf5c26
7
+ data.tar.gz: c0cd52dc3bf79dfa707d32b1865085e02fb2a26c27888ed1ad0b8a60dcd43aa87f26222c50b2f674dcb9be37fcffd688bcda88818a6178f73aaa849a2682cb15
metadata CHANGED
@@ -1,244 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etherscan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
- - wuminzhe
8
- autorequire:
9
- bindir: bin
7
+ - Aki Wu
8
+ autorequire:
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-22 00:00:00.000000000 Z
12
- dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: faraday
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - '='
18
- - !ruby/object:Gem::Version
19
- version: 0.9.2
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '='
25
- - !ruby/object:Gem::Version
26
- version: 0.9.2
27
- - !ruby/object:Gem::Dependency
28
- name: json
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - '='
32
- - !ruby/object:Gem::Version
33
- version: 2.1.0
34
- type: :runtime
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - '='
39
- - !ruby/object:Gem::Version
40
- version: 2.1.0
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: guard
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
- - !ruby/object:Gem::Dependency
98
- name: guard-rspec
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - ">="
102
- - !ruby/object:Gem::Version
103
- version: '0'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - ">="
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: rubocop
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ">="
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
- - !ruby/object:Gem::Dependency
126
- name: guard-rubocop
127
- requirement: !ruby/object:Gem::Requirement
128
- requirements:
129
- - - ">="
130
- - !ruby/object:Gem::Version
131
- version: '0'
132
- type: :development
133
- prerelease: false
134
- version_requirements: !ruby/object:Gem::Requirement
135
- requirements:
136
- - - ">="
137
- - !ruby/object:Gem::Version
138
- version: '0'
139
- - !ruby/object:Gem::Dependency
140
- name: webmock
141
- requirement: !ruby/object:Gem::Requirement
142
- requirements:
143
- - - ">="
144
- - !ruby/object:Gem::Version
145
- version: '0'
146
- type: :development
147
- prerelease: false
148
- version_requirements: !ruby/object:Gem::Requirement
149
- requirements:
150
- - - ">="
151
- - !ruby/object:Gem::Version
152
- version: '0'
153
- - !ruby/object:Gem::Dependency
154
- name: yard
155
- requirement: !ruby/object:Gem::Requirement
156
- requirements:
157
- - - ">="
158
- - !ruby/object:Gem::Version
159
- version: '0'
160
- type: :development
161
- prerelease: false
162
- version_requirements: !ruby/object:Gem::Requirement
163
- requirements:
164
- - - ">="
165
- - !ruby/object:Gem::Version
166
- version: '0'
167
- - !ruby/object:Gem::Dependency
168
- name: yard-ghpages
169
- requirement: !ruby/object:Gem::Requirement
170
- requirements:
171
- - - ">="
172
- - !ruby/object:Gem::Version
173
- version: '0'
174
- type: :development
175
- prerelease: false
176
- version_requirements: !ruby/object:Gem::Requirement
177
- requirements:
178
- - - ">="
179
- - !ruby/object:Gem::Version
180
- version: '0'
181
- description: 'Forked from: https://github.com/sebs/etherscanio-rb. 3rd party using
182
- to the API at etherscan.io'
11
+ date: 2023-12-02 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: etherscan.io API wrapper, or, etherscan compatible API wrapper
183
14
  email:
184
15
  - wuminzhe@gmail.com
185
16
  executables: []
186
17
  extensions: []
187
- extra_rdoc_files:
188
- - README.md
189
- files:
190
- - ".gitignore"
191
- - Gemfile
192
- - README.md
193
- - Rakefile
194
- - etherscan.gemspec
195
- - lib/etherscan.rb
196
- - lib/etherscan/api.rb
197
- - lib/etherscan/call.rb
198
- - spec/api/account/balance_spec.rb
199
- - spec/api/account/balancemulti_spec.rb
200
- - spec/api/account/getminedblocks_spec.rb
201
- - spec/api/account/txlist_internal_spec.rb
202
- - spec/api/account/txlist_spec.rb
203
- - spec/api/block_getblockreward_spec.rb
204
- - spec/api/contract_spec.rb
205
- - spec/api/transaction_getstatus_spec.rb
206
- - spec/etehrscanio_call_api_key_spec.rb
207
- - spec/etherscan_call_params_spec.rb
208
- - spec/etherscanio_call_spec.rb
209
- - spec/etherscanio_spec.rb
210
- - spec/fixtures/account/balance.json
211
- - spec/fixtures/account/balance_multiple.json
212
- - spec/fixtures/account/getminedblocks.json
213
- - spec/fixtures/account/txlist.json
214
- - spec/fixtures/account/txlist_internal.json
215
- - spec/fixtures/block_getblockreward.json
216
- - spec/fixtures/contract_getabi.json
217
- - spec/fixtures/proxy/eth_blocknumber.json
218
- - spec/fixtures/proxy/eth_call.json
219
- - spec/fixtures/proxy/eth_estimategas.json
220
- - spec/fixtures/proxy/eth_gasprice.json
221
- - spec/fixtures/proxy/eth_getblockbynumber.json
222
- - spec/fixtures/proxy/eth_getblocktransactioncountbynumber.json
223
- - spec/fixtures/proxy/eth_getcode.json
224
- - spec/fixtures/proxy/eth_getstorageat.json
225
- - spec/fixtures/proxy/eth_gettransactionbyhash.json
226
- - spec/fixtures/proxy/eth_gettransactionbynumberandindex.json
227
- - spec/fixtures/proxy/eth_gettransactioncount.json
228
- - spec/fixtures/proxy/eth_gettransactionreceipt.json
229
- - spec/fixtures/proxy/eth_getunclebyblockbynumberandindex.json
230
- - spec/fixtures/proxy/eth_sendrawtransaction.json
231
- - spec/fixtures/stats/ethprice.json
232
- - spec/fixtures/stats/ethsupply.json
233
- - spec/fixtures/stats/tokensupply.json
234
- - spec/fixtures/token/tokensupply.json
235
- - spec/fixtures/transaction_getstatus.json
236
- - spec/spec_helper.rb
237
- homepage: https://github.com/wuminzhe/etherscanio-rb
18
+ extra_rdoc_files: []
19
+ files: []
20
+ homepage: https://github.com/wuminzhe/etherscan
238
21
  licenses:
239
22
  - MIT
240
23
  metadata: {}
241
- post_install_message:
24
+ post_install_message:
242
25
  rdoc_options: []
243
26
  require_paths:
244
27
  - lib
@@ -253,48 +36,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
36
  - !ruby/object:Gem::Version
254
37
  version: '0'
255
38
  requirements: []
256
- rubyforge_project:
257
- rubygems_version: 2.6.13
258
- signing_key:
39
+ rubygems_version: 3.3.7
40
+ signing_key:
259
41
  specification_version: 4
260
- summary: 3rd party using to the API at etherscan.io
261
- test_files:
262
- - spec/api/account/balance_spec.rb
263
- - spec/api/account/balancemulti_spec.rb
264
- - spec/api/account/getminedblocks_spec.rb
265
- - spec/api/account/txlist_internal_spec.rb
266
- - spec/api/account/txlist_spec.rb
267
- - spec/api/block_getblockreward_spec.rb
268
- - spec/api/contract_spec.rb
269
- - spec/api/transaction_getstatus_spec.rb
270
- - spec/etehrscanio_call_api_key_spec.rb
271
- - spec/etherscan_call_params_spec.rb
272
- - spec/etherscanio_call_spec.rb
273
- - spec/etherscanio_spec.rb
274
- - spec/fixtures/account/balance.json
275
- - spec/fixtures/account/balance_multiple.json
276
- - spec/fixtures/account/getminedblocks.json
277
- - spec/fixtures/account/txlist.json
278
- - spec/fixtures/account/txlist_internal.json
279
- - spec/fixtures/block_getblockreward.json
280
- - spec/fixtures/contract_getabi.json
281
- - spec/fixtures/proxy/eth_blocknumber.json
282
- - spec/fixtures/proxy/eth_call.json
283
- - spec/fixtures/proxy/eth_estimategas.json
284
- - spec/fixtures/proxy/eth_gasprice.json
285
- - spec/fixtures/proxy/eth_getblockbynumber.json
286
- - spec/fixtures/proxy/eth_getblocktransactioncountbynumber.json
287
- - spec/fixtures/proxy/eth_getcode.json
288
- - spec/fixtures/proxy/eth_getstorageat.json
289
- - spec/fixtures/proxy/eth_gettransactionbyhash.json
290
- - spec/fixtures/proxy/eth_gettransactionbynumberandindex.json
291
- - spec/fixtures/proxy/eth_gettransactioncount.json
292
- - spec/fixtures/proxy/eth_gettransactionreceipt.json
293
- - spec/fixtures/proxy/eth_getunclebyblockbynumberandindex.json
294
- - spec/fixtures/proxy/eth_sendrawtransaction.json
295
- - spec/fixtures/stats/ethprice.json
296
- - spec/fixtures/stats/ethsupply.json
297
- - spec/fixtures/stats/tokensupply.json
298
- - spec/fixtures/token/tokensupply.json
299
- - spec/fixtures/transaction_getstatus.json
300
- - spec/spec_helper.rb
42
+ summary: etherscan.io API wrapper, or, etherscan compatible API wrapper
43
+ test_files: []
data/.gitignore DELETED
@@ -1,13 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
-
10
- # rspec failure tracking
11
- /.rspec_status
12
- /.idea
13
- /etherscan-*.*.*.gem
data/Gemfile DELETED
@@ -1,5 +0,0 @@
1
-
2
- source 'https://rubygems.org'
3
-
4
- # Specify your gem's dependencies in testgem.gemspec
5
- gemspec
data/README.md DELETED
@@ -1,17 +0,0 @@
1
- # etherscan
2
-
3
- Access to the API of etherscan.io and the ethereum blockchain
4
-
5
- Forked from: https://github.com/sebs/etherscanio-rb
6
-
7
- ## Installation
8
-
9
- etherscan is published to rubygems.
10
-
11
- Dpl requires ruby with a version greater than 1.9.3
12
- * To install: gem install etherscan
13
-
14
-
15
- ## Work in Progress
16
-
17
- Neither is is this stable, nor secure. Although all releases will be going through rubygems.
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
- require 'yard-ghpages'
4
-
5
- RSpec::Core::RakeTask.new(:spec)
6
-
7
- task test: :spec
8
- task default: :spec
9
-
10
- Yard::GHPages::Tasks.install_tasks
data/etherscan.gemspec DELETED
@@ -1,35 +0,0 @@
1
- # coding: utf-8
2
-
3
- lib = File.expand_path('../lib', __FILE__)
4
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = 'etherscan'
8
- spec.version = '0.1.3'
9
- spec.authors = ['wuminzhe']
10
- spec.email = ['wuminzhe@gmail.com']
11
- spec.description = 'Forked from: https://github.com/sebs/etherscanio-rb. 3rd party using to the API at etherscan.io'
12
- spec.summary = '3rd party using to the API at etherscan.io'
13
- spec.homepage = 'https://github.com/wuminzhe/etherscanio-rb'
14
- spec.license = 'MIT'
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ['lib']
20
-
21
- spec.extra_rdoc_files = ['README.md']
22
-
23
- spec.add_dependency 'faraday', '0.9.2'
24
- spec.add_dependency 'json', '2.1.0'
25
- spec.add_development_dependency 'bundler'
26
- spec.add_development_dependency 'rake'
27
- spec.add_development_dependency 'rspec'
28
- spec.add_development_dependency 'guard'
29
- spec.add_development_dependency 'guard-rspec'
30
- spec.add_development_dependency 'rubocop'
31
- spec.add_development_dependency 'guard-rubocop'
32
- spec.add_development_dependency 'webmock'
33
- spec.add_development_dependency 'yard'
34
- spec.add_development_dependency 'yard-ghpages'
35
- end
data/lib/etherscan/api.rb DELETED
@@ -1,225 +0,0 @@
1
- module Etherscan
2
- class << self
3
- attr_accessor :api_key, :chain
4
- end
5
-
6
- module Account
7
- class << self
8
- def txlist(address, startblock, endblock, sort = 'desc', page = nil, offset = nil)
9
- call = Etherscan::Call.new(Etherscan.chain, 'account', 'txlist')
10
- call.api_key = Etherscan.api_key
11
- call.address = address
12
- call.startblock = startblock
13
- call.endblock = endblock
14
- call.page = page
15
- call.offset = offset
16
- call.sort = sort
17
- call.fetch
18
- end
19
-
20
- def txlistinternal(address, startblock, endblock, sort = 'desc', page = nil, offset = nil)
21
- call = Etherscan::Call.new(Etherscan.chain, 'account', 'txlistinternal')
22
- call.api_key = Etherscan.api_key
23
- call.address = address
24
- call.startblock = startblock
25
- call.endblock = endblock
26
- call.page = page
27
- call.offset = offset
28
- call.sort = sort
29
- call.fetch
30
- end
31
-
32
- def txlistinternal_txhash(txhash)
33
- call = Etherscan::Call.new(Etherscan.chain, 'account', 'txlistinternal')
34
- call.api_key = Etherscan.api_key
35
- call.txhash = txhash
36
- call.fetch
37
- end
38
-
39
- def balance(address, tag)
40
- call = Etherscan::Call.new(Etherscan.chain, 'account', 'balance')
41
- call.api_key = Etherscan.api_key
42
- call.address = address
43
- call.tag = tag
44
- call.fetch
45
- end
46
-
47
- def getminedblocks(address, blocktype, page = nil, offset = nil)
48
- call = Etherscan::Call.new(Etherscan.chain, 'account', 'getminedblocks')
49
- call.api_key = Etherscan.api_key
50
- call.page = page
51
- call.offset = offset
52
- call.address = address
53
- call.blocktype = blocktype
54
- call.fetch
55
- end
56
-
57
- def balancemulti(address, tag)
58
- call = Etherscan::Call.new(Etherscan.chain, 'account', 'balancemulti')
59
- call.api_key = Etherscan.api_key
60
- call.address = address
61
- call.tag = tag
62
- call.fetch
63
- end
64
- end
65
- end
66
-
67
- module Contract
68
- class << self
69
- def getabi(address)
70
- call = Etherscan::Call.new(Etherscan.chain, 'contract', 'getabi')
71
- call.api_key = Etherscan.api_key
72
- call.address = address
73
- call.fetch
74
- end
75
- end
76
- end
77
-
78
- module Transaction
79
- class << self
80
- def getstatus(txhash)
81
- call = Etherscan::Call.new(Etherscan.chain, 'transaction', 'getstatus')
82
- call.api_key = Etherscan.api_key
83
- call.txhash = txhash
84
- call.fetch
85
- end
86
- end
87
- end
88
-
89
- module Block
90
- class << self
91
- def getblockreward(blockno)
92
- call = Etherscan::Call.new(Etherscan.chain, 'block', 'getblockreward')
93
- call.api_key = Etherscan.api_key
94
- call.blockno = blockno
95
- call.fetch
96
- end
97
- end
98
- end
99
-
100
- module Logs
101
- class << self
102
- def get_logs(fromBlock, toBlock, address, topics)
103
- call = Etherscan::Call.new(Etherscan.chain, 'logs', 'getLogs')
104
- call.api_key = Etherscan.api_key
105
- call.fromBlock = fromBlock
106
- call.toBlock = toBlock
107
- call.address = address
108
- call.topics = topics
109
- call.fetch
110
- end
111
- end
112
- end
113
-
114
- module Proxy
115
- class << self
116
- def eth_block_number
117
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_blockNumber')
118
- call.api_key = Etherscan.api_key
119
- call.fetch
120
- end
121
-
122
- def eth_get_block_by_number(tag, boolean)
123
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getBlockByNumber')
124
- call.api_key = Etherscan.api_key
125
- call.tag = tag
126
- call.boolean = boolean
127
- call.fetch
128
- end
129
-
130
- def eth_get_transaction_by_hash(txhash)
131
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getTransactionByHash')
132
- call.api_key = Etherscan.api_key
133
- call.txhash = txhash
134
- call.fetch
135
- end
136
-
137
- def eth_get_uncle_by_block_number_and_index(tag, index)
138
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getUncleByBlockNumberAndIndex')
139
- call.api_key = Etherscan.api_key
140
- call.tag = tag
141
- call.index = index
142
- call.fetch
143
- end
144
-
145
- def eth_get_block_transaction_count_by_number(tag)
146
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getBlockTransactionCountByNumber')
147
- call.api_key = Etherscan.api_key
148
- call.tag = tag
149
- call.fetch
150
- end
151
-
152
- def eth_get_transaction_by_block_number_and_index(tag, index)
153
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getTransactionByBlockNumberAndIndex')
154
- call.api_key = Etherscan.api_key
155
- call.tag = tag
156
- call.index = index
157
- call.fetch
158
- end
159
-
160
- def eth_get_transaction_count(address, tag)
161
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getTransactionCount')
162
- call.api_key = Etherscan.api_key
163
- call.address = address
164
- call.tag = tag
165
- call.fetch
166
- end
167
-
168
- def eth_send_raw_transaction(hex)
169
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_sendRawTransaction')
170
- call.api_key = Etherscan.api_key
171
- call.hex = hex
172
- call.fetch
173
- end
174
-
175
- def eth_get_transaction_receipt(txhash)
176
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getTransactionReceipt')
177
- call.api_key = Etherscan.api_key
178
- call.txhash = txhash
179
- call.fetch
180
- end
181
-
182
- def eth_call(to, data, tag)
183
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_call')
184
- call.api_key = Etherscan.api_key
185
- call.to = to
186
- call.data = data
187
- call.tag = tag
188
- call.fetch
189
- end
190
-
191
- def eth_get_code(address, tag)
192
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getCode')
193
- call.api_key = Etherscan.api_key
194
- call.address = address
195
- call.tag = tag
196
- call.fetch
197
- end
198
-
199
- def eth_get_storage_at(address, position, tag)
200
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getStorageAt')
201
- call.api_key = Etherscan.api_key
202
- call.address = address
203
- call.position = position
204
- call.tag = tag
205
- call.fetch
206
- end
207
-
208
- def eth_gas_price
209
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_gasPrice')
210
- call.api_key = Etherscan.api_key
211
- call.fetch
212
- end
213
-
214
- def eth_estimate_gas(to, value, gas_price, gas)
215
- call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_estimateGas')
216
- call.api_key = Etherscan.api_key
217
- call.to = to
218
- call.value = value
219
- call.gasPrice = gas_price
220
- call.gas = gas
221
- call.fetch
222
- end
223
- end
224
- end
225
- end