@@ -9,6 +9,21 @@ pub type Bytes32 = ffi::evmc_bytes32;
9
9
/// EVMC big-endian 256-bit integer
10
10
pub type Uint256 = ffi:: evmc_uint256be ;
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 ;
26
+
12
27
#[ cfg( test) ]
13
28
mod tests {
14
29
use super :: * ;
@@ -34,4 +49,35 @@ mod tests {
34
49
let b = Uint256 :: default ( ) ;
35
50
assert_eq ! ( a. clone( ) , b. clone( ) ) ;
36
51
}
52
+
53
+ #[ test]
54
+ fn message_kind ( ) {
55
+ assert_eq ! ( MessageKind :: EVMC_CALL , ffi:: evmc_call_kind:: EVMC_CALL ) ;
56
+ assert_eq ! (
57
+ MessageKind :: EVMC_CALLCODE ,
58
+ ffi:: evmc_call_kind:: EVMC_CALLCODE
59
+ ) ;
60
+ assert_eq ! (
61
+ MessageKind :: EVMC_DELEGATECALL ,
62
+ ffi:: evmc_call_kind:: EVMC_DELEGATECALL
63
+ ) ;
64
+ assert_eq ! ( MessageKind :: EVMC_CREATE , ffi:: evmc_call_kind:: EVMC_CREATE ) ;
65
+ }
66
+
67
+ #[ test]
68
+ fn message_flags ( ) {
69
+ assert_eq ! ( MessageFlags :: EVMC_STATIC , ffi:: evmc_flags:: EVMC_STATIC ) ;
70
+ }
71
+
72
+ #[ test]
73
+ fn status_code ( ) { }
74
+
75
+ #[ test]
76
+ fn storage_status ( ) { }
77
+
78
+ #[ test]
79
+ fn revision ( ) {
80
+ assert_eq ! ( Revision :: EVMC_FRONTIER , ffi:: evmc_revision:: EVMC_FRONTIER ) ;
81
+ assert_eq ! ( Revision :: EVMC_ISTANBUL , ffi:: evmc_revision:: EVMC_ISTANBUL ) ;
82
+ }
37
83
}
0 commit comments