Releases: pasiphae00/go-gas
Releases · pasiphae00/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.SuggestGasPricefor a specific priority level - Use
gas.SuggestFastGasPriceto fetch the fast priority level (no arguments)
- Use
- Create a new
GasPriceSuggesterwhich maintains a cache of results for a user-defined duration- Use
gas.NewGasPriceSuggesterand 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 (
NewGasPriceSuggesterouter function) that allows user-defined max result age- Powered by
gasPriceManagerwhich maintains result cache, with max age - Thread safe inner function (of type
GasPriceSuggester) - Adds tests for
gasPriceManagerwhich emulate functionality ofNewGasPriceSuggester
- Powered by
- Use
float64type 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.