-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTypes.mo
101 lines (93 loc) · 2.08 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
module Types {
//add new currency here and update FXFactory
public type Currency = {
#usd;
#eur;
#cad;
#gbp;
#chf;
#idr;
#jpy
};
//add new chain here and update TokenFactory
public type TokenChain = {
#btc_mainnet;
#icp_mainnet;
#icp_testnet;
#eth_mainnet;
#eth_testnet;
#sol_mainnet;
#tao_mainnet;
#op_mainnet;
#arb_mainnet;
#base_mainnet;
#ftm_mainnet;
#bsc_mainnet;
};
//add new token here and update TokenFactory
public type TokenCurrency = {
#icp;
#eth;
#btc;
#sol;
#weth;
#usdt;
#usdc;
#dai;
#ckbtc;
#cketh;
#wbtc;
#wtao;
#exe; //memes for testing
#sneed;
#bonk;
#test; //qa
};
//add new service here and update PriceFactory with your implementation
public type PriceService = {
#icpservice;
#coingecko;
#chainlink;
#coinmarketcap;
#kraken;
#testnet;
};
public type CurrencyQuote = {
name : Text; //USD, EUR
symbol : Text; //$, €, £
value : Float; //0.75
value_str : Text; //0.75
created_at : Nat64;
source : ?Text;
currency_type : Currency;
description : ?Text;
};
public type TokenQuote = {
name : Text;
symbol : Text;
value : Float;
value_str : Text;
created_at : Nat64;
source : ?Text;
currency_type : Currency;
token_type : TokenCurrency;
};
public type Token = {
name : Text;
decimals : Nat;
contract : Text;
created_at : Nat64;
abi : Text;
chains : [TokenChain];
token_type : TokenCurrency;
last_quote : ?TokenQuote;
description : Text;
slug : Text;
};
public type Response<T> = {
status : Nat16;
status_text : Text;
data : ?T;
error_text : ?Text;
};
};