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

refactor: remove dead code #1206

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Conversation

0xClandestine
Copy link
Member

@0xClandestine 0xClandestine commented Mar 4, 2025

Motivation:

We've got dead code throughout the repo.

Modifications:

  • Used this tool to programmatically remove dead Solidity.

Result:

Dead code has been removed.

@0xClandestine
Copy link
Member Author

0xClandestine commented Mar 4, 2025

Some of this shouldn't be removed, this branch is mostly meant to illustrate what's currently dead.

@0xClandestine 0xClandestine force-pushed the refactor/remove-dead-code branch from 804cd7c to 602cf38 Compare March 4, 2025 06:16
@0xClandestine 0xClandestine added ♻️ Refactor Code improvements without changing functionality. 🗡️ Slashing Release Changes for the slashing release. labels Mar 4, 2025
Copy link
Collaborator

@wadealexc wadealexc left a comment

Choose a reason for hiding this comment

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

Files that we should NOT tweak:

  • script/releases/Env.sol
    • This library interacts with Zeus ENV variables, so anytime we have release scripts that aren't using some ENV variables, the methods that fetch those will be "dead". Let's not remove this code; we'll want it when writing future release scripts.
  • src/contracts/libraries/BytesLib.sol
    • This isn't our code, it's a common library written by Goncalo Sa. Let's not alter the code; it's easier to validate that it's the "standard version" if we keep it as-is.
  • Anything in test/integration/deprecatedInterfaces
    • It's dead now, but if we decide we need it, it's much more of a pain in the ass to re-implement/lookup old interfaces

@0xClandestine 0xClandestine changed the base branch from test/slashing-integration-testing to dev March 5, 2025 18:29
- Removed changes to Env.sol, BytesLib.sol, and deprecated interfaces.
@0xClandestine 0xClandestine force-pushed the refactor/remove-dead-code branch from b9eb2da to 3e6d244 Compare March 5, 2025 18:33
@0xClandestine 0xClandestine requested a review from wadealexc March 5, 2025 18:34
@0xClandestine 0xClandestine changed the title refactor(draft): remove dead code refactor: remove dead code Mar 5, 2025
@github-actions github-actions bot added 📜 Script Script-related changes (automation, tooling). 🧪 Test Test-related changes (unit, integration, etc.). and removed 🗡️ Slashing Release Changes for the slashing release. labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
♻️ Refactor Code improvements without changing functionality. 📜 Script Script-related changes (automation, tooling). 🧪 Test Test-related changes (unit, integration, etc.).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants