commit 4f016c6b583d8c7cc7ae7618f503beed330e0d1c
parent ce3551c60e64d4c3a1e54afe5c0cb4ef67d1a17a
Author: aggstam <aggelosstam13@gmail.com>
Date: Wed, 9 Mar 2022 16:32:33 +0200
makefile: wabt removed
Diffstat:
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -17,7 +17,6 @@ wabt:
smart_contract.wasm: wabt $(SRC)
cd smart-contract && $(CARGO) build --release --lib --target wasm32-unknown-unknown
cp -f smart-contract/target/wasm32-unknown-unknown/release/$@ $@
- ./wabt/bin/wasm-strip $@
test:
$(CARGO) test --release --lib
diff --git a/smart-contract/src/lib.rs b/smart-contract/src/lib.rs
@@ -19,8 +19,10 @@ fn process_instruction(ix: &[u8]) -> ContractResult {
if args.a < args.b {
return Err(ContractError::Custom(69))
}
+
+ let sum = args.a + args.b;
- msg!("Hello from the VM runtime!");
+ msg!("Hello from the VM runtime! Sum: {:?}", sum);
Ok(())
}