-
Notifications
You must be signed in to change notification settings - Fork 21
/
.iex.exs
128 lines (106 loc) · 2.07 KB
/
.iex.exs
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
alias Sanbase.{
Project,
ProjectEthAddress
}
alias Sanbase.Model.{
Infrastructure,
MarketSegment,
LatestCoinmarketcapData,
ModelUtils,
Currency,
Ico,
IcoCurrency
}
alias Sanbase.Accounts.{
User,
EthAccount,
Apikey,
Hmac,
UserApikeyToken,
UserSettings,
Settings
}
alias Sanbase.Tag
alias Sanbase.Vote
alias Sanbase.Insight.{
Post,
PostImage
}
alias Sanbase.UserList
alias Sanbase.UserList.ListItem
alias Sanbase.Transfers.{
EthTransfers,
Erc20Transfers,
BtcTransfers
}
alias Sanbase.{
Repo,
ClickhouseRepo,
FileStore,
DateTimeUtils,
ApplicationUtils,
Parallel,
Price
}
alias Sanbase.InternalServices.{
Ethauth,
EthNode
}
alias Sanbase.ExternalServices.Coinmarketcap.{
WebApi,
PricePoint,
Scraper,
TickerFetcher,
Ticker
}
alias Sanbase.ExternalServices.Etherscan.Requests, as: EtherscanRequests
alias Sanbase.ExternalServices.Etherscan.Scraper, as: EtherscanScraper
alias Sanbase.ExternalServices.ProjectInfo
alias Sanbase.Discourse.Api, as: DiscourseApi
alias Sanbase.Discourse.Config, as: DiscourseConfig
alias Sanbase.Messaging.Insight, as: NotificationsInsight
alias Sanbase.Messaging.Discord
alias Sanbase.Utils.{
JsonLogger,
Config,
Math
}
alias SanbaseWeb.Graphql.Schema
alias SanbaseWeb.Graphql.Resolvers.{
UserResolver,
ApikeyResolver,
EthAccountResolver,
EtherbiResolver,
FileResolver,
GithubResolver,
IcoResolver,
MarketSegmentResolver,
PostResolver,
PriceResolver,
ProjectBalanceResolver,
ProjectResolver,
ProjectTransfersResolver,
TwitterResolver,
UserListResolver,
InsightResolver,
ClickhouseResolver
}
alias SanbaseWeb.Graphql.Cache
alias SanbaseWeb.Graphql.Helpers.Utils, as: GraphUtils
alias Sanbase.Prices.Utils, as: PricesUtils
alias Sanbase.SocialData
alias Sanbase.Alert.{UserTrigger, Trigger, Scheduler}
alias Sanbase.Billing.{
Product,
Plan,
Subscription
}
now = fn -> Timex.now() end
days_ago = fn days -> Timex.shift(Timex.now(), days: -days) end
run_db_test = fn func ->
Repo.transaction(fn ->
func.()
|> Repo.rollback()
end)
|> elem(1)
end