Skip to content

Commit

Permalink
feat: initial implementation of new NFTMigrationTrait trait and final…
Browse files Browse the repository at this point in the history
…ised creation of collections, classes and tokens for for migration pallet
  • Loading branch information
chexware committed Jul 18, 2024
1 parent 4a35f96 commit ab9f8fb
Show file tree
Hide file tree
Showing 6 changed files with 300 additions and 150 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

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

12 changes: 10 additions & 2 deletions pallets/nft-migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,22 @@ frame-support = { workspace = true }
frame-system = { workspace = true }
frame-benchmarking = { workspace = true, optional = true }

pallet-balances = { workspace = true }

core-primitives = { path = "../../traits/core-primitives", default-features = false }
primitives = { package = "bit-country-primitives", path = "../../primitives/metaverse", default-features = false }
pallet-balances = { workspace = true }

[dev-dependencies]
sp-core = { workspace = true }
sp-io = { workspace = true }
smallvec = { workspace = true }
orml-tokens = { workspace = true, default-features = true }
orml-nft = { workspace = true, default-features = true }
orml-traits = { workspace = true, default-features = true }
pallet-nft = { path = "../nft" }
currencies = { path = "../currencies" }
pallet-proxy = { workspace = true, default-features = true }
auction-manager = { package = "auction-manager", path = "../../traits/auction-manager" }

[features]
runtime-benchmarks = [
Expand All @@ -45,5 +53,5 @@ std = [
"frame-support/std",
"frame-system/std",
"frame-benchmarking/std",
"pallet-balances/std"
"pallet-balances/std",
]
10 changes: 6 additions & 4 deletions pallets/nft-migration/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,9 @@ impl<T: Config> Pallet<T> {
let mut response = pending.wait().unwrap();
let body = response.body();
ensure!(!body.error().is_none(), Error::<T>::PioneerDataNotFound);
// TODO: Process data into Vec<(T::AccountId, GroupCollectionId, ClassId, NftMetadata, NftClassData<BalanceOf<T>>)>
// NftClassData<BalanceOf<T>>)> Self::deposit_event(Event::<T>::FetchedClassData);
// TODO: Process data into Vec<(T::AccountId, GroupCollectionId, ClassId, NftMetadata,
// NftClassData<BalanceOf<T>>)> NftClassData<BalanceOf<T>>)>
// Self::deposit_event(Event::<T>::FetchedClassData);
return Ok(vec![]);
}
/// Fetches Pioneer tokens data from database via HTTP
Expand All @@ -256,8 +257,9 @@ impl<T: Config> Pallet<T> {
let mut response = pending.wait().unwrap();
let body = response.body();
ensure!(!body.error().is_none(), Error::<T>::PioneerDataNotFound);
// TODO: Process data into Vec<(T::AccountId, ClassId, TokenId, NftMetadata, NftAssetData<BalanceOf<T>>)>
// NftAssetData<BalanceOf<T>>)> Self::deposit_event(Event::<T>::FetchedTokenData);
// TODO: Process data into Vec<(T::AccountId, ClassId, TokenId, NftMetadata,
// NftAssetData<BalanceOf<T>>)> NftAssetData<BalanceOf<T>>)>
// Self::deposit_event(Event::<T>::FetchedTokenData);
return Ok(vec![]);
}

Expand Down
Loading

0 comments on commit ab9f8fb

Please sign in to comment.