mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-12-01 03:29:55 +00:00
fix: EnsureOrigin try_successful_origin and snowbridge rename
- Fix pezpallet-welati EnsureOrigin implementations (3 fixes)
- Remove incorrect #[cfg(not(feature = "runtime-benchmarks"))] blocks
- Affects EnsureSerok, EnsureParlementer, EnsureDiwan
- Fix asset-hub-zagros governance origins macros (2 fixes)
- Remove non-benchmark try_successful_origin from decl_unit_ensures!
- Remove non-benchmark try_successful_origin from decl_ensure!
- Rename snowbridge -> pezsnowbridge for consistency
- Update WORKFLOW_PLAN.md with build status and package names
- Correct package names: pezkuwi-teyrchain-bin, pezstaging-node-cli
- Mark completed builds: pezkuwi, pezkuwi-teyrchain-bin,
pezstaging-node-cli, teyrchain-template-node
This commit is contained in:
1 parent
ee2385e28f
commit
3ddf58cef9
194 files changed
+129
-129
No files matched your search
@@ -0,0 +1,47 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-FileCopyrightText: 2023 Snowfork <hello@snowfork.com>
|
||||
use super::*;
|
||||
|
||||
use crate::Pezpallet as InboundQueue;
|
||||
use pezframe_benchmarking::v2::*;
|
||||
use pezframe_support::assert_ok;
|
||||
use pezframe_system::RawOrigin;
|
||||
|
||||
#[benchmarks]
|
||||
mod benchmarks {
|
||||
use super::*;
|
||||
|
||||
#[benchmark]
|
||||
fn submit() -> Result<(), BenchmarkError> {
|
||||
let caller: T::AccountId = whitelisted_caller();
|
||||
|
||||
let create_message = T::Helper::initialize_storage();
|
||||
|
||||
let sovereign_account = sibling_sovereign_account::<T>(1000u32.into());
|
||||
|
||||
let minimum_balance = T::Token::minimum_balance();
|
||||
|
||||
// So that the receiving account exists
|
||||
assert_ok!(T::Token::mint_into(&caller, minimum_balance));
|
||||
// Fund the sovereign account (teyrchain sovereign account) so it can transfer a reward
|
||||
// fee to the caller account
|
||||
assert_ok!(T::Token::mint_into(
|
||||
&sovereign_account,
|
||||
3_000_000_000_000u128
|
||||
.try_into()
|
||||
.unwrap_or_else(|_| panic!("unable to cast sovereign account balance")),
|
||||
));
|
||||
|
||||
#[block]
|
||||
{
|
||||
assert_ok!(InboundQueue::<T>::submit(
|
||||
RawOrigin::Signed(caller.clone()).into(),
|
||||
create_message.event,
|
||||
));
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(InboundQueue, crate::mock::new_tester(), crate::mock::Test);
|
||||
}
|
||||
Reference in new issue
Block a user