Contracts: XP accrual and uncapped level progression #250
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#250
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?
Context
Onchain XP and uncapped level progression. Parent epic: #238.
Relevant files
contracts/src/TimeArena.solorcontracts/src/PlayerXp.solarenaXpMath.tsAcceptance criteria
min(20 + (L-1)*5, 100)XPxp,level,xpToNextLevelviewsXpGained(buyer, amount, newLevel?)Verification checklist
marked as related to #238
mentioned in issue #238
Implementation summary
ArenaXplibrary + onchainxp/level/XpGained; mirrorfrontend/src/lib/arenaXpMath.ts.Acceptance criteria
Verification checklist
arenaXpMath.test.tsmentioned in issue #265
marked as related to #265
mentioned in commit
776ba693e5Verification complete (agent)
Verified GitLab #250 on branch
issue/250-xp-accrual-verify(worktree) against acceptance criteria and the verification checklist. Implementation was already present; added explicit table-test coverage and doc cross-links, merged tomain(776ba69).Acceptance criteria
mulDiv); documented inArenaXp.sol,arena-v2.md,time-arena.mdmin(20 + (L-1)*5, 100); table-tested L1–L10 and flat 100 XP at L17+xp,level,xpTowardNext,xpToNextLevelonTimeArenaXpGained(buyer, amount, newLevel)— emitted in_finishBuy; new Forge testtest_xp_emits_XpGainedVerification checklist (automated)
ArenaXp.t.sol::test_level_thresholds_table_levels_1_through_10,test_level_50_plus_flat_100_xp_per_level,test_xpForCharm_linear_band;TimeArena.t.sol::test_xp_*(8 tests)frontend/src/lib/arenaXpMath.test.tsmirrors onchain formulas (6 tests)Docs / invariants / play skills
INV-TIME-ARENA-XPupdated with #250 evidence mappingskills/README.md,play-time-arena-doub/SKILL.md, guardrails skill, product specsManual re-check (optional)
cd contracts && forge test --match-contract ArenaXpcd frontend && npx vitest run src/lib/arenaXpMath.test.tsbuy(10e18)→xp+10,level1,XpGainedin receiptAll issue-body and comment criteria pass — closing.
mentioned in issue #299
mentioned in issue #303
mentioned in issue #304