-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTypes.mo
55 lines (46 loc) · 1.18 KB
/
Types.mo
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
51
52
53
54
55
import Time "mo:base/Time";
import Result "mo:base/Result";
module{
public type Error = {
#Invalid_Caller;
#Invalid_CanisterId;
#No_Wasm;
#No_Record;
#Insufficient_Cycles;
#Ledger_Transfer_Failed : Nat; // value : log id
#Create_Canister_Failed : Nat;
};
public type Canister = {
name : Text;
description : Text;
canister_id : Principal;
wasm : ?[Nat8];
};
public type Status = {
cycle_balance : Nat;
memory : Nat;
};
public type UpdateSettingsArgs = {
canister_id : Principal;
settings : canister_settings
};
public type TransformArgs = {
icp_amount : Nat64; // e8s
to_canister_id : Principal
};
public type DeployArgs = {
name : Text;
description : Text;
settings : ?canister_settings;
deploy_arguments : ?[Nat8];
wasm : ?[Nat8];
cycle_amount : Nat;
preserve_wasm : Bool;
};
public type canister_settings = {
freezing_threshold : ?Nat;
controllers : ?[Principal];
memory_allocation : ?Nat;
compute_allocation : ?Nat;
};
};