Skip to content

Commit

Permalink
Add asset registry pallet to Pendulum runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ebma committed Jul 14, 2023
1 parent c722147 commit f726d18
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions runtime/pendulum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ sp-transaction-pool = {git = "https://github.com/paritytech/substrate", default-
sp-version = {git = "https://github.com/paritytech/substrate", default-features = false, branch = "polkadot-v0.9.40"}

# Open Runtime Module Library
orml-asset-registry = {git = "https://github.com/open-web3-stack/open-runtime-module-library.git", default-features = false, branch = "polkadot-v0.9.40" }
orml-currencies = {git = "https://github.com/open-web3-stack/open-runtime-module-library.git", default-features = false, branch = "polkadot-v0.9.40" }
orml-traits = {git = "https://github.com/open-web3-stack/open-runtime-module-library.git", default-features = false, branch = "polkadot-v0.9.40" }
orml-tokens = {git = "https://github.com/open-web3-stack/open-runtime-module-library.git", default-features = false, branch = "polkadot-v0.9.40" }
Expand Down Expand Up @@ -131,6 +132,7 @@ std = [
"frame-support/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
"orml-asset-registry/std",
"orml-currencies/std",
"orml-traits/std",
"orml-tokens/std",
Expand Down
16 changes: 14 additions & 2 deletions runtime/pendulum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ use frame_system::{
pub use sp_runtime::{traits::AccountIdConversion, MultiAddress, Perbill, Permill, Perquintill};

use runtime_common::{
opaque, AccountId, Amount, AuraId, Balance, BlockNumber, Hash, Index, ReserveIdentifier,
Signature, EXISTENTIAL_DEPOSIT, MILLIUNIT, NANOUNIT, UNIT,
asset_registry, opaque, AccountId, Amount, AuraId, Balance, BlockNumber, Hash, Index,
ReserveIdentifier, Signature, EXISTENTIAL_DEPOSIT, MILLIUNIT, NANOUNIT, UNIT,
};

use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
Expand Down Expand Up @@ -728,6 +728,16 @@ impl orml_currencies::Config for Runtime {
type WeightInfo = ();
}

impl orml_asset_registry::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type CustomMetadata = asset_registry::CustomMetadata;
type AssetId = CurrencyId;
type AuthorityOrigin = asset_registry::AssetAuthority<RuntimeOrigin>;
type AssetProcessor = asset_registry::CustomAssetProcessor;
type Balance = Balance;
type WeightInfo = weights::orml_asset_registry::WeightInfo<Runtime>;
}

parameter_types! {
pub const MinBlocksPerRound: BlockNumber = HOURS;
pub const DefaultBlocksPerRound: BlockNumber = 2 * HOURS;
Expand Down Expand Up @@ -1001,6 +1011,8 @@ construct_runtime!(

ZenlinkProtocol: zenlink_protocol::{Pallet, Call, Storage, Event<T>} = 59,

AssetRegistry: orml_asset_registry::{Pallet, Storage, Call, Event<T>, Config<T>} = 91,

VestingManager: vesting_manager::{Pallet, Call, Event<T>} = 100
}
);
Expand Down

0 comments on commit f726d18

Please sign in to comment.