Documentation
¶
Index ¶
- Constants
- func GetUniV2Buy(amount0In, amount0Out, amount1In, amount1Out *big.Int) bool
- type Parser
- func (p *Parser) CreatePair(_ context.Context, addr *tronApi.Address, klass string) (*models.Pair, bool)
- func (p *Parser) DeleteHolders()
- func (p *Parser) GetEncodedBlock() []byte
- func (p *Parser) GetEncodedHolders() []byte
- func (p *Parser) GetPairTokens(pair *tronApi.Address, klass string) (tokenA, tokenB *models.Token, ok bool)
- func (p *Parser) GetSunswapToken(addr *tronApi.Address) (string, bool)
- func (p *Parser) GetTokenDecimals(address *tronApi.Address) (int32, bool)
- func (p *Parser) Parse(block models.Block) bool
- type State
- func (i *State) AddDirectSwap(m *models.DirectSwap)
- func (i *State) AddLiquidity(liquidity *models.LiquidityEvent)
- func (i *State) AddProcessHolder(h *models.Holder)
- func (i *State) AddTrade(trade *models.PairSwap)
- func (i *State) AddTransferEvent(transfer *models.TransferEvent)
- func (i *State) RegisterNewPair(factory, pair, klass, network, node string, blockTime time.Time)
Constants ¶
View Source
const ( Chain = "TRON" SyncTopicsCount = 4 )
View Source
const JMFactoryABI = `` /* 3510-byte string literal not displayed */
View Source
const SwftSwapEvent = 0x45f377f8
View Source
const Univ3EventidShort = 0xc42079f9
Variables ¶
This section is empty.
Functions ¶
func GetUniV2Buy ¶
GetUniV2Buy Returns Buy true/false
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func New ¶
func New(api *tronApi.API, lists *integrations.TokenListsProvider, pairsCache cache.PairCache, converter *converters.FiatConverter, abiHolder *abi.Holder, swLists *integrations.SunswapProvider) *Parser
func (*Parser) CreatePair ¶
func (*Parser) DeleteHolders ¶
func (p *Parser) DeleteHolders()
func (*Parser) GetEncodedBlock ¶
func (*Parser) GetEncodedHolders ¶
func (*Parser) GetPairTokens ¶
func (*Parser) GetSunswapToken ¶
GetSunswapToken - NOTICE This could fail due to "this node doesnt support constant"
func (*Parser) GetTokenDecimals ¶
type State ¶
type State struct { DirectSwaps []*models.DirectSwap `json:"direct_swaps"` PairSwaps []*models.PairSwap `json:"pair_swaps"` Liquidities []*models.LiquidityEvent `json:"liquidity_events"` Transfers []*models.TransferEvent `json:"transfer_events"` Pairs []*models.NewPair `json:"new_pairs"` Holders []*models.Holder `json:"holders"` Block *models.Block `json:"block"` // contains filtered or unexported fields }
func CreateState ¶
func (*State) AddDirectSwap ¶
func (i *State) AddDirectSwap(m *models.DirectSwap)
func (*State) AddLiquidity ¶
func (i *State) AddLiquidity(liquidity *models.LiquidityEvent)
func (*State) AddProcessHolder ¶
func (*State) AddTransferEvent ¶
func (i *State) AddTransferEvent(transfer *models.TransferEvent)
Click to show internal directories.
Click to hide internal directories.