Contracts move fixtures to new crate (#2246)

Small PR that introduce a new crate that will host RISC-V & wasm
fixtures for testing pallet-contracts
This commit is contained in:
PG Herveou
2023-11-10 12:22:47 +01:00
committed by GitHub
parent 03ee44d9e1
commit 64effd0e6f
57 changed files with 74 additions and 23 deletions
@@ -0,0 +1,35 @@
(module
(import "seal0" "seal_input" (func $seal_input (param i32 i32)))
(import "seal0" "seal_return" (func $seal_return (param i32 i32 i32)))
(import "env" "memory" (memory 1 1))
(func (export "deploy")
(call $ok_trap_revert)
)
(func (export "call")
(call $ok_trap_revert)
)
(func $ok_trap_revert
(i32.store (i32.const 4) (i32.const 4))
(call $seal_input (i32.const 0) (i32.const 4))
(block $IF_2
(block $IF_1
(block $IF_0
(br_table $IF_0 $IF_1 $IF_2
(i32.load8_u (i32.const 0))
)
(unreachable)
)
;; 0 = return with success
return
)
;; 1 = revert
(call $seal_return (i32.const 1) (i32.const 0) (i32.const 0))
(unreachable)
)
;; 2 = trap
(unreachable)
)
)