mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Adds force_origin support (#13845)
* Adds force_origin support * Moves a couple of tests to showcase v2 with force_origin * Adds remaining tests * adds documentation * minor * adds test for invalid origin * ".git/.scripts/commands/fmt/fmt.sh" * updates param to use MaxCalls * Fixes compilation error * Updates doc comment * Fixes test outputs * Fixes test output * ".git/.scripts/commands/fmt/fmt.sh" --------- Co-authored-by: command-bot <>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
use frame_benchmarking::v2::*;
|
||||
#[allow(unused_imports)]
|
||||
use frame_support_test::Config;
|
||||
use frame_support_test::Call;
|
||||
|
||||
#[benchmarks]
|
||||
mod benches {
|
||||
use super::*;
|
||||
|
||||
#[benchmark]
|
||||
fn bench() {
|
||||
#[extrinsic_call]
|
||||
thing(1);
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
@@ -0,0 +1,16 @@
|
||||
error[E0599]: no variant or associated item named `new_call_variant_thing` found for enum `Call` in the current scope
|
||||
--> tests/benchmark_ui/invalid_origin.rs:6:1
|
||||
|
|
||||
6 | #[benchmarks]
|
||||
| ^^^^^^^^^^^^^ variant or associated item not found in `Call<T>`
|
||||
|
|
||||
= note: this error originates in the attribute macro `benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error[E0277]: the trait bound `<T as frame_support_test::Config>::RuntimeOrigin: From<{integer}>` is not satisfied
|
||||
--> tests/benchmark_ui/invalid_origin.rs:6:1
|
||||
|
|
||||
6 | #[benchmarks]
|
||||
| ^^^^^^^^^^^^^ the trait `From<{integer}>` is not implemented for `<T as frame_support_test::Config>::RuntimeOrigin`
|
||||
|
|
||||
= note: required for `{integer}` to implement `Into<<T as frame_support_test::Config>::RuntimeOrigin>`
|
||||
= note: this error originates in the attribute macro `benchmarks` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
Reference in New Issue
Block a user