Releases: hrharder/go-gas
Releases · hrharder/go-gas
v1.0.1
Release: [email protected]
This is a patch release to the go-gas
module (gas
package) with minor internal enhancements.
There are no changes to any exported types, functions, or constants.
Changes
- Improvements to internal data management (see #5)
- Code cleanup
v1.0.0
Overview
Package gas
provides two main ways to fetch a gas price from the ETH Gas Station API.
- Fetch the current recommended price for a given priority level with a new API call each time
- Use
gas.SuggestGasPrice
for a specific priority level - Use
gas.SuggestFastGasPrice
to fetch the fast priority level (no arguments)
- Use
- Create a new
GasPriceSuggester
which maintains a cache of results for a user-defined duration- Use
gas.NewGasPriceSuggester
and specify a max result age - Use the returned function to fetch new gas prices, or use the cache based on how old the results are
- Use
New in v1
- Adds a closure (
NewGasPriceSuggester
outer function) that allows user-defined max result age- Powered by
gasPriceManager
which maintains result cache, with max age - Thread safe inner function (of type
GasPriceSuggester
) - Adds tests for
gasPriceManager
which emulate functionality ofNewGasPriceSuggester
- Powered by
- Use
float64
type for ETH Gas Station API results rather thanjson.Number
- Allows simplification of private parsing method
Notes
- Thanks to @jalextowle for the initial implementation of
NewGasPriceSuggester
v1.0-beta.0
Overview
This is the first official beta release of the go-gas
module. Be sure to report any issues or bugs if you use this package so we can address them prior to a full v1.0
tag.