Skip to content

Commit

Permalink
new-release
Browse files Browse the repository at this point in the history
  • Loading branch information
JuaniRios committed Jun 3, 2024
1 parent fe2d5dd commit d63dc67
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions pallets/funding/src/storage_migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,51 @@ pub mod v2 {
<T as frame_system::Config>::DbWeight,
>;
}

pub mod v3 {
use crate::{HRMPChannelStatus, MigrationReadinessCheck, PhaseTransitionPoints, ProjectStatus};
use frame_support::traits::tokens::Balance as BalanceT;
use polkadot_parachain_primitives::primitives::Id as ParaId;
use scale_info::TypeInfo;
use sp_arithmetic::FixedPointNumber;
use sp_core::{Decode, Encode, MaxEncodedLen, RuntimeDebug};

#[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)]
pub struct OldProjectDetails<
AccountId,
Did,
BlockNumber,
Price: FixedPointNumber,
Balance: BalanceT,
EvaluationRoundInfo,
> {
pub issuer_account: AccountId,
pub issuer_did: Did,
/// Whether the project is frozen, so no `metadata` changes are allowed.
pub is_frozen: bool,
/// The price in USD per token decided after the Auction Round
pub weighted_average_price: Option<Price>,
/// The current status of the project
pub status: ProjectStatus,
/// When the different project phases start and end
pub phase_transition_points: PhaseTransitionPoints<BlockNumber>,
/// Fundraising target amount in USD (6 decimals)
pub fundraising_target_usd: Balance,
/// The amount of Contribution Tokens that have not yet been sold
pub remaining_contribution_tokens: Balance,
/// Funding reached amount in USD (6 decimals)
pub funding_amount_reached_usd: Balance,
/// Information about the total amount bonded, and the outcome in regards to reward/slash/nothing
pub evaluation_round_info: EvaluationRoundInfo,
/// When the Funding Round ends
pub funding_end_block: Option<BlockNumber>,
/// ParaId of project
pub parachain_id: Option<ParaId>,
/// Migration readiness check
pub migration_readiness_check: Option<MigrationReadinessCheck>,
/// HRMP Channel status
pub hrmp_channel_status: HRMPChannelStatus,
}

// pub struct UncheckedMigrationToV3<T: Config>(PhantomData<T>);
}

0 comments on commit d63dc67

Please sign in to comment.