From eb15b1b0af2c9d7097eb01f7e2b81897bbd7e932 Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Mon, 18 Jul 2022 10:39:01 +0200 Subject: [PATCH 1/6] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcc44b85de7..96588f61772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -580,6 +580,7 @@ Released with 1.0.0-beta.37 code base. - Add optional hex formatting parameter for getTransactionrReceipt (#5153) - Fix transactionRoot -> transactionsRoot in BlockHeader (#5083) - Fix Promise in Accounts.signTransaction() throwing errors that cannot be caught (#4724) +- Fixed types for getPastEvents ### Security - Updated `got` lib version and fixed other libs using npm audit fix (#5178) (#5254) From 32fa296fac75b6e049ea12644e8b3301a118460c Mon Sep 17 00:00:00 2001 From: bigbizze <42508203+bigbizze@users.noreply.github.com> Date: Mon, 18 Jul 2022 04:40:25 -0400 Subject: [PATCH 2/6] Update index.d.ts (#4955) this callback returns an array of event data Co-authored-by: Oleksii Kosynskyi Co-authored-by: Nazar Hussain Co-authored-by: Nikos Iliakis --- packages/web3-eth-contract/types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web3-eth-contract/types/index.d.ts b/packages/web3-eth-contract/types/index.d.ts index c0658e0a366..d9bdf4deeb4 100644 --- a/packages/web3-eth-contract/types/index.d.ts +++ b/packages/web3-eth-contract/types/index.d.ts @@ -68,12 +68,12 @@ export class Contract { getPastEvents( event: string, options: PastEventOptions, - callback: (error: Error, event: EventData) => void + callback: (error: Error, event: EventData[]) => void ): Promise; getPastEvents(event: string, options: PastEventOptions): Promise; getPastEvents( event: string, - callback: (error: Error, event: EventData) => void + callback: (error: Error, event: EventData[]) => void ): Promise; } From ecb32d2c668b9c8e9828380aa51c4361ff055516 Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Mon, 18 Jul 2022 12:34:48 +0200 Subject: [PATCH 3/6] Update CHANGELOG.md --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 96588f61772..085d2d79bc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -580,8 +580,17 @@ Released with 1.0.0-beta.37 code base. - Add optional hex formatting parameter for getTransactionrReceipt (#5153) - Fix transactionRoot -> transactionsRoot in BlockHeader (#5083) - Fix Promise in Accounts.signTransaction() throwing errors that cannot be caught (#4724) -- Fixed types for getPastEvents ### Security - Updated `got` lib version and fixed other libs using npm audit fix (#5178) (#5254) +## [Unreleased] + +## [1.7.6] + +### Changed + +### Fixed +- Fixed types for getPastEvents + + From 859cb9815eb2c271dbb3356e09654a81e224ab2c Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Mon, 18 Jul 2022 13:08:18 +0200 Subject: [PATCH 4/6] Update CHANGELOG.md Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 085d2d79bc0..90693da75b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -591,6 +591,6 @@ Released with 1.0.0-beta.37 code base. ### Changed ### Fixed -- Fixed types for getPastEvents +- Fixed types for getPastEvents (#4955) (#5260) From 5213b53677632cff51f21a8e73de24a7e53e9bc1 Mon Sep 17 00:00:00 2001 From: Nazar Hussain Date: Tue, 19 Jul 2022 17:13:33 +0200 Subject: [PATCH 5/6] Apply suggestions from code review Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com> --- packages/web3-eth-contract/types/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web3-eth-contract/types/index.d.ts b/packages/web3-eth-contract/types/index.d.ts index d9bdf4deeb4..5abc6fe0ed4 100644 --- a/packages/web3-eth-contract/types/index.d.ts +++ b/packages/web3-eth-contract/types/index.d.ts @@ -68,12 +68,12 @@ export class Contract { getPastEvents( event: string, options: PastEventOptions, - callback: (error: Error, event: EventData[]) => void + callback: (error: Error, events: EventData[]) => void ): Promise; getPastEvents(event: string, options: PastEventOptions): Promise; getPastEvents( event: string, - callback: (error: Error, event: EventData[]) => void + callback: (error: Error, events: EventData[]) => void ): Promise; } From 1d09e1b153313f2f4e92451c6a4c8412ee1bb415 Mon Sep 17 00:00:00 2001 From: Oleksii Kosynskyi Date: Tue, 20 Sep 2022 11:13:29 -0400 Subject: [PATCH 6/6] fix CHANGELOG --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 217e384db0a..1e0f07f18ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -602,7 +602,9 @@ Released with 1.0.0-beta.37 code base. - Support of `safe` and `finalized` block tags added (#5410) ## [Unreleased] +## [1.8.1] +### Fixed - Fixed types for getPastEvents (#4955) (#5260) -## [1.8.1] +