-
Notifications
You must be signed in to change notification settings - Fork 2
/
market_schema.go
45 lines (38 loc) · 1.87 KB
/
market_schema.go
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
package market
import cosmostypes "github.com/cosmos/cosmos-sdk/types"
// ================= Query ================= //
type GetConfigResponse struct {
OwnerAddr cosmostypes.AccAddress `json:"owner_addr"`
ATerraContract cosmostypes.AccAddress `json:"aterra_contract"`
InterestModel cosmostypes.AccAddress `json:"interest_model"`
DistributionModel cosmostypes.AccAddress `json:"distribution_model"`
OverseerContract cosmostypes.AccAddress `json:"overseer_contract"`
CollectorContract cosmostypes.AccAddress `json:"collector_contract"`
FaucetContract cosmostypes.AccAddress `json:"faucet_contract"`
StableDenom string `json:"stable_denom"`
ReserveFactor cosmostypes.Dec `json:"reserve_factor"`
MaxBorrowFactor cosmostypes.Dec `json:"max_borrow_factor"`
}
type GetStateResponse struct {
TotalLiabilities cosmostypes.Dec `json:"total_liabilities"`
TotalReserves cosmostypes.Dec `json:"total_reserves"`
LastInterestUpdated uint64 `json:"last_interest_updated"`
LastRewardUpdated uint64 `json:"last_reward_updated"`
GlobalInterestIndex cosmostypes.Dec `json:"global_interest_index"`
GlobalRewardIndex cosmostypes.Dec `json:"global_reward_index"`
ANCEmissionRate cosmostypes.Dec `json:"anc_emission_rate"`
}
type GetEpochStateResponse struct {
ExchangeRate cosmostypes.Dec `json:"exchange_rate"`
ATokenSupply cosmostypes.Int `json:"a_token_supply"`
}
type GetBorrowerInfoResponse struct {
Borrower cosmostypes.AccAddress `json:"borrower"`
InterestIndex cosmostypes.Dec `json:"interest_index"`
RewardIndex cosmostypes.Dec `json:"reward_index"`
LoanAmount cosmostypes.Int `json:"loan_amount"`
PendingRewards cosmostypes.Dec `json:"pending_rewards"`
}
type GetBorrowerInfosResponse struct {
BorrowerInfos []GetBorrowerInfoResponse `json:"borrower_infos"`
}