PR Title:
fix: change settleClaim visibility from public to external (#183)
PR Description:
## Description
Resolves #183.
An audit identified that `settleClaim` was declared with `public` visibility in the
TruthBounty contracts. Since `settleClaim` is never called internally within the
contract, `public` visibility unnecessarily exposes an internal call path, wasting
gas on the ABI encoding step that `public` functions incur on internal calls.
This PR changes the visibility to `external` across all affected contracts and adds
regression tests to ensure the fix holds and the function behaviour is unaffected.
## Changes Made
- Confirmed and enforced `external` visibility on `settleClaim` in:
- `contracts/TruthBounty.sol`
- `contracts/TruthBountyWeighted.sol`
- Added `test/SettleClaimVisibility.test.ts` with:
- External call success tests for both `TruthBounty` and `TruthBountyWeighted`
- Revert tests for calls before confirmation delay has passed
- Revert tests for double-settlement attempts (idempotency protection)
- Protocol invariant test confirming `settled` flag prevents re-entry
## Why `external` over `public`?
- `external` functions receive arguments directly from `calldata`, avoiding the
extra memory copy that `public` functions perform — saving gas on every call.
- Explicitly marking functions as `external` signals to auditors and integrators
that the function is not part of the internal contract interface.
## Acceptance Criteria Met
- [x] `settleClaim` is declared `external` in all relevant contracts
- [x] Unit tests pass covering external call, premature call, and double-settle
- [x] Protocol invariant verified: `settled` flag prevents re-settlement
- [x] No regressions in existing test suite