diff --git a/pallets/api/src/fungibles/mod.rs b/pallets/api/src/fungibles/mod.rs index c6fe593c..4c840628 100644 --- a/pallets/api/src/fungibles/mod.rs +++ b/pallets/api/src/fungibles/mod.rs @@ -136,6 +136,7 @@ pub mod pallet { #[pallet::generate_deposit(pub(super) fn deposit_event)] pub enum Event { /// Event emitted when allowance by `owner` to `spender` changes. + // Differing style: event name abides by the PSP22 standard. Approval { /// The token. token: TokenIdOf, @@ -147,6 +148,7 @@ pub mod pallet { value: BalanceOf, }, /// Event emitted when a token transfer occurs. + // Differing style: event name abides by the PSP22 standard. Transfer { /// The token. token: TokenIdOf, @@ -158,7 +160,7 @@ pub mod pallet { value: BalanceOf, }, /// Event emitted when a token is created. - Create { + Created { /// The token identifier. id: TokenIdOf, /// The creator of the token. @@ -379,7 +381,7 @@ pub mod pallet { T::Lookup::unlookup(admin.clone()), min_balance, )?; - Self::deposit_event(Event::Create { id, creator, admin }); + Self::deposit_event(Event::Created { id, creator, admin }); Ok(()) } diff --git a/pallets/api/src/fungibles/tests.rs b/pallets/api/src/fungibles/tests.rs index a3929551..240a0e5c 100644 --- a/pallets/api/src/fungibles/tests.rs +++ b/pallets/api/src/fungibles/tests.rs @@ -318,7 +318,7 @@ fn create_works() { assert!(!Assets::asset_exists(id)); assert_ok!(Fungibles::create(signed(creator), id, admin, 100)); assert!(Assets::asset_exists(id)); - System::assert_last_event(Event::Create { id, creator, admin }.into()); + System::assert_last_event(Event::Created { id, creator, admin }.into()); // Check error works for `Assets::create()`. assert_noop!(Fungibles::create(signed(creator), id, admin, 100), AssetsError::InUse); });