Skip to content

Commit

Permalink
new benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
JuaniRios committed Jul 1, 2024
1 parent e47fef0 commit f3f3bb7
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions pallets/funding/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ pub mod pallet {
Self::do_create_project(&account, project, did)
}

#[pallet::call_index(35)]
#[pallet::call_index(1)]
#[pallet::weight(WeightInfoOf::<T>::remove_project())]
pub fn remove_project(origin: OriginFor<T>, jwt: UntrustedToken, project_id: ProjectId) -> DispatchResult {
let (account, did, investor_type, _cid) =
Expand All @@ -849,7 +849,7 @@ pub mod pallet {
}

/// Change the metadata hash of a project
#[pallet::call_index(1)]
#[pallet::call_index(2)]
#[pallet::weight(WeightInfoOf::<T>::edit_project())]
pub fn edit_project(
origin: OriginFor<T>,
Expand All @@ -864,7 +864,7 @@ pub mod pallet {
}

/// Starts the evaluation round of a project. It needs to be called by the project issuer.
#[pallet::call_index(2)]
#[pallet::call_index(3)]
#[pallet::weight(WeightInfoOf::<T>::start_evaluation(<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1))]
pub fn start_evaluation(
origin: OriginFor<T>,
Expand All @@ -880,7 +880,7 @@ pub mod pallet {
/// Starts the auction round for a project. From the next block forward, any professional or
/// institutional user can set bids for a token_amount/token_price pair.
/// Any bids from this point until the auction_closing starts, will be considered as valid.
#[pallet::call_index(3)]
#[pallet::call_index(4)]
#[pallet::weight(WeightInfoOf::<T>::start_auction_manually(<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1))]
pub fn start_auction(
origin: OriginFor<T>,
Expand All @@ -894,7 +894,7 @@ pub mod pallet {
}

/// Bond PLMC for a project in the evaluation stage
#[pallet::call_index(4)]
#[pallet::call_index(5)]
#[pallet::weight(
WeightInfoOf::<T>::evaluation(T::MaxEvaluationsPerUser::get() - 1)
)]
Expand All @@ -911,7 +911,7 @@ pub mod pallet {
}

/// Bid for a project in the Auction round
#[pallet::call_index(5)]
#[pallet::call_index(6)]
#[pallet::weight(
WeightInfoOf::<T>::bid(
<T as Config>::MaxBidsPerUser::get() - 1,
Expand All @@ -935,7 +935,7 @@ pub mod pallet {
}

/// Buy tokens in the Community or Remainder round at the price set in the Auction Round
#[pallet::call_index(6)]
#[pallet::call_index(7)]
#[pallet::weight(
WeightInfoOf::<T>::contribution(T::MaxContributionsPerUser::get() - 1)
.max(WeightInfoOf::<T>::contribution_ends_round(
Expand Down Expand Up @@ -969,7 +969,7 @@ pub mod pallet {
}

/// Buy tokens in the Community or Remainder round at the price set in the Auction Round
#[pallet::call_index(7)]
#[pallet::call_index(8)]
#[pallet::weight(
WeightInfoOf::<T>::contribution(T::MaxContributionsPerUser::get() - 1)
.max(WeightInfoOf::<T>::contribution_ends_round(
Expand Down Expand Up @@ -1002,7 +1002,7 @@ pub mod pallet {
)
}

#[pallet::call_index(8)]
#[pallet::call_index(9)]
#[pallet::weight(WeightInfoOf::<T>::decide_project_outcome(
<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1
))]
Expand All @@ -1019,7 +1019,7 @@ pub mod pallet {
Self::do_decide_project_outcome(account, project_id, outcome)
}

#[pallet::call_index(9)]
#[pallet::call_index(10)]
#[pallet::weight(WeightInfoOf::<T>::settle_successful_evaluation())]
pub fn settle_successful_evaluation(
origin: OriginFor<T>,
Expand All @@ -1033,7 +1033,7 @@ pub mod pallet {
Self::do_settle_successful_evaluation(bid, project_id)
}

#[pallet::call_index(10)]
#[pallet::call_index(11)]
#[pallet::weight(WeightInfoOf::<T>::settle_successful_bid())]
pub fn settle_successful_bid(
origin: OriginFor<T>,
Expand All @@ -1046,7 +1046,7 @@ pub mod pallet {
Self::do_settle_successful_bid(bid, project_id)
}

#[pallet::call_index(11)]
#[pallet::call_index(12)]
#[pallet::weight(WeightInfoOf::<T>::settle_successful_contribution())]
pub fn settle_successful_contribution(
origin: OriginFor<T>,
Expand All @@ -1060,7 +1060,7 @@ pub mod pallet {
Self::do_settle_successful_contribution(bid, project_id)
}

#[pallet::call_index(12)]
#[pallet::call_index(13)]
#[pallet::weight(WeightInfoOf::<T>::settle_failed_evaluation())]
pub fn settle_failed_evaluation(
origin: OriginFor<T>,
Expand All @@ -1074,7 +1074,7 @@ pub mod pallet {
Self::do_settle_failed_evaluation(bid, project_id)
}

#[pallet::call_index(13)]
#[pallet::call_index(14)]
#[pallet::weight(WeightInfoOf::<T>::settle_failed_bid())]
pub fn settle_failed_bid(
origin: OriginFor<T>,
Expand All @@ -1087,7 +1087,7 @@ pub mod pallet {
Self::do_settle_failed_bid(bid, project_id)
}

#[pallet::call_index(14)]
#[pallet::call_index(15)]
#[pallet::weight(WeightInfoOf::<T>::settle_failed_contribution())]
pub fn settle_failed_contribution(
origin: OriginFor<T>,
Expand All @@ -1101,9 +1101,9 @@ pub mod pallet {
Self::do_settle_failed_contribution(bid, project_id)
}

#[pallet::call_index(22)]
#[pallet::call_index(16)]
#[pallet::weight(Weight::from_parts(1000, 0))]
pub fn configure_receiver_pallet_migration(
pub fn start_pallet_migration(
origin: OriginFor<T>,
jwt: UntrustedToken,
project_id: ProjectId,
Expand All @@ -1116,7 +1116,7 @@ pub mod pallet {
Self::do_start_pallet_migration(&account, project_id, para_id)
}

#[pallet::call_index(23)]
#[pallet::call_index(17)]
#[pallet::weight(Weight::from_parts(1000, 0))]
pub fn start_migration_readiness_check(
origin: OriginFor<T>,
Expand All @@ -1130,7 +1130,7 @@ pub mod pallet {
}

/// Called only by other chains through a query response xcm message
#[pallet::call_index(24)]
#[pallet::call_index(18)]
#[pallet::weight(Weight::from_parts(1000, 0))]
pub fn migration_check_response(
origin: OriginFor<T>,
Expand All @@ -1142,7 +1142,7 @@ pub mod pallet {
Self::do_migration_check_response(location, query_id, response)
}

#[pallet::call_index(26)]
#[pallet::call_index(19)]
#[pallet::weight(Weight::from_parts(1000, 0))]
pub fn send_pallet_migration_for(
origin: OriginFor<T>,
Expand All @@ -1153,7 +1153,7 @@ pub mod pallet {
Self::do_send_pallet_migration_for(project_id, participant)
}

#[pallet::call_index(27)]
#[pallet::call_index(20)]
#[pallet::weight(Weight::from_parts(1000, 0))]
pub fn confirm_pallet_migrations(
origin: OriginFor<T>,
Expand All @@ -1165,7 +1165,7 @@ pub mod pallet {
Self::do_confirm_pallet_migrations(location, query_id, response)
}

#[pallet::call_index(38)]
#[pallet::call_index(21)]
#[pallet::weight(Weight::from_parts(1000, 0))]
pub fn confirm_offchain_migration(
origin: OriginFor<T>,
Expand All @@ -1177,7 +1177,7 @@ pub mod pallet {
Self::do_confirm_offchain_migration(project_id, caller, participant)
}

#[pallet::call_index(28)]
#[pallet::call_index(22)]
#[pallet::weight(WeightInfoOf::<T>::end_evaluation_success(
<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1,
))]
Expand All @@ -1186,14 +1186,14 @@ pub mod pallet {
Self::do_evaluation_end(project_id)
}

#[pallet::call_index(29)]
#[pallet::call_index(23)]
#[pallet::weight(WeightInfoOf::<T>::start_auction_manually(<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1))]
pub fn root_do_auction_opening(origin: OriginFor<T>, project_id: ProjectId) -> DispatchResultWithPostInfo {
ensure_root(origin)?;
Self::do_start_auction_opening(T::PalletId::get().into_account_truncating(), project_id)
}

#[pallet::call_index(30)]
#[pallet::call_index(24)]
#[pallet::weight(WeightInfoOf::<T>::start_auction_closing_phase(
<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1,
))]
Expand All @@ -1205,7 +1205,7 @@ pub mod pallet {
Self::do_start_auction_closing(project_id)
}

#[pallet::call_index(31)]
#[pallet::call_index(25)]
#[pallet::weight(WeightInfoOf::<T>::end_auction_closing(
<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1,
<T as Config>::MaxBidsPerProject::get() / 2,
Expand All @@ -1226,7 +1226,7 @@ pub mod pallet {
Self::do_end_auction_closing(project_id)
}

#[pallet::call_index(32)]
#[pallet::call_index(26)]
#[pallet::weight(WeightInfoOf::<T>::start_community_funding(
<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1,
<T as Config>::MaxBidsPerProject::get() / 2,
Expand All @@ -1247,7 +1247,7 @@ pub mod pallet {
Self::do_start_community_funding(project_id)
}

#[pallet::call_index(33)]
#[pallet::call_index(27)]
#[pallet::weight(WeightInfoOf::<T>::start_remainder_funding(
<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1,
))]
Expand All @@ -1256,7 +1256,7 @@ pub mod pallet {
Self::do_start_remainder_funding(project_id)
}

#[pallet::call_index(34)]
#[pallet::call_index(28)]
#[pallet::weight(WeightInfoOf::<T>::end_funding_automatically_rejected_evaluators_slashed(
<T as Config>::MaxProjectsToUpdateInsertionAttempts::get() - 1,
)
Expand All @@ -1275,7 +1275,7 @@ pub mod pallet {
Self::do_end_funding(project_id)
}

#[pallet::call_index(36)]
#[pallet::call_index(29)]
#[pallet::weight(WeightInfoOf::<T>::project_decision())]
pub fn root_do_project_decision(
origin: OriginFor<T>,
Expand All @@ -1286,7 +1286,7 @@ pub mod pallet {
Self::do_project_decision(project_id, decision)
}

#[pallet::call_index(37)]
#[pallet::call_index(30)]
#[pallet::weight(WeightInfoOf::<T>::start_settlement_funding_success()
.max(WeightInfoOf::<T>::start_settlement_funding_failure()))]
pub fn root_do_start_settlement(origin: OriginFor<T>, project_id: ProjectId) -> DispatchResultWithPostInfo {
Expand Down

0 comments on commit f3f3bb7

Please sign in to comment.