contracts: Emit event on contract termination (#8014)

* contracts: Remove redundant bool argument from the eviction event

* contracts: Improve event documentation

* contracts: Emit event on contract termination
This commit is contained in:
Alexander Theißen authored and GitHub committed 2021-02-02 10:48:35 +00:00
1 parent de838f9464
commit 815409f31e
4 files changed
+74 -27

No files matched your search

+2 -1
View File
@@ -582,6 +582,7 @@ where
)?;
if let Some(ContractInfo::Alive(info)) = ContractInfoOf::<T>::take(&self_id) {
Storage::<T>::queue_trie_for_deletion(&info)?;
Contracts::<T>::deposit_event(RawEvent::Terminated(self_id, beneficiary.clone()));
Ok(())
} else {
panic!(
@@ -671,7 +672,7 @@ where
fn deposit_event(&mut self, topics: Vec<T::Hash>, data: Vec<u8>) {
deposit_event::<Self::T>(
topics,
RawEvent::ContractExecution(self.ctx.self_account.clone(), data)
RawEvent::ContractEmitted(self.ctx.self_account.clone(), data)
);
}