Closed murderteeth closed 2 years ago
So would it be safe to use calculate this in the UI (saving an RPC call) since it's not available in the library codex? Such as the following:
(level * (level + 1) / 2) * 1000
Level 1: 1000 Level 2: 3000 Level 3: 6000
So would it be safe to use calculate this in the UI (saving an RPC call) since it's not available in the library codex? Such as the following:
(level * (level + 1) / 2) * 1000
Level 1: 1000 Level 2: 3000 Level 3: 6000
Correct, you could use that formula to calculate the xp between levels without calling the contract.
XP calculation is equivalent to SUM(x) which can be also be calculated with x(x+1)/2.