Skip to content

Commit daad0d1

Browse files
authored
chore: use dedicated accountinfo type (#10617)
1 parent f45b7c2 commit daad0d1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

crates/anvil/src/eth/api.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,19 +738,19 @@ impl EthApi {
738738
&self,
739739
address: Address,
740740
block_number: Option<BlockId>,
741-
) -> Result<serde_json::Value> {
741+
) -> Result<alloy_rpc_types::eth::AccountInfo> {
742742
node_info!("eth_getAccountInfo");
743743
let account = self
744744
.backend
745745
.get_account_at_block(address, Some(self.block_request(block_number).await?))
746746
.await?;
747747
let code =
748748
self.backend.get_code(address, Some(self.block_request(block_number).await?)).await?;
749-
Ok(serde_json::json!({
750-
"balance": account.balance,
751-
"nonce": account.nonce,
752-
"code": code
753-
}))
749+
Ok(alloy_rpc_types::eth::AccountInfo {
750+
balance: account.balance,
751+
nonce: account.nonce,
752+
code,
753+
})
754754
}
755755
/// Returns content of the storage at given address.
756756
///

0 commit comments

Comments
 (0)