Documentation
¶
Index ¶
- func Float64StringToUint256(s string, decimals int) (*uint256.Int, error)
- func Float64ToUint256(val float64, decimals int) *uint256.Int
- func GetWithContext(ctx context.Context, url string, reader ReadFn) error
- func GetWithContextAndHeader(ctx context.Context, url string, reader ReadFn, reqfn ReqFn) error
- type ReadFn
- type ReqFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float64StringToUint256 ¶
Float64StringToUint256 converts a float64 string to a uint256.
func Float64ToUint256 ¶
Float64ToBigInt converts a float64 to a uint256.
NOTE: MustFromBig will panic only if there is overflow when converting the big.Int to a uint256.Int. This should never happen since uint256 should be large enough to handle pricing data.
func GetWithContext ¶
GetWithContext provides logic for making an http get request, whose duration is bounded / controlled by a given context.
func GetWithContextAndHeader ¶
GetWithContextAndHeader provides logic for making an http get request, whose duration is bounded / controlled by a given context, and also updating fields in the header of the request
Types ¶
Click to show internal directories.
Click to hide internal directories.