This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Runtime: Treasury spends various asset kinds #7427
Open
muharem
wants to merge
23
commits into
master
Choose a base branch
from
muharem-multi-asset-treasury
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 14 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
07ab21f
multi-asset treasury
muharem 6f78c24
weights
muharem 5ba47db
benchmarks fix
muharem bd45a32
enable features for asset-rate pallet
muharem d15bacb
benchmarks impls and weights
muharem d98fcaa
fix runtime commont tests
muharem 9632b1a
benchmarks fixes
muharem cac07bc
Merge remote-tracking branch 'origin/master' into muharem-multi-asset…
muharem 9063841
void spend
muharem 5439b9d
use reject origin
muharem 137415e
fix type definition
muharem 8595f44
Add missing features
ggwpez 0bb118c
Merge remote-tracking branch 'origin/master' into muharem-multi-asset…
muharem 1d48a86
new fn for LocatableAssetId type
muharem db809d5
Merge remote-tracking branch 'origin/master' into muharem-multi-asset…
muharem 9bac3ac
fixes after master merge
muharem 0653c73
Merge remote-tracking branch 'origin/master' into muharem-multi-asset…
778f084
pallet-treasury deps in Cargo.lock, docify and sp-core
muharem 3348a45
Merge remote-tracking branch 'origin/master' into muharem-multi-asset…
7215bfc
add asset kind type
muharem 7189d45
Merge remote-tracking branch 'origin/master' into muharem-multi-asset…
muharem 9c0bf72
remove Balance type from asset-rate pallet config
muharem 533fac0
asset kind rename
muharem File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,86 @@ | ||
// Copyright (C) Parity Technologies (UK) Ltd. | ||
// This file is part of Polkadot. | ||
|
||
// Polkadot 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. | ||
|
||
// Polkadot 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 Polkadot. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
//! Autogenerated weights for `pallet_asset_rate` | ||
//! | ||
//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev | ||
//! DATE: 2023-07-03, STEPS: `50`, REPEAT: `2`, LOW RANGE: `[]`, HIGH RANGE: `[]` | ||
//! WORST CASE MAP SIZE: `1000000` | ||
//! HOSTNAME: `cob`, CPU: `<UNKNOWN>` | ||
//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: Some("kusama-dev"), DB CACHE: 1024 | ||
|
||
// Executed Command: | ||
// ./target/debug/polkadot | ||
// benchmark | ||
// pallet | ||
// --chain=kusama-dev | ||
// --steps=50 | ||
// --repeat=2 | ||
// --pallet=pallet_asset_rate | ||
// --extrinsic=* | ||
// --wasm-execution=compiled | ||
// --heap-pages=4096 | ||
// --output=./runtime/kusama/src/weights/ | ||
// --header=./file_header.txt | ||
|
||
#![cfg_attr(rustfmt, rustfmt_skip)] | ||
#![allow(unused_parens)] | ||
#![allow(unused_imports)] | ||
#![allow(missing_docs)] | ||
|
||
use frame_support::{traits::Get, weights::Weight}; | ||
use core::marker::PhantomData; | ||
|
||
/// Weight functions for `pallet_asset_rate`. | ||
pub struct WeightInfo<T>(PhantomData<T>); | ||
impl<T: frame_system::Config> pallet_asset_rate::WeightInfo for WeightInfo<T> { | ||
/// Storage: AssetRate ConversionRateToNative (r:1 w:1) | ||
/// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) | ||
fn create() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `42` | ||
// Estimated: `4702` | ||
// Minimum execution time: 53_000_000 picoseconds. | ||
Weight::from_parts(55_000_000, 0) | ||
.saturating_add(Weight::from_parts(0, 4702)) | ||
.saturating_add(T::DbWeight::get().reads(1)) | ||
.saturating_add(T::DbWeight::get().writes(1)) | ||
} | ||
/// Storage: AssetRate ConversionRateToNative (r:1 w:1) | ||
/// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) | ||
fn update() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `110` | ||
// Estimated: `4702` | ||
// Minimum execution time: 60_000_000 picoseconds. | ||
Weight::from_parts(60_000_000, 0) | ||
.saturating_add(Weight::from_parts(0, 4702)) | ||
.saturating_add(T::DbWeight::get().reads(1)) | ||
.saturating_add(T::DbWeight::get().writes(1)) | ||
} | ||
/// Storage: AssetRate ConversionRateToNative (r:1 w:1) | ||
/// Proof: AssetRate ConversionRateToNative (max_values: None, max_size: Some(1237), added: 3712, mode: MaxEncodedLen) | ||
fn remove() -> Weight { | ||
// Proof Size summary in bytes: | ||
// Measured: `110` | ||
// Estimated: `4702` | ||
// Minimum execution time: 66_000_000 picoseconds. | ||
Weight::from_parts(74_000_000, 0) | ||
.saturating_add(Weight::from_parts(0, 4702)) | ||
.saturating_add(T::DbWeight::get().reads(1)) | ||
.saturating_add(T::DbWeight::get().writes(1)) | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of hardcoding
18
here, I propose that we fetch it programmatically using thePalletInfo
trait.