Skip to content

Commit

Permalink
Fix formatting and license notes (#1388)
Browse files Browse the repository at this point in the history
* Fix formatting

* Fix copyright
  • Loading branch information
maltekliemann authored Oct 24, 2024
1 parent 2660096 commit a56f929
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 16 deletions.
17 changes: 17 additions & 0 deletions primitives/src/traits/combinatorial_tokens_benchmark_helper.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2024 Forecasting Technologies LTD.
//
// This file is part of Zeitgeist.
//
// Zeitgeist 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.
//
// Zeitgeist 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 Zeitgeist. If not, see <https://www.gnu.org/licenses/>.

use alloc::vec::Vec;
use sp_runtime::DispatchResult;

Expand Down
17 changes: 17 additions & 0 deletions zrml/combinatorial-tokens/src/mock/types/benchmark_helper.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2024 Forecasting Technologies LTD.
//
// This file is part of Zeitgeist.
//
// Zeitgeist 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.
//
// Zeitgeist 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 Zeitgeist. If not, see <https://www.gnu.org/licenses/>.

use crate::{
mock::{runtime::Runtime, types::MockPayout},
BalanceOf, MarketIdOf,
Expand Down
32 changes: 16 additions & 16 deletions zrml/combinatorial-tokens/src/weights.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ use frame_support::{traits::Get, weights::Weight};
/// Trait containing the required functions for weight retrival within
/// zrml_combinatorial_tokens (automatically generated)
pub trait WeightInfoZeitgeist {
fn split_position_vertical_sans_parent(n: u32, ) -> Weight;
fn split_position_vertical_with_parent(n: u32, ) -> Weight;
fn split_position_horizontal(n: u32, ) -> Weight;
fn merge_position_vertical_sans_parent(n: u32, ) -> Weight;
fn merge_position_vertical_with_parent(n: u32, ) -> Weight;
fn merge_position_horizontal(n: u32, ) -> Weight;
fn redeem_position_sans_parent(n: u32, ) -> Weight;
fn redeem_position_with_parent(n: u32, ) -> Weight;
fn split_position_vertical_sans_parent(n: u32) -> Weight;
fn split_position_vertical_with_parent(n: u32) -> Weight;
fn split_position_horizontal(n: u32) -> Weight;
fn merge_position_vertical_sans_parent(n: u32) -> Weight;
fn merge_position_vertical_with_parent(n: u32) -> Weight;
fn merge_position_horizontal(n: u32) -> Weight;
fn redeem_position_sans_parent(n: u32) -> Weight;
fn redeem_position_with_parent(n: u32) -> Weight;
}

/// Weight functions for zrml_combinatorial_tokens (automatically generated)
Expand All @@ -71,7 +71,7 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
/// Storage: `Tokens::TotalIssuance` (r:32 w:32)
/// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// The range of component `n` is `[2, 32]`.
fn split_position_vertical_sans_parent(_n: u32, ) -> Weight {
fn split_position_vertical_sans_parent(_n: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `441`
// Estimated: `84574`
Expand All @@ -87,7 +87,7 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
/// Storage: `Tokens::TotalIssuance` (r:33 w:33)
/// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// The range of component `n` is `[2, 32]`.
fn split_position_vertical_with_parent(_n: u32, ) -> Weight {
fn split_position_vertical_with_parent(_n: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `671`
// Estimated: `87186`
Expand All @@ -103,7 +103,7 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
/// Storage: `Tokens::TotalIssuance` (r:33 w:33)
/// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// The range of component `n` is `[2, 32]`.
fn split_position_horizontal(_n: u32, ) -> Weight {
fn split_position_horizontal(_n: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `633`
// Estimated: `87186`
Expand All @@ -121,7 +121,7 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`)
/// The range of component `n` is `[2, 32]`.
fn merge_position_vertical_sans_parent(_n: u32, ) -> Weight {
fn merge_position_vertical_sans_parent(_n: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `624 + n * (160 ±0)`
// Estimated: `84574`
Expand All @@ -137,7 +137,7 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
/// Storage: `Tokens::TotalIssuance` (r:33 w:33)
/// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// The range of component `n` is `[2, 32]`.
fn merge_position_vertical_with_parent(_n: u32, ) -> Weight {
fn merge_position_vertical_with_parent(_n: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `518 + n * (160 ±0)`
// Estimated: `87186`
Expand All @@ -153,7 +153,7 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
/// Storage: `Tokens::TotalIssuance` (r:33 w:33)
/// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// The range of component `n` is `[2, 32]`.
fn merge_position_horizontal(_n: u32, ) -> Weight {
fn merge_position_horizontal(_n: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `480 + n * (160 ±0)`
// Estimated: `87186`
Expand All @@ -171,7 +171,7 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
/// Storage: `System::Account` (r:1 w:1)
/// Proof: `System::Account` (`max_values`: None, `max_size`: Some(132), added: 2607, mode: `MaxEncodedLen`)
/// The range of component `n` is `[2, 32]`.
fn redeem_position_sans_parent(_n: u32, ) -> Weight {
fn redeem_position_sans_parent(_n: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `780`
// Estimated: `4173`
Expand All @@ -187,7 +187,7 @@ impl<T: frame_system::Config> WeightInfoZeitgeist for WeightInfo<T> {
/// Storage: `Tokens::TotalIssuance` (r:2 w:2)
/// Proof: `Tokens::TotalIssuance` (`max_values`: None, `max_size`: Some(57), added: 2532, mode: `MaxEncodedLen`)
/// The range of component `n` is `[2, 32]`.
fn redeem_position_with_parent(_n: u32, ) -> Weight {
fn redeem_position_with_parent(_n: u32) -> Weight {
// Proof Size summary in bytes:
// Measured: `674`
// Estimated: `6214`
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2024 Forecasting Technologies LTD.
//
// This file is part of Zeitgeist.
//
// Zeitgeist 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.
//
// Zeitgeist 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 Zeitgeist. If not, see <https://www.gnu.org/licenses/>.

use crate::{BalanceOf, Config, MarketIdOf};
use alloc::vec::Vec;
use core::marker::PhantomData;
Expand Down
17 changes: 17 additions & 0 deletions zrml/prediction-markets/src/types/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
// Copyright 2024 Forecasting Technologies LTD.
//
// This file is part of Zeitgeist.
//
// Zeitgeist 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.
//
// Zeitgeist 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 Zeitgeist. If not, see <https://www.gnu.org/licenses/>.

mod combinatorial_tokens_benchmark_helper;

pub use combinatorial_tokens_benchmark_helper::PredictionMarketsCombinatorialTokensBenchmarkHelper;

0 comments on commit a56f929

Please sign in to comment.