> For the complete documentation index, see [llms.txt](https://docs.mercurydata.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mercurydata.app/~/changes/KX2wpglbthtd9RsHwz3R/mercury-classic/queries/contract-data-entry-updates.md).

# Contract Data Entry Updates

Start querying contract events

For contract data entry updates, there are 3 queries, all with the same body:

* `entryUpdateByContractId`
* `entryUpdateByContractIdAndKey`
* `allEntryUpdates`

For example, to get the last 10 entries of a certain contract:

```graphql
query MyQuery {
  entryUpdateByContractId(contract: "CONTRACT_ID", lastN: 10) {
    nodes {
      contractId
      keyXdr
      txInfoByTx {
        txHash
        memo
        opCount
        fee
        ledgerByLedger {
          closeTime
          sequence
        }
      }
      valueXdr
    }
  }
}
```
