You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/hooks/useScaffoldEventHistory.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,13 +32,15 @@ This example retrieves the historical event logs for the `GreetingChange` event
32
32
|**contractName**|`string`| Name of the contract to read from. |
33
33
|**eventName**|`string`| Name of the event to read. |
34
34
|**fromBlock**|`bigint`| Block number from which to start reading events. |
35
+
|**toBlock**|`bigint`| block number to stop reading events at (if not provided, reads until current block) |
35
36
|**filters** (optional) |`object`| Apply filters to the event based on **indexed** parameter names and values `{ [parameterName]: value }`. |
36
37
|**blockData** (optional) |`boolean`| If set to true it will return the block data for each event (default: false). |
37
38
|**transactionData** (optional) |`boolean`| If set to true it will return the transaction data for each event (default: false). |
38
39
|**receiptData** (optional) |`boolean`| If set to true it will return the receipt data for each event (default: false). |
39
40
|**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). |
40
41
|**enabled** (optional) |`boolean`| If set to false, the hook will not fetch any data (default: true). |
41
42
|**chainId** (optional) |`string`| Id of the chain the contract lives on. Defaults to [`targetNetworks[0].id`](/deploying/deploy-nextjs-app#--targetnetworks)|
43
+
|**blocksBatchSize** (optional) |`number`| batch size for fetching events. If specified, each batch will contain at most this many blocks (default: 500) |
Copy file name to clipboardExpand all lines: static/llms-full.txt
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1215,13 +1215,15 @@ This example retrieves the historical event logs for the `GreetingChange` event
1215
1215
| **contractName** | `string` | Name of the contract to read from. |
1216
1216
| **eventName** | `string` | Name of the event to read. |
1217
1217
| **fromBlock** | `bigint` | Block number from which to start reading events. |
1218
+
| **toBlock** | `bigint` | block number to stop reading events at (if not provided, reads until current block) |
1218
1219
| **filters** (optional) | `object` | Apply filters to the event based on **indexed** parameter names and values `{ [parameterName]: value }`. |
1219
1220
| **blockData** (optional) | `boolean` | If set to true it will return the block data for each event (default: false). |
1220
1221
| **transactionData** (optional) | `boolean` | If set to true it will return the transaction data for each event (default: false). |
1221
1222
| **receiptData** (optional) | `boolean` | If set to true it will return the receipt data for each event (default: false). |
1222
1223
| **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). |
1223
1224
| **enabled** (optional) | `boolean` | If set to false, the hook will not fetch any data (default: true). |
1224
1225
| **chainId** (optional) | `string` | Id of the chain the contract lives on. Defaults to [`targetNetworks[0].id`](/deploying/deploy-nextjs-app#--targetnetworks) |
1226
+
| **blocksBatchSize** (optional) | `number` | batch size for fetching events. If specified, each batch will contain at most this many blocks (default: 500) |
0 commit comments