-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Manta] unfilter utility for batched token transfer (#284)
* unfilter utility for batched token transfer
- Loading branch information
Showing
5 changed files
with
123 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// Copyright 2020-2021 Manta Network. | ||
// This file is part of Manta. | ||
|
||
// Manta is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Manta is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Manta. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! Autogenerated weights for pallet_utility | ||
//! | ||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev | ||
//! DATE: 2021-11-26, STEPS: `50`, REPEAT: 20, LOW RANGE: `[]`, HIGH RANGE: `[]` | ||
//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("calamari-dev"), DB CACHE: 128 | ||
// Executed Command: | ||
// manta | ||
// benchmark | ||
// --chain=calamari-dev | ||
// --pallet=pallet_utility | ||
// --extrinsic=* | ||
// --execution=Wasm | ||
// --wasm-execution=Compiled | ||
// --heap-pages=4096 | ||
// --repeat=20 | ||
// --steps=50 | ||
// --template=.github/resources/frame-weight-template.hbs | ||
// --output=pallet_utility.rs | ||
|
||
|
||
#![cfg_attr(rustfmt, rustfmt_skip)] | ||
#![allow(unused_parens)] | ||
#![allow(unused_imports)] | ||
|
||
use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}}; | ||
use sp_std::marker::PhantomData; | ||
|
||
/// Weight functions needed for pallet_utility. | ||
pub trait WeightInfo { | ||
fn batch(c: u32, ) -> Weight; | ||
fn as_derivative() -> Weight; | ||
fn batch_all(c: u32, ) -> Weight; | ||
} | ||
|
||
/// Weights for pallet_utility using the Substrate node and recommended hardware. | ||
pub struct SubstrateWeight<T>(PhantomData<T>); | ||
impl<T: frame_system::Config> pallet_utility::WeightInfo for SubstrateWeight<T> { | ||
fn batch(c: u32, ) -> Weight { | ||
(43_160_000 as Weight) | ||
// Standard Error: 6_000 | ||
.saturating_add((14_311_000 as Weight).saturating_mul(c as Weight)) | ||
} | ||
fn as_derivative() -> Weight { | ||
(7_671_000 as Weight) | ||
} | ||
fn batch_all(c: u32, ) -> Weight { | ||
(26_924_000 as Weight) | ||
// Standard Error: 4_000 | ||
.saturating_add((15_469_000 as Weight).saturating_mul(c as Weight)) | ||
} | ||
} | ||
|
||
// For backwards compatibility and tests | ||
impl WeightInfo for () { | ||
fn batch(c: u32, ) -> Weight { | ||
(43_160_000 as Weight) | ||
// Standard Error: 6_000 | ||
.saturating_add((14_311_000 as Weight).saturating_mul(c as Weight)) | ||
} | ||
fn as_derivative() -> Weight { | ||
(7_671_000 as Weight) | ||
} | ||
fn batch_all(c: u32, ) -> Weight { | ||
(26_924_000 as Weight) | ||
// Standard Error: 4_000 | ||
.saturating_add((15_469_000 as Weight).saturating_mul(c as Weight)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters