forked from funded-labs/escrow_manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
types.mo
56 lines (48 loc) · 1.51 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
56
import Time "mo:base/Time";
module {
public type NFTInfo = {
number : Nat;
priceE8S : Nat;
};
public type AccountId = Blob;
public type AccountIdText = Text;
public type Subaccount = Nat;
public type SubaccountNat8Arr = [Nat8];
public type SubaccountBlob = Blob;
public type SubaccountStatus = {
#empty; // empty and waiting for a transfer
#cancelled; // transfer has been cancelled
#confirmed; // transfer has been confirmed by frontend,
// now we need to check that we recieved the funds
#funded; // funds recieved
};
// PROJECT
public type ProjectId = Nat;
public type ProjectStatus = {
#whitelist;
#live;
#fully_funded;
};
// LEDGER
public type AccountBalanceArgs = { account : AccountIdText };
public type ICPTs = { e8s : Nat64 };
public type SendArgs = {
memo : Nat64;
amount : ICPTs;
fee : ICPTs;
from_subaccount : ?SubaccountNat8Arr;
to : AccountIdText;
created_at_time : ?Time.Time;
};
// ESCROW STATS
public type NFTStats = {
number : Nat;
priceE8S : Nat;
sold : Nat;
openSubaccounts : Nat;
};
public type EscrowStats = {
endTime : Time.Time;
nftStats : [NFTStats];
};
};