Pallet Assets: Create new asset classes from genesis config (#9742)

* Pallet Assets: Allow creating asset classes from genesis config

* Add accounts and metadata to genesis config

* whitespace fixes

* Update more chainspecs

* Run rustfmt over code

* More formatting fixes

* Update frame/assets/src/lib.rs

Improve error message

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

* Update frame/assets/src/lib.rs

Improve error message

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>

Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Vincent Geddes
2021-09-30 18:32:29 +02:00
committed by GitHub
parent 74475e602b
commit 653f299b95
6 changed files with 132 additions and 5 deletions
+10
View File
@@ -784,3 +784,13 @@ fn balance_conversion_should_work() {
);
});
}
#[test]
fn assets_from_genesis_should_exist() {
new_test_ext().execute_with(|| {
assert!(Asset::<Test>::contains_key(999));
assert!(Metadata::<Test>::contains_key(999));
assert_eq!(Assets::balance(999, 1), 100);
assert_eq!(Assets::total_supply(999), 100);
});
}