public AccountAdapter getAccount(final DataFetchingEnvironment dataFetchingEnvironment) {
    // until the miner can expose the current "proposed block" we have no
    // speculative environment, so estimate against latest.
    final BlockchainQueries blockchainQuery =
        dataFetchingEnvironment.getGraphQlContext().get(GraphQLContextType.BLOCKCHAIN_QUERIES);
    final Address addr = dataFetchingEnvironment.getArgument("address");
    final Long blockNumber = dataFetchingEnvironment.getArgument("blockNumber");
    final long latestBlockNumber = blockchainQuery.latestBlock().get().getHeader().getNumber();
    return blockchainQuery
        .getAndMapWorldState(latestBlockNumber, ws -> Optional.ofNullable(ws.get(addr)))
        .map(AccountAdapter::new)
        .orElseGet(() -> new AccountAdapter(null));
  }
Returns an AccountAdapter object for the account associated with the provided address.

<p>The account state is estimated against the latest block.

@param dataFetchingEnvironment the data fetching environment.
@return an AccountAdapter object for the account associated with the provided address.
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/graphql/internal/pojoadapter/PendingStateAdapter.java