From 13de07a13f8bca4b1bf45848ff0cd96cc0046cb5 Mon Sep 17 00:00:00 2001 From: Juan Ignacio Rios Date: Thu, 20 Jun 2024 09:55:13 +0200 Subject: [PATCH] add when to contribution info --- pallets/funding/src/functions/4_contribution.rs | 1 + pallets/funding/src/lib.rs | 3 ++- pallets/funding/src/types.rs | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/pallets/funding/src/functions/4_contribution.rs b/pallets/funding/src/functions/4_contribution.rs index 55d6ef4bb..5e2d380b8 100644 --- a/pallets/funding/src/functions/4_contribution.rs +++ b/pallets/funding/src/functions/4_contribution.rs @@ -317,6 +317,7 @@ impl Pallet { funding_asset, funding_asset_amount, plmc_bond, + when: now, }; // Try adding the new contribution to the system diff --git a/pallets/funding/src/lib.rs b/pallets/funding/src/lib.rs index 8b34935fc..75c4829cf 100644 --- a/pallets/funding/src/lib.rs +++ b/pallets/funding/src/lib.rs @@ -177,7 +177,8 @@ pub type EvaluationInfoOf = EvaluationInfo = BidInfo, PriceOf, AccountIdOf, BlockNumberFor, MultiplierOf>; -pub type ContributionInfoOf = ContributionInfo, BalanceOf, MultiplierOf>; +pub type ContributionInfoOf = + ContributionInfo, BalanceOf, BlockNumberFor, MultiplierOf>; pub type BucketOf = Bucket, PriceOf>; pub type WeightInfoOf = ::WeightInfo; diff --git a/pallets/funding/src/types.rs b/pallets/funding/src/types.rs index ed033fbdb..a08672829 100644 --- a/pallets/funding/src/types.rs +++ b/pallets/funding/src/types.rs @@ -413,7 +413,7 @@ pub mod storage_types { } #[derive(Clone, Encode, Decode, Eq, PartialEq, RuntimeDebug, MaxEncodedLen, TypeInfo)] - pub struct ContributionInfo { + pub struct ContributionInfo { pub id: Id, pub did: Did, pub project_id: ProjectId, @@ -424,6 +424,7 @@ pub mod storage_types { pub funding_asset: AcceptedFundingAsset, pub funding_asset_amount: Balance, pub plmc_bond: Balance, + pub when: BlockNumber, } /// Represents a bucket that holds a specific amount of tokens at a given price.