// GasPrice makes an RPC call to get the current gasPrice.
// To get gasPrice execute in a terminal:
//  curl -X POST --data '{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":1}' http://localhost:8545
// There are gasPrice providers for mainNet, for instance:
//  curl -X POST https://www.ethgasstation.info/json/ethgasAPI.json
GasPrice makes an RPC call to get the current gasPrice.
// GasPrice makes an RPC call to get the current gasPrice . // To get gasPrice execute in a terminal : // curl - X POST -- data ' { " jsonrpc " : " 2 . 0 " " method " : " eth_gasPrice " " params " : [] " id " : 1 } ' http : // localhost : 8545 // There are gasPrice providers for mainNet for instance : // curl - X POST https : // www . ethgasstation . info / json / ethgasAPI . json
func (c *EthCli) GasPrice() (price uint64, err error) {
	var response interface{}
	if err = c.Call("eth_gasPrice", []interface{}{}, &response); err != nil {
		return 0, err
	}
	return strconv.ParseUint(response.(string), 0, 64)
}
func ( c * EthCli ) GasPrice ( ) ( price uint64 , err error ) { var response interface { } if err = c . Call ( " " , [ ] interface { } { } , & response ) ; err != nil { return 0 , err } return strconv . ParseUint ( response . ( string ) , 0 , 64 ) }
GasPrice makes an RPC call to get the current gasPrice.
GasPrice makes an RPC call to get the current gasPrice .