From 896528a5dd9719ba435bfe8320adb090f8362e2e Mon Sep 17 00:00:00 2001 From: minaminao Date: Sat, 22 Jun 2024 12:01:40 +0900 Subject: [PATCH] add makefile for cosmwasm ctf --- src/OakSecurityCosmWasmCTF/01-Mjolnir/src/exploit.rs | 2 +- .../01-Mjolnir/src/integration_tests.rs | 2 +- src/OakSecurityCosmWasmCTF/Makefile | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 src/OakSecurityCosmWasmCTF/Makefile diff --git a/src/OakSecurityCosmWasmCTF/01-Mjolnir/src/exploit.rs b/src/OakSecurityCosmWasmCTF/01-Mjolnir/src/exploit.rs index 99f4c7b..a7823a8 100644 --- a/src/OakSecurityCosmWasmCTF/01-Mjolnir/src/exploit.rs +++ b/src/OakSecurityCosmWasmCTF/01-Mjolnir/src/exploit.rs @@ -26,7 +26,7 @@ pub mod exploit { let cw_template_id = app.store_code(challenge_contract()); // init contract - let msg = InstantiateMsg { count: 1i32 }; + let msg = InstantiateMsg {}; let contract_addr = app .instantiate_contract( cw_template_id, diff --git a/src/OakSecurityCosmWasmCTF/01-Mjolnir/src/integration_tests.rs b/src/OakSecurityCosmWasmCTF/01-Mjolnir/src/integration_tests.rs index 7a2fe4b..8769e97 100644 --- a/src/OakSecurityCosmWasmCTF/01-Mjolnir/src/integration_tests.rs +++ b/src/OakSecurityCosmWasmCTF/01-Mjolnir/src/integration_tests.rs @@ -25,7 +25,7 @@ pub mod tests { let cw_template_id = app.store_code(challenge_contract()); // init contract - let msg = InstantiateMsg { count: 1i32 }; + let msg = InstantiateMsg {}; let contract_addr = app .instantiate_contract( cw_template_id, diff --git a/src/OakSecurityCosmWasmCTF/Makefile b/src/OakSecurityCosmWasmCTF/Makefile new file mode 100644 index 0000000..8f42e43 --- /dev/null +++ b/src/OakSecurityCosmWasmCTF/Makefile @@ -0,0 +1,6 @@ +test: + cd 01-* && cargo test + cd 02-* && cargo test --release + cd 03-* && cargo test + cd 04-* && cargo test + cd 05-* && cargo test