go
import (
"context"
"fmt"
"log"
"net/http"
"github.com/0xsequence/go-sequence/indexer"
)
func GetTokenSupplies(contractAddress string) {
seqIndexer := indexer.NewIndexer("https://polygon-indexer.sequence.app", "AQAAAAAAAF_JvPALhBthL7VGn6jV0YDqaFY")
metadataOptions := indexer.MetadataOptions{
VerifiedOnly: true, // Set to true if you want to fetch only verified contracts
UnverifiedOnly: false,
IncludeContracts: nil, // Provide a list of specific contracts to include, if any
}
_, _, tokenDetails, err := seqIndexer.GetTokenSupplies(context.Background(), contractAddress, nil, &metadataOptions, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println("token details:", tokenDetails)
}