if_config

package
v0.0.0-...-09f7846 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IfBorrow

type IfBorrow struct {
	Address     string  `json:"address"`
	FormalDays  float64 `json:"formal_days"`
	InterimDays float64 `json:"interim_days"`

	InterimInterestRate     string `json:"interim_interest_rate"`
	PunishInterestRate      string `json:"punish_interest_rate"`
	ReservesFactor          string `json:"reserves_factor"`
	InsuranceInterestFactor string `json:"insurance_interest_factor"`

	OScoreInfo []*OScoreInfo `json:"o_score_info"`
	// contains filtered or unexported fields
}

func (*IfBorrow) GetAddress

func (this *IfBorrow) GetAddress() common.Address

func (*IfBorrow) GetFormalDays

func (this *IfBorrow) GetFormalDays() uint64

func (*IfBorrow) GetInsuranceInterestFactor

func (this *IfBorrow) GetInsuranceInterestFactor() *big.Int

func (*IfBorrow) GetInterimDays

func (this *IfBorrow) GetInterimDays() uint64

func (*IfBorrow) GetInterimInterestRate

func (this *IfBorrow) GetInterimInterestRate() *big.Int

func (*IfBorrow) GetPunishInterestRate

func (this *IfBorrow) GetPunishInterestRate() *big.Int

func (*IfBorrow) GetReservesFactor

func (this *IfBorrow) GetReservesFactor() *big.Int

type IfConfig

type IfConfig struct {
	GasPrice      uint64                 `json:"gas_price"`
	GasLimit      uint64                 `json:"gas_limit"`
	NodeRPCAddr   string                 `json:"node_rpc_addr"`
	PriceOracle   string                 `json:"price_oracle"`
	GlobalParam   string                 `json:"global_param"`
	WingAddr      string                 `json:"wing_addr"`
	Approve       string                 `json:"approve"`
	IfUtils       *IfUtilsConfig         `json:"if_utils"`
	IfComptroller *if_ctrl.IfComptroller `json:"if_comptroller"`
	IfOracle      *IfOracle              `json:"if_oracle"`
	Tokens        map[string]*IfToken    `json:"tokens"`
}

func ParseIfConfig

func ParseIfConfig(path string) (*IfConfig, error)

func (*IfConfig) GetGlobalParam

func (this *IfConfig) GetGlobalParam() common.Address

func (*IfConfig) GetPriceOracle

func (this *IfConfig) GetPriceOracle() common.Address

func (*IfConfig) GetWingAddr

func (this *IfConfig) GetWingAddr() common.Address

type IfInsurance

type IfInsurance struct {
	Address            string `json:"address"`
	InitExchangeRate   string `json:"init_exchange_rate"`
	Underlying         string `json:"underlying"`
	UnderlyingDecimals uint64 `json:"underlying_decimals"`
}

func (*IfInsurance) GetAddress

func (this *IfInsurance) GetAddress() common.Address

func (*IfInsurance) GetInitExchangeRate

func (this *IfInsurance) GetInitExchangeRate() *big.Int

func (*IfInsurance) GetUnderlying

func (this *IfInsurance) GetUnderlying() common.Address

type IfOracle

type IfOracle struct {
	FilePath string `json:"file_path"`
	Address  string `json:"address"`
	Admin    string `json:"admin"`
}

type IfSupply

type IfSupply struct {
	Address          string `json:"address"`
	InitExchangeRate string `json:"init_exchange_rate"`
}

func (*IfSupply) GetAddress

func (this *IfSupply) GetAddress() common.Address

func (*IfSupply) GetInitExchangeRate

func (this *IfSupply) GetInitExchangeRate() *big.Int

type IfToken

type IfToken struct {
	MarketName  string       `json:"market_name"`
	Admin       string       `json:"admin"`
	WingWeight  uint64       `json:"wing_weight"`
	FilePath    string       `json:"file_path"`
	IfSupply    *IfSupply    `json:"if_supply"`
	IfInsurance *IfInsurance `json:"if_insurance"`
	IfBorrow    *IfBorrow    `json:"if_borrow"`
}

func (*IfToken) GetAdmin

func (this *IfToken) GetAdmin() common.Address

type IfUtilsConfig

type IfUtilsConfig struct {
	FilePath string `json:"file_path"`
	Address  string `json:"address"`
	Admin    string `json:"admin"`
}

func (*IfUtilsConfig) GetAdmin

func (this *IfUtilsConfig) GetAdmin() common.Address

type OScoreInfo

type OScoreInfo struct {
	Level            float64 `json:"level"`
	InterestRate     string  `json:"interest_rate"`
	CollateralFactor string  `json:"collateral_factor"`
	MaxValue         string  `json:"max_value"`
}

func (*OScoreInfo) GetCollateralFactor

func (this *OScoreInfo) GetCollateralFactor() uint64

func (*OScoreInfo) GetInterestRate

func (this *OScoreInfo) GetInterestRate() uint64

func (*OScoreInfo) GetLevel

func (this *OScoreInfo) GetLevel() byte

func (*OScoreInfo) GetMaxValue

func (this *OScoreInfo) GetMaxValue(decimals uint64) *big.Int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL