Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Contracts: Enabled signed extension (#14565)
Browse files Browse the repository at this point in the history
* Contracts enable signed extension

* Add test

* fix

* xx

* Update frame/contracts/fixtures/sign_extension.wat

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>

* move tests

---------

Co-authored-by: Sasha Gryaznov <hi@agryaznov.com>
  • Loading branch information
pgherveou and agryaznov authored Jul 21, 2023
1 parent 713e34a commit aacf416
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion frame/contracts/src/wasm/prepare.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl LoadedModule {
config
.wasm_multi_value(false)
.wasm_mutable_global(false)
.wasm_sign_extension(false)
.wasm_sign_extension(true)
.wasm_bulk_memory(false)
.wasm_reference_types(false)
.wasm_tail_call(false)
Expand Down Expand Up @@ -674,6 +674,22 @@ mod tests {
Ok(_)
);

prepare_test!(
signed_extension_works,
r#"
(module
(import "env" "memory" (memory 1 1))
(func (export "deploy"))
(func (export "call"))
(func (param i32) (result i32)
local.get 0
i32.extend8_s
)
)
"#,
Ok(_)
);

prepare_test!(
omit_memory,
r#"
Expand Down

0 comments on commit aacf416

Please sign in to comment.