ftoken

package
v0.0.0-...-29f768c Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: Apache-2.0 Imports: 16 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetITokenAddress

func GetITokenAddress(genSdk *ontSDK.OntologySdk, ftokenAddress common.Address) (common.Address, error)

Types

type AccountSnapshot

type AccountSnapshot struct {
	TokenBalance       *big.Int
	BorrowBalance      *big.Int
	ValidBorrowBalance *big.Int
	ExchangeRate       *big.Int
}

func DeserializeAccountSnapshot

func DeserializeAccountSnapshot(data []byte) (*AccountSnapshot, error)

type FlashToken

type FlashToken struct {
	WingGov     common.Address
	Comptroller *comptroller.Comptroller
	TestConfig  *config.Config
	// contains filtered or unexported fields
}

func NewFlashToken

func NewFlashToken(sdk *ontSDK.OntologySdk, contractAddr string, signer *ontSDK.Account, gasPrice,
	gasLimit uint64) (*FlashToken, error)

func NewFlashToken2

func NewFlashToken2(sdk *ontSDK.OntologySdk, contractAddr string, signer *ontSDK.Account, cfg *config.Config, comptroller *comptroller.Comptroller) (*FlashToken, error)

func (*FlashToken) AcceptAdmin

func (this *FlashToken) AcceptAdmin() (string, error)

func (*FlashToken) AccountSnapshot

func (this *FlashToken) AccountSnapshot(owner common.Address) (*AccountSnapshot, error)

func (*FlashToken) AccrualBlockNumber

func (this *FlashToken) AccrualBlockNumber() (uint32, error)

func (*FlashToken) AccrualTimestamp

func (this *FlashToken) AccrualTimestamp() (uint64, error)

func (*FlashToken) AccrueInterest

func (this *FlashToken) AccrueInterest() (string, error)

func (*FlashToken) AddInsurance

func (this *FlashToken) AddInsurance(from common.Address, addAmount *big.Int) (string, error)

func (*FlashToken) AddReserves

func (this *FlashToken) AddReserves(from common.Address, addAmount *big.Int) (string, error)

func (*FlashToken) Admin

func (this *FlashToken) Admin() (common.Address, error)

func (*FlashToken) Allowance

func (this *FlashToken) Allowance(owner, spender common.Address) (*big.Int, error)

func (*FlashToken) Approve

func (this *FlashToken) Approve(owner, spender common.Address, amount *big.Int) (string, error)

func (*FlashToken) BalanceOf

func (this *FlashToken) BalanceOf(owner common.Address) (*big.Int, error)

func (*FlashToken) BalanceOfUnderlying

func (this *FlashToken) BalanceOfUnderlying(owner common.Address) (*big.Int, error)

func (*FlashToken) Borrow

func (this *FlashToken) Borrow(borrower common.Address, borrowAmount *big.Int, useWing bool) (string, error)

func (*FlashToken) BorrowBalanceStored

func (this *FlashToken) BorrowBalanceStored(account common.Address) (*big.Int, *big.Int, error)

func (*FlashToken) BorrowIndex

func (this *FlashToken) BorrowIndex() (*big.Int, error)

func (*FlashToken) BorrowRatePerBlock

func (this *FlashToken) BorrowRatePerBlock() (*big.Int, error)

func (*FlashToken) Decimals

func (this *FlashToken) Decimals() (string, error)

func (*FlashToken) ExchangeRateStored

func (this *FlashToken) ExchangeRateStored() (*big.Int, error)

func (*FlashToken) GetAddr

func (this *FlashToken) GetAddr() common.Address

func (*FlashToken) GetCash

func (this *FlashToken) GetCash() (*big.Int, error)

func (*FlashToken) GetComptroller

func (this *FlashToken) GetComptroller() (common.Address, error)

func (*FlashToken) GetGoSdk

func (this *FlashToken) GetGoSdk() *ontSDK.OntologySdk

func (*FlashToken) GetInsuranceRedeemApply

func (this *FlashToken) GetInsuranceRedeemApply(account common.Address) (*big.Int, error)

func (*FlashToken) GetLastSettleTime

func (this *FlashToken) GetLastSettleTime() (*big.Int, error)

func (*FlashToken) GetRedeemApplyTotal

func (this *FlashToken) GetRedeemApplyTotal() (*big.Int, error)

func (*FlashToken) GetSettleInterval

func (this *FlashToken) GetSettleInterval() (*big.Int, error)

func (*FlashToken) GetSettlementAmtMax

func (this *FlashToken) GetSettlementAmtMax() (*big.Int, error)

func (*FlashToken) GetSigner

func (this *FlashToken) GetSigner() ontSDK.Account

func (*FlashToken) GlobalParam

func (this *FlashToken) GlobalParam() (common.Address, error)

func (*FlashToken) Init

func (this *FlashToken) Init(admin, underlying_ common.Address, underlyingName string, comptroller_,
	globalParamContract common.Address, interestRateModel common.Address,
	initialExchangeRateMantissa *big.Int) (string, error)

func (*FlashToken) InitialExchangeRateMantissa

func (this *FlashToken) InitialExchangeRateMantissa() (*big.Int, error)

func (*FlashToken) InsuranceAddr

func (this *FlashToken) InsuranceAddr() (common.Address, error)

func (*FlashToken) InsuranceFactorMantissa

func (this *FlashToken) InsuranceFactorMantissa() (*big.Int, error)

func (*FlashToken) InsuranceMintPaused

func (this *FlashToken) InsuranceMintPaused() (bool, error)

func (*FlashToken) InterestRateModel

func (this *FlashToken) InterestRateModel() (common.Address, error)

func (*FlashToken) IsFToken

func (this *FlashToken) IsFToken() (bool, error)

func (*FlashToken) IsInsurance

func (this *FlashToken) IsInsurance() (bool, error)

func (*FlashToken) LiquidateBorrow

func (this *FlashToken) LiquidateBorrow(liquidator, borrower, tokenCollateral common.Address, repayAmount *big.Int) (string, error)

func (*FlashToken) MarketAddr

func (this *FlashToken) MarketAddr() (common.Address, error)

func (*FlashToken) Mint

func (this *FlashToken) Mint(minter common.Address, mintAmount *big.Int) (string, error)

func (*FlashToken) Name

func (this *FlashToken) Name() (string, error)

func (*FlashToken) NativeApprove

func (this *FlashToken) NativeApprove(owner, spender common.Address, amount *big.Int) (string, error)

func (*FlashToken) NeoVMApprove

func (this *FlashToken) NeoVMApprove(owner, spender common.Address, amount *big.Int) (string, error)

func (*FlashToken) NeoVMBalanceOf

func (this *FlashToken) NeoVMBalanceOf(owner common.Address) (*big.Int, error)

func (*FlashToken) PendingAdmin

func (this *FlashToken) PendingAdmin() (common.Address, error)

func (*FlashToken) PutSettleInterval

func (this *FlashToken) PutSettleInterval(interval uint64) (string, error)

func (*FlashToken) PutSettlementAmtMax

func (this *FlashToken) PutSettlementAmtMax(amt *big.Int) (string, error)

func (*FlashToken) Redeem

func (this *FlashToken) Redeem(redeemer common.Address, redeemTokens *big.Int) (string, error)

func (*FlashToken) RedeemApply

func (this *FlashToken) RedeemApply(redeemer common.Address, redeemTokens *big.Int) (string, error)

func (*FlashToken) RedeemApplySettlement

func (this *FlashToken) RedeemApplySettlement() (string, error)

func (*FlashToken) RedeemUnderlying

func (this *FlashToken) RedeemUnderlying(redeemer common.Address, redeemAmount *big.Int) (string, error)

func (*FlashToken) ReduceReserves

func (this *FlashToken) ReduceReserves(reduceAmount *big.Int) (string, error)

func (*FlashToken) RepayBorrow

func (this *FlashToken) RepayBorrow(borrower common.Address, repayAmount *big.Int) (string, error)

func (*FlashToken) RepayBorrowBehalf

func (this *FlashToken) RepayBorrowBehalf(payer, borrower common.Address, repayAmount *big.Int) (string, error)

func (*FlashToken) ReserveFactorMantissa

func (this *FlashToken) ReserveFactorMantissa() (*big.Int, error)

func (*FlashToken) SetAddr

func (this *FlashToken) SetAddr(address common.Address)

func (*FlashToken) SetComptroller

func (this *FlashToken) SetComptroller(comptroller common.Address) (string, error)

func (*FlashToken) SetGlobalParam

func (this *FlashToken) SetGlobalParam(globalParam common.Address) (string, error)

func (*FlashToken) SetInsuranceAddr

func (this *FlashToken) SetInsuranceAddr(insurance common.Address) (string, error)

func (*FlashToken) SetInsuranceFactor

func (this *FlashToken) SetInsuranceFactor(factor *big.Int) (string, error)

func (*FlashToken) SetInterestRateModel

func (this *FlashToken) SetInterestRateModel(interestRateModel common.Address) (string, error)

func (*FlashToken) SetMarketAddr

func (this *FlashToken) SetMarketAddr(market common.Address) (string, error)

func (*FlashToken) SetPendingAdmin

func (this *FlashToken) SetPendingAdmin(pendingAdmin common.Address) (string, error)

func (*FlashToken) SetPriceOracle

func (this *FlashToken) SetPriceOracle(oracle common.Address) (string, error)

func (*FlashToken) SetReserveFactor

func (this *FlashToken) SetReserveFactor(factor *big.Int) (string, error)

func (*FlashToken) SupplyRatePerBlock

func (this *FlashToken) SupplyRatePerBlock() (*big.Int, error)

func (*FlashToken) Symbol

func (this *FlashToken) Symbol() (string, error)

func (*FlashToken) TestBorrowRate

func (this *FlashToken) TestBorrowRate(marketName, addr string)

1.use market name and usraddr

func (*FlashToken) TestBorrowRate2Supply

func (this *FlashToken) TestBorrowRate2Supply(marketName, addr string)

1.use market name and usraddr

func (*FlashToken) TestBorrowRateSync

func (this *FlashToken) TestBorrowRateSync(marketName, addr string, sy *sync.WaitGroup)

1.use market name and usraddr

func (*FlashToken) TotalBorrows

func (this *FlashToken) TotalBorrows() (*big.Int, error)

func (*FlashToken) TotalInsurance

func (this *FlashToken) TotalInsurance() (*big.Int, error)

func (*FlashToken) TotalReserves

func (this *FlashToken) TotalReserves() (*big.Int, error)

func (*FlashToken) TotalSupply

func (this *FlashToken) TotalSupply() (*big.Int, error)

func (*FlashToken) TotalValidBorrows

func (this *FlashToken) TotalValidBorrows() (*big.Int, error)

func (*FlashToken) Transfer

func (this *FlashToken) Transfer(from, to common.Address, amount *big.Int) (string, error)

func (*FlashToken) TransferFrom

func (this *FlashToken) TransferFrom(from, src, to common.Address, amount *big.Int) (string, error)

func (*FlashToken) Underlying

func (this *FlashToken) Underlying() common.Address

func (*FlashToken) UnderlyingName

func (this *FlashToken) UnderlyingName() (string, error)

func (*FlashToken) UpdateInsuranceMintPaused

func (this *FlashToken) UpdateInsuranceMintPaused(state bool) (string, error)

func (*FlashToken) UpdateSigner

func (this *FlashToken) UpdateSigner(newSigner *ontSDK.Account)

func (*FlashToken) WingSpeed4BorrowTestNew

func (this *FlashToken) WingSpeed4BorrowTestNew(userAddr string)

func (*FlashToken) WingSpeed4BorrowTestNewByMarketAddr

func (this *FlashToken) WingSpeed4BorrowTestNewByMarketAddr(marketAddr common.Address, userAddr string, sy *sync.WaitGroup)

func (*FlashToken) WingSpeed4BorrowTestNewByMarketName

func (this *FlashToken) WingSpeed4BorrowTestNewByMarketName(marketName, userAddr string)

func (*FlashToken) WingSpeed4SuppluyTestNew

func (this *FlashToken) WingSpeed4SuppluyTestNew(marketAddr common.Address, userAddr string, sy *sync.WaitGroup)

func (*FlashToken) WingSpeed4SupplyAndBorrowTestByName

func (this *FlashToken) WingSpeed4SupplyAndBorrowTestByName(marketName, userAddr string)

func (*FlashToken) WingSpeed4SupplyTest

func (this *FlashToken) WingSpeed4SupplyTest(userAddr string)

func (*FlashToken) WingSpeed4SupplyTestByName

func (this *FlashToken) WingSpeed4SupplyTestByName(marketName, userAddr string)

func (*FlashToken) WingSpeedByNameNew

func (this *FlashToken) WingSpeedByNameNew(marketName, userAddr string)

Jump to

Keyboard shortcuts

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