Trigger OnKill

Example 1

In this example, this token will only be killed by the owner and reject anything else.

This is to destroy the contract.

contract test {
    import Runtime;
    trigger onKill(from:address)
    {
        Runtime.expect(Runtime.isWitness(owner),"only the owner can kill.");
        return;
    }
}

Last updated