Documentation ¶
Index ¶
- func ChainlinkACAListSanityCheck(client *ethclient.Client) bool
- func CheckBlockReorderTaint(block *types.Block, client *ethclient.Client) (bool, int)
- func DialInfuraClient() *ethclient.Client
- func DialLocalClient() *ethclient.Client
- func GetCurrentClient() *ethclient.Client
- func HandleAddLiquidity(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleAddLiquidityETH(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleRemoveLiquidity(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleRemoveLiquidityETH(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleRemoveLiquidityETHSupportingFeeOnTransferTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleRemoveLiquidityETHWithPermit(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleRemoveLiquidityETHWithPermitSupportingFeeOnTransferTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleRemoveLiquidityWithPermit(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapETHForExactTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapExactETHForTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapExactETHForTokensSupportingFeeOnTransferTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapExactTokensForETH(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapExactTokensForETHSupportingFeeOnTransferTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapExactTokensForTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapExactTokensForTokensSupportingFeeOnTransferTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapTokensForExactEth(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func HandleSwapTokensForExactTokens(tx *types.Transaction, client *ethclient.Client, isStealth bool, fullMode bool)
- func InitRPCClient() *rpc.Client
- func StreamNewBlocks(client *rpc.Client)
- func StreamNewTxs(rpcClient *rpc.Client, fullMode bool)
- func TxMinedUpdate(txHash string, client *ethclient.Client)
- type ERC20TransferParsedInput
- type UniswapAddLiquidityETHFinalInput
- type UniswapAddLiquidityETHInput
- type UniswapAddLiquidityFinalInput
- type UniswapAddLiquidityInput
- type UniswapETHToExactTokensInput
- type UniswapETHToTokenParsedInput
- type UniswapExactETHForTokensSupportingFeeOnTransferTokensInput
- type UniswapExactTokensForETHSupportingFeeOnTransferTokensInput
- type UniswapExactTokensForTokensSupportingFeeOnTransferTokensInput
- type UniswapRemoveLiquidityETHFinalInput
- type UniswapRemoveLiquidityETHInput
- type UniswapRemoveLiquidityETHSupportingFeeOnTransferTokens
- type UniswapRemoveLiquidityETHWithPermit
- type UniswapRemoveLiquidityETHWithPermitSupportingFeeOnTransferTokensInput
- type UniswapRemoveLiquidityFinalInput
- type UniswapRemoveLiquidityInput
- type UniswapRemoveLiquidityWithPermitInput
- type UniswapTokenToETHParsedInput
- type UniswapTokenToTokenParsedInput
- type UniswapTokensForExactETHInput
- type UniswapTokensForExactTokensInput
- type UniswapTradeFinal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChainlinkACAListSanityCheck ¶
This function serves two purposes 1) Check if the list of chainlink oracle pricefeeds (that I bootstrapped in `priceFeedACAList`) are valid 2) To run on init to check if all the pricefeeds are valid (useful to check sanity of ACA's when we add new oracles)
func CheckBlockReorderTaint ¶
Check if the block txs order indicates deviation from standard client rules A block is said to be tainted if a miner prioritizes a tx over other despite the latter paying higher gas If a miner were to be extracting MEV, they would prioritize execution of their own above else (despite gas priority) TODO: Lot's of test cases to ensure accuracy, return addition info about types of tx prioritized
func DialInfuraClient ¶
func DialLocalClient ¶
func HandleAddLiquidity ¶
func HandleAddLiquidityETH ¶
func HandleRemoveLiquidity ¶
func InitRPCClient ¶
func StreamNewBlocks ¶
func StreamNewTxs ¶
Method to stream new transactions as they're discovered by the node We create a new channel to plug into the mempool and listen to new txs They're then passed through the tx classifier to be parsed and eventually piped into elastic search
func TxMinedUpdate ¶
After a block is mined, we iterate through the txs and mark the ones that've been mined
Types ¶
type ERC20TransferParsedInput ¶
type ERC20TransferParsedInput struct {
// contains filtered or unexported fields
}
type UniswapAddLiquidityETHFinalInput ¶
type UniswapAddLiquidityETHFinalInput struct { TokenAddress string `json:"tokenAddress"` LiquidityProviderAddress string `json:"liquidityProviderAddress"` Deadline int64 `json:"deadline"` AmountTokenDesired float64 `json:"amountTokenDesired"` AmountTokenMin float64 `json:"amountTokenMin"` AmountEthMin float64 `json:"amountEthMin"` }
type UniswapAddLiquidityFinalInput ¶
type UniswapAddLiquidityFinalInput struct { TokenAAddress string `json:"tokenAAddress"` TokenBAddress string `json:"tokenBAddress"` AmountADesired float64 `json:"amountADesired"` AmountBDesired float64 `json:"amountBDesired"` AmountAMin float64 `json:"amountAMin"` AmountBMin float64 `json:"amountBMin"` Deadline int64 `json:"deadline"` LiquidityProviderAddress string `json:"liquidityProviderAddress"` }
type UniswapETHToTokenParsedInput ¶
type UniswapETHToTokenParsedInput struct { AmountOutMin *big.Int Path []common.Address Deadline *big.Int To common.Address }
Relevant types
type UniswapRemoveLiquidityETHFinalInput ¶
type UniswapRemoveLiquidityETHFinalInput struct { TokenAddress string `json:"tokenAddress"` LPTokenAmount float64 `json:"lPTokenAmount"` AmountTokenMin float64 `json:"amountTokenMin"` AmountETHMin float64 `json:"amountEthMin"` Deadline int64 `json:"deadline"` LiquidityProviderAddress string `json:"liquidityProviderAddress"` }
type UniswapRemoveLiquidityETHWithPermit ¶
type UniswapRemoveLiquidityETHWithPermit struct { // (address token,uint256 liquidity,uint256 amountTokenMin,uint256 amountETHMin,address to,uint256 deadline,bool approveMax,uint8 v,bytes32 r,bytes32 s ) Token common.Address Liquidity *big.Int AmountTokenMin *big.Int AmountETHMin *big.Int Deadline *big.Int To common.Address ApproveMax bool V uint8 R [32]byte S [32]byte }