Skip to content
Snippets Groups Projects
Select Git revision
  • 7438495
  • master default protected
  • polkadart-stuff
  • dev
  • provider-to-riverpod
  • implementLightnode
  • subscribesSplit
  • hugo_RML16
  • refactorOnboardingSlideshow
  • duniterV1Latest
  • scanNetwork
  • dubp_rs
  • v0.2.2+118
  • v0.2.1+113
  • polkawallet-sdk-latest
  • v0.1.29+111
  • v0.1.28+109
  • v0.1.27+108
  • v0.1.26+107
  • v0.1.25+106
  • v0.1.25+105
  • v0.1.24+102
  • v0.1.23+101
  • v0.1.22+100
  • v0.1.22+99
  • v0.1.21+98
  • v0.1.21+97
  • v0.1.21+96
  • v0.1.21+95
  • v0.1.21+94
  • v0.1.21+93
  • v0.1.20+92
32 results

README.md

Blame
  • pallets_config.rs 28.36 KiB
    // Copyright 2021 Axiom-Team
    //
    // This file is part of Duniter-v2S.
    //
    // Duniter-v2S is free software: you can redistribute it and/or modify
    // it under the terms of the GNU Affero General Public License as published by
    // the Free Software Foundation, version 3 of the License.
    //
    // Duniter-v2S 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 Affero General Public License for more details.
    //
    // You should have received a copy of the GNU Affero General Public License
    // along with Duniter-v2S. If not, see <https://www.gnu.org/licenses/>.
    
    #[macro_export]
    macro_rules! pallets_config {
        {$($custom:tt)*} => {
            $($custom)*
    
            // SYSTEM //
    
            parameter_types! {
                pub const Version: RuntimeVersion = VERSION;
            }
    
            impl frame_system::Config for Runtime {
                /// The basic call filter to use in dispatchable.
                type BaseCallFilter = BaseCallFilter;
                /// Block & extrinsics weights: base values and limits.
                type BlockWeights = BlockWeights;
                /// The maximum length of a block (in bytes).
                type BlockLength = BlockLength;
                /// The identifier used to distinguish between accounts.
                type AccountId = AccountId;
                /// The aggregated dispatch type that is available for extrinsics.
                type RuntimeCall = RuntimeCall;
                /// The lookup mechanism to get account ID from whatever is passed in dispatchers.
                type Lookup = AccountIdLookup<AccountId, ()>;
                /// The index type for storing how many extrinsics an account has signed.
                type Index = Index;
                /// The index type for blocks.
                type BlockNumber = BlockNumber;
                /// The type for hashing blocks and tries.
                type Hash = Hash;
                /// The hashing algorithm used.
                type Hashing = BlakeTwo256;
                /// The header type.
                type Header = generic::Header<BlockNumber, BlakeTwo256>;
                /// The ubiquitous event type.
                type RuntimeEvent = RuntimeEvent;
                /// The ubiquitous origin type.
                type RuntimeOrigin = RuntimeOrigin;
                /// Maximum number of block number to block hash mappings to keep (oldest pruned first).
                type BlockHashCount = BlockHashCount;
                /// The weight of database operations that the runtime can invoke.
                type DbWeight = DbWeight;
                /// Version of the runtime.
                type Version = Version;
                /// Converts a module to the index of the module in `construct_runtime!`.
                ///
                /// This type is being generated by `construct_runtime!`.
                type PalletInfo = PalletInfo;
                /// What to do if a new account is created.
                type OnNewAccount = ();
                /// What to do if an account is fully reaped from the system.
                type OnKilledAccount = ();
                /// The data to be stored in an account.
                type AccountData = pallet_duniter_account::AccountData<Balance, IdtyIndex>;