Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Protocol ¶
type Protocol struct {
ProtocolBasic *model.ProtocolBasic
LiquidityPools []*liquidity.LiquidityPool
StakePools []*stake.StakePool
LendingPools []*lending.LendingPool
}
func New ¶
func New(input ProtocolInput) (*Protocol, error)
Create a new protocol, with basic info and empty pools.
func (*Protocol) UpdateLendingApys ¶ added in v0.2.0
Update some of the protocol's lend pools apys by given underlying addresses.
If "underlyings" is empty, update all pools.
func (*Protocol) UpdateLendingPoolTokens ¶ added in v0.2.0
Update lending pool tokens.
func (*Protocol) UpdateProtocolBasic ¶ added in v0.2.0
func (prot *Protocol) UpdateProtocolBasic(input ProtocolInput)
Update the protocol basic info.
Will not update the empty params.
type ProtocolInput ¶ added in v0.2.0
type ProtocolInput struct {
Network string // Network of the protocol.
Name string // Name of the protocol, given by github.com/0xVanfer/ethaddr.
Client bind.ContractBackend // Contract backend to call the contracts. Can be nil, but most functions will not work properly.
Coingecko coingecko.Gecko // Coingecko. Can also input the key only.
}
Click to show internal directories.
Click to hide internal directories.