Module: Etherscan::Proxy

Defined in:
lib/etherscan/api.rb

Class Method Summary collapse

Class Method Details

.eth_block_numberObject



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_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_transaction_by_hash(txhash) ⇒ Object



131
132
133
134
135
136
# File 'lib/etherscan/api.rb', line 131

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



123
124
125
126
127
128
129
# File 'lib/etherscan/api.rb', line 123

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_send_raw_transaction(hex) ⇒ Object



116
117
118
119
120
121
# File 'lib/etherscan/api.rb', line 116

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