Documentation ¶
Index ¶
- type AddressMonitor
- type Bee
- type EthClient
- type EthClientCluster
- func (e *EthClientCluster) BlockByNumber(ctx context.Context, n *big.Int) (b *types.Block, err error)
- func (e *EthClientCluster) CallContract(ctx context.Context, call ethereum.CallMsg, blockNumber *big.Int) ([]byte, error)
- func (e *EthClientCluster) CodeAt(ctx context.Context, contract common.Address, blockNumber *big.Int) ([]byte, error)
- func (e *EthClientCluster) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
- func (e *EthClientCluster) FilterLogs(ctx context.Context, query ethereum.FilterQuery) ([]types.Log, error)
- func (e *EthClientCluster) HeaderByNumber(ctx context.Context, number *big.Int) (*types.Header, error)
- func (e *EthClientCluster) NetworkID(ctx context.Context) (*big.Int, error)
- func (e *EthClientCluster) NewLoadBalancedContext(ctx context.Context) context.Context
- func (e *EthClientCluster) PendingCodeAt(ctx context.Context, account common.Address) ([]byte, error)
- func (e *EthClientCluster) PendingNonceAt(ctx context.Context, account common.Address) (uint64, error)
- func (e *EthClientCluster) SendTransaction(ctx context.Context, tx *types.Transaction) error
- func (e *EthClientCluster) SubscribeFilterLogs(ctx context.Context, query ethereum.FilterQuery, ch chan<- types.Log) (ethereum.Subscription, error)
- func (e *EthClientCluster) SuggestGasPrice(ctx context.Context) (*big.Int, error)
- func (e *EthClientCluster) SuggestGasTipCap(ctx context.Context) (*big.Int, error)
- func (e *EthClientCluster) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
- func (e *EthClientCluster) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error)
- type Monitor
- type MonitorEngine
- type Sniper
- type UniswapLiquidity
- type WhaleMonitor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddressMonitor ¶
type AddressMonitor struct {
// contains filtered or unexported fields
}
func NewAddressMonitor ¶
func NewAddressMonitor(sn domain.Sniper, addrs ...domain.NamedAddress) *AddressMonitor
func (*AddressMonitor) Monitor ¶
func (m *AddressMonitor) Monitor(ctx context.Context, tx *types.Transaction)
type Bee ¶
type Bee struct { RawPK *ecdsa.PrivateKey PendingNonce uint64 }
type EthClient ¶
type EthClient interface { bind.ContractBackend SendTransaction(context.Context, *types.Transaction) error TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error) TransactionReceipt(ctx context.Context, txHash common.Hash) (*types.Receipt, error) BlockByNumber(context.Context, *big.Int) (b *types.Block, err error) NetworkID(context.Context) (*big.Int, error) }
type EthClientCluster ¶
type EthClientCluster struct {
// contains filtered or unexported fields
}
func NewEthClientCluster ¶
func NewEthClientCluster(d ...EthClient) *EthClientCluster
func (*EthClientCluster) BlockByNumber ¶
func (*EthClientCluster) CallContract ¶
func (*EthClientCluster) EstimateGas ¶
func (e *EthClientCluster) EstimateGas(ctx context.Context, call ethereum.CallMsg) (gas uint64, err error)
func (*EthClientCluster) FilterLogs ¶
func (*EthClientCluster) HeaderByNumber ¶
func (*EthClientCluster) NewLoadBalancedContext ¶
func (e *EthClientCluster) NewLoadBalancedContext(ctx context.Context) context.Context
func (*EthClientCluster) PendingCodeAt ¶
func (*EthClientCluster) PendingNonceAt ¶
func (*EthClientCluster) SendTransaction ¶
func (e *EthClientCluster) SendTransaction(ctx context.Context, tx *types.Transaction) error
func (*EthClientCluster) SubscribeFilterLogs ¶
func (*EthClientCluster) SuggestGasPrice ¶
func (*EthClientCluster) SuggestGasTipCap ¶
func (*EthClientCluster) TransactionByHash ¶
func (e *EthClientCluster) TransactionByHash(ctx context.Context, hash common.Hash) (tx *types.Transaction, isPending bool, err error)
func (*EthClientCluster) TransactionReceipt ¶
type MonitorEngine ¶
type MonitorEngine struct {
// contains filtered or unexported fields
}
func NewMonitorEngine ¶
func NewMonitorEngine(m ...Monitor) *MonitorEngine
func (*MonitorEngine) Monitor ¶
func (e *MonitorEngine) Monitor(ctx context.Context, tx *types.Transaction)
type Sniper ¶
type Sniper struct {
// contains filtered or unexported fields
}
type UniswapLiquidity ¶
type UniswapLiquidity struct {
// contains filtered or unexported fields
}
func NewUniswapLiquidity ¶
func (*UniswapLiquidity) Add ¶
func (u *UniswapLiquidity) Add(ctx context.Context, tx *types.Transaction, pending bool) error
Add checks when the tx is of addLiquidity in an UniswapV2 AMM fork. If all our checks regarding the snipe passes (eg. the devs adding a minimum liquidity that we expect) then we invoke the snipe
func (*UniswapLiquidity) AddETH ¶
func (u *UniswapLiquidity) AddETH(ctx context.Context, tx *types.Transaction, pending bool) error
AddETH checks when the tx is of addLiquidityETH in an UniswapV2 AMM fork. If all our checks regarding the snipe passes (eg. the devs adding a minimum liquidity that we expect) then we invoke the snipe TODO Super similars, refactor?
type WhaleMonitor ¶
func NewWhaleMonitor ¶
func NewWhaleMonitor(m *big.Int) *WhaleMonitor
func (*WhaleMonitor) Monitor ¶
func (m *WhaleMonitor) Monitor(ctx context.Context, tx *types.Transaction)
Click to show internal directories.
Click to hide internal directories.