pub fn update(env: Env, new_wasm_hash: BytesN<32>) {
let admin: Address = env.storage().instance().get(&DataKey::Admin).unwrap();
admin.require_auth();
env.deployer().update_current_contract_wasm(new_wasm_hash);
}
Is it possible to update the contract, if the admin is actually under the persistent storage?
Right now the function fails, since it can't find the value under the instance storage (which is interesting, because it used to be an instance - the value should be there from before).
Is it possible to somehow inject a function into a contract? For example in another blockchain during migration the function is being read from the target contract, not from the source.