feat(rpc): add EIP-7928 eth_getBalanceWithProof and eth_getAccountWithProof (#21720)

Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
Georgios Konstantopoulos
2026-02-02 17:12:04 -08:00
committed by GitHub
parent 53f922927a
commit 47ebc79c85

View File

@@ -394,6 +394,17 @@ pub trait EthApi<
address: Address,
block: BlockId,
) -> RpcResult<alloy_rpc_types_eth::AccountInfo>;
/// Returns the EIP-7928 block access list for a block by hash.
#[method(name = "getBlockAccessListByBlockHash")]
async fn block_access_list_by_block_hash(&self, hash: B256) -> RpcResult<Option<Bytes>>;
/// Returns the EIP-7928 block access list for a block by number.
#[method(name = "getBlockAccessListByBlockNumber")]
async fn block_access_list_by_block_number(
&self,
number: BlockNumberOrTag,
) -> RpcResult<Option<Bytes>>;
}
#[async_trait::async_trait]
@@ -881,4 +892,19 @@ where
trace!(target: "rpc::eth", "Serving eth_getAccountInfo");
Ok(EthState::get_account_info(self, address, block).await?)
}
/// Handler for: `eth_getBlockAccessListByBlockHash`
async fn block_access_list_by_block_hash(&self, hash: B256) -> RpcResult<Option<Bytes>> {
trace!(target: "rpc::eth", ?hash, "Serving eth_getBlockAccessListByBlockHash");
Err(internal_rpc_err("unimplemented"))
}
/// Handler for: `eth_getBlockAccessListByBlockNumber`
async fn block_access_list_by_block_number(
&self,
number: BlockNumberOrTag,
) -> RpcResult<Option<Bytes>> {
trace!(target: "rpc::eth", ?number, "Serving eth_getBlockAccessListByBlockNumber");
Err(internal_rpc_err("unimplemented"))
}
}