etherscan 0.1.4 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +5 -5
  2. metadata +14 -243
  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 -33
  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: 11c14d79cdadb3896f0a89a5975e56b7ff12ef46
4
- data.tar.gz: d64f4a059d448778d97e4b7a6d9196ac594f7d70
2
+ SHA256:
3
+ metadata.gz: a9b8f56872aa48330bd4345ab8ba4460b3e8d1651cc1bd1a5789ed0926129d2e
4
+ data.tar.gz: b86478806a4f8d6f3002fd5c94269641df13ac7a6d5a5abed4f17b7358aebc44
5
5
  SHA512:
6
- metadata.gz: 13b7511430949da0ceaf5a4ce8a11952e84ad9bbfe9d4c633bbd725f5cc860466973e6e79d316f71027dcec56e3c7d599b6fd83caad0a7ff2375d1a16b4506e3
7
- data.tar.gz: 18a9cddb717f42cd63b87fe934121ebd22e2edb2116ccae07b6adfd144c04c2113163afb3cbd61415781841e1b036e199945380c6089123bc7bd0d02fc67bebd
6
+ metadata.gz: 27dee16d9f81a6d66446db01ceae02380c24d7ff63f47e5cb8151a0728aa6ba72a8c424fa6b9a891cfa8663bb761bf6dedb9f864533238504d7117a0fddf5c26
7
+ data.tar.gz: c0cd52dc3bf79dfa707d32b1865085e02fb2a26c27888ed1ad0b8a60dcd43aa87f26222c50b2f674dcb9be37fcffd688bcda88818a6178f73aaa849a2682cb15
metadata CHANGED
@@ -1,216 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etherscan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
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-23 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
- description: 'Forked from: https://github.com/sebs/etherscanio-rb. 3rd party using
154
- 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
155
14
  email:
156
15
  - wuminzhe@gmail.com
157
16
  executables: []
158
17
  extensions: []
159
- extra_rdoc_files:
160
- - README.md
161
- files:
162
- - ".gitignore"
163
- - Gemfile
164
- - README.md
165
- - Rakefile
166
- - etherscan.gemspec
167
- - lib/etherscan.rb
168
- - lib/etherscan/api.rb
169
- - lib/etherscan/call.rb
170
- - spec/api/account/balance_spec.rb
171
- - spec/api/account/balancemulti_spec.rb
172
- - spec/api/account/getminedblocks_spec.rb
173
- - spec/api/account/txlist_internal_spec.rb
174
- - spec/api/account/txlist_spec.rb
175
- - spec/api/block_getblockreward_spec.rb
176
- - spec/api/contract_spec.rb
177
- - spec/api/transaction_getstatus_spec.rb
178
- - spec/etehrscanio_call_api_key_spec.rb
179
- - spec/etherscan_call_params_spec.rb
180
- - spec/etherscanio_call_spec.rb
181
- - spec/etherscanio_spec.rb
182
- - spec/fixtures/account/balance.json
183
- - spec/fixtures/account/balance_multiple.json
184
- - spec/fixtures/account/getminedblocks.json
185
- - spec/fixtures/account/txlist.json
186
- - spec/fixtures/account/txlist_internal.json
187
- - spec/fixtures/block_getblockreward.json
188
- - spec/fixtures/contract_getabi.json
189
- - spec/fixtures/proxy/eth_blocknumber.json
190
- - spec/fixtures/proxy/eth_call.json
191
- - spec/fixtures/proxy/eth_estimategas.json
192
- - spec/fixtures/proxy/eth_gasprice.json
193
- - spec/fixtures/proxy/eth_getblockbynumber.json
194
- - spec/fixtures/proxy/eth_getblocktransactioncountbynumber.json
195
- - spec/fixtures/proxy/eth_getcode.json
196
- - spec/fixtures/proxy/eth_getstorageat.json
197
- - spec/fixtures/proxy/eth_gettransactionbyhash.json
198
- - spec/fixtures/proxy/eth_gettransactionbynumberandindex.json
199
- - spec/fixtures/proxy/eth_gettransactioncount.json
200
- - spec/fixtures/proxy/eth_gettransactionreceipt.json
201
- - spec/fixtures/proxy/eth_getunclebyblockbynumberandindex.json
202
- - spec/fixtures/proxy/eth_sendrawtransaction.json
203
- - spec/fixtures/stats/ethprice.json
204
- - spec/fixtures/stats/ethsupply.json
205
- - spec/fixtures/stats/tokensupply.json
206
- - spec/fixtures/token/tokensupply.json
207
- - spec/fixtures/transaction_getstatus.json
208
- - spec/spec_helper.rb
18
+ extra_rdoc_files: []
19
+ files: []
209
20
  homepage: https://github.com/wuminzhe/etherscan
210
21
  licenses:
211
22
  - MIT
212
23
  metadata: {}
213
- post_install_message:
24
+ post_install_message:
214
25
  rdoc_options: []
215
26
  require_paths:
216
27
  - lib
@@ -225,48 +36,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
225
36
  - !ruby/object:Gem::Version
226
37
  version: '0'
227
38
  requirements: []
228
- rubyforge_project:
229
- rubygems_version: 2.6.13
230
- signing_key:
39
+ rubygems_version: 3.3.7
40
+ signing_key:
231
41
  specification_version: 4
232
- summary: An etherscan.io api wrapper
233
- test_files:
234
- - spec/api/account/balance_spec.rb
235
- - spec/api/account/balancemulti_spec.rb
236
- - spec/api/account/getminedblocks_spec.rb
237
- - spec/api/account/txlist_internal_spec.rb
238
- - spec/api/account/txlist_spec.rb
239
- - spec/api/block_getblockreward_spec.rb
240
- - spec/api/contract_spec.rb
241
- - spec/api/transaction_getstatus_spec.rb
242
- - spec/etehrscanio_call_api_key_spec.rb
243
- - spec/etherscan_call_params_spec.rb
244
- - spec/etherscanio_call_spec.rb
245
- - spec/etherscanio_spec.rb
246
- - spec/fixtures/account/balance.json
247
- - spec/fixtures/account/balance_multiple.json
248
- - spec/fixtures/account/getminedblocks.json
249
- - spec/fixtures/account/txlist.json
250
- - spec/fixtures/account/txlist_internal.json
251
- - spec/fixtures/block_getblockreward.json
252
- - spec/fixtures/contract_getabi.json
253
- - spec/fixtures/proxy/eth_blocknumber.json
254
- - spec/fixtures/proxy/eth_call.json
255
- - spec/fixtures/proxy/eth_estimategas.json
256
- - spec/fixtures/proxy/eth_gasprice.json
257
- - spec/fixtures/proxy/eth_getblockbynumber.json
258
- - spec/fixtures/proxy/eth_getblocktransactioncountbynumber.json
259
- - spec/fixtures/proxy/eth_getcode.json
260
- - spec/fixtures/proxy/eth_getstorageat.json
261
- - spec/fixtures/proxy/eth_gettransactionbyhash.json
262
- - spec/fixtures/proxy/eth_gettransactionbynumberandindex.json
263
- - spec/fixtures/proxy/eth_gettransactioncount.json
264
- - spec/fixtures/proxy/eth_gettransactionreceipt.json
265
- - spec/fixtures/proxy/eth_getunclebyblockbynumberandindex.json
266
- - spec/fixtures/proxy/eth_sendrawtransaction.json
267
- - spec/fixtures/stats/ethprice.json
268
- - spec/fixtures/stats/ethsupply.json
269
- - spec/fixtures/stats/tokensupply.json
270
- - spec/fixtures/token/tokensupply.json
271
- - spec/fixtures/transaction_getstatus.json
272
- - 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,33 +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.4'
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 = 'An etherscan.io api wrapper'
13
- spec.homepage = 'https://github.com/wuminzhe/etherscan'
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
- 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