alchemy

package
v0.0.0-...-8b20efb Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	URL   = "https://eth-mainnet.alchemyapi.io/v2/2KUlKPEL26J4MBsVa5O9rkiW2ebfaDe8"
	ZAPIN = ""
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Alchemy

type Alchemy struct {
	// contains filtered or unexported fields
}

func NewAlchemy

func NewAlchemy() (*Alchemy, error)

func (*Alchemy) BalancerGetFinalTokens

func (a *Alchemy) BalancerGetFinalTokens(pool common.Address) ([]common.Address, error)

func (*Alchemy) ContractName

func (a *Alchemy) ContractName(addr common.Address) (string, error)

func (*Alchemy) ERC20Allowance

func (a *Alchemy) ERC20Allowance(erc20 common.Address, owner common.Address, spender common.Address) (*big.Int, error)

func (*Alchemy) ERC20BalanceOf

func (a *Alchemy) ERC20BalanceOf(erc20 common.Address, account common.Address) (*big.Int, error)

func (*Alchemy) ERC20TotalSupply

func (a *Alchemy) ERC20TotalSupply(erc20 common.Address) (*big.Int, error)

func (*Alchemy) HarvestAutoStakeLpToken

func (a *Alchemy) HarvestAutoStakeLpToken(pool common.Address) (common.Address, error)

func (*Alchemy) HarvestAutoStakeRewardPool

func (a *Alchemy) HarvestAutoStakeRewardPool(pool common.Address) (common.Address, error)

func (*Alchemy) HarvestNoMintRewardPoolEarned

func (a *Alchemy) HarvestNoMintRewardPoolEarned(pool common.Address, user common.Address) (*big.Int, error)

func (*Alchemy) HarvestNoMintRewardPoolLpToken

func (a *Alchemy) HarvestNoMintRewardPoolLpToken(pool common.Address) (common.Address, error)

func (*Alchemy) HarvestNoMintRewardPoolRewardToken

func (a *Alchemy) HarvestNoMintRewardPoolRewardToken(pool common.Address) (common.Address, error)

func (*Alchemy) SushiswapEstimateLPTokens

func (a *Alchemy) SushiswapEstimateLPTokens(token0Amount, token1Amount *big.Int, addrs ...common.Address) (*big.Int, error)

won't consider reserve0&reserve1, just an approx estimation

func (*Alchemy) SushiswapGetAmountsOut

func (a *Alchemy) SushiswapGetAmountsOut(amountIn *big.Int, paths []common.Address) ([]*big.Int, error)

func (*Alchemy) SushiswapPairTokens

func (a *Alchemy) SushiswapPairTokens(pair common.Address) (common.Address, common.Address, error)

func (*Alchemy) SushiswapPairTotalSupply

func (a *Alchemy) SushiswapPairTotalSupply(token0Amount, token1Amount *big.Int, addresses ...common.Address) (struct {
	Reserve0           *big.Int
	Reserve1           *big.Int
	BlockTimestampLast uint32
}, *big.Int, error)

func (*Alchemy) UniswapEstimateLPTokens

func (a *Alchemy) UniswapEstimateLPTokens(token0Amount, token1Amount *big.Int, addrs ...common.Address) (*big.Int, error)

won't consider reserve0&reserve1, just an approx estimation

func (*Alchemy) UniswapGetAmountsOut

func (a *Alchemy) UniswapGetAmountsOut(amountIn *big.Int, paths []common.Address) ([]*big.Int, error)

func (*Alchemy) UniswapV2GetReserves

func (a *Alchemy) UniswapV2GetReserves(pool common.Address) (reserveA, reserveB *big.Int, err error)

func (*Alchemy) UniswapV2PairTokens

func (a *Alchemy) UniswapV2PairTokens(pair common.Address) (common.Address, common.Address, error)

func (*Alchemy) UniswapV2PairTotalSupply

func (a *Alchemy) UniswapV2PairTotalSupply(token0Amount, token1Amount *big.Int, addresses ...common.Address) (struct {
	Reserve0           *big.Int
	Reserve1           *big.Int
	BlockTimestampLast uint32
}, *big.Int, error)

func (*Alchemy) UniswapV2RemoveLiquidity

func (a *Alchemy) UniswapV2RemoveLiquidity(amount *big.Int, account, token0, token1 common.Address) error

func (*Alchemy) UniswapV2RewardStakingToken

func (a *Alchemy) UniswapV2RewardStakingToken(pool common.Address) (rewardToken common.Address, stakingToken common.Address, err error)

Jump to

Keyboard shortcuts

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