(module: &mut RpcModule<Context>)
| 108 | } |
| 109 | |
| 110 | pub(crate) fn eth_send_transaction(module: &mut RpcModule<Context>) -> Result<()> { |
| 111 | module.register_async_method( |
| 112 | "eth_sendTransaction", |
| 113 | move |params, blockchain| async move { |
| 114 | let transaction_request = params.one::<TransactionRequest>()?; |
| 115 | let transaction_hash = blockchain |
| 116 | .lock() |
| 117 | .await |
| 118 | .send_transaction(transaction_request) |
| 119 | .await; |
| 120 | |
| 121 | Ok(transaction_hash?) |
| 122 | }, |
| 123 | )?; |
| 124 | |
| 125 | Ok(()) |
| 126 | } |
| 127 | |
| 128 | pub(crate) fn eth_send_raw_transaction(module: &mut RpcModule<Context>) -> Result<()> { |
| 129 | module.register_async_method( |
no test coverage detected