> ## Documentation Index
> Fetch the complete documentation index at: https://solana.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# getFees (removed)

> Replace getFees with getLatestBlockhash and getFeeForMessage.

`getFees` combined a recent blockhash, its legacy fee calculator, and a last
valid slot in one response.

<Warning>
  **Removed RPC method**

  This method was removed in Agave v2.0. Replace its lifetime and fee fields
  separately.
</Warning>

## Migration

1. Call [getLatestBlockhash](/developers/docs/rpc/http/getlatestblockhash) to obtain
   `blockhash` and `lastValidBlockHeight`. The replacement reports a block
   height, not the legacy `lastValidSlot`.
2. Compile the transaction message with that blockhash, then pass the encoded
   message to [getFeeForMessage](/developers/docs/rpc/http/getfeeformessage).

Use `lastValidBlockHeight` when tracking transaction expiration; do not convert
it to a slot or fixed wall-clock deadline.
