mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-04-28 03:57:59 +00:00
Preserve "deploy" when optimizing pwasm ctor module
When optimizing the constructor module for a PWasm contract the "deploy" symbol is preserved instead of the "call" symbol. Before this change `build` would error for PWasm contracts because `pack_instance` would not find the "deploy" symbol in the optimized contract. Fixes #128
This commit is contained in:
+1
-1
@@ -105,7 +105,7 @@ pub fn build(
|
||||
|
||||
if !skip_optimization {
|
||||
let preserved_exports = match target_runtime {
|
||||
TargetRuntime::PWasm(_) => vec![target_runtime.symbols().call],
|
||||
TargetRuntime::PWasm(_) => vec![target_runtime.symbols().create],
|
||||
TargetRuntime::Substrate(_) => vec![target_runtime.symbols().call, target_runtime.symbols().create],
|
||||
};
|
||||
optimize(&mut ctor_module, preserved_exports)?;
|
||||
|
||||
Reference in New Issue
Block a user