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 @@ -5,20 +5,7 @@ pub use evmc_sys as ffi;
5
5
// TODO: Add convenient helpers for evmc_execute
6
6
// TODO: Add a derive macro here for creating evmc_create
7
7
8
- /// EVMC message (call) kind.
9
- pub type MessageKind = ffi:: evmc_call_kind ;
10
-
11
- /// EVMC message (call) flags.
12
- pub type MessageFlags = ffi:: evmc_flags ;
13
-
14
- /// EVMC status code.
15
- pub type StatusCode = ffi:: evmc_status_code ;
16
-
17
- /// EVMC storage status.
18
- pub type StorageStatus = ffi:: evmc_storage_status ;
19
-
20
- /// EVMC VM revision.
21
- pub type Revision = ffi:: evmc_revision ;
8
+ pub mod types;
22
9
23
10
/// EVMC result structure.
24
11
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