Description: We need a secure, admin-controlled mechanism to upgrade the smart contracts without migrating liquidity or losing state.
Context / Motivation: TradeFlow is in active development. We must be able to patch bugs and deploy new features to the core contracts without disrupting user balances or breaking frontend integrations.
Acceptance Criteria: - [ ] Implement an upgrade function in the core contracts.
Description: We need a secure, admin-controlled mechanism to upgrade the smart contracts without migrating liquidity or losing state.
Context / Motivation: TradeFlow is in active development. We must be able to patch bugs and deploy new features to the core contracts without disrupting user balances or breaking frontend integrations.
Acceptance Criteria: - [ ] Implement an
upgradefunction in the core contracts.Adminaddress.env.deployer().update_current_contract_wasm()to swap the executable code.Technical Pointers: Review the Soroban documentation on contract upgrades. Pay close attention to how data schemas in storage are handled post-upgrade; ensure no breaking changes in storage struct definitions occur in your tests.