Skip to content

Fix every finding of the unreachable Solidity code scanner - #1892

Merged
KillariDev merged 1 commit into
mainfrom
t3/fix-solidity-unreachable-findings
Dec 3, 2026
Merged

KillariDev merged 1 commit into
mainfrom
t3/fix-solidity-unreachable-findings

Conversation

@KillariDev

@KillariDev KillariDev commented Dec 3, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes the findings of the scanner added in #1890. The two PRs are independent and can merge in either order; this one contains only the contract fixes and their consumer updates.

What

Fixes all 22 findings of bun run check:solidity-unreachable from #1890. Run against this branch, the scanner reports No unreachable code found in 157 Solidity file(s).

Finding Fix
Unused imports Deposit and SecurityPoolUtils; EscalationGameFactory in IQuestionLedger once its last use went Removed
IEscalationGameAuthorization never inherited or used EscalationGameDepositDelegate, which implements both functions, now declares is IEscalationGameAuthorization, so the compiler checks the signatures
IQuestionLedger.isEscalationResolved, initialEscalationGameDepositAttoRep, escalationGameFactory; ISecurityPoolServiceRoot.forkController; IEscalationGameDepositContext.getQuestionResolution never called through the interface Removed from the interfaces. The concrete contracts keep their functions and getters
IWeth9 ERC-20 functions and events never used IWeth9 now declares only deposit and withdraw; token transfers already go through IERC20
IERC1155.URI never emitted Removed. augurScan's unclassifiedEvents set existed only for it and is removed with its test case
ISecurityPoolRepairAuctionDeployer.create never called, because SecurityPoolForkCoordinator declared an identical duplicate interface The coordinator now uses ISecurityPoolRepairAuctionDeployer from SecurityPool.sol, and the duplicate is gone
IGenesisUniswapV3Factory / IGenesisUniswapV3PoolState unused in Solidity These describe Uniswap's own contracts and only served as ABI sources for the chaos bot. The same ABIs now live hand-written in bots/chaos/src/contracts/uniswap-abi.ts, beside the bot's other Uniswap ABIs, and the generated bot ABI file and its tests drop them

Regenerated outputs

No behaviour changes, and deployed bytecode is identical to main: the deployment manifests and pinned runtime code hashes are unchanged. Regenerated:

  • bots/shared/src/contracts/abi.generated.ts, which drops URI and the moved Uniswap ABIs
  • the contract-reference source fingerprint and ShareToken's ABI fingerprint (and its page comment), after checking that no documentation describes a removed member

Validation

  • The Add a solc-based scanner for unreachable and unused Solidity code #1890 scanner, run against this branch: no findings
  • bun run test (TypeScript and the full root suite): 6724 pass, 0 fail
  • bun run test in augurScan, bots/shared and bots/chaos: all pass
  • bun run test:browser:smoke: 46 pass
  • bun run check:generated-clean, bun run knip, bun run check:changed, bun run format:check, bun run check:solidity-format, bun run docs:check-contract-reference, bun run check:mainnet-deployment:current, bots/shared check:generated, and git diff --check: all pass

Removes unused imports and interface members nothing calls (unused
IQuestionLedger, ISecurityPoolServiceRoot and deposit-context getters,
the IWeth9 ERC-20 surface, and IERC1155's never-emitted URI event).
EscalationGameDepositDelegate now declares IEscalationGameAuthorization
so the compiler checks it, and the fork coordinator reuses SecurityPool's
repair auction deployer interface instead of a duplicate.

The Uniswap factory and pool ABIs the chaos bot calls move from Solidity
interfaces to hand-written TypeScript beside the bot's other Uniswap ABIs.
augurScan drops its special case for the removed URI event.

Regenerates the bot ABIs and the contract reference fingerprints.
@KillariDev
KillariDev force-pushed the t3/fix-solidity-unreachable-findings branch from 55777c6 to c4feea1 Compare December 3, 2026 11:25
@KillariDev
KillariDev changed the base branch from t3/solidity-unreachable-code-scanner to main December 3, 2026 11:25
@KillariDev
KillariDev added this pull request to the merge queue Dec 3, 2026
Merged via the queue into main with commit 36f0029 Dec 3, 2026
44 checks passed
@KillariDev
KillariDev deleted the t3/fix-solidity-unreachable-findings branch December 3, 2026 11:45
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.

1 participant