Documentation ¶
Index ¶
- Constants
- func GetAssetsJson() (map[string]*OsmosisAsset, error)
- func NewJSONReader(path string, filename string) *jsonReader
- type AnyswapAssetSource
- type AssetSource
- type Assets
- type AyinAssetSource
- type BalancerV2AssetSource
- type BifrostAssetSource
- type BitflowAssetSource
- type CamelotV3AssetSource
- type CurvefiAssetSource
- type GRPCClient
- type HydrationAssetSource
- type OrcaAssetSource
- type OsmosisAsset
- type OsmosisAssetResponse
- type OsmosisAssetSource
- type PlatypusAssetSource
- type PlatypusCoin
- type SerumAssetSource
- type SerumPair
- type TraderJoeAssetSource
- type UniswapAssetSource
- func (uas *UniswapAssetSource) Asset() chan dia.Asset
- func (uas *UniswapAssetSource) Done() chan bool
- func (uas *UniswapAssetSource) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
- func (uas *UniswapAssetSource) GetName(tokenAddress common.Address) (name string, err error)
- func (uas *UniswapAssetSource) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)
- func (uas *UniswapAssetSource) GetPairByID(num int64) (UniswapPair, error)
- type UniswapPair
- type UniswapV3AssetSource
- type VelarAssetSource
- type VelodromeAssetSource
- func (uas *VelodromeAssetSource) Asset() chan dia.Asset
- func (uas *VelodromeAssetSource) Done() chan bool
- func (uas *VelodromeAssetSource) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
- func (uas *VelodromeAssetSource) GetName(tokenAddress common.Address) (name string, err error)
- func (uas *VelodromeAssetSource) GetPairByAddress(pairAddress common.Address) (pair VelodromePair, err error)
- func (uas *VelodromeAssetSource) GetPairByID(num int64) (VelodromePair, error)
- type VelodromePair
Constants ¶
const (
Blockchain = "Bifrost"
)
Variables ¶
This section is empty.
Functions ¶
func GetAssetsJson ¶ added in v1.4.242
func GetAssetsJson() (map[string]*OsmosisAsset, error)
func NewJSONReader ¶
Types ¶
type AnyswapAssetSource ¶ added in v1.4.0
type AnyswapAssetSource struct { URL string // contains filtered or unexported fields }
func NewAnyswapAssetSource ¶ added in v1.4.0
func NewAnyswapAssetSource(exchange dia.Exchange) *AnyswapAssetSource
func (*AnyswapAssetSource) Asset ¶ added in v1.4.0
func (sas *AnyswapAssetSource) Asset() chan dia.Asset
func (*AnyswapAssetSource) Done ¶ added in v1.4.0
func (sas *AnyswapAssetSource) Done() chan bool
type AssetSource ¶
type AyinAssetSource ¶ added in v1.4.504
type AyinAssetSource struct {
// contains filtered or unexported fields
}
AlphiumAssetSource aset collector object - which serves assetCollector command
func NewAyinAssetSource ¶ added in v1.4.504
func NewAyinAssetSource(exchange dia.Exchange, relDB *models.RelDB) *AyinAssetSource
NewAlephiumAssetSource creates object to get alephium assets ENV values:
AYIN_ASSETS_SLEEP_TIMEOUT - (optional,millisecond), make timeout between API calls, default "alephiumhelper.DefaultSleepBetweenContractCalls" value AYIN_SWAP_CONTRACTS_LIMIT - (optional, int), limit to get swap contact addresses, default "alephiumhelper.DefaultSwapContractsLimit" value AYIN_TARGET_SWAP_CONTRACT - (optional, string), useful for debug, default = "" AYIN_DEBUG - (optional, bool), make stdout output with alephium client http call, default = false
func (*AyinAssetSource) Asset ¶ added in v1.4.504
func (s *AyinAssetSource) Asset() chan dia.Asset
func (*AyinAssetSource) Done ¶ added in v1.4.504
func (s *AyinAssetSource) Done() chan bool
type BalancerV2AssetSource ¶ added in v1.4.2
type BalancerV2AssetSource struct { RestClient *ethclient.Client // contains filtered or unexported fields }
func NewBalancerV2AssetSource ¶ added in v1.4.2
func NewBalancerV2AssetSource(exchange dia.Exchange) (bas *BalancerV2AssetSource)
func (*BalancerV2AssetSource) Asset ¶ added in v1.4.2
func (bas *BalancerV2AssetSource) Asset() chan dia.Asset
func (*BalancerV2AssetSource) Done ¶ added in v1.4.2
func (bas *BalancerV2AssetSource) Done() chan bool
type BifrostAssetSource ¶ added in v1.4.550
type BifrostAssetSource struct {
// contains filtered or unexported fields
}
BifrostAssetSource asset collector object - which serves assetCollector command
func NewBifrostAssetSource ¶ added in v1.4.550
func NewBifrostAssetSource(exchange dia.Exchange, relDB *models.RelDB) *BifrostAssetSource
NewBifrostAssetSource creates object to get bifrost assets ENV values:
BIFROST_ASSETS_SLEEP_TIMEOUT - (optional,millisecond), make timeout between API calls, default "bifrosthelper.DefaultSleepBetweenContractCalls" value BIFROST_SWAP_CONTRACTS_LIMIT - (optional, int), limit to get swap contact addresses, default "bifrosthelper.DefaultSwapContractsLimit" value BIFROST_TARGET_SWAP_CONTRACT - (optional, string), useful for debug, default = "" BIFROST_DEBUG - (optional, bool), make stdout output with bifrost client http call, default = false
func (*BifrostAssetSource) Asset ¶ added in v1.4.550
func (s *BifrostAssetSource) Asset() chan dia.Asset
func (*BifrostAssetSource) Done ¶ added in v1.4.550
func (s *BifrostAssetSource) Done() chan bool
type BitflowAssetSource ¶ added in v1.4.543
type BitflowAssetSource struct {
// contains filtered or unexported fields
}
BitflowAssetSource asset collector object - which serves assetCollector command
func NewBitflowAssetSource ¶ added in v1.4.543
func NewBitflowAssetSource(exchange dia.Exchange, relDB *models.RelDB) *BitflowAssetSource
NewBitflowAssetSource creates object to fetch bitflow assets ENV values:
BITFLOW_API_HOST - (required, string), bitflow private REST API host, required to fetch assets BITFLOW_API_KEY - (required, string), bitflow private API key, required to acess the REST API BIFROST_DEBUG - (optional, bool), make stdout output with bitflow client http call, default = false
func (*BitflowAssetSource) Asset ¶ added in v1.4.543
func (s *BitflowAssetSource) Asset() chan dia.Asset
func (*BitflowAssetSource) Done ¶ added in v1.4.543
func (s *BitflowAssetSource) Done() chan bool
type CamelotV3AssetSource ¶ added in v1.4.401
type CamelotV3AssetSource struct { RestClient *ethclient.Client WsClient *ethclient.Client // contains filtered or unexported fields }
func NewCamelotV3AssetSource ¶ added in v1.4.401
func NewCamelotV3AssetSource(exchange dia.Exchange, relDB *models.RelDB) *CamelotV3AssetSource
NewCamelotV3AssetSource returns a new CamelotV3AssetSource
func (*CamelotV3AssetSource) Asset ¶ added in v1.4.401
func (uas *CamelotV3AssetSource) Asset() chan dia.Asset
func (*CamelotV3AssetSource) Done ¶ added in v1.4.401
func (uas *CamelotV3AssetSource) Done() chan bool
func (*CamelotV3AssetSource) GetAssetFromAddress ¶ added in v1.4.401
type CurvefiAssetSource ¶ added in v1.4.2
type CurvefiAssetSource struct { RestClient *ethclient.Client // contains filtered or unexported fields }
CurvefiAssetSource is a curve finance scraper on a specific blockchain.
func NewCurvefiAssetSource ¶ added in v1.4.2
func NewCurvefiAssetSource(exchange dia.Exchange) *CurvefiAssetSource
func (*CurvefiAssetSource) Asset ¶ added in v1.4.2
func (cas *CurvefiAssetSource) Asset() chan dia.Asset
func (*CurvefiAssetSource) Done ¶ added in v1.4.2
func (cas *CurvefiAssetSource) Done() chan bool
type GRPCClient ¶ added in v1.4.242
type GRPCClient struct {
// contains filtered or unexported fields
}
func NewGRPCClient ¶ added in v1.4.242
func NewGRPCClient(conf *scrapers.OsmosisConfig) (*GRPCClient, error)
type HydrationAssetSource ¶ added in v1.4.556
type HydrationAssetSource struct {
// contains filtered or unexported fields
}
HydrationAssetSource asset collector object - which serves assetCollector command
func NewHydrationAssetSource ¶ added in v1.4.556
func NewHydrationAssetSource(exchange dia.Exchange, relDB *models.RelDB) *HydrationAssetSource
NewHydrationAssetSource creates object to get hydration assets ENV values:
HYDRATION_ASSETS_SLEEP_TIMEOUT - (optional,millisecond), make timeout between API calls, default "hydrationhelper.DefaultSleepBetweenContractCalls" value HYDRATION_SWAP_CONTRACTS_LIMIT - (optional, int), limit to get swap contact addresses, default "hydrationhelper.DefaultSwapContractsLimit" value HYDRATION_TARGET_SWAP_CONTRACT - (optional, string), useful for debug, default = "" HYDRATION_DEBUG - (optional, bool), make stdout output with hydration client http call, default = false
func (*HydrationAssetSource) Asset ¶ added in v1.4.556
func (s *HydrationAssetSource) Asset() chan dia.Asset
func (*HydrationAssetSource) Done ¶ added in v1.4.556
func (s *HydrationAssetSource) Done() chan bool
type OrcaAssetSource ¶ added in v1.4.88
The scraper object for Orca.
func NewOrcaScraper ¶ added in v1.4.88
func NewOrcaScraper(exchange dia.Exchange) *OrcaAssetSource
Returns a new Orca asset scraper.
func (*OrcaAssetSource) Asset ¶ added in v1.4.88
func (pas *OrcaAssetSource) Asset() chan dia.Asset
func (*OrcaAssetSource) Done ¶ added in v1.4.88
func (pas *OrcaAssetSource) Done() chan bool
type OsmosisAsset ¶ added in v1.4.242
type OsmosisAsset struct { Base string `json:"Base"` // base_denom Name string `json:"Name"` // name of denom Display string `json:"Display"` // human name Symbol string `json:"Symbol"` // symbol of the denom Decimals uint8 `json:"Decimals"` // to be loaded from Denom_units Denom_units *[]banktypes.DenomUnit `json:"Denom_units"` }
type OsmosisAssetResponse ¶ added in v1.4.242
type OsmosisAssetResponse struct {
Assets *[]OsmosisAsset `json:"Assets"`
}
type OsmosisAssetSource ¶ added in v1.4.242
type OsmosisAssetSource struct { GRPCClient *GRPCClient // contains filtered or unexported fields }
The scraper object for Osmosis.
func NewOsmosisScraper ¶ added in v1.4.242
func NewOsmosisScraper(exchange dia.Exchange) *OsmosisAssetSource
Returns a new Osmosis asset scraper.
func (*OsmosisAssetSource) Asset ¶ added in v1.4.242
func (oas *OsmosisAssetSource) Asset() chan dia.Asset
func (*OsmosisAssetSource) Done ¶ added in v1.4.242
func (oas *OsmosisAssetSource) Done() chan bool
type PlatypusAssetSource ¶ added in v1.4.2
type PlatypusAssetSource struct { RestClient *ethclient.Client // contains filtered or unexported fields }
The scraper object for Platypus Finance.
func NewPlatypusScraper ¶ added in v1.4.2
func NewPlatypusScraper(exchange dia.Exchange) *PlatypusAssetSource
Returns a new platypus asset scraper.
func (*PlatypusAssetSource) Asset ¶ added in v1.4.2
func (pas *PlatypusAssetSource) Asset() chan dia.Asset
func (*PlatypusAssetSource) Done ¶ added in v1.4.2
func (pas *PlatypusAssetSource) Done() chan bool
type PlatypusCoin ¶ added in v1.4.2
type SerumAssetSource ¶
type SerumAssetSource struct {
// contains filtered or unexported fields
}
func NewSerumAssetSource ¶
func NewSerumAssetSource(exchange dia.Exchange) *SerumAssetSource
func (*SerumAssetSource) Asset ¶
func (sas *SerumAssetSource) Asset() chan dia.Asset
func (*SerumAssetSource) Done ¶ added in v1.4.0
func (sas *SerumAssetSource) Done() chan bool
type TraderJoeAssetSource ¶ added in v1.4.357
type TraderJoeAssetSource struct { RestClient *ethclient.Client WsClient *ethclient.Client // contains filtered or unexported fields }
TraderJoeAssetSource manages the scraping of assets for the Trader Joe exchange.
func NewTraderJoeAssetSource ¶ added in v1.4.357
func NewTraderJoeAssetSource(exchange dia.Exchange, relDB *models.RelDB) *TraderJoeAssetSource
NewTraderJoeAssetSource initializes a Trader Joe asset sourcer, creating an instance of the NewTraderJoeAssetSource struct. It configures necessary parameters, initiates asset fetching, and returns the initialized scraper.
func (*TraderJoeAssetSource) Asset ¶ added in v1.4.357
func (tjas *TraderJoeAssetSource) Asset() chan dia.Asset
Asset returns a channel for receiving dia.Asset instances scraped by the Trader Joe asset source.
func (*TraderJoeAssetSource) Done ¶ added in v1.4.357
func (tjas *TraderJoeAssetSource) Done() chan bool
Done returns a channel for signaling the completion of Trader Joe asset scraping.
type UniswapAssetSource ¶
type UniswapAssetSource struct { RestClient *ethclient.Client // contains filtered or unexported fields }
func NewUniswapAssetSource ¶
func NewUniswapAssetSource(exchange dia.Exchange, relDB *models.RelDB) (uas *UniswapAssetSource)
func (*UniswapAssetSource) Asset ¶
func (uas *UniswapAssetSource) Asset() chan dia.Asset
func (*UniswapAssetSource) Done ¶ added in v1.4.0
func (uas *UniswapAssetSource) Done() chan bool
func (*UniswapAssetSource) GetDecimals ¶
func (uas *UniswapAssetSource) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
GetDecimals returns the decimals of the token with address @tokenAddress
func (*UniswapAssetSource) GetName ¶
func (uas *UniswapAssetSource) GetName(tokenAddress common.Address) (name string, err error)
func (*UniswapAssetSource) GetPairByAddress ¶
func (uas *UniswapAssetSource) GetPairByAddress(pairAddress common.Address) (pair UniswapPair, err error)
func (*UniswapAssetSource) GetPairByID ¶
func (uas *UniswapAssetSource) GetPairByID(num int64) (UniswapPair, error)
GetPairByID returns the UniswapPair with the integer id @num
type UniswapPair ¶
type UniswapV3AssetSource ¶ added in v1.4.2
type UniswapV3AssetSource struct { RestClient *ethclient.Client WsClient *ethclient.Client // contains filtered or unexported fields }
func NewUniswapV3AssetSource ¶ added in v1.4.2
func NewUniswapV3AssetSource(exchange dia.Exchange, relDB *models.RelDB) *UniswapV3AssetSource
NewUniswapV3AssetSource returns a new UniswapV3AssetSource
func (*UniswapV3AssetSource) Asset ¶ added in v1.4.2
func (uas *UniswapV3AssetSource) Asset() chan dia.Asset
func (*UniswapV3AssetSource) Done ¶ added in v1.4.2
func (uas *UniswapV3AssetSource) Done() chan bool
func (*UniswapV3AssetSource) GetAssetFromAddress ¶ added in v1.4.2
type VelarAssetSource ¶ added in v1.4.544
type VelarAssetSource struct {
// contains filtered or unexported fields
}
VelarAssetSource asset collector object - which serves assetCollector command
func NewVelarAssetSource ¶ added in v1.4.544
func NewVelarAssetSource(exchange dia.Exchange, relDB *models.RelDB) *VelarAssetSource
NewVelarAssetSource creates object to fetch velar assets ENV values:
VELAR_DEBUG - (optional, bool), make stdout output with velar client http call, default = false
func (*VelarAssetSource) Asset ¶ added in v1.4.544
func (s *VelarAssetSource) Asset() chan dia.Asset
func (*VelarAssetSource) Done ¶ added in v1.4.544
func (s *VelarAssetSource) Done() chan bool
type VelodromeAssetSource ¶ added in v1.4.325
type VelodromeAssetSource struct { RestClient *ethclient.Client // contains filtered or unexported fields }
func NewVelodromeAssetSource ¶ added in v1.4.325
func NewVelodromeAssetSource(exchange dia.Exchange, relDB *models.RelDB) (uas *VelodromeAssetSource)
func (*VelodromeAssetSource) Asset ¶ added in v1.4.325
func (uas *VelodromeAssetSource) Asset() chan dia.Asset
func (*VelodromeAssetSource) Done ¶ added in v1.4.325
func (uas *VelodromeAssetSource) Done() chan bool
func (*VelodromeAssetSource) GetDecimals ¶ added in v1.4.325
func (uas *VelodromeAssetSource) GetDecimals(tokenAddress common.Address) (decimals uint8, err error)
GetDecimals returns the decimals of the token with address @tokenAddress
func (*VelodromeAssetSource) GetName ¶ added in v1.4.325
func (uas *VelodromeAssetSource) GetName(tokenAddress common.Address) (name string, err error)
func (*VelodromeAssetSource) GetPairByAddress ¶ added in v1.4.325
func (uas *VelodromeAssetSource) GetPairByAddress(pairAddress common.Address) (pair VelodromePair, err error)
func (*VelodromeAssetSource) GetPairByID ¶ added in v1.4.325
func (uas *VelodromeAssetSource) GetPairByID(num int64) (VelodromePair, error)
GetPairByID returns the VelodromePair with the integer id @num