Documentation ¶
Index ¶
- type ChainData
- type Storage
- func (s *Storage) AddSolanaTradeLogs(logs []common.SolanaTradelog)
- func (s *Storage) AddSolanaTransferLogs(logs []common.SolanaTransferlog)
- func (s *Storage) GetLastBigTx(chain common.Chain, action common.SmartMoneyActivities, last int) ([]common.BigTx, error)
- func (s *Storage) GetLastBigTxForToken(chain common.Chain, action common.SmartMoneyActivities, last int, ...) ([]common.BigTx, error)
- func (s *Storage) GetLastBigTxForUser(chain common.Chain, action common.SmartMoneyActivities, last int, ...) ([]common.BigTx, error)
- func (s *Storage) GetTokenInFlow(duration time.Duration) (map[string]float64, error)
- func (s *Storage) GetTokenInFlowInUsdt(duration time.Duration) (map[string]float64, error)
- func (s *Storage) GetTokenInfo() map[string]common.Token
- func (s *Storage) GetTokenOutFlow(duration time.Duration) (map[string]float64, error)
- func (s *Storage) GetTokenOutFlowInUsdt(duration time.Duration) (map[string]float64, error)
- func (s *Storage) GetTokenUsdtRate() map[string]float64
- func (s *Storage) GetTokens(chain common.Chain) []string
- func (s *Storage) GetTradeLogs(duration time.Duration) (TradeStorageByRange, error)
- func (s *Storage) GetTradeLogsForToken(from time.Time, token string) []common.SolanaTradelog
- func (s *Storage) GetTradeLogsForUser(from time.Time, user string) []common.SolanaTradelog
- func (s *Storage) GetTransferLogs(duration time.Duration) (TransferStorageByRange, error)
- func (s *Storage) GetTransferLogsForToken(from time.Time, token string) []common.SolanaTransferlog
- func (s *Storage) GetTrendingToken() coingecko.CoingeckoTrending
- func (s *Storage) GetUsers(chain common.Chain) []string
- func (s *Storage) RemoveTrades(sugar *zap.SugaredLogger)
- func (s *Storage) RemoveTransfer(sugar *zap.SugaredLogger)
- func (s *Storage) SetAddrToTokenInfo(tokens []common.Token)
- func (s *Storage) SetTokenUsdtRate(rates []common.Token)
- func (s *Storage) SetTrendingToken(t coingecko.CoingeckoTrending)
- type StorageByRangeIndex
- type TradeStorageByRange
- type TransferStorageByRange
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage struct {
// contains filtered or unexported fields
}
func NewStorage ¶
func NewStorage(log *zap.SugaredLogger) *Storage
func (*Storage) AddSolanaTradeLogs ¶
func (s *Storage) AddSolanaTradeLogs(logs []common.SolanaTradelog)
func (*Storage) AddSolanaTransferLogs ¶
func (s *Storage) AddSolanaTransferLogs(logs []common.SolanaTransferlog)
func (*Storage) GetLastBigTx ¶ added in v0.0.4
func (*Storage) GetLastBigTxForToken ¶ added in v0.0.8
func (*Storage) GetLastBigTxForUser ¶ added in v0.0.9
func (*Storage) GetTokenInFlow ¶ added in v0.0.2
func (*Storage) GetTokenInFlowInUsdt ¶ added in v0.0.2
func (*Storage) GetTokenOutFlow ¶ added in v0.0.2
func (*Storage) GetTokenOutFlowInUsdt ¶ added in v0.0.2
func (*Storage) GetTokenUsdtRate ¶
func (*Storage) GetTradeLogs ¶
func (s *Storage) GetTradeLogs(duration time.Duration) (TradeStorageByRange, error)
func (*Storage) GetTradeLogsForToken ¶
heavy action
func (*Storage) GetTradeLogsForUser ¶
heavy action
func (*Storage) GetTransferLogs ¶
func (s *Storage) GetTransferLogs(duration time.Duration) (TransferStorageByRange, error)
func (*Storage) GetTransferLogsForToken ¶
func (*Storage) GetTrendingToken ¶ added in v0.0.9
func (s *Storage) GetTrendingToken() coingecko.CoingeckoTrending
func (*Storage) RemoveTrades ¶
func (s *Storage) RemoveTrades(sugar *zap.SugaredLogger)
func (*Storage) RemoveTransfer ¶
func (s *Storage) RemoveTransfer(sugar *zap.SugaredLogger)
func (*Storage) SetAddrToTokenInfo ¶
func (*Storage) SetTokenUsdtRate ¶
func (*Storage) SetTrendingToken ¶ added in v0.0.9
func (s *Storage) SetTrendingToken(t coingecko.CoingeckoTrending)
type StorageByRangeIndex ¶
type StorageByRangeIndex struct { StartIndex int // point to first trade logs of this chain that in duration StartBlockTs time.Time // use to debug, blockTs of StartIndex block StartBlock uint64 // use to debug, block number of StartIndex block EndBlockTs time.Time // use to debug, end block ts EndBlock uint64 // use to debug, end block number }
type TradeStorageByRange ¶
type TradeStorageByRange struct { UserProfit map[string]float64 TokenProfit map[string]float64 TokenInFlowInUsdt map[string]float64 TokenInFlow map[string]float64 TokenOutFlowInUsdt map[string]float64 TokenOutFlow map[string]float64 StorageByRangeIndex // contains filtered or unexported fields }
func NewTradeStorageByRange ¶
func NewTradeStorageByRange(duration time.Duration) TradeStorageByRange
type TransferStorageByRange ¶
type TransferStorageByRange struct { CexInFlow map[string]float64 CexInFlowInUsdt map[string]float64 CexOutFlow map[string]float64 CexOutFlowInUsdt map[string]float64 StorageByRangeIndex // contains filtered or unexported fields }
func NewTransferStorageByRange ¶
func NewTransferStorageByRange(duration time.Duration) TransferStorageByRange
Click to show internal directories.
Click to hide internal directories.