Skip to content

Remove external functions nothing calls - #1904

Merged
KillariDev merged 2 commits into
mainfrom
t3/fix-scanner-findings-3
Dec 4, 2026
Merged

KillariDev merged 2 commits into
mainfrom
t3/fix-scanner-findings-3

Conversation

@KillariDev

Copy link
Copy Markdown
Collaborator

What

Removes four external functions that nothing calls:

  • OpenOracleRejectingETHReceiver.setRejectETH and setConsumeAllGas (test harness). With the setters gone, rejectETH was always true and consumeAllGas always false, so both flags are removed and receive() simply reverts after the optional reentry, which is what it already did in every test.
  • SecurityPoolForkHarness.creditForkFees (test harness).
  • TwoWayConstantProductFactory.predictPair (production). Only integration tests called it. They now derive the CREATE2 address in TypeScript (solidity/ts/tests/trading/pairAddress.ts) and still assert it equals the deployed pair. The trading contracts reference drops the function and now states the CREATE2 inputs (deployer, salt, init code), so the address can still be derived before a pair exists.

Why

The unreachable-code scanner in #1890 reports these as entry points no Solidity refers to and no TypeScript names (for predictPair, only tests). This PR only fixes them; it does not depend on the scanner.

Follow-on updates: the bots' generated ABI is regenerated, the docs search index is rebuilt, and the contract-reference source fingerprint is updated after re-checking the documented factory behavior.

Validation

  • bun run tsc, bun run check (includes docs:check), bun run format:check, bun run knip, bun run check:generated-clean, git diff --check.
  • Solidity tests for every affected harness and the trading factory: pair router and real-core integration, OpenOracle dispute and price-oracle security, security-pool fork coordinator, fork retirement, report operations and transaction rollback, WETH9, trading router residue and math fuzz, security-pool collateral (161 pass).
  • Package tests: bots/shared contract ABIs, bots/chaos catalog coverage and canonical scan, augurScan config, trading UI deployment flow.
  • Docs runtime tests.

@KillariDev
KillariDev added this pull request to the merge queue Dec 4, 2026
Merged via the queue into main with commit d90712b Dec 4, 2026
44 checks passed
@KillariDev
KillariDev deleted the t3/fix-scanner-findings-3 branch December 4, 2026 13:31
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