Skip to content

Commit

Permalink
Add memo to ulas
Browse files Browse the repository at this point in the history
  • Loading branch information
daniellam258 committed Apr 16, 2022
1 parent 7f8c3eb commit 1299190
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions runtime/ulas/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,7 @@ bholdus-support-nft = { package = "support-nft", path = "../../pallets/support/n
bholdus-support = { path = "../../pallets/support", default-features = false }
bholdus-currencies = { path = "../../pallets/currencies", default-features = false }
bholdus-bridge-native-transfer = { path = "../../pallets/bridge/native-transfer", default-features = false }


pallet-template = { path = "../../pallets/template", default-features = false }
bholdus-memo = { path = "../../pallets/memo", default-features = false }

runtime-chain-extension = { path = "../chain-extension", default-features = false }

Expand All @@ -136,6 +134,7 @@ runtime-benchmarks = [
"bholdus-bridge-native-transfer/runtime-benchmarks",
"bholdus-tokens/runtime-benchmarks",
"bholdus-nft/runtime-benchmarks",
"bholdus-memo/runtime-benchmarks",
"pallet-ethereum/runtime-benchmarks",
]

Expand All @@ -151,7 +150,6 @@ std = [
"pallet-grandpa/std",
"pallet-randomness-collective-flip/std",
"pallet-sudo/std",
"pallet-template/std",
"pallet-timestamp/std",
"pallet-transaction-payment-rpc-runtime-api/std",
"pallet-transaction-payment/std",
Expand Down Expand Up @@ -185,6 +183,7 @@ std = [
"bholdus-primitives/std",
"bholdus-bridge-native-transfer/std",
"bholdus-bridge-native-transfer/std",
"bholdus-memo/std",
"sp-api/std",
"sp-block-builder/std",
"sp-core/std",
Expand Down Expand Up @@ -232,7 +231,6 @@ try-runtime = [
"pallet-grandpa/try-runtime",
"pallet-randomness-collective-flip/try-runtime",
"pallet-sudo/try-runtime",
"pallet-template/try-runtime",
"pallet-timestamp/try-runtime",
"pallet-transaction-payment/try-runtime",
"pallet-staking/try-runtime",
Expand All @@ -256,5 +254,6 @@ try-runtime = [
"pallet-recovery/try-runtime",

"bholdus-bridge-native-transfer/try-runtime",
"bholdus-memo/try-runtime",
]

24 changes: 16 additions & 8 deletions runtime/ulas/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ pub mod constants;
pub mod weights;
pub use constants::{currency::*, fee, time::*};
mod voter_bags;
/// Import the template pallet.
pub use pallet_template;

/// Opaque types. These are used by the CLI to instantiate machinery that don't need to know
/// the specifics of the runtime. They can then be made to be agnostic over specific formats
Expand Down Expand Up @@ -132,7 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 1_000_011,
spec_version: 1_000_015,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 1,
Expand Down Expand Up @@ -1094,9 +1092,17 @@ impl bholdus_bridge_native_transfer::Config for Runtime {
type WeightInfo = bholdus_bridge_native_transfer::weights::SubstrateWeight<Runtime>;
}

/// Configure the pallet-template in pallets/template.
impl pallet_template::Config for Runtime {
/// Configure the bholdus-memo in pallets/memo.
parameter_types! {
pub const ContentLimit: u32 = 320;
}

impl bholdus_memo::Config for Runtime {
type Event = Event;
type UnixTime = Timestamp;
type Currency = Balances;
type WeightInfo = bholdus_memo::weights::SubstrateWeight<Runtime>;
type ContentLimit = ContentLimit;
}

pub struct FindAuthorTruncated<F>(PhantomData<F>);
Expand Down Expand Up @@ -1219,20 +1225,22 @@ construct_runtime!(
Proxy: pallet_proxy::{Pallet, Call, Storage, Event<T>},
Multisig: pallet_multisig::{Pallet, Call, Storage, Event<T>},
Bounties: pallet_bounties::{Pallet, Call, Storage, Event<T>},
BagsList: pallet_bags_list::{Pallet, Call, Storage, Event<T>},

// Bridge support
Mmr: pallet_mmr::{Pallet, Storage},
Beefy: pallet_beefy::{Pallet, Config<T>, Storage},
MmrLeaf: pallet_beefy_mmr::{Pallet, Storage},
BridgeNativeTransfer: bholdus_bridge_native_transfer::{Pallet, Call, Storage, Event<T>, Config<T>},

// Defi
Tokens: bholdus_tokens::{Pallet, Call, Storage, Config<T>, Event<T>},
NFT: bholdus_nft::{Pallet, Call, Event<T>},
BholdusSupportNFT: bholdus_support_nft::{Pallet, Storage, Config<T>},
// Dex: bholdus_dex::{Pallet, Call, Storage, Config<T>, Event<T>},
BagsList: pallet_bags_list::{Pallet, Call, Storage, Event<T>},
// Include the custom logic from the pallet-template in the runtime.
TemplateModule: pallet_template::{Pallet, Call, Storage, Event<T>},

// Others
Memo: bholdus_memo::{Pallet, Call, Storage, Event<T>},

// Frontier EVM
EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>},
Expand Down

0 comments on commit 1299190

Please sign in to comment.