Versions in this module Expand all Collapse all v0 v0.1.1 Jul 30, 2023 Changes in this version + const AAVE + const BAT + const BUSD + const COMP + const DAI + const ETH + const ProxyAddr + const REP + const SAI + const StableRate + const UNI + const USDC + const USDT + const VariableRate + const WBTC + const YFI + const ZRX + var CoinToAddressMap = map[coinType]common.Address + var CoinToCompoundMap = map[coinType]common.Address + var CoinToIlkMap = map[coinType][32]byte + var CoinToJoinMap = map[coinType]common.Address + func Approve(client *DefiClient, coin coinType, addr common.Address, size *big.Int) error + type AaveClient struct + func (c *AaveClient) Borrow(size *big.Int, coin coinType, interestRate rateModel) error + func (c *AaveClient) FlashLoanActions(size *big.Int, coin coinType, actions *Actions) *Actions + func (c *AaveClient) GetUserReserveData(addr common.Address, user common.Address) (ReserveData, error) + func (c *AaveClient) Lend(size *big.Int, coin coinType) error + type Actions struct + Actions []action + func (actions *Actions) Add(newActionss ...*Actions) error + type BalancerClient struct + func (c *BalancerClient) Swap(inputCoin coinType, outputCoin coinType, inputAmount *big.Int) *Actions + type Client interface + Uniswap func() UniswapClient + type CompoundClient struct + func (c *CompoundClient) BalanceOf(coin coinType) (*big.Int, error) + func (c *CompoundClient) BalanceOfUnderlying(coin coinType) (*types.Transaction, error) + func (c *CompoundClient) Redeem(amount int64, coin coinType) error + func (c *CompoundClient) RedeemActions(size *big.Int, coin coinType) *Actions + func (c *CompoundClient) Supply(amount int64, coin coinType) error + func (c *CompoundClient) SupplyActions(size *big.Int, coin coinType) *Actions + type CurveClient struct + func (c *CurveClient) AddLiquidityActions(handler common.Address, pool common.Address, tokens []common.Address, ...) *Actions + func (c *CurveClient) ExchangeActions(handler common.Address, token1Addr common.Address, token2Addr common.Address, ...) *Actions + func (c *CurveClient) ExchangeUnderlyingActions(handler common.Address, token1Addr common.Address, token2Addr common.Address, ...) *Actions + func (c *CurveClient) RemoveLiquidityActions(handler common.Address, pool common.Address, tokenI common.Address, ...) *Actions + type DefiClient struct + func NewClient(opts *bind.TransactOpts, ethClient *ethclient.Client) *DefiClient + func (c *DefiClient) Aave() *AaveClient + func (c *DefiClient) BalanceOf(coin coinType) (*big.Int, error) + func (c *DefiClient) Balancer() *BalancerClient + func (c *DefiClient) CombineActions(actions *Actions) ([]common.Address, [][]byte, *big.Int, error) + func (c *DefiClient) Compound() *CompoundClient + func (c *DefiClient) Curve() *CurveClient + func (c *DefiClient) ExecuteActions(actions *Actions) error + func (c *DefiClient) ExecuteActionsWithGasPrice(actions *Actions, gasPrice *big.Int) error + func (c *DefiClient) Kyberswap() *KyberswapClient + func (c *DefiClient) Maker() *MakerClient + func (c *DefiClient) SuggestGasPrice(blockNum *big.Int) (*big.Int, error) + func (c *DefiClient) SupplyFundActions(size *big.Int, coin coinType) *Actions + func (c *DefiClient) Sushiswap() *SushiswapClient + func (c *DefiClient) Uniswap() *UniswapClient + func (c *DefiClient) Yearn() *YearnClient + type KyberswapClient struct + func (c *KyberswapClient) SwapActions(size *big.Int, baseCurrency coinType, quoteCurrency coinType) *Actions + type MakerClient struct + func (c *MakerClient) DepositCollateralActions(collateralAmount *big.Int, collateralType coinType, cdp *big.Int) *Actions + func (c *MakerClient) GenerateDaiAction(collateralAmount *big.Int, daiAmount *big.Int, collateralType coinType) *Actions + func (c *MakerClient) WipeAction(daiAmount *big.Int, cdp *big.Int) *Actions + type ReserveData struct + BorrowRate *big.Int + BorrowRateMode *big.Int + CurrentATokenBalance *big.Int + CurrentBorrowBalance *big.Int + LastUpdateTimestamp *big.Int + LiquidityRate *big.Int + OriginationFee *big.Int + PrincipalBorrowBalance *big.Int + UsageAsCollateralEnabled bool + VariableBorrowIndex *big.Int + type SushiswapClient struct + func (c *SushiswapClient) SwapActions(size *big.Int, baseCurrency coinType, quoteCurrency coinType) *Actions + type TxHash string + type UniswapClient struct + func (c *UniswapClient) FlashSwapActions(size *big.Int, coinBorrow coinType, coinRepay coinType, actions *Actions) *Actions + func (c *UniswapClient) Swap(size int64, baseCurrency coinType, quoteCurrency coinType, ...) error + func (c *UniswapClient) SwapActions(size *big.Int, baseCurrency coinType, quoteCurrency coinType) *Actions + type YearnClient struct + func (c *YearnClient) AddLiquidityActions(size *big.Int, coin coinType) *Actions + func (c *YearnClient) RemoveLiquidityActions(size *big.Int, coin coinType) *Actions