Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement bridges pot currency swap accounts inititialization (#716)
* Initial basic implementation * Inline implementations * Docs and refactoring * Handle all bridges initial balances cases * Fix basic test * Properly handle edge cases * Improve tests * Add initialization_fails_treasury_insufficient_balance test * Update features snapshot * Add weight value calculation * Add runtime-upgrade logic * Add runtime upgrade test * Check is balanced before applying initialization * Fix try-runtime feature related code * Rename pallet in mock * Use runtime_lock and externalities logic as shared components * More explicit mocks usage in tests * Use a struct type for address/balance pair in tests * Rename version mocks * Add initialization idempotence test * Add initializer version storage * Add verify_balanced call * Edit docs Co-authored-by: MOZGIII <[email protected]> * Twice immediate reinvocation idempotency Co-authored-by: MOZGIII <[email protected]> * Add transfer with creating account to test * Make is_balanced fn public * Fix typos Co-authored-by: MOZGIII <[email protected]> * Improve docs and debug_assert for make_native_bridge_balance_be * Improve docs and debug_assert for make_evm_bridge_balance_be * Improve assert messages * Proportionally equal natve and evm total issuances * Fix is_balanced logic to calculate different swappable balances * Rename pallet * Use a helper function to calculate required bridges minimum balances * Fix pallet renaming in tests * Fix pallet renaming in features snapshot * Return test * Add docs for tests --------- Co-authored-by: MOZGIII <[email protected]>
- Loading branch information