Closed aymericdelab closed 3 months ago
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
eternum | โ Ready (Inspect) | Visit Preview | ๐ฌ Add feedback | Jun 26, 2024 11:57am |
โฑ๏ธ Estimated effort to review [1-5] | 4 |
๐งช Relevant tests | Yes |
๐ Security concerns | No |
โก Key issues to review |
Possible Bug: The removal of BankAccounts struct and related functionality in various contracts might lead to issues if there are dependencies elsewhere in the code that expect these accounts to exist or be created. This needs thorough investigation to ensure that no other parts of the system are adversely affected by these changes. |
Refactoring Concern: The renaming of modules from bank_systems , liquidity_systems , and swap_systems to bank , liquidity , and swap could potentially lead to confusion or errors if not all references to these modules have been updated accordingly across the entire project. | |
Data Handling: The changes in how resources are handled, especially with the introduction of pickup_resources_from_bank replacing open_account , need careful review to ensure that resource transactions are still handled securely and correctly. |
Failed to generate code suggestions for PR
User description
also changed bank_systems, swap_systems, liquidity_systems to just bank, swap, liquidity
PR Type
Enhancement, Tests
Description
BankAccounts
struct from the bank model.bank_systems
,liquidity_systems
, andswap_systems
tobank
,liquidity
, andswap
.open_account
function and addedpickup_resources_from_bank
function in the bank contract.entity_id
and modified liquidity events.entity_id
and modified swap events.test_bank_create_account
test.BankAccounts
creation in the admin bank contract.Changes walkthrough ๐
7 files
bank.cairo
Remove `BankAccounts` struct from bank model.
contracts/src/models/bank/bank.cairo - Removed the `BankAccounts` struct.
combat.cairo
Reformat comments and update mock functions in combat model.
contracts/src/models/combat.cairo
u64
instead ofu32
.defence_army_lifetime
andattack_army_lifetime
tomock_battle
.contracts.cairo
Rename bank, liquidity, and swap system modules.
contracts/src/systems/bank/contracts.cairo
bank_systems
,liquidity_systems
, andswap_systems
to
bank
,liquidity
, andswap
.bank.cairo
Remove `open_account` and add `pickup_resources_from_bank` function.
contracts/src/systems/bank/contracts/bank.cairo
open_account
function.pickup_resources_from_bank
function.liquidity.cairo
Update liquidity functions to include `entity_id`.
contracts/src/systems/bank/contracts/liquidity.cairo
add
andremove
functions to includeentity_id
.entity_id
instead ofbank_account_entity_id
.swap.cairo
Update swap functions to include `entity_id`.
contracts/src/systems/bank/contracts/swap.cairo
buy
andsell
functions to includeentity_id
.entity_id
instead ofbank_account_entity_id
.bank.cairo
Remove `BankAccounts` creation in admin bank.
contracts/src/systems/dev/contracts/bank.cairo - Removed `BankAccounts` creation in `create_admin_bank`.
3 files
bank.cairo
Remove `test_bank_create_account` test.
contracts/src/systems/bank/tests/bank.cairo - Removed `test_bank_create_account` test.
liquidity.cairo
Update liquidity tests and add donkey resource assertions.
contracts/src/systems/bank/tests/liquidity.cairo
swap.cairo
Update swap tests and add donkey resource assertions.
contracts/src/systems/bank/tests/swap.cairo