-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapi_manual.rs
50 lines (45 loc) · 1.25 KB
/
api_manual.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! Contains `extern "C"` functions, manually created.
//! The created functions can also be seen in the documentation.
//!
//! See also [`super::api`] for an example of how to automatically
//! create those functions.
use super::Struct3;
use contract_interface::ci;
use contract_standards::cs;
use cs::ft::core_impl::impl_fungible_token;
// #[cfg(target_arch = "wasm32")]
#[no_mangle]
pub extern "C" fn ft_transfer_manual() {
use ci::ServeRefMut;
impl_fungible_token::ft_transfer::Serve::extern_serve::<Struct3>(
//
|state| &mut state.token,
);
}
// #[cfg(target_arch = "wasm32")]
#[no_mangle]
pub extern "C" fn ft_transfer_call() {
use ci::ServeRefMut;
impl_fungible_token::ft_transfer_call::Serve::extern_serve::<Struct3>(
//
|state| &mut state.token,
);
}
// #[cfg(target_arch = "wasm32")]
#[no_mangle]
pub extern "C" fn ft_total_supply() {
use ci::ServeRef;
impl_fungible_token::ft_total_supply::Serve::extern_serve::<Struct3>(
//
|state| &state.token,
);
}
// #[cfg(target_arch = "wasm32")]
#[no_mangle]
pub extern "C" fn ft_balance_of() {
use ci::ServeRef;
impl_fungible_token::ft_balance_of::Serve::extern_serve::<Struct3>(
//
|state| &state.token,
);
}