contracts: Add event field names (#9896)

* Add struct variant fields to contract Event

* Update comments and usages

* Fmt
This commit is contained in:
Andrew Jones
2021-09-30 09:12:25 +01:00
committed by GitHub
parent 817d0d26d5
commit e0742bcd6d
4 changed files with 57 additions and 45 deletions
@@ -59,7 +59,7 @@ where
Some(module) => increment_64(&mut module.refcount),
None => {
*existing = Some(prefab_module);
Contracts::<T>::deposit_event(Event::CodeStored(code_hash))
Contracts::<T>::deposit_event(Event::CodeStored { code_hash })
},
});
}
@@ -170,7 +170,7 @@ where
T::AccountId: UncheckedFrom<T::Hash> + AsRef<[u8]>,
{
<PristineCode<T>>::remove(code_hash);
Contracts::<T>::deposit_event(Event::CodeRemoved(code_hash))
Contracts::<T>::deposit_event(Event::CodeRemoved { code_hash })
}
/// Increment the refcount panicking if it should ever overflow (which will not happen).