Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Update Crowdloan Account to FundIndex #4824

Merged

Conversation

shawntabrizi
Copy link
Member

@shawntabrizi shawntabrizi commented Feb 1, 2022

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label Feb 1, 2022
Comment on lines -661 to 662
pub fn fund_account_id(index: ParaId) -> T::AccountId {
pub fn fund_account_id(index: FundIndex) -> T::AccountId {
T::PalletId::get().into_sub_account(index)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the main change, and UIs will need to update logic

#[pallet::getter(fn next_trie_index)]
pub(super) type NextTrieIndex<T> = StorageValue<_, u32, ValueQuery>;
#[pallet::getter(fn next_fund_index)]
pub(super) type NextFundIndex<T> = StorageValue<_, u32, ValueQuery>;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is also a breaking change that needs to be migrated

@shawntabrizi shawntabrizi merged commit 9548b0a into shawntabrizi-complete-swap Feb 1, 2022
@shawntabrizi shawntabrizi deleted the shawntabrizi-crowdloan-index branch February 1, 2022 10:55
paritytech-processbot bot pushed a commit that referenced this pull request Feb 12, 2022
* add support for parachain to parachain swap

* enable swaps on kusama

* sanity test in paras_registrar

* express more errors

* finish up tests

* fmt

* make fields pub

* refactor integration tests to use real accounts

* Update Crowdloan Account to FundIndex (#4824)

* update fund account to use index

* fix integration tests

* Update runtime/common/src/crowdloan.rs

* finish parachain swap test

* format

* fix warning

* fix spacing

* fix formatting

* write migrations

* add migration

* fixes

* more fixes to migration

* Update runtime/common/src/crowdloan/mod.rs

Co-authored-by: Zeke Mostov <z.mostov@gmail.com>

* Update runtime/common/src/paras_registrar.rs

* Update migration.rs

* extract swap function

Co-authored-by: Zeke Mostov <z.mostov@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant