diff --git a/docs/hooks/useScaffoldEventHistory.md b/docs/hooks/useScaffoldEventHistory.md index 51f90b7..07380cf 100644 --- a/docs/hooks/useScaffoldEventHistory.md +++ b/docs/hooks/useScaffoldEventHistory.md @@ -32,6 +32,7 @@ This example retrieves the historical event logs for the `GreetingChange` event | **contractName** | `string` | Name of the contract to read from. | | **eventName** | `string` | Name of the event to read. | | **fromBlock** | `bigint` | Block number from which to start reading events. | +| **toBlock** | `bigint` | block number to stop reading events at (if not provided, reads until current block) | | **filters** (optional) | `object` | Apply filters to the event based on **indexed** parameter names and values `{ [parameterName]: value }`. | | **blockData** (optional) | `boolean` | If set to true it will return the block data for each event (default: false). | | **transactionData** (optional) | `boolean` | If set to true it will return the transaction data for each event (default: false). | @@ -39,6 +40,7 @@ This example retrieves the historical event logs for the `GreetingChange` event | **watch** (optional) | `boolean` | If set to true, the events will be refetched every [`pollingInterval`](/deploying/deploy-nextjs-app#--pollinginterval) set at `scaffold.config.ts`. (default: false). | | **enabled** (optional) | `boolean` | If set to false, the hook will not fetch any data (default: true). | | **chainId** (optional) | `string` | Id of the chain the contract lives on. Defaults to [`targetNetworks[0].id`](/deploying/deploy-nextjs-app#--targetnetworks) | +| **blocksBatchSize** (optional) | `number` | batch size for fetching events. If specified, each batch will contain at most this many blocks (default: 500) | ## Return Values diff --git a/static/llms-full.txt b/static/llms-full.txt index 76b38b4..d0ce90b 100644 --- a/static/llms-full.txt +++ b/static/llms-full.txt @@ -1215,6 +1215,7 @@ This example retrieves the historical event logs for the `GreetingChange` event | **contractName** | `string` | Name of the contract to read from. | | **eventName** | `string` | Name of the event to read. | | **fromBlock** | `bigint` | Block number from which to start reading events. | +| **toBlock** | `bigint` | block number to stop reading events at (if not provided, reads until current block) | | **filters** (optional) | `object` | Apply filters to the event based on **indexed** parameter names and values `{ [parameterName]: value }`. | | **blockData** (optional) | `boolean` | If set to true it will return the block data for each event (default: false). | | **transactionData** (optional) | `boolean` | If set to true it will return the transaction data for each event (default: false). | @@ -1222,6 +1223,7 @@ This example retrieves the historical event logs for the `GreetingChange` event | **watch** (optional) | `boolean` | If set to true, the events will be refetched every [`pollingInterval`](/deploying/deploy-nextjs-app#--pollinginterval) set at `scaffold.config.ts`. (default: false). | | **enabled** (optional) | `boolean` | If set to false, the hook will not fetch any data (default: true). | | **chainId** (optional) | `string` | Id of the chain the contract lives on. Defaults to [`targetNetworks[0].id`](/deploying/deploy-nextjs-app#--targetnetworks) | +| **blocksBatchSize** (optional) | `number` | batch size for fetching events. If specified, each batch will contain at most this many blocks (default: 500) | #### Return Values