Skip to content

Commit 8a70be5

Browse files
authored
Update useDeployedContractInfo and useScaffoldEventHistory with deployedOnBlock (#130)
1 parent 4119e88 commit 8a70be5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

docs/hooks/useDeployedContractInfo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ This example retrieves the details of the deployed contract with the specified n
2121

2222
### Return Value
2323

24-
- `data`: Object containing `address` and `abi` of contract.
24+
- `data`: Object containing `address`, `abi` and `deployedOnBlock` of the contract.

docs/hooks/useScaffoldEventHistory.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ This example retrieves the historical event logs for the `GreetingChange` event
3131
| :----------------------------- | :-------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
3232
| **contractName** | `string` | Name of the contract to read from. |
3333
| **eventName** | `string` | Name of the event to read. |
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) |
34+
| **fromBlock** (optional) | `bigint` | Block number from which to start reading events (defaults to `deployedOnBlock` in deployedContracts.ts if set for contract, otherwise defaults to 0). |
35+
| **toBlock** (optional) | `bigint` | Block number to stop reading events at (if not provided, reads until current block). |
3636
| **filters** (optional) | `object` | Apply filters to the event based on **indexed** parameter names and values `{ [parameterName]: value }`. |
3737
| **blockData** (optional) | `boolean` | If set to true it will return the block data for each event (default: false). |
3838
| **transactionData** (optional) | `boolean` | If set to true it will return the transaction data for each event (default: false). |

0 commit comments

Comments
 (0)