Function ink_env::terminate_contract
source · pub fn terminate_contract<E>(beneficiary: E::AccountId) -> !where
E: Environment,
Expand description
Terminates the existence of the currently executed smart contract.
This removes the calling account and transfers all remaining balance to the given beneficiary.
§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.