diff --git a/lib/etherscan.rb b/lib/etherscan.rb index f74b478..1be2cef 100644 --- a/lib/etherscan.rb +++ b/lib/etherscan.rb @@ -3,6 +3,7 @@ require_relative 'etherscan/client' require_relative 'etherscan/accounts' require_relative 'etherscan/tokens' +require_relative 'etherscan/proxy' require_relative 'etherscan/engine' if defined?(Rails) module Etherscan diff --git a/lib/etherscan/proxy.rb b/lib/etherscan/proxy.rb new file mode 100644 index 0000000..c78cb93 --- /dev/null +++ b/lib/etherscan/proxy.rb @@ -0,0 +1,21 @@ +require_relative 'api' + +module Etherscan + class Proxy < Etherscan::Api + def eth_get_transaction_by_hash(tx_hash) + params = { + module: 'proxy', action: 'eth_getTransactionByHash', + txhash: tx_hash + } + get(params) + end + + def eth_get_transaction_receipt(tx_hash) + params = { + module: 'proxy', action: 'eth_getTransactionReceipt', + txhash: tx_hash + } + get(params) + end + end +end