Skip to content

Commit

Permalink
Add asset registry pallet to Amplitude runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ebma committed Jul 14, 2023
1 parent 80ec897 commit c722147
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions runtime/amplitude/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,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 @@ -150,6 +151,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/amplitude/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ use frame_system::{
pub use sp_runtime::{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 @@ -819,6 +819,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 @@ -1251,6 +1261,8 @@ construct_runtime!(
VaultRewards: reward::{Pallet, Call, Storage, Event<T>} = 70,
VaultStaking: staking::{Pallet, Storage, Event<T>} = 71,

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 c722147

Please sign in to comment.