Documentation
¶
Index ¶
- type ABIEvent
- type ABIInput
- type ABIManager
- func (am *ABIManager) GetABI(contractName string) (*abi.ABI, error)
- func (am *ABIManager) GetEventSignature(contractName, eventName string) (string, error)
- func (am *ABIManager) ListContracts() []string
- func (am *ABIManager) ListEvents(contractName string) ([]string, error)
- func (am *ABIManager) LoadABIFromFile(contractName, filePath string) error
- func (am *ABIManager) LoadABIsFromDirectory(dirPath string) error
- type EventProcessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ABIEvent ¶
type ABIEvent struct {
Type string `json:"type"`
Name string `json:"name"`
Inputs []ABIInput `json:"inputs"`
Anonymous bool `json:"anonymous,omitempty"`
}
ABIEvent represents a generic event structure
type ABIInput ¶
type ABIInput struct {
Indexed bool `json:"indexed"`
Name string `json:"name"`
Type string `json:"type"`
InternalType string `json:"internalType,omitempty"`
}
ABIInput represents an event input parameter
type ABIManager ¶
type ABIManager struct {
// contains filtered or unexported fields
}
ABIManager handles loading and managing multiple contract ABIs
func (*ABIManager) GetABI ¶
func (am *ABIManager) GetABI(contractName string) (*abi.ABI, error)
GetABI returns the ABI for a specific contract
func (*ABIManager) GetEventSignature ¶
func (am *ABIManager) GetEventSignature(contractName, eventName string) (string, error)
GetEventSignature returns the event signature for a specific contract and event
func (*ABIManager) ListContracts ¶
func (am *ABIManager) ListContracts() []string
ListContracts returns all loaded contract names
func (*ABIManager) ListEvents ¶
func (am *ABIManager) ListEvents(contractName string) ([]string, error)
ListEvents returns all events for a specific contract
func (*ABIManager) LoadABIFromFile ¶
func (am *ABIManager) LoadABIFromFile(contractName, filePath string) error
LoadABIFromFile loads an ABI from a JSON file
func (*ABIManager) LoadABIsFromDirectory ¶
func (am *ABIManager) LoadABIsFromDirectory(dirPath string) error
LoadABIsFromDirectory loads all ABI files from a directory
type EventProcessor ¶
type EventProcessor struct {
// contains filtered or unexported fields
}
EventProcessor handles processing of blockchain events
func NewEventProcessor ¶
func NewEventProcessor(abiManager *ABIManager, pool *pgxpool.Pool) *EventProcessor
NewEventProcessor creates a new event processor
func (*EventProcessor) GetABIManager ¶
func (ep *EventProcessor) GetABIManager() *ABIManager
GetABIManager returns the ABI manager
func (*EventProcessor) ProcessLog ¶
func (ep *EventProcessor) ProcessLog(vLog types.Log, contractName string) error
ProcessLog processes a single log entry