Module: Etherscan::Proxy
- Defined in:
- lib/etherscan/api.rb
Class Method Summary collapse
- .eth_block_number ⇒ Object
- .eth_call(to, data, tag) ⇒ Object
- .eth_estimate_gas(to, value, gas_price, gas) ⇒ Object
- .eth_gas_price ⇒ Object
- .eth_get_block_by_number(tag, boolean) ⇒ Object
- .eth_get_block_transaction_count_by_number(tag) ⇒ Object
- .eth_get_code(address, tag) ⇒ Object
- .eth_get_storage_at(address, position, tag) ⇒ Object
- .eth_get_transaction_by_block_number_and_index(tag, index) ⇒ Object
- .eth_get_transaction_by_hash(txhash) ⇒ Object
- .eth_get_transaction_count(address, tag) ⇒ Object
- .eth_get_transaction_receipt(txhash) ⇒ Object
- .eth_get_uncle_by_block_number_and_index(tag, index) ⇒ Object
- .eth_send_raw_transaction(hex) ⇒ Object
Class Method Details
.eth_block_number ⇒ Object
116 117 118 119 120 |
# File 'lib/etherscan/api.rb', line 116 def eth_block_number call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_blockNumber') call.api_key = Etherscan.api_key call.fetch end |
.eth_call(to, data, tag) ⇒ Object
182 183 184 185 186 187 188 189 |
# File 'lib/etherscan/api.rb', line 182 def eth_call(to, data, tag) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_call') call.api_key = Etherscan.api_key call.to = to call.data = data call.tag = tag call.fetch end |
.eth_estimate_gas(to, value, gas_price, gas) ⇒ Object
214 215 216 217 218 219 220 221 222 |
# File 'lib/etherscan/api.rb', line 214 def eth_estimate_gas(to, value, gas_price, gas) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_estimateGas') call.api_key = Etherscan.api_key call.to = to call.value = value call.gasPrice = gas_price call.gas = gas call.fetch end |
.eth_gas_price ⇒ Object
208 209 210 211 212 |
# File 'lib/etherscan/api.rb', line 208 def eth_gas_price call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_gasPrice') call.api_key = Etherscan.api_key call.fetch end |
.eth_get_block_by_number(tag, boolean) ⇒ Object
122 123 124 125 126 127 128 |
# File 'lib/etherscan/api.rb', line 122 def eth_get_block_by_number(tag, boolean) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getBlockByNumber') call.api_key = Etherscan.api_key call.tag = tag call.boolean = boolean call.fetch end |
.eth_get_block_transaction_count_by_number(tag) ⇒ Object
145 146 147 148 149 150 |
# File 'lib/etherscan/api.rb', line 145 def eth_get_block_transaction_count_by_number(tag) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getBlockTransactionCountByNumber') call.api_key = Etherscan.api_key call.tag = tag call.fetch end |
.eth_get_code(address, tag) ⇒ Object
191 192 193 194 195 196 197 |
# File 'lib/etherscan/api.rb', line 191 def eth_get_code(address, tag) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getCode') call.api_key = Etherscan.api_key call.address = address call.tag = tag call.fetch end |
.eth_get_storage_at(address, position, tag) ⇒ Object
199 200 201 202 203 204 205 206 |
# File 'lib/etherscan/api.rb', line 199 def eth_get_storage_at(address, position, tag) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getStorageAt') call.api_key = Etherscan.api_key call.address = address call.position = position call.tag = tag call.fetch end |
.eth_get_transaction_by_block_number_and_index(tag, index) ⇒ Object
152 153 154 155 156 157 158 |
# File 'lib/etherscan/api.rb', line 152 def eth_get_transaction_by_block_number_and_index(tag, index) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getTransactionByBlockNumberAndIndex') call.api_key = Etherscan.api_key call.tag = tag call.index = index call.fetch end |
.eth_get_transaction_by_hash(txhash) ⇒ Object
130 131 132 133 134 135 |
# File 'lib/etherscan/api.rb', line 130 def eth_get_transaction_by_hash(txhash) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getTransactionByHash') call.api_key = Etherscan.api_key call.txhash = txhash call.fetch end |
.eth_get_transaction_count(address, tag) ⇒ Object
160 161 162 163 164 165 166 |
# File 'lib/etherscan/api.rb', line 160 def eth_get_transaction_count(address, tag) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getTransactionCount') call.api_key = Etherscan.api_key call.address = address call.tag = tag call.fetch end |
.eth_get_transaction_receipt(txhash) ⇒ Object
175 176 177 178 179 180 |
# File 'lib/etherscan/api.rb', line 175 def eth_get_transaction_receipt(txhash) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getTransactionReceipt') call.api_key = Etherscan.api_key call.txhash = txhash call.fetch end |
.eth_get_uncle_by_block_number_and_index(tag, index) ⇒ Object
137 138 139 140 141 142 143 |
# File 'lib/etherscan/api.rb', line 137 def eth_get_uncle_by_block_number_and_index(tag, index) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_getUncleByBlockNumberAndIndex') call.api_key = Etherscan.api_key call.tag = tag call.index = index call.fetch end |
.eth_send_raw_transaction(hex) ⇒ Object
168 169 170 171 172 173 |
# File 'lib/etherscan/api.rb', line 168 def eth_send_raw_transaction(hex) call = Etherscan::Call.new(Etherscan.chain, 'proxy', 'eth_sendRawTransaction') call.api_key = Etherscan.api_key call.hex = hex call.fetch end |