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: add display of contract disassembly in ContractDetails page (#817) #818

Merged
merged 51 commits into from
Dec 27, 2023

Conversation

svienot
Copy link
Collaborator

@svienot svienot commented Dec 26, 2023

Description:

  • Display of Runtime Bytecode and Assembly Bytecode side-by-side in the Contract Bytecode section
  • Showing the hexadecimal opcode is optional, and persisted as a user preference
  • Contract Bytecode section is now displayed after the Recent Contract Calls section
  • Compiler version renamed Solidity Compiler Version

Related issue(s):

Fixes #817

Notes for reviewer:

  • Screen capture:
Screenshot 2023-12-26 at 19 13 43
  • Also deployed on staging.

Checklist

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

quiet-node and others added 30 commits December 22, 2023 23:39
Signed-off-by: Logan Nguyen <[email protected]>
…CodeSection and remove the rest of bytecode tooling for the time being.

Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Simon Viénot <[email protected]>
…sses in disassembled code.

Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Logan Nguyen <[email protected]>
@svienot svienot self-assigned this Dec 26, 2023
Copy link

github-actions bot commented Dec 26, 2023

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 88.4% 33365 / 37743
🔵 Statements 88.4% 33365 / 37743
🔵 Functions 66.69% 799 / 1198
🔵 Branches 84.42% 3697 / 4379
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
src/AppStorage.ts 75.13% 70% 52.94% 75.13% 51-52, 55-56, 70-71, 98-100, 103-105, 118-119, 130-131, 141-142, 144-145, 154-163, 166-180
src/components/Copyable.vue 94.04% 80% 50% 94.04% 60-64
src/components/DashboardCard.vue 100% 100% 100% 100%
src/components/contract/ContractByteCodeSection.vue 98.13% 91.66% 20% 98.13% 32-33, 178-179
src/components/values/ByteCodeValue.vue 100% 83.33% 100% 100%
src/components/values/DisassembledCodeValue.vue 97.19% 57.14% 100% 97.19% 70-71, 78
src/components/values/HexaValue.vue 97.33% 88.46% 75% 97.33% 102-105
src/components/values/OpcodeValue.vue 99.1% 95.45% 100% 99.1% 40
src/pages/ContractDetails.vue 98.63% 92.4% 100% 98.63% 74-78
src/utils/bytecode_tools/disassembler/BytecodeDisassembler.ts 100% 100% 100% 100%
src/utils/bytecode_tools/disassembler/utils/evm_opcodes.ts 100% 100% 100% 100%
src/utils/bytecode_tools/disassembler/utils/helpers.ts 93.47% 89.47% 100% 93.47% 101-110, 174-175
Generated in workflow #612

Signed-off-by: Simon Viénot <[email protected]>
Signed-off-by: Simon Viénot <[email protected]>
@svienot svienot marked this pull request as ready for review December 26, 2023 22:34
quiet-node
quiet-node previously approved these changes Dec 27, 2023
Copy link
Member

@quiet-node quiet-node left a comment

Choose a reason for hiding this comment

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

LGTM

@quiet-node quiet-node changed the title 00817 disassemble contract bytecode feat: added new feature to display contract's disassembly in ContractDetail page (#817) Dec 27, 2023
@svienot svienot changed the title feat: added new feature to display contract's disassembly in ContractDetail page (#817) feat: add display of contract disassembly in ContractDetails page (#817) Dec 27, 2023
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions

1 Security Hotspot
0.0% Coverage on New Code (required ≥ 80%)
8.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarCloud

Copy link
Collaborator

@ericleponner ericleponner 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

@svienot svienot merged commit bafcf97 into main Dec 27, 2023
4 of 5 checks passed
@svienot svienot deleted the 00817-disassemble-contract-bytecode branch December 27, 2023 16:05
svienot added a commit that referenced this pull request Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to visualize Assembly Bytecode in ContractDetails view.
3 participants