pub fn _set_proxy_target(new_target: ContractId) 
Expand description

Change the target contract of a proxy contract.

Arguments

  • new_target: [ContractId] - The new proxy contract to which all fallback calls will be passed.

Number of Storage Accesses

  • Writes: 1

Examples

use sway_libs::upgradability::{_proxy_target, _set_proxy_target};

fn foo() {
    assert(_proxy_target() == None);

    let new_target = ContractId::zero();
    _set_proxy_target(new_target);

    assert(_proxy_target() == Some(new_target));
}