Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nikos/fix ens event test #5880

Merged
merged 17 commits into from
Mar 1, 2023
Merged

Nikos/fix ens event test #5880

merged 17 commits into from
Mar 1, 2023

Conversation

nikoulai
Copy link
Contributor

Description

fix failing ens events tests

Checklist for 4.x:

  • I have selected the correct 4.x base branch.
  • Within the description, the feature or issue is discussed in detail or an issue is linked.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added any required tests for the changes I made
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules.
  • I ran yarn successfully
  • I ran yarn lint successfully
  • I ran yarn build:web successfully
  • I ran yarn test:unit successfully
  • I ran yarn test:integration successfully
  • I ran compile:contracts successfully
  • I have tested my code.
  • I have updated the corresponding CHANGELOG.md file in the packages I have edited.

@nikoulai nikoulai changed the base branch from 1.x to 4.x February 28, 2023 19:08
@nikoulai nikoulai self-assigned this Feb 28, 2023
@nikoulai nikoulai added the 4.x 4.0 related label Feb 28, 2023
@github-actions github-actions bot temporarily deployed to Preview: (nikos/fix-ens-event-test) February 28, 2023 19:17 Inactive
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 28, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1cb087d
Status: ✅  Deploy successful!
Preview URL: https://75a40222.web3-js-docs.pages.dev
Branch Preview URL: https://nikos-fix-ens-event-test.web3-js-docs.pages.dev

View logs

@github-actions
Copy link

Bundle Stats

Hey there, this message comes from a github action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Asset Old size New size Diff Diff %
Total 1.18 MB 1.06 MB -119 KB -9.90%
View detailed bundle breakdown

Added

Asset Old size New size Diff Diff %
../lib/eth.exports.d.ts.map 0 358 bytes 358 bytes -
../lib/eth.exports.d.ts 0 321 bytes 321 bytes -
../lib/providers.exports.d.ts.map 0 292 bytes 292 bytes -
../lib/providers.exports.d.ts 0 238 bytes 238 bytes -

Removed

No assets were removed

Bigger

Asset Old size New size Diff Diff %
../lib/index.d.ts 77 bytes 899 bytes 822 bytes 1067.53%
../lib/index.d.ts.map 155 bytes 919 bytes 764 bytes 492.90%

Smaller

Asset Old size New size Diff Diff %
web3.min.js 1.17 MB 1.05 MB -121 KB -10.18%
../lib/types.d.ts 1.92 KB 1.68 KB -253 bytes -12.84%
../lib/types.d.ts.map 1.75 KB 1.51 KB -241 bytes -13.46%

Unchanged

Asset Old size New size Diff Diff %
../lib/accounts.d.ts 3.42 KB 3.42 KB 0 0.00%
../lib/abi.d.ts 1020 bytes 999 bytes -18 bytes -1.77%
../lib/web3.d.ts 842 bytes 842 bytes 0 0.00%
../lib/web3.d.ts.map 693 bytes 694 bytes 1 bytes 0.14%
../lib/accounts.d.ts.map 528 bytes 528 bytes 0 0.00%
../lib/version.d.ts.map 140 bytes 140 bytes 0 0.00%
../lib/abi.d.ts.map 124 bytes 124 bytes 0 0.00%
../lib/version.d.ts 97 bytes 97 bytes 0 0.00%

@github-actions github-actions bot temporarily deployed to Preview: (nikos/fix-ens-event-test) February 28, 2023 19:36 Inactive
@github-actions github-actions bot temporarily deployed to Preview: (nikos/fix-ens-event-test) February 28, 2023 19:55 Inactive
@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Merging #5880 (1cb087d) into 4.x (2b5408d) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##              4.x    #5880   +/-   ##
=======================================
  Coverage   80.03%   80.03%           
=======================================
  Files         136      136           
  Lines        5899     5899           
  Branches     1537     1537           
=======================================
  Hits         4721     4721           
  Misses       1178     1178           
Flag Coverage Δ
UnitTests 80.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
web3 ∅ <ø> (∅)
web3-core ∅ <ø> (∅)
web3-errors ∅ <ø> (∅)
web3-eth ∅ <ø> (∅)
web3-eth-abi ∅ <ø> (∅)
web3-eth-accounts ∅ <ø> (∅)
web3-eth-contract ∅ <ø> (∅)
web3-eth-ens ∅ <ø> (∅)
web3-eth-iban ∅ <ø> (∅)
web3-eth-personal ∅ <ø> (∅)
web3-net ∅ <ø> (∅)
web3-providers-http ∅ <ø> (∅)
web3-providers-ipc ∅ <ø> (∅)
web3-providers-ws ∅ <ø> (∅)
web3-rpc-methods ∅ <ø> (∅)
web3-utils ∅ <ø> (∅)
web3-validator ∅ <ø> (∅)

Copy link
Contributor

@spacesailor24 spacesailor24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

G2g minus the comment about the inline disabled eslint rule

@spacesailor24 spacesailor24 merged commit a17f87e into 4.x Mar 1, 2023
@spacesailor24 spacesailor24 deleted the nikos/fix-ens-event-test branch March 1, 2023 07:44
Copy link
Contributor

@Muhammad-Altabba Muhammad-Altabba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

spacesailor24 pushed a commit that referenced this pull request Mar 9, 2023
* Expose registry events in ens class

* Add tests for events

* Check for socket

* Skip test

* Try to unskip test

* skip test again

* Update packages/web3-eth-ens/test/integration/ens.events.test.ts

Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>

* feedback

* Try fix

* Merge branch '4.x'

* Revert conf files

* Remove error for event

---------

Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com>
Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>
spacesailor24 added a commit that referenced this pull request Mar 9, 2023
* Add payload as optional argument for InvalidResponseError

* Init Transaction Error Scenarios tests

* Init ERR_TX_REVERT_TRANSACTION_CUSTOM_ERROR

* WIP

* WIP

* Update TransactionRevertedWithoutReasonError to handle receipts objects with BigInts

* Update sendTransaction revert tests

* Add contractAbi argument to getTransactionError

* sendTransation emits error for ContractExecutionError

* Add ContractExecutionError to SendTransactionEvents. Add contractAbi to SendTransactionOptions

* Replace use of contractExecutionError sendTransaction event with error

* Update contract_methods reverts test

* Update web3-errors test

* Update expected error mesage for contract_deploy_test

* Add expectedErrorObject based on test backend

* Correct web3-errors test snapshots

* fix (#5869)

* 5747 codecov (#5843)

* code cov integration for unit tests

* removed cov threshold

* code cov token

* by default collect coverage

* codecov with existing unittests

* jest config

* only analyze coverage for n v16 unit test runs

* node ver

* codecov paths config

* added layout

* common config

* flag names in ci

* flags under proj

* min CI for test

* build and test for u14 and 16

* validated yml

* components usage

* comment moved at end

* updated comments

* testing 90% cov target

* component cov target

* patch cov

* enable actions + remove old coverage check actions

* codecov config change

* remove unused scripts

* ens system tests (#5849)

* Expose registry events in ens class

* Add tests for events

* Check for socket

* Skip test

* Try to unskip test

* skip test again

* Update packages/web3-eth-ens/test/integration/ens.events.test.ts

Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>

* feedback

---------

Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com>
Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>

* Disconnect function doesn't exists in types of currentProvider (#5865)

* fix disconnect function

* add link

* test types

* add disconnect function test

* fix eth tests

* test stuck

* trace

* fix

* check

* fix test

* add empty disconnect function

* add test for provider instances

* fix http unit test

* remove logs

* revert to throw error http provider

---------

Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>

* Nikos/fix ens event test (#5880)

* Expose registry events in ens class

* Add tests for events

* Check for socket

* Skip test

* Try to unskip test

* skip test again

* Update packages/web3-eth-ens/test/integration/ens.events.test.ts

Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>

* feedback

* Try fix

* Merge branch '4.x'

* Revert conf files

* Remove error for event

---------

Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com>
Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>

* update event emitter geth ipc tests (#5874)

* update geth binary tests

* update helper and changelog

* adding await

* update helper

* add await

* add await

* add await

* fix typings

* update tests

* update

* debug

* remove debugging

* 4.x issue stale conf (#5878)

* Add documentation for catching provider events (#5886)

* show Ipc and WebSocket providers in the documentation

* add guides for providers and their events

* move the generic section of the providers guide from the migration guide

* edit some texts in the guides

* Fixing tests for WS and IPC

* Remove jest specific test code that doesn't work in Cypress

* Remove jest specific test code that doesn't work in Cypress

* Remove jest specific test code

* Add toLowerCase for address

* Rename TransactionRevertError to TransactionRevertInstructionError

* Add beforeAll for Transaction Error Scenario tests

* Add Transaction Error Scenario tests for call

* Add support for handleRevert in sendTransaction for geth

* Update tests and add test to verify event error is same as thrown error

* Correct test expected data

* Remove message from expectedThrownError for sendTransaction tests

* Add error refactors to sendSignedTransaction and init tests

* Remove call Transaction Error Scenario tests

* Fix type error

* Fix nonce issue in tests

* Fix error parsing bug for web3Eth.sendSignedTransaction

* Update expected error for send_signed_transaction error tests

* Revert ResponseError change to maintain 1.x parity

* Add web3-errors test for TransactionRevertWithCustomError

* Update expected error message for RespnoseError in web3-eth-contract tests

* Add example to dev comment for sendSignedTransaction

* Removed implemented TODO in packages/web3-eth/src/utils/get_transaction_error.ts

* Update CHANGELOGs

* Update CHANGELOG.md

* Init get_transaction_error tests

* Add mock to getRevertReason for get_transaction_error tests

* Init getRevertReason tests and parseTransactionError tests

* Add check for revert before sending tx

* Update web3-plugin-example test to account for getRevertReason check

* Turn off checkRevertBeforeSending for sendFewTxes helper

* Fix test data for send_signed_transaction tests

* Fix bug in get_transaction_error

* Fix send_transaction error test

* Add checkRevertBeforeSending: false to sendTransaction calls in Contract class

* Add checkRevertBeforeSending: false for send tx test helpers

* Remove getRevertReason mock

* A fix at `IpcProvider` and few changes at `SocketProvider` and its descendants (#5891)

* rename `_providerOptions` to `_socketOptions`

* pass `_socketOptions` from IpcProvider constructor to the underlying connection

* move a comment to its correct position at `SocketProvider`

* expose the getter of `SocketConnection` from `SocketProvider`.

* update CHANGELOG.md files

* add extremely simple unit test for SocketProvider

* Fix failed tx test for ganache

* Update expected transaction errors for ganache

* Fix method handler crashed (#5905)

* version fix

* use geth binary

* try 1.11.2

* Test fix

* Use `v1` instead of Short Sha for cloudflare/pages-action (#5909)

* use `v1` instead of short Sha for cloudflare/pages-action

---------

Co-authored-by: Oleksii Kosynskyi <oleksii.kosynskyi@gmail.com>
Co-authored-by: Junaid <86780488+jdevcs@users.noreply.github.com>
Co-authored-by: Nikos Iliakis <nikoulai@users.noreply.github.com>
Co-authored-by: Muhammad Altabba <24407834+Muhammad-Altabba@users.noreply.github.com>
Co-authored-by: Alex <alex.luu@mail.utoronto.ca>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants