Executes an `eth_call` against `to`.
(&self, to: Address, call: C)
| 505 | |
| 506 | /// Executes an `eth_call` against `to`. |
| 507 | pub async fn call<C>(&self, to: Address, call: C) -> Result<Bytes> |
| 508 | where |
| 509 | C: SolCall, |
| 510 | { |
| 511 | let request = BaseTransactionRequest::default() |
| 512 | .from(self.signer.address()) |
| 513 | .to(to) |
| 514 | .input(TransactionInput::new(Bytes::from(call.abi_encode()))); |
| 515 | |
| 516 | self.provider.call(request).await.wrap_err("B-20 eth_call failed") |
| 517 | } |
| 518 | |
| 519 | /// Signs, sends, and waits for a transaction against `to`. |
| 520 | pub async fn send_call<C>(&self, to: Address, call: C, label: &'static str) -> Result<()> |