Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mint and distribute Contribution Token via pallet_asset #9

Merged
merged 12 commits into from
Jan 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions nodes/standalone/src/chain_spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,6 @@ fn testnet_genesis(
})
.collect::<Vec<_>>(),
},
..Default::default()
}
}
1 change: 1 addition & 0 deletions pallets/funding/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ sp-core = { default-features = false, git = "https://github.com/paritytech/subst
sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
pallet-balances = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
pallet-randomness-collective-flip = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
pallet-assets = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
pallet-credentials = { path = "../credentials", default-features = false }

[features]
Expand Down
8 changes: 4 additions & 4 deletions pallets/funding/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ fn get_events<T: Config>() -> frame_benchmarking::Vec<<T as frame_system::Config

fn create_default_project<T: Config>(
id: Option<u32>,
) -> (T::ProjectIdentifier, T::AccountId, ProjectOf<T>) {
) -> (T::ProjectIdParameter, T::AccountId, ProjectOf<T>) {
let issuer: T::AccountId = account::<T::AccountId>("Alice", 1, 1);
let project_id_parameter = id.unwrap_or(0);
let project_id = T::BenchmarkHelper::create_project_id_parameter(project_id_parameter);
Expand All @@ -44,7 +44,7 @@ fn create_default_project<T: Config>(

fn create_default_minted_project<T: Config>(
id: Option<u32>,
) -> (T::ProjectIdentifier, T::AccountId) {
) -> (T::ProjectIdParameter, T::AccountId) {
let (project_id, issuer, project) = create_default_project::<T>(id);
assert!(
PolimecFunding::<T>::create(SystemOrigin::Signed(issuer.clone()).into(), project,).is_ok()
Expand Down Expand Up @@ -76,7 +76,7 @@ benchmarks! {
verify {
// assert_last_event::<T>(Event::ProjectCreated(0).into());
let project_id = T::BenchmarkHelper::create_project_id_parameter(1);
let project_info = PolimecFunding::<T>::project_info(project_id);
let project_info = PolimecFunding::<T>::project_info(project_id.into());
assert_eq!(project_info.project_status, ProjectStatus::Application);
}

Expand Down Expand Up @@ -108,7 +108,7 @@ benchmarks! {
let p = T::ActiveProjectsLimit::get();
for i in 0 .. p {
let project_id = T::BenchmarkHelper::create_project_id_parameter(i);
let project_info = PolimecFunding::<T>::project_info(project_id);
let project_info = PolimecFunding::<T>::project_info(project_id.into());
assert_eq!(project_info.project_status, ProjectStatus::EvaluationEnded);
}

Expand Down
Loading