Closed credence0x closed 3 weeks ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | โ Failed (Inspect) | Jun 19, 2024 11:56am |
โฑ๏ธ Estimated effort to review [1-5] | 4 |
๐งช Relevant tests | No |
๐ Security concerns | No |
โก Key issues to review |
Type Conversion: The PR includes changes from Number to BigInt and u32 to u64 for troop counts and other related properties. Ensure that all related calculations, especially those involving arithmetic operations, properly handle these new types without loss of precision or overflow issues. |
Data Consistency: The introduction of attack_army_lifetime and defence_army_lifetime properties requires careful handling to ensure that these values are consistently updated wherever troop counts are modified. Review all logic paths to ensure that lifetime values are correctly maintained in sync with current troop counts. | |
Health Calculation Changes: Modifications in health calculation methods (e.g., decrease_current_by replacing decrease_by ) need thorough testing to ensure they behave as expected under all conditions, particularly edge cases like health reaching zero or partial health deductions. |
Failed to generate code suggestions for PR
User description
PR Type
Enhancement, Bug fix
Description
Number
toBigInt
in contract components.attack_army_lifetime
anddefence_army_lifetime
properties to track lifetime of armies in battles.currencyFormat
function.Changes walkthrough ๐
contractComponents.ts
Update troop properties and battle types in contract components.
client/src/dojo/contractComponents.ts
troops
properties fromNumber
toBigInt
.attack_army_lifetime
anddefence_army_lifetime
properties.u64
instead ofu32
.contracts.cairo
Enhance combat system with lifetime tracking and health checks.
contracts/src/systems/combat/contracts.cairo
attack_army_lifetime
anddefence_army_lifetime
properties.combat.cairo
Update troop properties and add reset function in combat model.
contracts/src/models/combat.cairo
Troops
properties fromu32
tou64
.reset_count_and_health
function.utils.tsx
Fix type conversion in currencyFormat function.
client/src/ui/utils/utils.tsx - Converted `num` to `Number` in `currencyFormat` function.
manifest.json
Update manifest with new class hashes and properties.
contracts/manifests/dev/manifest.json
attack_army_lifetime
anddefence_army_lifetime
properties.troops
properties fromu32
tou64
.manifest.toml
Update manifest with new class hashes and properties.
contracts/manifests/dev/manifest.toml
attack_army_lifetime
anddefence_army_lifetime
properties.