File tree 3 files changed +22
-0
lines changed
3 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ wee_alloc = "0.4.4"
14
14
default = [ " std" ]
15
15
std = []
16
16
debug = []
17
+ experimental = []
Original file line number Diff line number Diff line change
1
+ //! Experimental methods.
2
+
3
+ use super :: * ;
4
+
5
+ mod native {
6
+ extern "C" {
7
+ pub fn experimental_isAccountEmpty ( addressOffset : * const u32 ) -> u32 ;
8
+ }
9
+ }
10
+
11
+ pub fn is_account_empty ( address : & Address ) -> bool {
12
+ let ret = unsafe { native:: experimental_isAccountEmpty ( address. bytes . as_ptr ( ) as * const u32 ) } ;
13
+ if ret != 0 && ret != 1 {
14
+ panic ! ( ) ;
15
+ }
16
+
17
+ ret == 1
18
+ }
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ pub mod debug;
32
32
#[ cfg( not( feature = "std" ) ) ]
33
33
pub mod convert;
34
34
35
+ #[ cfg( feature = "experimental" ) ]
36
+ pub mod experimental;
37
+
35
38
#[ cfg( feature = "std" ) ]
36
39
use std:: vec:: Vec ;
37
40
You can’t perform that action at this time.
0 commit comments