Skip to content

Commit

Permalink
Merge pull request #1026 from AntelopeIO/jumborow_wasm_gen
Browse files Browse the repository at this point in the history
regenerate jumborow.wasm when `EOSIO_COMPILE_TEST_CONTRACTS` enabled
  • Loading branch information
spoonincode authored Nov 13, 2024
2 parents 88c8dbe + deb277d commit 6e0de35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion unittests/contracts/jumborow/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/jumborow.wasm ${CMAKE_CURRENT_BINARY_DIR}/jumborow.wasm COPYONLY )
if(EOSIO_COMPILE_TEST_CONTRACTS)
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/jumborow.wasm"
COMMAND "${CDT_ROOT}/bin/eosio-wast2wasm" "${CMAKE_CURRENT_SOURCE_DIR}/jumborow.wast" -o "${CMAKE_CURRENT_BINARY_DIR}/jumborow.wasm"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/jumborow.wast")
add_custom_target(gen_jumborow_wasm ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/jumborow.wasm")
else()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/jumborow.wasm ${CMAKE_CURRENT_BINARY_DIR}/jumborow.wasm COPYONLY )
endif()
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/jumborow.abi ${CMAKE_CURRENT_BINARY_DIR}/jumborow.abi COPYONLY )
2 changes: 1 addition & 1 deletion unittests/contracts/jumborow/jumborow.wast
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
(memory $0 528)
(export "apply" (func $apply))
(func $apply (param $receiver i64) (param $account i64) (param $action_name i64)
(drop (call $db_store_i64 (local.get $receiver) (local.get $receiver) (local.get $receiver) (i64.const 0) (i32.const 1) (i32.const 34603007)))
(drop (call $db_store_i64 (get_local $receiver) (get_local $receiver) (get_local $receiver) (i64.const 0) (i32.const 1) (i32.const 34603007)))
)
)

0 comments on commit 6e0de35

Please sign in to comment.