lendingtoken

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetATokenUnderlyingAddress added in v0.2.1

func GetATokenUnderlyingAddress(protocol, network, atoken string) (string, error)

Types

type AToken

type AToken struct {
	ProtocolBasic   *model.ProtocolBasic // basic info of the protocol
	Basic           *erc.ERC20Info       // basic info of the token
	UnderlyingBasic *erc.ERC20Info       // basic info of the underlying token
	ApyInfo         *model.ApyInfo       // deposit apy info
}

Aave like a token.

func (*AToken) GetUnderlyingAddress

func (t *AToken) GetUnderlyingAddress() (string, error)

func (*AToken) UpdateATokenByUnderlying

func (t *AToken) UpdateATokenByUnderlying(underlying string) error

Use underlying address to update a token info.

type CToken

type CToken struct {
	ProtocolBasic   *model.ProtocolBasic // basic info of the protocol
	Basic           *erc.ERC20Info       // basic info of the token
	UnderlyingBasic *erc.ERC20Info       // basic info of the underlying token
	SupplyApyInfo   *model.ApyInfo       // supply apy info
	BorrowApyInfo   *model.ApyInfo       // borrow apy info
}

func (*CToken) GetUnderlyingAddress

func (t *CToken) GetUnderlyingAddress(ctoken string) (string, error)

Use c token address to get underlying address.

func (*CToken) UpdateCTokenByUnderlying

func (t *CToken) UpdateCTokenByUnderlying(underlying string) error

Use underlying address to update c token info.

type SToken

type SToken struct {
	ProtocolBasic   *model.ProtocolBasic // basic info of the protocol
	Basic           *erc.ERC20Info       // basic info of the token
	UnderlyingBasic *erc.ERC20Info       // basic info of the underlying token
	ApyInfo         *model.ApyInfo       // borrow stable apy info
}

func (*SToken) GetUnderlyingAddress

func (t *SToken) GetUnderlyingAddress(stoken string) (string, error)

Use s token address to get underlying address.

func (*SToken) UpdateSTokenByUnderlying

func (t *SToken) UpdateSTokenByUnderlying(underlying string) error

Use underlying address to update s token info.

type VToken

type VToken struct {
	ProtocolBasic   *model.ProtocolBasic // basic info of the protocol
	Basic           *erc.ERC20Info       // basic info of the token
	UnderlyingBasic *erc.ERC20Info       // basic info of the underlying token
	ApyInfo         *model.ApyInfo       // borrow variable apy info
}

func (*VToken) GetUnderlyingAddress

func (t *VToken) GetUnderlyingAddress(vtoken string) (string, error)

Use v token address to get underlying address.

func (*VToken) UpdateVTokenByUnderlying

func (t *VToken) UpdateVTokenByUnderlying(underlying string) error

Use underlying address to update v token info.

Jump to

Keyboard shortcuts

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