set_code: TxDescriptor<{
    code_hash: FixedSizeBinary<32>;
    dest: FixedSizeBinary<20>;
}>

Privileged function that changes the code of an existing contract.

This takes care of updating refcounts and all other necessary operations. Returns an error if either the code_hash or dest do not exist.

Note

This does not change the address of the contract in question. This means that the contract address is no longer derived from its code hash after calling this dispatchable.