Skip to content

Commit

Permalink
piecrust: make counter use wrap_call_unchecked
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszm committed Feb 13, 2024
1 parent ec37578 commit 6efec4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contracts/counter/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ impl Counter {
/// Expose `Counter::read_value()` to the host
#[no_mangle]
unsafe fn read_value(arg_len: u32) -> u32 {
uplink::wrap_call(arg_len, |_: ()| STATE.read_value())
uplink::wrap_call_unchecked(arg_len, |_: ()| STATE.read_value())
}

/// Expose `Counter::increment()` to the host
#[no_mangle]
unsafe fn increment(arg_len: u32) -> u32 {
uplink::wrap_call(arg_len, |_: ()| STATE.increment())
uplink::wrap_call_unchecked(arg_len, |_: ()| STATE.increment())
}

0 comments on commit 6efec4c

Please sign in to comment.