Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface { BorrowStable( ctx context.Context, acc terra.Account, amount cosmostypes.Int, to *cosmostypes.AccAddress, ) (cosmostypes.TxResponse, error) RepayStable( ctx context.Context, acc terra.Account, amount cosmostypes.Coin, ) (cosmostypes.TxResponse, error) DepositStable( ctx context.Context, acc terra.Account, amount cosmostypes.Coin, ) (cosmostypes.TxResponse, error) RedeemStable( ctx context.Context, acc terra.Account, amount cosmostypes.Int, ) (cosmostypes.TxResponse, error) }
type ExecutorMsg ¶
type ExecutorMsg interface { BorrowStableMsg( acc terra.Account, amount cosmostypes.Int, to *cosmostypes.AccAddress, ) ([]cosmostypes.Msg, error) RepayStableMsg( acc terra.Account, amount cosmostypes.Coin, ) ([]cosmostypes.Msg, error) DepositStableMsg( acc terra.Account, amount cosmostypes.Coin, ) ([]cosmostypes.Msg, error) RedeemStableMsg( acc terra.Account, amount cosmostypes.Int, ) ([]cosmostypes.Msg, error) }
type GetBorrowerInfoResponse ¶
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 ¶
type GetBorrowerInfosResponse struct {
BorrowerInfos []GetBorrowerInfoResponse `json:"borrower_infos"`
}
type GetConfigResponse ¶
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 GetEpochStateResponse ¶
type GetEpochStateResponse struct { ExchangeRate cosmostypes.Dec `json:"exchange_rate"` ATokenSupply cosmostypes.Int `json:"a_token_supply"` }
type GetStateResponse ¶
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 Market ¶
type Market interface { StableDenom() string Anchored() cw20.Token bind.BaseContract Executor ExecutorMsg Querier }
func NewContract ¶
func NewContract(ctx context.Context, addr cosmostypes.AccAddress, client terra.Client) (Market, error)
type Querier ¶
type Querier interface { GetConfig(ctx context.Context) (GetConfigResponse, error) GetState(ctx context.Context) (GetStateResponse, error) GetEpochState(ctx context.Context, height *uint64) (GetEpochStateResponse, error) GetBorrowerInfo(ctx context.Context, borrower cosmostypes.AccAddress, height *uint64) (GetBorrowerInfoResponse, error) GetBorrowerInfos(ctx context.Context, startAfter *cosmostypes.AccAddress, limit *uint32) ([]GetBorrowerInfoResponse, error) }
Click to show internal directories.
Click to hide internal directories.