Add missing Forge negative tests and TimeArena DRY/gas fixes #316
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#316
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Parent
Gap analysis follow-up from #309.
Current codebase
TimeArena.t.solcovers happy-path routing, CRED, WarBow basics; weak on revert matrix.docs/operations/pause-and-final-signoff.mdclaimsclaimWarBowFlagworks while paused — approved: docs wrong; code pause behavior is correct (fix docs in docs bundle, not here).safeTransfers per buy; bubble-sort on 3 podium slots.Why needed
Approved: Add missing negative tests; fix DRY/gas hotspots in
TimeArena.Constraints / guardrails
NonStandardERC20tests referenced in gap report — add if fee-on-transfer coverage gaps exist.Relevant files
contracts/test/TimeArena.t.solcontracts/test/TimeArenaBuyRouter.t.solcontracts/src/arena/TimeArena.solcontracts/test/NonStandardERC20.t.sol(create if missing)Recommended direction
setPaused(true)blocksbuy,buyWithCred, WarBow actions,claimWarBowFlag.finalizeWarbowPodium/ autoroll guards (coordinate with autoroll issue).Acceptance criteria
Test plan
cd contracts && forge test.cd contracts && forge test --match-contract TimeArena -vvfor new reverts.Attack / abuse test plan
Verification criteria
forge testgreen except knowndoub.csvfork skips.mentioned in issue #309
mentioned in commit
18a24e5101mentioned in merge request !461
mentioned in commit
adb400d006mentioned in merge request !464
mentioned in commit
a80b465b34mentioned in merge request !463
mentioned in commit
28fbbba370mentioned in merge request !465
Verification complete — GitLab #316
Verified merged implementation on
mainat1a7b8ed5(MR !461).Acceptance criteria
cd contracts && forge test --match-test test_pause_blocks -vv— 6/6 (buy,buyWithCred,warbowSteal,warbowActivateGuard,warbowRevenge,claimWarBowFlag) all revertTimeArena: pausedcd contracts && forge test --match-test "test_warbow_.*_reverts|test_finalize_warbow_podium_reverts" -vv— 10/10 (steal band, daily cap, revenge expiry/no-pending, flag holder/silence, double finalize, bad victim/epoch)ArenaCharmBounds.solshared byTimeArena,ArenaXp,ArenaCharmPriceTwap; existingtest_buy_reverts_charm_*+ fuzz charm tests green inTimeArenaTest(95 tests)_routeDoubPrizeSplitdocuments onesafeTransferwhen all pool slots map toaddress(vaults);test_buy_routes_doub_splitstill greencd contracts && forge test --match-contract NonStandardERC20Test -vv— 4/4 (buy, WarBow guard/steal, top-up parity)forge testcd contracts && forge test— 183 passed, 4 failed only inDoubAirdropMegaethForkTest(missing gitignoredairdrop/doub.csv);DevStackIntegrationTest5/5 PASScd contracts && forge test --match-contract "TimeArenaTest|NonStandardERC20Test"— 99/99TimeArena.t.sol§316 comments (pause incident response, steal-band griefing, daily-cap bypass, revenge window, double finalize, etc.)docs/testing/invariants-and-business-logic.md§316 (INV-TIME-ARENA-PAUSE-MUTATING,INV-TIME-ARENA-WARBOW-REVERT-MATRIX,INV-TIME-ARENA-CHARM-BOUNDS-DRY,INV-TIME-ARENA-BUY-ROUTING-GAS,INV-ERC20-123-NONSTANDARD)Out of scope / not required for this issue
docs/operations/pause-and-final-signoff.mdpause copy — explicitly deferred to docs bundle per issue body.No repo changes from this verification pass; closing issue.
mentioned in merge request !520
mentioned in issue #366