1mod asset;
2mod block;
3mod call_contract;
4mod converts;
5mod crypto;
6mod lease;
7mod memory;
8mod storage;
9mod tx;
10mod utils;
11
12#[doc(hidden)]
13#[macro_export]
14macro_rules! internal_data {
15 (this) => {{
16 (core::ptr::null(), 0)
17 }};
18 (system_token) => {{
19 (core::ptr::null(), 0)
20 }};
21}
22
23#[doc(hidden)]
24#[macro_export]
25macro_rules! error {
26 ($error:expr) => {
27 if $error != 0 {
28 return $error;
29 }
30 };
31}
32
33#[macro_export]
56macro_rules! require {
57 ($condition:expr) => {
58 if !($condition) {
59 return 300;
60 }
61 };
62 ($condition:expr, $message:tt) => {
63 if !($condition) {
64 let error = wevm::v0::bindings::require($message.as_ptr(), $message.len());
65 if error != 0 {
66 return error;
67 } else {
68 return 300;
69 }
70 }
71 }
72}