Documentation
¶
Index ¶
- Constants
- Variables
- func DisplayActionInfo(actionNameSubstr string)
- func DisplayActions()
- func FinishActions(actions map[string]shared.ActionOptions)
- func InitActions(actions map[string]shared.ActionOptions)
- func InitTornadoContracts() tornadoContractsMutex
- func ProcessERC20Transfer(p ActionEventData)
- func ProcessTornadoDeposit(p ActionEventData)
- func ProcessTornadoWithdraw(p ActionEventData)
- func SendWebhookMsgERC20Transfer(eventLog types.Log, erc20 ERC20TransferInfo)
- func SendWebhookMsgERC20Volume(erc20Token common.Address, minutes int)
- func TryBackrunTx(p ActionTxData)
- type ActionBlockData
- type ActionEventData
- type ActionTxData
- type ERC20TransferInfo
- type NativePrice
- type TokenInfo
- type WaitGroupCount
Constants ¶
const ( Reset = "\033[0m" Bold = "\033[1m" Underline = "\033[4m" Italic = "\033[3m" )
Variables ¶
var ActionMapMutex sync.RWMutex
prevent concurrent map writes for maps: EventSigToAction ContractToEventSigToAction TxAddressToAction
var BlockActions []func(ActionBlockData)
array of action functions, all of which are called when block is mined
var ContractToEventAction map[common.Address][]func(ActionEventData)
map contract address to event handling action function
var ContractToEventSigToAction map[common.Address]map[common.Hash][]func(ActionEventData)
map contract address and event sig to functions
var ETH common.Address // we will treat native ETH as an ERC20 token with address 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
var EventSigToAction map[common.Hash][]func(ActionEventData)
map event sig hash to action functions
var TxAddressToAction map[common.Address][]func(ActionTxData)
map transaction `to` or `from` address to action functions
var USDC common.Address
var USDT common.Address
tokens and addresses
var WETH common.Address
Functions ¶
func DisplayActionInfo ¶
func DisplayActionInfo(actionNameSubstr string)
display full action info (including options) of actions that contain the given action name substring case insensitive
func DisplayActions ¶
func DisplayActions()
func FinishActions ¶
func FinishActions(actions map[string]shared.ActionOptions)
call all action finish functions only called by historical tracking after historical finishes
func InitActions ¶
func InitActions(actions map[string]shared.ActionOptions)
initializes all actions by calling all method functions of action struct that are enabled in config file
func InitTornadoContracts ¶
func InitTornadoContracts() tornadoContractsMutex
func ProcessERC20Transfer ¶
func ProcessERC20Transfer(p ActionEventData)
func ProcessTornadoDeposit ¶
func ProcessTornadoDeposit(p ActionEventData)
func ProcessTornadoWithdraw ¶
func ProcessTornadoWithdraw(p ActionEventData)
func SendWebhookMsgERC20Transfer ¶
func SendWebhookMsgERC20Transfer(eventLog types.Log, erc20 ERC20TransferInfo)
func TryBackrunTx ¶
func TryBackrunTx(p ActionTxData)
Types ¶
type ActionBlockData ¶
type ActionEventData ¶
type ActionTxData ¶
type ERC20TransferInfo ¶
type ERC20TransferInfo struct {
// contains filtered or unexported fields
}
type NativePrice ¶
type TokenInfo ¶
type TokenInfo struct { TokenName string `json:"tokenName"` TokenSymbol string `json:"tokenSymbol"` TokenLogo string `json:"tokenLogo"` TokenDecimals string `json:"tokenDecimals"` NativePrice NativePrice `json:"nativePrice"` UsdPrice float64 `json:"usdPrice"` UsdPriceFormatted string `json:"usdPriceFormatted"` ExchangeName string `json:"exchangeName"` ExchangeAddress string `json:"exchangeAddress"` TokenAddress string `json:"tokenAddress"` PriceLastChangedAtBlock string `json:"priceLastChangedAtBlock"` PossibleSpam bool `json:"possibleSpam"` VerifiedContract bool `json:"verifiedContract"` PairAddress string `json:"pairAddress"` PairTotalLiquidityUsd string `json:"pairTotalLiquidityUsd"` PercentChange24hr string `json:"24hrPercentChange"` }
type WaitGroupCount ¶
var RpcWaitGroup WaitGroupCount
wait group used to track and wait for rpc requests if RpcWaitGroup.GetCount() is too many, historical events listener calls RpcWaitGroup.Wait()
func (*WaitGroupCount) Add ¶
func (wg *WaitGroupCount) Add(delta int)
func (*WaitGroupCount) Done ¶
func (wg *WaitGroupCount) Done()
func (*WaitGroupCount) GetCount ¶
func (wg *WaitGroupCount) GetCount() int
Source Files
¶
- action_bytecode_scan.go
- action_erc20.go
- action_graph.go
- action_logging.go
- action_monitor_transfers.go
- action_ownershiptransfer.go
- action_proxy_upgrades.go
- action_send_transaction.go
- action_tethertrack.go
- action_tornado_funded_exploits.go
- action_tornadocash.go
- action_track_contract_calls.go
- action_uniswapV2_volume.go
- action_uniswapV3_volume.go
- base.go
- init.go