Documentation ¶
Overview ¶
Package service provides the unipan service TODO(bonedaddy): enable gas price estimation
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory provides swap factory monitoring capabilities and is designed to listen for new tokens
type Pair ¶
type Pair struct {
// contains filtered or unexported fields
}
Pair provides pair monitoring capabilities to watch for liquidity additions in order to trigger a purchase
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service prvoides the unipan backend service
func New ¶
func New( ctx context.Context, cfg *config.Config, logger *zap.Logger, db *database.Database, auther *utils.Authorizer, pan *uniswap.Client, uni *uniswap.Client) *Service
New returns a new unipan service
func (*Service) StartFactoryWatchers ¶
func (s *Service) StartFactoryWatchers(uniStart, panStart *uint64, addrOverride *common.Address) error
StartFactoryWatchers is used to start factory watcher services if uniStart is not nil we start monitoring uniswap events at that block if panStart is not nil we start monitoring pancakeswap events at that block if addrOverride is not nil we use that address for both factory contracts