Documentation ¶
Index ¶
- Variables
- func CreateHTTPClient(requestTimeout time.Duration, tlsVersion uint16) (*http.Client, error)
- func EtherToWei(eth *big.Float) *big.Int
- func EtherToWeiFloat(ether *big.Float) *big.Float
- func GetEtherscanAddressURL(address *common.Address) string
- func GetEtherscanTokenURL(address *common.Address) string
- func GetEtherscanTokenURLForAddress(address common.Address) string
- func GetEtherscanTxURL(txHash string) string
- func GetLinks(txHash common.Hash, contractAddress common.Address, tokenID int64) (string, string, string)
- func GetMetricValue(col prometheus.Collector) float64
- func GetOpenseaCollectionLink(slug string) string
- func GetOpenseaItemLink(contractAddress string, tokenID int64) string
- func PrepareURL(url string) string
- func WalletShortAddress(address common.Address) string
- func WeiToEther(wei *big.Int) *big.Float
- func WeiToGwei(wei *big.Int) *big.Float
- type HTTPClient
- func (h *HTTPClient) Get(ctx context.Context, url string) (*http.Response, error)
- func (h *HTTPClient) GetWithHeader(ctx context.Context, url string, customHeader http.Header) (*http.Response, error)
- func (h *HTTPClient) GetWithTLS12(ctx context.Context, url string) (*http.Response, error)
- func (h *HTTPClient) GetWithTLS12AndHeader(ctx context.Context, url string, customHeader http.Header) (*http.Response, error)
- func (h *HTTPClient) Head(ctx context.Context, url string) (*http.Response, error)
- func (h *HTTPClient) Post(ctx context.Context, url string, payload *strings.Reader) (*http.Response, error)
- func (h *HTTPClient) PostWithHeader(ctx context.Context, url string, customHeader http.Header, ...) (*http.Response, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var HTTP = &HTTPClient{}
Functions ¶
func CreateHTTPClient ¶ added in v0.4.0
func EtherToWei ¶ added in v0.4.0
EtherToWei converts an ether value to wei. (https://github.com/ethereum/go-ethereum/issues/21221#issuecomment-802092592)
func GetEtherscanAddressURL ¶ added in v0.11.0
func GetEtherscanTokenURL ¶ added in v0.4.0
func GetEtherscanTokenURLForAddress ¶ added in v0.11.1
func GetLinks ¶ added in v0.4.0
func GetLinks(txHash common.Hash, contractAddress common.Address, tokenID int64) (string, string, string)
GetLinks returns the links to etherscan, opensea and blur.
func GetMetricValue ¶ added in v0.11.0
func GetMetricValue(col prometheus.Collector) float64
GetMetricValue returns the value of a prometheus.Collector (https://stackoverflow.com/a/58875389/13180763)
func GetOpenseaCollectionLink ¶ added in v0.11.1
func GetOpenseaItemLink ¶ added in v0.11.1
opensea.io.
func PrepareURL ¶ added in v0.4.0
PrepareURL removes not allowed characters and replaces the ipfs:// scheme or "https://ipfs.io" with the configured ipfs gateway.
func WalletShortAddress ¶
Types ¶
type HTTPClient ¶
type HTTPClient struct{}
func (*HTTPClient) GetWithHeader ¶
func (*HTTPClient) GetWithTLS12 ¶
func (*HTTPClient) GetWithTLS12AndHeader ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.