Skip to content

Commit 5be080f

Browse files
authored
Merge pull request #242 from jurteam/develop
develop to staging
2 parents f09db16 + 99fe8b1 commit 5be080f

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

pallets/bounties/src/benchmarking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ benchmarks! {
157157
2
158158
)
159159
verify {
160-
assert_last_event::<T>(Event::<T>::CreatedBounty(<T as pallet::Config>::Helper::bounty(1)).into());
160+
assert_last_event::<T>(Event::<T>::CreatedBounty(community_id, <T as pallet::Config>::Helper::bounty(1)).into());
161161
}
162162

163163
update_bounty {
@@ -204,7 +204,7 @@ benchmarks! {
204204
bounded_accounts
205205
)
206206
verify {
207-
assert_last_event::<T>(Event::<T>::UpdatedBounty(<T as pallet::Config>::Helper::bounty(1)).into());
207+
assert_last_event::<T>(Event::<T>::UpdatedBounty(community_id, <T as pallet::Config>::Helper::bounty(1)).into());
208208
}
209209

210210
complete_bounty {
@@ -258,7 +258,7 @@ benchmarks! {
258258
members
259259
)
260260
verify {
261-
assert_last_event::<T>(Event::<T>::CompletedBounty(<T as pallet::Config>::Helper::bounty(1)).into());
261+
assert_last_event::<T>(Event::<T>::CompletedBounty(community_id, <T as pallet::Config>::Helper::bounty(1)).into());
262262
}
263263

264264
impl_benchmark_test_suite!(Pallet, crate::mock::new_test_ext(), crate::mock::Test);

pallets/bounties/src/lib.rs

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,14 @@ pub mod pallet {
128128
#[pallet::event]
129129
#[pallet::generate_deposit(pub(super) fn deposit_event)]
130130
pub enum Event<T: Config> {
131-
/// Created Bounty [Bounty Id]
132-
CreatedBounty(T::BountyId),
133-
/// Updated Bounty [Bounty Id]
134-
UpdatedBounty(T::BountyId),
135-
/// Added bounty contributor to the chain [Bounty Id]
136-
AddedContributor(T::BountyId),
137-
/// Completed bounty and badges assigned to the contributors [Bounty Id]
138-
CompletedBounty(T::BountyId),
139-
/// Bounty closed due to deadline meet.
140-
ClosedBounty(T::BountyId),
131+
/// Created Bounty [Community Id, Bounty Id]
132+
CreatedBounty(T::CommunityId, T::BountyId),
133+
/// Updated Bounty [Community Id, Bounty Id]
134+
UpdatedBounty(T::CommunityId, T::BountyId),
135+
/// Completed bounty and badges assigned to the contributors [Community Id, Bounty Id]
136+
CompletedBounty(T::CommunityId, T::BountyId),
137+
/// Bounty closed due to deadline meet [Community Id, Bounty Id]
138+
ClosedBounty(T::CommunityId, T::BountyId),
141139
}
142140

143141
#[pallet::error]
@@ -186,7 +184,7 @@ pub mod pallet {
186184

187185
bounty.status = BountyStatus::Completed;
188186

189-
Self::deposit_event(Event::ClosedBounty(bounty_id));
187+
Self::deposit_event(Event::ClosedBounty(community_id, bounty_id));
190188

191189
Ok(())
192190
},
@@ -294,7 +292,7 @@ pub mod pallet {
294292
bounty.participants = participants;
295293
bounty.status = BountyStatus::WorkInProgress;
296294

297-
Self::deposit_event(Event::UpdatedBounty(bounty_id));
295+
Self::deposit_event(Event::UpdatedBounty(community_id, bounty_id));
298296
Ok(())
299297
})
300298
}
@@ -376,7 +374,7 @@ pub mod pallet {
376374
}
377375
bounty.contributors = bounty_contributors;
378376

379-
Self::deposit_event(Event::CompletedBounty(bounty_id));
377+
Self::deposit_event(Event::CompletedBounty(community_id, bounty_id));
380378
Ok(())
381379
})
382380
}
@@ -427,7 +425,7 @@ impl<T: Config> Pallet<T> {
427425
let next_id = bounty_id.increment();
428426
NextBountyId::<T>::insert(community_id, next_id);
429427

430-
Self::deposit_event(Event::CreatedBounty(bounty_id));
428+
Self::deposit_event(Event::CreatedBounty(community_id, bounty_id));
431429

432430
Ok(().into())
433431
}

runtime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
122122
// `spec_version`, and `authoring_version` are the same between Wasm and native.
123123
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
124124
// the compatible custom types.
125-
spec_version: 125,
125+
spec_version: 126,
126126
impl_version: 1,
127127
apis: RUNTIME_API_VERSIONS,
128128
transaction_version: 1,

0 commit comments

Comments
 (0)