Documentation
¶
Index ¶
- func HexToDecimal(hex string) (decimal.Decimal, bool)
- type BlockNumPlugin
- type ERC20TransferPlugin
- type IBlockPlugin
- type IReceiptLogPlugin
- type ITxPlugin
- type ITxReceiptPlugin
- type ReceiptLogPlugin
- type SimpleBlockPlugin
- type TransferEvent
- type TxHashPlugin
- type TxPlugin
- type TxReceiptPlugin
- type TxReceiptPluginWithFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BlockNumPlugin ¶
type BlockNumPlugin struct {
// contains filtered or unexported fields
}
func NewBlockNumPlugin ¶
func NewBlockNumPlugin(callback func(uint64, bool)) BlockNumPlugin
func (BlockNumPlugin) AcceptBlock ¶
func (p BlockNumPlugin) AcceptBlock(b *structs.RemovableBlock)
type ERC20TransferPlugin ¶
type ERC20TransferPlugin struct {
// contains filtered or unexported fields
}
func NewERC20TransferPlugin ¶
func NewERC20TransferPlugin(callback func(tokenAddress, from, to string, amount decimal.Decimal, isRemoved bool)) *ERC20TransferPlugin
func (*ERC20TransferPlugin) Accept ¶
func (p *ERC20TransferPlugin) Accept(tx *structs.RemovableTxAndReceipt)
type IBlockPlugin ¶
type IBlockPlugin interface {
AcceptBlock(block *structs.RemovableBlock)
}
type IReceiptLogPlugin ¶
type IReceiptLogPlugin interface { FromContract() string InterestedTopics() []string NeedReceiptLog(receiptLog *structs.RemovableReceiptLog) bool Accept(receiptLog *structs.RemovableReceiptLog) }
type ITxPlugin ¶
type ITxPlugin interface {
AcceptTx(transaction structs.RemovableTx)
}
type ITxReceiptPlugin ¶
type ITxReceiptPlugin interface {
Accept(tx *structs.RemovableTxAndReceipt)
}
type ReceiptLogPlugin ¶
type ReceiptLogPlugin struct {
// contains filtered or unexported fields
}
func NewReceiptLogPlugin ¶
func NewReceiptLogPlugin( contract string, topics []string, callback func(receiptLog *structs.RemovableReceiptLog), ) *ReceiptLogPlugin
func (*ReceiptLogPlugin) Accept ¶
func (p *ReceiptLogPlugin) Accept(receiptLog *structs.RemovableReceiptLog)
func (*ReceiptLogPlugin) FromContract ¶
func (p *ReceiptLogPlugin) FromContract() string
func (*ReceiptLogPlugin) InterestedTopics ¶
func (p *ReceiptLogPlugin) InterestedTopics() []string
func (*ReceiptLogPlugin) NeedReceiptLog ¶
func (p *ReceiptLogPlugin) NeedReceiptLog(receiptLog *structs.RemovableReceiptLog) bool
simplified version of specifying topic filters https://github.com/ethereum/wiki/wiki/JSON-RPC#a-note-on-specifying-topic-filters
type SimpleBlockPlugin ¶
type SimpleBlockPlugin struct {
// contains filtered or unexported fields
}
provide block info with tx basic infos
func NewSimpleBlockPlugin ¶
func NewSimpleBlockPlugin(callback func(block *structs.RemovableBlock)) SimpleBlockPlugin
func (SimpleBlockPlugin) AcceptBlock ¶
func (p SimpleBlockPlugin) AcceptBlock(b *structs.RemovableBlock)
type TransferEvent ¶
type TransferEvent struct {
// contains filtered or unexported fields
}
type TxHashPlugin ¶
type TxHashPlugin struct {
// contains filtered or unexported fields
}
func NewTxHashPlugin ¶
func NewTxHashPlugin(callback func(txHash string, isRemoved bool)) TxHashPlugin
func (TxHashPlugin) AcceptTx ¶
func (p TxHashPlugin) AcceptTx(transaction structs.RemovableTx)
type TxPlugin ¶
type TxPlugin struct {
// contains filtered or unexported fields
}
func NewTxPlugin ¶
func NewTxPlugin(callback func(tx structs.RemovableTx)) TxPlugin
func (TxPlugin) AcceptTx ¶
func (p TxPlugin) AcceptTx(transaction structs.RemovableTx)
type TxReceiptPlugin ¶
type TxReceiptPlugin struct {
// contains filtered or unexported fields
}
func NewTxReceiptPlugin ¶
func NewTxReceiptPlugin(callback func(tx *structs.RemovableTxAndReceipt)) *TxReceiptPlugin
func (TxReceiptPlugin) Accept ¶
func (p TxReceiptPlugin) Accept(tx *structs.RemovableTxAndReceipt)
type TxReceiptPluginWithFilter ¶
type TxReceiptPluginWithFilter struct { ITxReceiptPlugin // contains filtered or unexported fields }
func NewTxReceiptPluginWithFilter ¶
func NewTxReceiptPluginWithFilter( callback func(tx *structs.RemovableTxAndReceipt), filterFunc func(transaction blockchain.Transaction) bool) *TxReceiptPluginWithFilter
func (TxReceiptPluginWithFilter) NeedReceipt ¶
func (p TxReceiptPluginWithFilter) NeedReceipt(tx blockchain.Transaction) bool
Click to show internal directories.
Click to hide internal directories.