mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-03 14:37:24 +00:00
contracts: Validate code before deployment (#2330)
* Validate module before storing it in code_cache. * Bump version.
This commit is contained in:
committed by
DemiMarie-parity
parent
2a463a7b2a
commit
07268022cc
@@ -72,8 +72,6 @@ pub fn save<T: Trait>(
|
||||
let prefab_module = prepare::prepare_contract::<T, Env>(&original_code, schedule)?;
|
||||
let code_hash = T::Hashing::hash(&original_code);
|
||||
|
||||
// TODO: #1416 validate the code. If the code is not valid, then don't store it.
|
||||
|
||||
<CodeStorage<T>>::insert(code_hash, prefab_module);
|
||||
<PristineCode<T>>::insert(code_hash, original_code);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user