Documentation ¶
Index ¶
- Constants
- func NewRouter(client *ethclient.Client, address string) (exchanges.Router, error)
- func NewRouterWithName(client *ethclient.Client, address string, routerName string) (exchanges.Router, error)
- type Router
- func (r Router) Client() *ethclient.Client
- func (r Router) GetAllPairs(ctx context.Context) ([]common.Address, error)
- func (r Router) GetAllPairsAsync(ctx context.Context) (int64, chan *common.Address, chan error)
- func (r Router) GetFactoryAddress() common.Address
- func (r Router) GetPairInfo(address common.Address) (*models.LiquidityPool, error)
- func (r Router) GetPairPrice(address common.Address, token0Amount int64, token1Amount int64) (*exchanges.TradeInfo, error)
- func (r Router) GetReserves(address common.Address) (float64, float64, error)
- func (r Router) GetRouterAddress() common.Address
- func (r Router) GetRouterContract() exchanges.RouterContract
- func (r Router) Name() string
Constants ¶
View Source
const ( RouterAddress = "0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F" Name = "pancake" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
func (Router) GetAllPairs ¶
func (Router) GetAllPairsAsync ¶
func (Router) GetFactoryAddress ¶
func (Router) GetPairInfo ¶
func (Router) GetPairPrice ¶
func (Router) GetReserves ¶
func (Router) GetRouterAddress ¶
func (Router) GetRouterContract ¶
func (r Router) GetRouterContract() exchanges.RouterContract
Click to show internal directories.
Click to hide internal directories.