Function ink_env::terminate_contract[][src]

pub fn terminate_contract<T>(beneficiary: T::AccountId) -> ! where
    T: Environment
Expand description

Terminates the existence of the currently executed smart contract without creating a tombstone.

This removes the calling account and transfers all remaining balance to the given beneficiary.

No tombstone will be created, this function kills a contract completely!

Note

This function never returns. Either the termination was successful and the execution of the destroyed contract is halted. Or it failed during the termination which is considered fatal and results in a trap and rollback.