diff --git a/internal/ticker/manifold.go b/internal/ticker/manifold.go index 03e76f8..d23af6c 100644 --- a/internal/ticker/manifold.go +++ b/internal/ticker/manifold.go @@ -153,7 +153,7 @@ func (s *ManifoldStats) ManifoldTicker(manifoldTicker *time.Ticker, queueOutput manifoldLine.WriteString(" " + tokenInfo) - openseaURL := utils.GetOpenseaLink(collection.ContractAddress.String(), event.Transfers[0].Token.ID.Int64()) + openseaURL := utils.GetOpenseaItemLink(collection.ContractAddress.String(), event.Transfers[0].Token.ID.Int64()) telegramMessage.WriteString(" · [" + collection.Name + "](" + openseaURL + ")") @@ -238,7 +238,7 @@ func (s *ManifoldStats) OneMinuteTicker(manifoldTicker *time.Ticker) { telegramMessage.WriteString(fmt.Sprintf("%6.3f", priceEtherPerItem)) telegramMessage.WriteString("Ξ") - openseaURL := utils.GetOpenseaLink(collection.ContractAddress.String(), event.Transfers[0].Token.ID.Int64()) + openseaURL := utils.GetOpenseaItemLink(collection.ContractAddress.String(), event.Transfers[0].Token.ID.Int64()) telegramMessage.WriteString(" · [" + collection.Name + "](" + openseaURL + ")") // telegramMessage.WriteString(" " + collection.Name) diff --git a/internal/utils/utils.go b/internal/utils/utils.go index 5af9c95..a3913cd 100644 --- a/internal/utils/utils.go +++ b/internal/utils/utils.go @@ -14,7 +14,7 @@ import ( // GetLinks returns the links to etherscan, opensea and blur. func GetLinks(txHash common.Hash, contractAddress common.Address, tokenID int64) (string, string, string) { etherscanURL := GetEtherscanTxURL(txHash.String()) - openseaURL := GetOpenseaLink(contractAddress.String(), tokenID) + openseaURL := GetOpenseaItemLink(contractAddress.String(), tokenID) blurURL := getBlurLink(contractAddress.String(), tokenID) return etherscanURL, openseaURL, blurURL @@ -39,10 +39,14 @@ func getBlurLink(contractAddress string, tokenID int64) string { } // opensea.io. -func GetOpenseaLink(contractAddress string, tokenID int64) string { +func GetOpenseaItemLink(contractAddress string, tokenID int64) string { return fmt.Sprintf("https://opensea.io/assets/ethereum/%s/%d", contractAddress, tokenID) } +func GetOpenseaCollectionLink(slug string) string { + return fmt.Sprintf("https://opensea.io/collection/%s", slug) +} + func WalletShortAddress(address common.Address) string { addressBytes := address.Bytes()