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

feat: Explorer could interpret Solidity method selectors #880

Merged
merged 9 commits into from
Jan 31, 2024

Conversation

ericleponner
Copy link
Collaborator

@ericleponner ericleponner commented Jan 30, 2024

Description:

With changes below, Explorer now queries 4byte.directory and tries to decode call input/output. Contract Result and Call Trace sections in Transaction Details are now able to display decoded input and output even if corresponding contract is unverified.

Changes also include additional unit tests for FunctionCallAnalyzer class.

Note: Event decoding is not handled by these changes ; this will be done in a second phase.

Related issue(s):

Fixes #696

Notes for reviewer:

This transaction gives a pretty good view of the feature (see Call Trace section).

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

@ericleponner ericleponner requested a review from svienot January 30, 2024 17:54
Copy link

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 85.39% 34395 / 40276
🔵 Statements 85.39% 34395 / 40276
🔵 Functions 65.4% 815 / 1246
🔵 Branches 84.15% 3852 / 4577
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/components/values/FunctionInput.vue 68.5% 50% 100% 68.5% 28-65, 71-72
src/components/values/FunctionResult.vue 83.8% 50% 100% 83.8% 28-42, 48-49
src/utils/analyzer/FunctionCallAnalyzer.ts 95.48% 83.33% 100% 95.48% 159, 190, 221-222, 238-240, 244, 251-252, 258-260, 313-315
src/utils/cache/CacheUtils.ts 100% 100% 100% 100%
src/utils/cache/SignatureCache.ts 97.56% 80% 100% 97.56% 44-45
Generated in workflow #692

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

0.0% Coverage on New Code (required ≥ 80%)
23.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Collaborator

@svienot svienot 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 to me!

@ericleponner ericleponner merged commit 66b4e82 into main Jan 31, 2024
6 of 7 checks passed
@ericleponner ericleponner deleted the 00696_method_selectors branch January 31, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants