mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 11:11:17 +00:00
contracts: add seal_code_hash and seal_own_code_hash to API (#10933)
* `seal_origin` + tests added * `seal_origin` benchmark added * `seal_code_hash` + tests added * `seal_code_hash` benchmark added * `seal_own_code_hash` + tests added * `seal_own_code_hash` benchmark added * fmt lil fix * akward accident bug fix * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * benchmark fix * `WasmModule::getter()` to take `module_name` arg * test enhanced * fixes based on review feedback * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * Hash left as const to return a ref to it from mock * HASH test val to local const in mock * Apply suggestions from code review Co-authored-by: Alexander Theißen <alex.theissen@me.com> * fixes to benchmarks according to review feedback * cargo run --quiet --profile=production --features=runtime-benchmarks --manifest-path=bin/node/cli/Cargo.toml -- benchmark --chain=dev --steps=50 --repeat=20 --pallet=pallet_contracts --extrinsic=* --execution=wasm --wasm-execution=compiled --heap-pages=4096 --output=./frame/contracts/src/weights.rs --template=./.maintain/frame-weight-template.hbs * removed `seal_origin` from API Co-authored-by: Alexander Theißen <alex.theissen@me.com> Co-authored-by: Parity Bot <admin@parity.io>
This commit is contained in:
committed by
GitHub
parent
83d4be6151
commit
e4caf7388a
@@ -339,12 +339,12 @@ where
|
||||
/// Creates a wasm module that calls the imported function named `getter_name` `repeat`
|
||||
/// times. The imported function is expected to have the "getter signature" of
|
||||
/// (out_ptr: u32, len_ptr: u32) -> ().
|
||||
pub fn getter(getter_name: &'static str, repeat: u32) -> Self {
|
||||
pub fn getter(module_name: &'static str, getter_name: &'static str, repeat: u32) -> Self {
|
||||
let pages = max_pages::<T>();
|
||||
ModuleDefinition {
|
||||
memory: Some(ImportedMemory::max::<T>()),
|
||||
imported_functions: vec![ImportedFunction {
|
||||
module: "seal0",
|
||||
module: module_name,
|
||||
name: getter_name,
|
||||
params: vec![ValueType::I32, ValueType::I32],
|
||||
return_type: None,
|
||||
|
||||
Reference in New Issue
Block a user