Skip to content

Commit

Permalink
getpastLogs accept blockhash as a parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
luu-alex committed Jun 22, 2023
1 parent 6bdc10c commit 2b4a6cc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/web3-rpc-methods/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,7 @@ Documentation:
[Migration Guide from 1.x](https://docs.web3js.org/guides/web3_upgrade_guide/x/)

## [Unreleased]

### Fixed

- Rpc method `getPastLogs` accept blockHash as a parameter https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getlogs (#6181)
2 changes: 1 addition & 1 deletion packages/web3-types/src/eth_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ export interface Filter {
readonly fromBlock?: BlockNumberOrTag;
readonly toBlock?: BlockNumberOrTag;
readonly address?: Address | Address[];

readonly blockHash?: Address;
// Using "null" type intentionally to match specifications
// eslint-disable-next-line @typescript-eslint/ban-types
readonly topics?: (null | Topic | Topic[])[];
Expand Down
1 change: 1 addition & 0 deletions packages/web3-validator/src/validation/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const isFilterObject = (value: Filter) => {
'toBlock',
'address',
'topics',
'blockHash',
];
if (isNullish(value) || typeof value !== 'object') return false;

Expand Down

0 comments on commit 2b4a6cc

Please sign in to comment.