Documentation ¶
Index ¶
- Variables
- func GetGasBlockNative(url string) (fastestETH, fastETH, averageETH float64, err error)
- func GetGasEtherscan(url string) (fastestETH, fastETH, averageETH float64, err error)
- func GetGasNode(rpc string) (fastestETH, fastETH, averageETH float64, err error)
- func NewLog(serverName string) log15.Logger
- type Gas
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EvmGas = func(chainType string) *Gas { switch chainType { case tokSchema.OracleEthChainType: return NewGas(map[string]func(url string) (fastestETH float64, fastETH float64, averageETH float64, err error){ "https://api.etherscan.io/api?module=gastracker&action=gasoracle&apikey=MYDQVP2XTAE7DCPACT9NMZ9CQX558M2WWS": GetGasEtherscan, "https://api.blocknative.com/gasprices/blockprices": GetGasBlockNative, }) case tokSchema.OracleMoonChainType: return NewGas(map[string]func(url string) (fastestETH float64, fastETH float64, averageETH float64, err error){ "https://rpc.api.moonbeam.network": GetGasNode, }) case tokSchema.OracleCfxChainType: return NewGas(map[string]func(url string) (fastestETH float64, fastETH float64, averageETH float64, err error){ "https://evm.confluxrpc.com": GetGasNode, }) } return nil } )
Functions ¶
func GetGasBlockNative ¶
func GetGasEtherscan ¶
func GetGasNode ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.