Contracts: Fix legacy uapi (#3994)

Fix some broken legacy definitions of pallet_contracts_uapi storage host
functions
This commit is contained in:
PG Herveou
2024-04-10 07:05:21 +02:00
committed by GitHub
parent df818d2974
commit 2d927b0772
5 changed files with 112 additions and 131 deletions
+4 -3
View File
@@ -243,9 +243,10 @@ impl<T: Config> WasmBlob<T> {
.define("env", "memory", memory)
.expect("We just created the Linker. It has no definitions with this name; qed");
let instance = linker
.instantiate(&mut store, &contract.module)
.map_err(|_| "can't instantiate module with provided definitions")?;
let instance = linker.instantiate(&mut store, &contract.module).map_err(|err| {
log::debug!(target: LOG_TARGET, "failed to instantiate module: {:?}", err);
"can't instantiate module with provided definitions"
})?;
Ok((store, memory, instance))
}