pub fn renounce_ownership() 
Expand description

Revokes ownership of the current owner and disallows any new owners.

Reverts

  • When the sender is not the owner.

Number of Storage Accesses

  • Reads: 1
  • Writes: 1

Examples

use sway_libs::ownership::{_owner, renounce_ownership};

fn foo() {
    assert(_owner() == State::Initialized(Identity::Address(Address::zero()));
    renounce_ownership();
    assert(_owner() == State::Revoked);
}