mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 05:21:08 +00:00
Upgrade wasm crate dependencies (#12173)
* Upgrade wasm crate dependencies * New wasmi version changed error output a bit * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts * ".git/.scripts/bench-bot.sh" pallet dev pallet_contracts Co-authored-by: command-bot <>
This commit is contained in:
committed by
GitHub
parent
6c5d4668d0
commit
5afe00d89c
@@ -195,7 +195,7 @@ where
|
||||
for func in def.imported_functions {
|
||||
let sig = builder::signature()
|
||||
.with_params(func.params)
|
||||
.with_results(func.return_type.into_iter().collect())
|
||||
.with_results(func.return_type)
|
||||
.build_sig();
|
||||
let sig = contract.push_signature(sig);
|
||||
contract = contract
|
||||
@@ -254,9 +254,9 @@ where
|
||||
code = inject_stack_metering::<T>(code);
|
||||
}
|
||||
|
||||
let code = code.to_bytes().unwrap();
|
||||
let code = code.into_bytes().unwrap();
|
||||
let hash = T::Hashing::hash(&code);
|
||||
Self { code, hash, memory: def.memory }
|
||||
Self { code: code.into(), hash, memory: def.memory }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -285,11 +285,11 @@ where
|
||||
.find_map(|e| if let External::Memory(mem) = e.external() { Some(mem) } else { None })
|
||||
.unwrap()
|
||||
.limits();
|
||||
let code = module.to_bytes().unwrap();
|
||||
let code = module.into_bytes().unwrap();
|
||||
let hash = T::Hashing::hash(&code);
|
||||
let memory =
|
||||
ImportedMemory { min_pages: limits.initial(), max_pages: limits.maximum().unwrap() };
|
||||
Self { code, hash, memory: Some(memory) }
|
||||
Self { code: code.into(), hash, memory: Some(memory) }
|
||||
}
|
||||
|
||||
/// Creates a wasm module with an empty `call` and `deploy` function and nothing else.
|
||||
|
||||
@@ -54,7 +54,7 @@ impl<'a, T: Config> ContractModule<'a, T> {
|
||||
elements::deserialize_buffer(original_code).map_err(|_| "Can't decode wasm code")?;
|
||||
|
||||
// Make sure that the module is valid.
|
||||
validate_module::<PlainValidator>(&module).map_err(|_| "Module is not valid")?;
|
||||
validate_module::<PlainValidator>(&module, ()).map_err(|_| "Module is not valid")?;
|
||||
|
||||
// Return a `ContractModule` instance with
|
||||
// __valid__ module.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user