Skip to content

Commit

Permalink
Reject batches immediately.
Browse files Browse the repository at this point in the history
  • Loading branch information
koxu1996 committed Jul 29, 2024
1 parent d53e3a4 commit 25727cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kairos-contracts/demo-contract/contract/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![no_std]
#![no_main]
#![allow(unreachable_code)]
extern crate alloc;
use alloc::vec;
use alloc::{string::ToString, vec::Vec};
Expand Down Expand Up @@ -97,6 +98,7 @@ pub extern "C" fn deposit() {

#[no_mangle]
pub extern "C" fn submit_batch() {
runtime::revert(ApiError::User(0u16));
let receipt_serialized: Bytes = runtime::get_named_arg(RUNTIME_ARG_RECEIPT);
let Ok(receipt): Result<Receipt, _> = serde_json_wasm::from_slice(&receipt_serialized) else {
runtime::revert(ApiError::User(0u16));
Expand Down

0 comments on commit 25727cc

Please sign in to comment.