web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Handle common cases for smart contract errors according to EIP 838

Open Muhammad-Altabba opened this issue 1 year ago • 3 comments
trafficstars

Handle common cases for smart contract errors according to EIP 838: 0x4e487b71 which is the ‘selector’ for Panic(uint256) and 0x08c379a0 is the ‘selector’ of Error(string). https://github.com/web3/web3.js/issues/5482#issuecomment-2230741828

Note: Faced when debugging #7143

Muhammad-Altabba avatar Jul 16 '24 12:07 Muhammad-Altabba

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

Files count Total bundle size % Changed
10 639.17 kB → 639.51 kB (+349 B) +0.05%
Changeset
File Δ Size
../web3-eth-abi/lib/commonjs/decode_contract_error_data.js 📈 +1.13 kB (+56.74%) 1.99 kB → 3.12 kB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

Asset File Size % Changed
web3.min.js 619.88 kB → 620.22 kB (+349 B) +0.05%

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
../lib/commonjs/index.d.ts 8.69 kB 0%
../lib/commonjs/accounts.d.ts 3.89 kB 0%
../lib/commonjs/types.d.ts 2.67 kB 0%
../lib/commonjs/web3.d.ts 1.35 kB 0%
../lib/commonjs/web3_eip6963.d.ts 1.2 kB 0%
../lib/commonjs/abi.d.ts 999 B 0%
../lib/commonjs/eth.exports.d.ts 280 B 0%
../lib/commonjs/providers.exports.d.ts 183 B 0%
../lib/commonjs/version.d.ts 60 B 0%

github-actions[bot] avatar Jul 16 '24 12:07 github-actions[bot]

Codecov Report

Attention: Patch coverage is 80.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.48%. Comparing base (9b32205) to head (d446964).

Additional details and impacted files
@@            Coverage Diff             @@
##              4.x    #7155      +/-   ##
==========================================
- Coverage   94.50%   94.48%   -0.02%     
==========================================
  Files         216      216              
  Lines        8429     8439      +10     
  Branches     2315     2318       +3     
==========================================
+ Hits         7966     7974       +8     
- Misses        463      465       +2     
Flag Coverage Δ
UnitTests 94.48% <80.00%> (-0.02%) :arrow_down:

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

codecov[bot] avatar Jul 16 '24 12:07 codecov[bot]

Looks good, update changelog

luu-alex avatar Jul 17 '24 14:07 luu-alex