referrerpolicy=no-referrer-when-downgrade

Function pallet_revive::pallet::dispatchables::set_code

source ·
pub fn set_code<T: Config>(dest: H160, code_hash: H256)
Expand description

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.

§Warning: Doc-Only

This function is an automatically generated, and is doc-only, uncallable stub. See the real version in Pallet::set_code.