Class: Reth::JSONRPC::App

Inherits:
Sinatra::Base
  • Object
show all
Includes:
Handler
Defined in:
lib/reth/jsonrpc/app.rb

Constant Summary collapse

CORS_ORIGIN =
"http://localhost:8080"

Instance Method Summary collapse

Methods included from Handler

#handle_db_getHex, #handle_db_getString, #handle_db_putHex, #handle_db_putString, #handle_eth_accounts, #handle_eth_blockNumber, #handle_eth_call, #handle_eth_coinbase, #handle_eth_compileLLL, #handle_eth_compileSerpent, #handle_eth_compileSolidity, #handle_eth_estimateGas, #handle_eth_gasPrice, #handle_eth_getBalance, #handle_eth_getBlockByHash, #handle_eth_getBlockByNumber, #handle_eth_getBlockTransactionCountByHash, #handle_eth_getBlockTransactionCountByNumber, #handle_eth_getCode, #handle_eth_getCompilers, #handle_eth_getFilterChanges, #handle_eth_getFilterLogs, #handle_eth_getLogs, #handle_eth_getStorageAt, #handle_eth_getTransactionByBlockHashAndIndex, #handle_eth_getTransactionByHash, #handle_eth_getTransactionCount, #handle_eth_getTransactionReceipt, #handle_eth_getUncleByBlockHashAndIndex, #handle_eth_getUncleByBlockNumberAndIndex, #handle_eth_getUncleCountByBlockHash, #handle_eth_getUncleCountByBlockNumber, #handle_eth_getWork, #handle_eth_hashrate, #handle_eth_mining, #handle_eth_newBlockFilter, #handle_eth_newFilter, #handle_eth_newPendingTransactionFilter, #handle_eth_protocolVersion, #handle_eth_sendRawTransaction, #handle_eth_sendTransaction, #handle_eth_sign, #handle_eth_submitHashrate, #handle_eth_submitWork, #handle_eth_syncing, #handle_eth_uninstallFilter, #handle_net_listening, #handle_net_peerCount, #handle_net_version, #handle_web3_clientVersion, #handle_web3_sha3, #tentatively_execute

Methods included from Helper

#bytes_to_hex, #chain, #decode_block_tag, #discovery, #encode_block, #encode_loglist, #encode_tx, #get_block, #get_compilers, #get_ivar_value, #hex_to_bytes, #hex_to_int, #int_to_hex, #peermanager

Constructor Details

#initialize(node) ⇒ App

Returns a new instance of App.



42
43
44
45
46
47
48
49
50
51
# File 'lib/reth/jsonrpc/app.rb', line 42

def initialize(node)
  @node = node

  @default_block = 'latest'
  @default_address = Account.test_accounts.keys.first
  @default_startgas = 500 * 1000
  @default_gas_price = 60.shannon

  super()
end