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

Use Error ABI to parse errors when sending a transaction #5662

Merged

Conversation

Muhammad-Altabba
Copy link
Contributor

Description

Implements #5587

This MR is just applying the same error ABI prasing logic, that is used when performing a call to a smart contract function, to be also used when sending a transaction.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist for 1.x:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:cov and my test cases cover all the lines and branches of the added code.
  • I ran npm run build with success.
  • I have tested the built dist/web3.min.js in a browser.
  • I have tested my code on the live network.
  • I have checked the Deploy Preview and it looks correct.
  • I have updated the CHANGELOG.md file in the root folder.

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.

@render
Copy link

render bot commented Nov 29, 2022

@Muhammad-Altabba Muhammad-Altabba marked this pull request as draft December 2, 2022 15:55
@Muhammad-Altabba Muhammad-Altabba marked this pull request as ready for review December 5, 2022 23:49
@Muhammad-Altabba Muhammad-Altabba merged commit 7b7e5b0 into 4.x Dec 7, 2022
@Muhammad-Altabba Muhammad-Altabba deleted the feature/5587/use-errorabi-when-sending-transaction branch December 7, 2022 15:44
@spacesailor24 spacesailor24 mentioned this pull request Dec 7, 2022
jdevcs added a commit that referenced this pull request Dec 8, 2022
* Update CHANGELOG version headers

* Contract call with tuple is missing param names (#5613)

* call special output type

* fix

* fix: enable outputs to have param names (#5624)

* hot fix

* add type if only one param

* overloaded inputs types

* fix resolver tests

* add type tests

* simplify types

* revert registry unit test

* test firefox

* revert firefox test

* update changelogs

Co-authored-by: Marin Petrunić <[email protected]>

* Fix `isHex` and `isHexStrict` for some edge cases and enrich their tests (#5655)

* Change `isHex` to return true for negative numbers (for example `-123`)
* Change both `isHex` and `isHexStrict` to return `false` for `-0x`
* Change `isHex` to return `false` for empty strings ''.

* Remove erroneous set provider code for Contract constructor (#5669)

* Remove erroneous set provider code for Contract constructor. Add Contract constructor provider set test

* Update CHANGELOGs

* Debugging failing integration tests

* Apply suggestions from code review

* Use getSystemTestProvider instead of hardcoded string

* Refactor ternaries in Contract constructor to if statements

* Correct CHANGELOG entries

* Remove unneeded checks in if statements

* Test with injected external providers (#5652)

* fix: sending tx with injected provider (#5651)

Co-authored-by: Marin Petrunic <[email protected]>

* adding a test for using `ganache` provider

* enable the jsonrpc `id` to optionally be incremented starting from a number
 (Inspired by: #5373 (comment) and needed as a work around for blockchainsllc/in3#46)

* test with `in3` as a provider & skip `in3` test if it takes too long

* increase integration test timeout at web3 package

* add a test for using `hardhat` provider

* improve how legacy providers, such as hardhat, is used

* implement `isPromise` that works in the browsers

* refactor external providers tests

* update CHANGELOG.md

* Use Error ABI to parse errors when sending a transaction (#5662)

* use Error ABI when sending a transaction

* update CHANGELOG.md for #5587

* Remove merge conflict marker

Co-authored-by: Oleksii Kosynskyi <[email protected]>
Co-authored-by: Marin Petrunić <[email protected]>
Co-authored-by: Muhammad Altabba <[email protected]>
Co-authored-by: jdevcs <[email protected]>
spacesailor24 added a commit that referenced this pull request Dec 8, 2022
* Version bump and build for v4.0.1-alpha.2

* Release/4.0.1 alpha.2 changelog update 3 (#5689)

* Update CHANGELOG version headers

* Update CHANGELOGs

* Revert package version bump for web3-packagetemplate

* Release/4.0.1 alpha.2 merge conflicts (#5692)

* Update CHANGELOG version headers

* Contract call with tuple is missing param names (#5613)

* call special output type

* fix

* fix: enable outputs to have param names (#5624)

* hot fix

* add type if only one param

* overloaded inputs types

* fix resolver tests

* add type tests

* simplify types

* revert registry unit test

* test firefox

* revert firefox test

* update changelogs

Co-authored-by: Marin Petrunić <[email protected]>

* Fix `isHex` and `isHexStrict` for some edge cases and enrich their tests (#5655)

* Change `isHex` to return true for negative numbers (for example `-123`)
* Change both `isHex` and `isHexStrict` to return `false` for `-0x`
* Change `isHex` to return `false` for empty strings ''.

* Remove erroneous set provider code for Contract constructor (#5669)

* Remove erroneous set provider code for Contract constructor. Add Contract constructor provider set test

* Update CHANGELOGs

* Debugging failing integration tests

* Apply suggestions from code review

* Use getSystemTestProvider instead of hardcoded string

* Refactor ternaries in Contract constructor to if statements

* Correct CHANGELOG entries

* Remove unneeded checks in if statements

* Test with injected external providers (#5652)

* fix: sending tx with injected provider (#5651)

Co-authored-by: Marin Petrunic <[email protected]>

* adding a test for using `ganache` provider

* enable the jsonrpc `id` to optionally be incremented starting from a number
 (Inspired by: #5373 (comment) and needed as a work around for blockchainsllc/in3#46)

* test with `in3` as a provider & skip `in3` test if it takes too long

* increase integration test timeout at web3 package

* add a test for using `hardhat` provider

* improve how legacy providers, such as hardhat, is used

* implement `isPromise` that works in the browsers

* refactor external providers tests

* update CHANGELOG.md

* Use Error ABI to parse errors when sending a transaction (#5662)

* use Error ABI when sending a transaction

* update CHANGELOG.md for #5587

* Remove merge conflict marker

Co-authored-by: Oleksii Kosynskyi <[email protected]>
Co-authored-by: Marin Petrunić <[email protected]>
Co-authored-by: Muhammad Altabba <[email protected]>
Co-authored-by: jdevcs <[email protected]>

* Release patch/4.0.1 alpha.2/solve merge conflicts (#5697)

* Update CHANGELOG version headers

* Remove merge conflict markers

* Remove double CHANGELOG entry

Co-authored-by: Oleksii Kosynskyi <[email protected]>
Co-authored-by: Marin Petrunić <[email protected]>
Co-authored-by: Muhammad Altabba <[email protected]>
Co-authored-by: jdevcs <[email protected]>
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.

4 participants