File tree Expand file tree Collapse file tree 2 files changed +30
-14
lines changed
bindings/rust/evmc-vm/src Expand file tree Collapse file tree 2 files changed +30
-14
lines changed Original file line number Diff line number Diff line change @@ -9,20 +9,7 @@ pub use evmc_sys as ffi;
9
9
// TODO: Add convenient helpers for evmc_execute
10
10
// TODO: Add a derive macro here for creating evmc_create
11
11
12
- /// EVMC message (call) kind.
13
- pub type MessageKind = ffi:: evmc_call_kind ;
14
-
15
- /// EVMC message (call) flags.
16
- pub type MessageFlags = ffi:: evmc_flags ;
17
-
18
- /// EVMC status code.
19
- pub type StatusCode = ffi:: evmc_status_code ;
20
-
21
- /// EVMC storage status.
22
- pub type StorageStatus = ffi:: evmc_storage_status ;
23
-
24
- /// EVMC VM revision.
25
- pub type Revision = ffi:: evmc_revision ;
12
+ pub mod types;
26
13
27
14
/// EVMC result structure.
28
15
pub struct ExecutionResult {
Original file line number Diff line number Diff line change
1
+ use evmc_sys as ffi;
2
+
3
+ /// EVMC message (call) kind.
4
+ pub type MessageKind = ffi:: evmc_call_kind ;
5
+
6
+ /// EVMC message (call) flags.
7
+ pub type MessageFlags = ffi:: evmc_flags ;
8
+
9
+ /// EVMC status code.
10
+ pub type StatusCode = ffi:: evmc_status_code ;
11
+
12
+ /// EVMC storage status.
13
+ pub type StorageStatus = ffi:: evmc_storage_status ;
14
+
15
+ /// EVMC VM revision.
16
+ pub type Revision = ffi:: evmc_revision ;
17
+
18
+ #[ cfg( test) ]
19
+ mod tests {
20
+ use super :: * ;
21
+
22
+ #[ test]
23
+ fn message_kind ( ) {
24
+ // assert_eq!(MessageKind::EVMC_CALL, ffi::evmc_call_kind::EVMC_CALL);
25
+ // assert_eq!(MessageKind::EVMC_CREATE, ffi::evmc_call_kind::EVMC_CREATE);
26
+ let x = MessageKind :: EVMC_ISTANBUL ;
27
+ // assert_eq!(Revision::EVMC_ISTANBUL, ffi::evmc_revision::EVMC_ISTANBUL);
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments