Documentation ¶
Overview ¶
Moved here because transactions package depends on accounts package which depends on appdatabase where this functionality is needed
Index ¶
- Constants
- Variables
- func GetEventSignatureHash(signature string) common.Hash
- func IsTokenTransfer(logs []*types.Log) bool
- func ParseErc20TransferLog(ethlog *types.Log) (from, to common.Address, amount *big.Int)
- func ParseErc721TransferLog(ethlog *types.Log) (from, to common.Address, tokenID *big.Int)
- func ParseUniswapV2Log(ethlog *types.Log) (pairAddress common.Address, from common.Address, to common.Address, ...)
- func ParseUniswapV3Log(ethlog *types.Log) (poolAddress common.Address, sender common.Address, recipient common.Address, ...)
- type ChainID
- type EventType
- type Type
Constants ¶
View Source
const ( EthereumMainnet uint64 = 1 EthereumGoerli uint64 = 5 EthereumSepolia uint64 = 11155111 OptimismMainnet uint64 = 10 OptimismGoerli uint64 = 420 ArbitrumMainnet uint64 = 42161 ArbitrumGoerli uint64 = 421613 )
View Source
const ( // Transaction types EthTransfer Type = "eth" Erc20Transfer Type = "erc20" Erc721Transfer Type = "erc721" UniswapV2Swap Type = "uniswapV2Swap" UniswapV3Swap Type = "uniswapV3Swap" // Event types Erc20TransferEventType EventType = "erc20Event" Erc721TransferEventType EventType = "erc721Event" UniswapV2SwapEventType EventType = "uniswapV2SwapEvent" UniswapV3SwapEventType EventType = "uniswapV3SwapEvent" UnknownEventType EventType = "unknownEvent" Erc20_721TransferEventSignature = "Transfer(address,address,uint256)" )
Variables ¶
Functions ¶
func GetEventSignatureHash ¶ added in v0.157.2
func IsTokenTransfer ¶ added in v0.157.2
func ParseErc20TransferLog ¶ added in v0.157.2
func ParseErc721TransferLog ¶ added in v0.157.2
func ParseUniswapV2Log ¶ added in v0.157.2
Types ¶
type EventType ¶ added in v0.157.2
type EventType string
Log Event type
func GetEventType ¶ added in v0.157.2
Detect event type for a cetain item from the Events Log
type Type ¶ added in v0.157.2
type Type string
Type type of transaction
func EventTypeToSubtransactionType ¶ added in v0.157.2
Click to show internal directories.
Click to hide internal directories.