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
102 103 104 105 106 |
# File 'lib/etherscan/api.rb', line 102 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
168 169 170 171 172 173 174 175 |
# File 'lib/etherscan/api.rb', line 168 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
200 201 202 203 204 205 206 207 208 |
# File 'lib/etherscan/api.rb', line 200 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
194 195 196 197 198 |
# File 'lib/etherscan/api.rb', line 194 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
108 109 110 111 112 113 114 |
# File 'lib/etherscan/api.rb', line 108 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
131 132 133 134 135 136 |
# File 'lib/etherscan/api.rb', line 131 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
177 178 179 180 181 182 183 |
# File 'lib/etherscan/api.rb', line 177 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
185 186 187 188 189 190 191 192 |
# File 'lib/etherscan/api.rb', line 185 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
138 139 140 141 142 143 144 |
# File 'lib/etherscan/api.rb', line 138 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
116 117 118 119 120 121 |
# File 'lib/etherscan/api.rb', line 116 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
146 147 148 149 150 151 152 |
# File 'lib/etherscan/api.rb', line 146 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
161 162 163 164 165 166 |
# File 'lib/etherscan/api.rb', line 161 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
123 124 125 126 127 128 129 |
# File 'lib/etherscan/api.rb', line 123 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 |