Documentation ¶
Index ¶
- Variables
- func CreateHTTPClient(requestTimeout time.Duration, tlsVersion uint16) (*http.Client, error)
- func CreateRequest(ctx context.Context, url string, method string, customHeader http.Header, ...) (*http.Request, error)
- func EtherToWei(ether *big.Float) *big.Float
- func GetERC1155TokenID(data []byte) *big.Int
- func GetERC1155TokenIDAndAmount(data []byte) (*big.Int, *big.Int)
- func GetERC1155TokenValue(data []byte) *big.Int
- func GetEtherscanTokenURL(txHash string) string
- func GetEtherscanTxURL(txHash string) string
- func GetLinks(txHash common.Hash, contractAddress common.Address, tokenID int64) (string, string, string)
- func ParseFirstTopic(topics []common.Hash) topic.Topic
- func ParseTopics(topics []common.Hash) (topic.Topic, common.Address, common.Address, *big.Int)
- 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) 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 ( ZeroAddress = common.HexToAddress("0x0000000000000000000000000000000000000000") ZeroHash = common.Hash{} GloombergVersion = "unknown" )
View Source
var HTTP = &HTTPClient{}
Functions ¶
func CreateHTTPClient ¶ added in v0.4.0
func CreateRequest ¶ added in v0.4.0
func CreateRequest(ctx context.Context, url string, method string, customHeader http.Header, payload *strings.Reader) (*http.Request, error)
func createGetRequest(url string, customHeader http.Header) (*http.Request, error) {.
func GetERC1155TokenID ¶ added in v0.4.0
TODO MERGE SOMEHOW WITH duplicated methods.
func GetERC1155TokenIDAndAmount ¶ added in v0.4.0
func GetERC1155TokenValue ¶ added in v0.4.0
func GetEtherscanTokenURL ¶ added in v0.4.0
etherscan.io.
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 ParseTopics ¶
func PrepareURL ¶ added in v0.4.0
PrepareURL 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 ¶
Click to show internal directories.
Click to hide internal directories.