(module: &mut RpcModule<Context>)
| 145 | } |
| 146 | |
| 147 | pub(crate) fn eth_get_transaction_receipt(module: &mut RpcModule<Context>) -> Result<()> { |
| 148 | module.register_async_method( |
| 149 | "eth_getTransactionReceipt", |
| 150 | move |params, blockchain| async move { |
| 151 | let transaction_hash = params.one::<H256>()?; |
| 152 | let transaction_receipt = blockchain |
| 153 | .lock() |
| 154 | .await |
| 155 | .get_transaction_receipt(transaction_hash) |
| 156 | .await |
| 157 | .map_err(|e| Error::Custom(e.to_string()))?; |
| 158 | |
| 159 | Ok(transaction_receipt) |
| 160 | }, |
| 161 | )?; |
| 162 | |
| 163 | Ok(()) |
| 164 | } |
| 165 | |
| 166 | pub(crate) fn eth_get_code(module: &mut RpcModule<Context>) -> Result<()> { |
| 167 | module.register_async_method("eth_getCode", move |params, blockchain| async move { |
no test coverage detected